Fixed yet another status code crash, this time when a stonecursed mob with high maxhp changes class to a Poring (see bugreport:621)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12097 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
25fbe01a75
commit
cbd15650f1
@ -6780,7 +6780,14 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
|
|||||||
}
|
}
|
||||||
if(--(sce->val3) > 0) {
|
if(--(sce->val3) > 0) {
|
||||||
if(++(sce->val4)%5 == 0 && status->hp > status->max_hp/4)
|
if(++(sce->val4)%5 == 0 && status->hp > status->max_hp/4)
|
||||||
|
{
|
||||||
|
bool flag;
|
||||||
|
map_freeblock_lock();
|
||||||
status_zap(bl, sce->val2, 0);
|
status_zap(bl, sce->val2, 0);
|
||||||
|
flag = !sc->data[type];
|
||||||
|
map_freeblock_unlock();
|
||||||
|
if (flag) return 0; //target died, SC cancelled already.
|
||||||
|
}
|
||||||
sc_timer_next(1000+tick,status_change_timer, bl->id, data );
|
sc_timer_next(1000+tick,status_change_timer, bl->id, data );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user