Issue information

Issue ID
#2913
Status
Invalid
Severity
None
Started
Hercules Elf Bot
Mar 28, 2009 20:28
Last Post
Hercules Elf Bot
Apr 18, 2012 15:40
Confirmation
N/A

Hercules Elf Bot - Mar 28, 2009 20:28

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2913

CODE
Index: trunk/src/map/skill.c
===================================================================
--- trunk/src/map/skill.c (revision 13631)
+++ trunk/src/map/skill.c (revision 13632)
@@ -10841,6 +10841,7 @@
    if (data <= 0 || data >= MAX_SKILL)
        return 0;
-    if (sd) sd->blockskill[data] = 0;
-
+    if (!sd) return 0;
+    if (sd->blockskill[data] != (0x1|(tid&0xFE))) return 0;
+    sd->blockskill[data] = 0;
    return 1;
}
@@ -10859,6 +10860,6 @@
    }

-    sd->blockskill[skillid] = 1;
-    return add_timer(gettick()+tick,skill_blockpc_end,sd->bl.id,skillid);
+    sd->blockskill[skillid] = 0x1|(0xFE&add_timer(gettick()+tick,skill_blockpc_end,sd->bl.id,skillid));
+    return 0;
}

This change is supposed to avoid the situation where you use Snap (which is supposed to activate a 2second asura delay), and shortly afterwards use Snap again, while the timer is still running.

I suggest reviewing this and finding a more systematic (and less crazy) solution. My first idea was to cancel the previous timer when starting the new timer, and then I noticed that the timer id isn't being stored anywhere.

Hercules Elf Bot - Dec 26, 2011 11:09

Originally posted by [b]Ind[/b]
not a bug report, please use the development forum for suggestions, thanks!