From b2ad735efc1798101018d4e0973d7bea681a1310 Mon Sep 17 00:00:00 2001 From: skotlex Date: Sat, 8 Apr 2006 06:48:16 +0000 Subject: - 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 --- src/map/pc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index a5cacfea8..5852edc08 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -415,7 +415,6 @@ int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int lo sd->state.auth = 0; sd->bl.type = BL_PC; sd->canlog_tick = gettick(); - unit_dataset(&sd->bl); sd->state.waitingdisconnect = 0; return 0; @@ -677,14 +676,12 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t //Set here because we need the inventory data for weapon sprite parsing. status_set_viewdata(&sd->bl, sd->status.class_); + status_change_init(&sd->bl); + unit_dataset(&sd->bl); + // pet sd->pet_hungry_timer = -1; - // ステ?タス異常の初期化 - for(i = 0; i < MAX_STATUSCHANGE; i++) { - sd->sc.data[i].timer=-1; - } - sd->sc.count=0; if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) && (pc_isGM(sd) >= get_atcommand_level(AtCommand_Hide))) sd->status.option &= (OPTION_MASK | OPTION_INVISIBLE); -- cgit v1.2.3-70-g09d2