summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-09 14:05:14 -0300
committershennetsind <ind@henn.et>2013-07-09 14:05:14 -0300
commitb2f4e8034ab59f6071dd3882edee9f5bd45bb147 (patch)
tree944e7c20209c9d30ed8ba7d757f6cf5d64f430c6 /src/map
parent629fbd735a2a09d865dda51f0d128fc90039ea5a (diff)
downloadhercules-b2f4e8034ab59f6071dd3882edee9f5bd45bb147.tar.gz
hercules-b2f4e8034ab59f6071dd3882edee9f5bd45bb147.tar.bz2
hercules-b2f4e8034ab59f6071dd3882edee9f5bd45bb147.tar.xz
hercules-b2f4e8034ab59f6071dd3882edee9f5bd45bb147.zip
For Bug #7496
Skill cooldown indexing fixed Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 5df3596da..78914869c 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -17047,18 +17047,18 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick,
if( i == MAX_SKILL_TREE ) {
ShowError("skill_blockpc_start: '%s' got over '%d' skill cooldowns, no room to save!\n",sd->status.name,MAX_SKILL_TREE);
} else {
- cd->entry[i] = ers_alloc(skill->cd_entry_ers,struct skill_cd_entry);
+ cd->entry[cd->cursor] = ers_alloc(skill->cd_entry_ers,struct skill_cd_entry);
- cd->entry[i]->duration = tick;
+ cd->entry[cd->cursor]->duration = tick;
#if PACKETVER >= 20120604
- cd->entry[i]->total = tick;
+ cd->entry[cd->cursor]->total = tick;
#endif
- cd->entry[i]->skidx = idx;
- cd->entry[i]->skill_id = skill_id;
- cd->entry[i]->started = iTimer->gettick();
+ cd->entry[cd->cursor]->skidx = idx;
+ cd->entry[cd->cursor]->skill_id = skill_id;
+ cd->entry[cd->cursor]->started = iTimer->gettick();
cd->cursor++;
- }
+ }
}
sd->blockskill[idx] = 0x1|(0xFE&iTimer->add_timer(iTimer->gettick()+tick,skill->blockpc_end,sd->bl.id,idx));