summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-09-25 21:26:54 +0200
committerHaru <haru@dotalux.com>2013-09-25 22:15:53 +0200
commitafcad494411995396b906f214d1c4ffcf485cc0a (patch)
treee70b21658276ddef885322b7c9b18935b6c0235e /src/map/pet.c
parent13afb7e0bf35bacc9c90c7dffe34120ddd2fd099 (diff)
downloadhercules-afcad494411995396b906f214d1c4ffcf485cc0a.tar.gz
hercules-afcad494411995396b906f214d1c4ffcf485cc0a.tar.bz2
hercules-afcad494411995396b906f214d1c4ffcf485cc0a.tar.xz
hercules-afcad494411995396b906f214d1c4ffcf485cc0a.zip
Renamed local variables that would conflict with a rename of iStatus to status
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index d064ddfe0..bb5982e7a 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1114,10 +1114,9 @@ int pet_recovery_timer(int tid, unsigned int tick, int id, intptr_t data)
return 0;
}
-int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
+int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd=iMap->id2sd(id);
- struct status_data *status;
+ struct status_data *st;
struct pet_data *pd;
unsigned int rate = 100;
@@ -1131,11 +1130,11 @@ int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data)
return 0;
}
- status = iStatus->get_status_data(&sd->bl);
+ st = iStatus->get_status_data(&sd->bl);
if(pc_isdead(sd) ||
- (rate = get_percentage(status->sp, status->max_sp)) > pd->s_skill->sp ||
- (rate = get_percentage(status->hp, status->max_hp)) > pd->s_skill->hp ||
+ (rate = get_percentage(st->sp, st->max_sp)) > pd->s_skill->sp ||
+ (rate = get_percentage(st->hp, st->max_hp)) > pd->s_skill->hp ||
(rate = (pd->ud.skilltimer != INVALID_TIMER)) //Another skill is in effect
) { //Wait (how long? 1 sec for every 10% of remaining)
pd->s_skill->timer=timer->add(timer->gettick()+(rate>10?rate:10)*100,pet->heal_timer,sd->bl.id,0);
@@ -1152,11 +1151,10 @@ int pet_heal_timer(int tid, unsigned int tick, int id, intptr_t data)
/*==========================================
* pet support skills [Skotlex]
*------------------------------------------*/
-int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data)
-{
+int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd=iMap->id2sd(id);
struct pet_data *pd;
- struct status_data *status;
+ struct status_data *st;
short rate = 100;
if(sd==NULL || sd->pd == NULL || sd->pd->s_skill == NULL)
return 1;
@@ -1168,7 +1166,7 @@ int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data)
return 0;
}
- status = iStatus->get_status_data(&sd->bl);
+ st = iStatus->get_status_data(&sd->bl);
if (DIFF_TICK(pd->ud.canact_tick, tick) > 0)
{ //Wait until the pet can act again.
@@ -1177,8 +1175,8 @@ int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data)
}
if(pc_isdead(sd) ||
- (rate = get_percentage(status->sp, status->max_sp)) > pd->s_skill->sp ||
- (rate = get_percentage(status->hp, status->max_hp)) > pd->s_skill->hp ||
+ (rate = get_percentage(st->sp, st->max_sp)) > pd->s_skill->sp ||
+ (rate = get_percentage(st->hp, st->max_hp)) > pd->s_skill->hp ||
(rate = (pd->ud.skilltimer != INVALID_TIMER)) //Another skill is in effect
) { //Wait (how long? 1 sec for every 10% of remaining)
pd->s_skill->timer=timer->add(tick+(rate>10?rate:10)*100,pet->skill_support_timer,sd->bl.id,0);