summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-02 20:56:10 -0200
committershennetsind <ind@henn.et>2013-11-02 20:56:24 -0200
commit34b5ad00e2b7a3589040946b7825ef246bfafe99 (patch)
tree8e739a4927d9c499741f3df31d79c47915dd7116
parentb0e2af0ce9aa63ebc0ffc2735f805505bccd61e8 (diff)
downloadhercules-34b5ad00e2b7a3589040946b7825ef246bfafe99.tar.gz
hercules-34b5ad00e2b7a3589040946b7825ef246bfafe99.tar.bz2
hercules-34b5ad00e2b7a3589040946b7825ef246bfafe99.tar.xz
hercules-34b5ad00e2b7a3589040946b7825ef246bfafe99.zip
Fixed Bug #7621
Magicmushroom poison now properly cancels skills being cast upon activating one of its own, also modified unit_skillcastcancel's error message upon timer deletion failure so that it becomes easier to debug in the future. http://hercules.ws/board/tracker/issue-7621-erro-map-server-waraitake/ Thanks to Beret Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--src/map/status.c20
-rw-r--r--src/map/unit.c2
2 files changed, 11 insertions, 11 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 0ff30595d..c06de4dfe 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -10379,7 +10379,7 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
if (sd && !pc_issit(sd)) { //can't cast if sit
int mushroom_skill_id = 0, i;
unit->stop_attack(bl);
- unit->skillcastcancel(bl,1);
+ unit->skillcastcancel(bl,0);
do {
i = rnd() % MAX_SKILL_MAGICMUSHROOM_DB;
mushroom_skill_id = skill->magicmushroom_db[i].skill_id;
@@ -10387,15 +10387,15 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
while( mushroom_skill_id == 0 );
switch( skill->get_casttype(mushroom_skill_id) ) { // Magic Mushroom skills are buffs or area damage
- case CAST_GROUND:
- skill->castend_pos2(bl,bl->x,bl->y,mushroom_skill_id,1,tick,0);
- break;
- case CAST_NODAMAGE:
- skill->castend_nodamage_id(bl,bl,mushroom_skill_id,1,tick,0);
- break;
- case CAST_DAMAGE:
- skill->castend_damage_id(bl,bl,mushroom_skill_id,1,tick,0);
- break;
+ case CAST_GROUND:
+ skill->castend_pos2(bl,bl->x,bl->y,mushroom_skill_id,1,tick,0);
+ break;
+ case CAST_NODAMAGE:
+ skill->castend_nodamage_id(bl,bl,mushroom_skill_id,1,tick,0);
+ break;
+ case CAST_DAMAGE:
+ skill->castend_damage_id(bl,bl,mushroom_skill_id,1,tick,0);
+ break;
}
}
diff --git a/src/map/unit.c b/src/map/unit.c
index 08e97cfee..c7ba2f6f9 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1966,7 +1966,7 @@ int unit_skillcastcancel(struct block_list *bl,int type)
else
ret = timer->delete( ud->skilltimer, skill->castend_id );
if( ret < 0 )
- ShowError("delete timer error : skill_id : %d\n",ret);
+ ShowError("delete timer error %d : skill %d (%s)\n",ret,skill_id,skill->get_name(skill_id));
ud->skilltimer = INVALID_TIMER;