diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-01-14 22:04:20 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-01-14 22:04:20 +0000 |
commit | 178e1269471a35507a1965fdb1548f052312a6a3 (patch) | |
tree | 1920d8230cd6a54bf04fb96d49cb3d70143139ce /src/map/pc.c | |
parent | 457cff865b0aa35bef85d8440ddf67c95158aa8b (diff) | |
download | hercules-178e1269471a35507a1965fdb1548f052312a6a3.tar.gz hercules-178e1269471a35507a1965fdb1548f052312a6a3.tar.bz2 hercules-178e1269471a35507a1965fdb1548f052312a6a3.tar.xz hercules-178e1269471a35507a1965fdb1548f052312a6a3.zip |
* Removed unconditional redundant status change checks before status_change_end calls (follow up to r12890).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14671 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 1ce5f0f3b..f745c2f0a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4101,18 +4101,12 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y { // Cancel some map related stuff. if (sd->sc.data[SC_JAILED]) return 1; //You may not get out! - if (sd->sc.data[SC_BOSSMAPINFO]) - status_change_end(&sd->bl, SC_BOSSMAPINFO, INVALID_TIMER); - if (sd->sc.data[SC_WARM]) - status_change_end(&sd->bl, SC_WARM, INVALID_TIMER); - if (sd->sc.data[SC_SUN_COMFORT]) - status_change_end(&sd->bl, SC_SUN_COMFORT, INVALID_TIMER); - if (sd->sc.data[SC_MOON_COMFORT]) - status_change_end(&sd->bl, SC_MOON_COMFORT, INVALID_TIMER); - if (sd->sc.data[SC_STAR_COMFORT]) - status_change_end(&sd->bl, SC_STAR_COMFORT, INVALID_TIMER); - if (sd->sc.data[SC_MIRACLE]) - status_change_end(&sd->bl, SC_MIRACLE, INVALID_TIMER); + status_change_end(&sd->bl, SC_BOSSMAPINFO, INVALID_TIMER); + status_change_end(&sd->bl, SC_WARM, INVALID_TIMER); + status_change_end(&sd->bl, SC_SUN_COMFORT, INVALID_TIMER); + status_change_end(&sd->bl, SC_MOON_COMFORT, INVALID_TIMER); + status_change_end(&sd->bl, SC_STAR_COMFORT, INVALID_TIMER); + status_change_end(&sd->bl, SC_MIRACLE, INVALID_TIMER); if (sd->sc.data[SC_KNOWLEDGE]) { struct status_change_entry *sce = sd->sc.data[SC_KNOWLEDGE]; if (sce->timer != INVALID_TIMER) @@ -7241,8 +7235,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) sd->status.weapon = sd->weapontype2; pc_calcweapontype(sd); clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); - if(sd->sc.data[SC_DANCING]) //When unequipping, stop dancing. [Skotlex] - status_change_end(&sd->bl, SC_DANCING, INVALID_TIMER); + status_change_end(&sd->bl, SC_DANCING, INVALID_TIMER); //When unequipping, stop dancing. [Skotlex] } if(sd->status.inventory[n].equip & EQP_HAND_L) { sd->status.shield = sd->weapontype2 = 0; @@ -7272,10 +7265,8 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) if(sd->status.inventory[n].equip & EQP_ARMOR) { // On Armor Change... - if( sd->sc.data[SC_BENEDICTIO] ) - status_change_end(&sd->bl, SC_BENEDICTIO, INVALID_TIMER); - if( sd->sc.data[SC_ARMOR_RESIST] ) - status_change_end(&sd->bl, SC_ARMOR_RESIST, INVALID_TIMER); + status_change_end(&sd->bl, SC_BENEDICTIO, INVALID_TIMER); + status_change_end(&sd->bl, SC_ARMOR_RESIST, INVALID_TIMER); } if( sd->state.autobonus&sd->status.inventory[n].equip ) @@ -7735,8 +7726,7 @@ int map_night_timer(int tid, unsigned int tick, int id, intptr data) void pc_setstand(struct map_session_data *sd){ nullpo_retv(sd); - if(sd->sc.data[SC_TENSIONRELAX]) - status_change_end(&sd->bl, SC_TENSIONRELAX, INVALID_TIMER); + status_change_end(&sd->bl, SC_TENSIONRELAX, INVALID_TIMER); //Reset sitting tick. sd->ssregen.tick.hp = sd->ssregen.tick.sp = 0; |