summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-22 23:52:58 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-22 23:52:58 +0000
commit2b2dbf43f11aecf778ff118dd1da1af9726f36e6 (patch)
tree890231641c122da8ef8664471be4a008041c6349 /src/map/map.c
parent78dcaf513236ab7736a84deff5820b71cf6a76fb (diff)
downloadhercules-2b2dbf43f11aecf778ff118dd1da1af9726f36e6.tar.gz
hercules-2b2dbf43f11aecf778ff118dd1da1af9726f36e6.tar.bz2
hercules-2b2dbf43f11aecf778ff118dd1da1af9726f36e6.tar.xz
hercules-2b2dbf43f11aecf778ff118dd1da1af9726f36e6.zip
- Changed the status_change structure to use dynamic rather than static memory to hold the individual status changes, this should have a noticeable impact on the server's memory consumption.
- Had to add a few 'ugly' flags to status_change since now you can't track SC related information while said SC is not active (happens only for Storm Gust, Joint Beat and Magic Power). - Since I am unable to fully test, watch out for any bugs~ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11786 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 5cff144b9..d113e8a6d 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -454,17 +454,17 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
skill_unit_move(bl,tick,2);
sc = status_get_sc(bl);
if (sc && sc->count) {
- if (sc->data[SC_CLOSECONFINE].timer != -1)
+ if (sc->data[SC_CLOSECONFINE])
status_change_end(bl, SC_CLOSECONFINE, -1);
- if (sc->data[SC_CLOSECONFINE2].timer != -1)
+ if (sc->data[SC_CLOSECONFINE2])
status_change_end(bl, SC_CLOSECONFINE2, -1);
-// if (sc->data[SC_BLADESTOP].timer != -1) //Won't stop when you are knocked away, go figure...
+// if (sc->data[SC_BLADESTOP]) //Won't stop when you are knocked away, go figure...
// status_change_end(bl, SC_BLADESTOP, -1);
- if (sc->data[SC_BASILICA].timer != -1)
+ if (sc->data[SC_BASILICA])
status_change_end(bl, SC_BASILICA, -1);
- if (sc->data[SC_TATAMIGAESHI].timer != -1)
+ if (sc->data[SC_TATAMIGAESHI])
status_change_end(bl, SC_TATAMIGAESHI, -1);
- if (sc->data[SC_MAGICROD].timer != -1)
+ if (sc->data[SC_MAGICROD])
status_change_end(bl, SC_MAGICROD, -1);
}
} else
@@ -484,12 +484,12 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
skill_unit_move(bl,tick,3);
if (sc) {
if (sc->count) {
- if (sc->data[SC_CLOAKING].timer != -1)
- skill_check_cloaking(bl, sc);
- if (sc->data[SC_DANCING].timer != -1)
- skill_unit_move_unit_group((struct skill_unit_group *)sc->data[SC_DANCING].val2, bl->m, x1-x0, y1-y0);
- if (sc->data[SC_WARM].timer != -1)
- skill_unit_move_unit_group((struct skill_unit_group *)sc->data[SC_WARM].val4, bl->m, x1-x0, y1-y0);
+ if (sc->data[SC_CLOAKING])
+ skill_check_cloaking(bl, sc->data[SC_CLOAKING]);
+ if (sc->data[SC_DANCING])
+ skill_unit_move_unit_group((struct skill_unit_group *)sc->data[SC_DANCING]->val2, bl->m, x1-x0, y1-y0);
+ if (sc->data[SC_WARM])
+ skill_unit_move_unit_group((struct skill_unit_group *)sc->data[SC_WARM]->val4, bl->m, x1-x0, y1-y0);
}
}
} else
@@ -3073,6 +3073,7 @@ void do_final(void)
do_final_guild();
do_final_party();
do_final_pc();
+ do_final_status();
do_final_pet();
do_final_mob();
do_final_msg();