diff options
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 58 |
1 files changed, 16 insertions, 42 deletions
diff --git a/src/map/map.c b/src/map/map.c index 0dab56d21..510f36109 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -358,10 +358,10 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) sc = status_get_sc(bl); skill->unit_move(bl,tick,2); - status_change_end(bl, SC_CLOSECONFINE, INVALID_TIMER); - status_change_end(bl, SC_CLOSECONFINE2, INVALID_TIMER); + status_change_end(bl, SC_RG_CCONFINE_M, INVALID_TIMER); + status_change_end(bl, SC_RG_CCONFINE_S, INVALID_TIMER); // status_change_end(bl, SC_BLADESTOP, INVALID_TIMER); //Won't stop when you are knocked away, go figure... - status_change_end(bl, SC_TATAMIGAESHI, INVALID_TIMER); + status_change_end(bl, SC_NJ_TATAMIGAESHI, INVALID_TIMER); status_change_end(bl, SC_MAGICROD, INVALID_TIMER); if (sc->data[SC_PROPERTYWALK] && sc->data[SC_PROPERTYWALK]->val3 >= skill->get_maxcount(sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2) ) @@ -1667,45 +1667,19 @@ int map_quit(struct map_session_data *sd) { //(changing map-servers invokes unit_free but bypasses iMap->quit) if( sd->sc.count ) { //Status that are not saved... - status_change_end(&sd->bl, SC_BOSSMAPINFO, INVALID_TIMER); - status_change_end(&sd->bl, SC_AUTOTRADE, INVALID_TIMER); - status_change_end(&sd->bl, SC_SPURT, INVALID_TIMER); - status_change_end(&sd->bl, SC_BERSERK, INVALID_TIMER); - status_change_end(&sd->bl, SC__BLOODYLUST, INVALID_TIMER); - status_change_end(&sd->bl, SC_TRICKDEAD, INVALID_TIMER); - status_change_end(&sd->bl, SC_LEADERSHIP, INVALID_TIMER); - status_change_end(&sd->bl, SC_GLORYWOUNDS, INVALID_TIMER); - status_change_end(&sd->bl, SC_SOULCOLD, INVALID_TIMER); - status_change_end(&sd->bl, SC_HAWKEYES, INVALID_TIMER); - if(sd->sc.data[SC_ENDURE] && sd->sc.data[SC_ENDURE]->val4) - status_change_end(&sd->bl, SC_ENDURE, INVALID_TIMER); //No need to save infinite endure. - status_change_end(&sd->bl, SC_WEIGHT50, INVALID_TIMER); - status_change_end(&sd->bl, SC_WEIGHT90, INVALID_TIMER); - status_change_end(&sd->bl, SC_SATURDAYNIGHTFEVER, INVALID_TIMER); - status_change_end(&sd->bl, SC_KYOUGAKU, INVALID_TIMER); - if (battle_config.debuff_on_logout&1) { - status_change_end(&sd->bl, SC_ORCISH, INVALID_TIMER); - status_change_end(&sd->bl, SC_STRIPWEAPON, INVALID_TIMER); - status_change_end(&sd->bl, SC_STRIPARMOR, INVALID_TIMER); - status_change_end(&sd->bl, SC_STRIPSHIELD, INVALID_TIMER); - status_change_end(&sd->bl, SC_STRIPHELM, INVALID_TIMER); - status_change_end(&sd->bl, SC_EXTREMITYFIST, INVALID_TIMER); - status_change_end(&sd->bl, SC_EXPLOSIONSPIRITS, INVALID_TIMER); - if(sd->sc.data[SC_REGENERATION] && sd->sc.data[SC_REGENERATION]->val4) - status_change_end(&sd->bl, SC_REGENERATION, INVALID_TIMER); - //TO-DO Probably there are way more NPC_type negative status that are removed - status_change_end(&sd->bl, SC_CHANGEUNDEAD, INVALID_TIMER); - // Both these statuses are removed on logout. [L0ne_W0lf] - status_change_end(&sd->bl, SC_SLOWCAST, INVALID_TIMER); - status_change_end(&sd->bl, SC_CRITICALWOUND, INVALID_TIMER); - } - if (battle_config.debuff_on_logout&2) { - status_change_end(&sd->bl, SC_MAXIMIZEPOWER, INVALID_TIMER); - status_change_end(&sd->bl, SC_MAXOVERTHRUST, INVALID_TIMER); - status_change_end(&sd->bl, SC_STEELBODY, INVALID_TIMER); - status_change_end(&sd->bl, SC_PRESERVE, INVALID_TIMER); - status_change_end(&sd->bl, SC_KAAHI, INVALID_TIMER); - status_change_end(&sd->bl, SC_SPIRIT, INVALID_TIMER); + for(i=0; i < SC_MAX; i++){ + if ( status_get_sc_type(i)&SC_NO_SAVE ){ + if ( !sd->sc.data[i] ) + continue; + switch( i ){ + case SC_ENDURE: + case SC_GDSKILL_REGENERATION: + if( !sd->sc.data[i]->val4 ) + break; + default: + status_change_end(&sd->bl, (sc_type)i, INVALID_TIMER); + } + } } } |