- Made the pc_deleteinvincibletimer function a define so it auto-checks for the timer value.

- Fixed a missing tab in the skill require info of TWILIGHT3


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9709 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2007-01-24 21:29:01 +00:00
parent 5e13f9d6a7
commit c82708aba9
4 changed files with 16 additions and 29 deletions

View File

@ -390,7 +390,7 @@
495,0,0,100,0,0,0,2,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //KN_ONEHAND##
496,0,0,200,0,0,0,99,0,0,none,0,7134,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_TWILIGHT1##
497,0,0,200,0,0,0,99,0,0,none,0,7134,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_TWILIGHT2##
498,0,0,200,0,0,0,99,0,0,none,0,7134,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0//AM_TWILIGHT3##
498,0,0,200,0,0,0,99,0,0,none,0,7134,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //AM_TWILIGHT3##
499,0,0,8,0,0,0,11,1,1,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //HT_POWER##
500,0,0,2,0,0,1,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GS_GLITTERING
501,0,0,10,0,0,0,99,0,0,none,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GS_FLING

View File

@ -8471,8 +8471,6 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) {
return;
pc_stop_attack(sd);
if (sd->invincible_timer != -1)
pc_delinvincibletimer(sd);
cmd = RFIFOW(fd,0);
@ -8892,9 +8890,8 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
return;
}
}
if (sd->invincible_timer != -1)
pc_delinvincibletimer(sd);
pc_delinvincibletimer(sd);
sd->idletime = last_tick;
unit_attack(&sd->bl, target_id, action_type != 0);
break;
@ -9313,7 +9310,6 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) {
if (clif_trading(sd))
return;
if (sd->invincible_timer != -1)
pc_delinvincibletimer(sd);
//Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex]
@ -9789,7 +9785,6 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) {
if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
return;
if (sd->invincible_timer != -1)
pc_delinvincibletimer(sd);
if(target_id<0 && -target_id == sd->bl.id) // for disguises [Valaris]
@ -9889,7 +9884,6 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, int skilll
if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
return;
if (sd->invincible_timer != -1)
pc_delinvincibletimer(sd);
if (sd->skillitem == skillnum) {
if (skilllv != sd->skillitemlv)
@ -9953,7 +9947,6 @@ void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
return;
if(sd->invincible_timer != -1)
pc_delinvincibletimer(sd);
skill_castend_map(sd,RFIFOW(fd,2),(char*)RFIFOP(fd,4));

View File

@ -131,15 +131,10 @@ int pc_setinvincibletimer(struct map_session_data *sd,int val) {
return 0;
}
int pc_delinvincibletimer(struct map_session_data *sd) {
nullpo_retr(0, sd);
if(sd->invincible_timer != INVALID_TIMER) {
void pc_delinvincibletimer_sub(struct map_session_data *sd) {
delete_timer(sd->invincible_timer,pc_invincible_timer);
sd->invincible_timer = INVALID_TIMER;
skill_unit_move(&sd->bl,gettick(),1);
}
return 0;
}
static int pc_spiritball_timer(int tid,unsigned int tick,int id,int data) {
@ -606,6 +601,8 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
sd->followtimer = -1; // [MouseJstr]
sd->invincible_timer = -1;
sd->npc_timer_id = -1;
sd->pvp_timer = -1;
sd->canuseitem_tick = tick;
sd->cantalk_tick = tick;
@ -650,11 +647,6 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
for(i = 0; i < MAX_EVENTTIMER; i++)
sd->eventtimer[i] = -1;
sd->npc_timer_id = -1;
// Moved PVP timer initialisation before set_pos
sd->pvp_timer = -1;
for (i = 0; i < 3; i++)
sd->hate_mob[i] = -1;

View File

@ -279,7 +279,9 @@ extern struct skill_tree_entry skill_tree[MAX_PC_CLASS][MAX_SKILL_TREE];
int pc_read_gm_account(int fd);
int pc_setinvincibletimer(struct map_session_data *sd,int);
int pc_delinvincibletimer(struct map_session_data *sd);
void pc_delinvincibletimer_sub(struct map_session_data *sd);
#define pc_delinvincibletimer(sd) if ((sd)->invincible_timer != INVALID_TIMER) pc_delinvincibletimer_sub(sd)
int pc_addspiritball(struct map_session_data *sd,int,int);
int pc_delspiritball(struct map_session_data *sd,int,int);
void pc_addfame(struct map_session_data *sd,int count);