summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-04 16:17:38 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-04 16:17:38 +0000
commit4a6222bdc0279f78e44fc1dbce66d3eeeac88e17 (patch)
treef89643f3c7ab5ecf0d171084e4fd69136bfef929 /src/map
parent5c2e44cd3d10eb4b979d048d80914107485b6004 (diff)
downloadhercules-4a6222bdc0279f78e44fc1dbce66d3eeeac88e17.tar.gz
hercules-4a6222bdc0279f78e44fc1dbce66d3eeeac88e17.tar.bz2
hercules-4a6222bdc0279f78e44fc1dbce66d3eeeac88e17.tar.xz
hercules-4a6222bdc0279f78e44fc1dbce66d3eeeac88e17.zip
Follow up r16228 fixed logical problem with previous implementation (the see vals would break).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16231 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/status.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 5fd25eeea..1ceba9c95 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6002,6 +6002,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
struct status_data *status;
struct view_data *vd;
int opt_flag, calc_flag, undead_flag, val_flag = 0, tick_time = 0;
+ bool sc_isnew = true;
nullpo_ret(bl);
sc = status_get_sc(bl);
@@ -8274,11 +8275,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if((sce=sc->data[type])) {// reuse old sc
if( sce->timer != INVALID_TIMER )
delete_timer(sce->timer, status_change_timer);
+ sc_isnew = false;
} else {// new sc
++(sc->count);
sce = sc->data[type] = ers_alloc(sc_data_ers, struct status_change_entry);
- if ( StatusChangeStateTable[type] ) /* non-zero */
- status_calc_state(bl,sc,( enum scs_flag ) StatusChangeStateTable[type],true);
}
sce->val1 = val1;
sce->val2 = val2;
@@ -8292,6 +8292,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if (calc_flag)
status_calc_bl(bl,calc_flag);
+ if ( sc_isnew && StatusChangeStateTable[type] ) /* non-zero */
+ status_calc_state(bl,sc,( enum scs_flag ) StatusChangeStateTable[type],true);
+
+
if(sd && sd->pd)
pet_sc_check(sd, type); //Skotlex: Pet Status Effect Healing