diff options
author | shennetsind <ind@henn.et> | 2013-09-25 09:07:33 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-09-25 09:07:33 -0300 |
commit | 13afb7e0bf35bacc9c90c7dffe34120ddd2fd099 (patch) | |
tree | 180c739ac69aceab8ce4cc6151030539a32ac8c3 /src/map/pet.c | |
parent | 1114eb3da58b078258a824424fef687a1ccee90c (diff) | |
parent | 66979ef89363c03e3cc02d63feb5248836daff4e (diff) | |
download | hercules-13afb7e0bf35bacc9c90c7dffe34120ddd2fd099.tar.gz hercules-13afb7e0bf35bacc9c90c7dffe34120ddd2fd099.tar.bz2 hercules-13afb7e0bf35bacc9c90c7dffe34120ddd2fd099.tar.xz hercules-13afb7e0bf35bacc9c90c7dffe34120ddd2fd099.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Conflicts:
src/map/chrif.c
src/map/clif.c
src/map/homunculus.c
src/map/pet.c
src/map/script.c
src/map/skill.c
src/map/status.c
All clear.
Diffstat (limited to 'src/map/pet.c')
-rw-r--r-- | src/map/pet.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index b4714cc06..d064ddfe0 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -1049,13 +1049,13 @@ int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) struct map_session_data *sd=iMap->id2sd(id); struct pet_data *pd; int bonus; - int next = 0; - + int duration = 0; + if(sd == NULL || sd->pd==NULL || sd->pd->bonus == NULL) return 1; pd=sd->pd; - + if(pd->bonus->timer != tid) { ShowError("pet_skill_bonus_timer %d != %d\n",pd->bonus->timer,tid); pd->bonus->timer = INVALID_TIMER; @@ -1065,21 +1065,21 @@ int pet_skill_bonus_timer(int tid, unsigned int tick, int id, intptr_t data) // determine the time for the next timer if (pd->state.skillbonus && pd->bonus->delay > 0) { bonus = 0; - next = pd->bonus->delay*1000; // the duration until pet bonuses will be reactivated again + duration = pd->bonus->delay*1000; // the duration until pet bonuses will be reactivated again } else if (pd->pet.intimate) { bonus = 1; - next = pd->bonus->duration*1000; // the duration for pet bonuses to be in effect + duration = pd->bonus->duration*1000; // the duration for pet bonuses to be in effect } else { //Lost pet... pd->bonus->timer = INVALID_TIMER; return 0; } - + if (pd->state.skillbonus != bonus) { pd->state.skillbonus = bonus; status_calc_pc(sd, 0); } // wait for the next timer - pd->bonus->timer=timer->add(tick+next,pet->skill_bonus_timer,sd->bl.id,0); + pd->bonus->timer=timer->add(tick+duration,pet->skill_bonus_timer,sd->bl.id,0); return 0; } |