Issue information

Issue ID
#8383
Status
New
Severity
None
Started
dungpt8782
Oct 5, 2014 11:06
Last Post
Playtester
Oct 7, 2014 6:18
Confirmation
N/A

dungpt8782 - Oct 5, 2014 11:06

I just updated lastest Git Hercules and have this error:
[attachment=2013:error.jpg]

I never seen before.
Pls check and help me to fix it !!!

Playtester - Oct 7, 2014 6:18

These error would occur if you create a new skilltimer without making sure that the previous skill timer is deleted.

Maybe it's because of this:[code=auto:0] if(ud->skilltimer != INVALID_TIMER && skill_id != SA_CASTCANCEL && skill_id != SO_SPELLFIST) return 0;[/code]Usually, it is not possible to cast a skill when another skill is being cast. It is checked here.
However, with the two spells SA_CASTCANCEL and SO_SPELLFIST, the check is overridden. So if you cast these two skills, a new timer could be created even though the existing one wasn't cleared yet.[code=auto:0] if( casttime > 0 ) { ud->skilltimer = timer->add( tick+casttime, skill->castend_id, src->id, 0 ); if( sd && (pc->checkskill(sd,SA_FREECAST) > 0 || skill_id == LG_EXEEDBREAK) ) status_calc_bl(&sd->bl, SCB_SPEED); } else skill->castend_id(ud->skilltimer,tick,src->id,0);[/code]The problem however should only occur is one of the two skills has a cast time... and they don't have any cast time by default, so can't be it?


Could also happen if ud->skilltimer is set to INVALID_TIMER or another timer ID without deleting the actual timer... but can't actually find anything in the code that changing ud->skilltimer that isn't within a timer call anyway (which deletes timer after call).