summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-06-13 01:56:21 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-06-13 01:56:21 +0800
commit0395610469ffcd3b71c93ef90861f73e0ab8d16f (patch)
tree5755aa69c3fef1355bc164a3870a1b25ecce9cf6 /src/map/map.c
parent8821ff87533b037d5d4914db6dbdeacfa5fca4ce (diff)
downloadhercules-0395610469ffcd3b71c93ef90861f73e0ab8d16f.tar.gz
hercules-0395610469ffcd3b71c93ef90861f73e0ab8d16f.tar.bz2
hercules-0395610469ffcd3b71c93ef90861f73e0ab8d16f.tar.xz
hercules-0395610469ffcd3b71c93ef90861f73e0ab8d16f.zip
Hercules Renewal Phase : Renewal
Rename SC names to eagis standard. Implement SC Configuration.(see db/sc_config.txt) Skill updates and fixes. Some code optimization. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c58
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);
+ }
+ }
}
}