summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-08 06:48:16 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-08 06:48:16 +0000
commitb2ad735efc1798101018d4e0973d7bea681a1310 (patch)
tree63fde029e8036e572b1ae4610b0f7b176b61626d /src/map/status.c
parent1811436903c5383e8f3eeacdd88bd7eece6c7998 (diff)
downloadhercules-b2ad735efc1798101018d4e0973d7bea681a1310.tar.gz
hercules-b2ad735efc1798101018d4e0973d7bea681a1310.tar.bz2
hercules-b2ad735efc1798101018d4e0973d7bea681a1310.tar.xz
hercules-b2ad735efc1798101018d4e0973d7bea681a1310.zip
- Added function status_change_init to initialize all the sc timers. Added sc_data initialization to the npc structures who were missing them.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5953 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 9b0dbfc03..511cf9416 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3401,6 +3401,16 @@ struct status_change *status_get_sc(struct block_list *bl)
return NULL;
}
+void status_change_init(struct block_list *bl)
+{
+ struct status_change *sc = status_get_sc(bl);
+ int i;
+ nullpo_retv(sc);
+ memset(sc, 0, sizeof (struct status_change));
+ for (i=0; i< SC_MAX; i++)
+ sc->data[i].timer = -1;
+}
+
//Returns defense against the specified status change.
//Return range is 0 (no resist) to 10000 (inmunity)
int status_get_sc_def(struct block_list *bl, int type)