summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-02 17:20:47 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-02 17:20:47 +0000
commit48f6cbbd88f70c4ef4cb1ce711053009b666164a (patch)
tree3561f70558969a898d3f1e9362c0b569f7e8e618
parent36759ed2d2cdd3e319e86a571045229b234d9bac (diff)
downloadhercules-48f6cbbd88f70c4ef4cb1ce711053009b666164a.tar.gz
hercules-48f6cbbd88f70c4ef4cb1ce711053009b666164a.tar.bz2
hercules-48f6cbbd88f70c4ef4cb1ce711053009b666164a.tar.xz
hercules-48f6cbbd88f70c4ef4cb1ce711053009b666164a.zip
* Removed redundant check in food vs. cash food status change overriding code, partially suggested by xazax (related r14437 and r14510).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14547 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/status.c36
2 files changed, 13 insertions, 24 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 10c9938c5..4bf971e79 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,6 +1,7 @@
Date Added
2010/12/02
+ * Removed redundant check in food vs. cash food status change overriding code, partially suggested by xazax (related r14437 and r14510). [Ai4rei]
* Added an error message when a client connection exceeds the socket write buffer, so that it does not appear to be closed for no apparent reason (follow up to r13469). [Ai4rei]
* Random clif.c fixes and cleanups. [Ai4rei]
- Fixed clif_homskillup using sd before nullpo check (since r9297 and r9307).
diff --git a/src/map/status.c b/src/map/status.c
index eb0bef30a..35f72afea 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5093,52 +5093,40 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
status_change_end(bl,SC_INCREASEAGI,-1);
break;
case SC_STRFOOD:
- if (sc->data[SC_FOOD_STR_CASH] && sc->data[SC_FOOD_STR_CASH]->val1 <= val1)
- status_change_end(bl,SC_FOOD_STR_CASH,-1);
+ status_change_end(bl,SC_FOOD_STR_CASH,-1);
break;
case SC_AGIFOOD:
- if (sc->data[SC_FOOD_AGI_CASH] && sc->data[SC_FOOD_AGI_CASH]->val1 <= val1)
- status_change_end(bl,SC_FOOD_AGI_CASH,-1);
+ status_change_end(bl,SC_FOOD_AGI_CASH,-1);
break;
case SC_VITFOOD:
- if (sc->data[SC_FOOD_VIT_CASH] && sc->data[SC_FOOD_VIT_CASH]->val1 <= val1)
- status_change_end(bl,SC_FOOD_VIT_CASH,-1);
+ status_change_end(bl,SC_FOOD_VIT_CASH,-1);
break;
case SC_INTFOOD:
- if (sc->data[SC_FOOD_INT_CASH] && sc->data[SC_FOOD_INT_CASH]->val1 <= val1)
- status_change_end(bl,SC_FOOD_INT_CASH,-1);
+ status_change_end(bl,SC_FOOD_INT_CASH,-1);
break;
case SC_DEXFOOD:
- if (sc->data[SC_FOOD_DEX_CASH] && sc->data[SC_FOOD_DEX_CASH]->val1 <= val1)
- status_change_end(bl,SC_FOOD_DEX_CASH,-1);
+ status_change_end(bl,SC_FOOD_DEX_CASH,-1);
break;
case SC_LUKFOOD:
- if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 <= val1)
- status_change_end(bl,SC_FOOD_LUK_CASH,-1);
+ status_change_end(bl,SC_FOOD_LUK_CASH,-1);
break;
case SC_FOOD_STR_CASH:
- if (sc->data[SC_STRFOOD] && sc->data[SC_STRFOOD]->val1 <= val1)
- status_change_end(bl,SC_STRFOOD,-1);
+ status_change_end(bl,SC_STRFOOD,-1);
break;
case SC_FOOD_AGI_CASH:
- if (sc->data[SC_AGIFOOD] && sc->data[SC_AGIFOOD]->val1 <= val1)
- status_change_end(bl,SC_AGIFOOD,-1);
+ status_change_end(bl,SC_AGIFOOD,-1);
break;
case SC_FOOD_VIT_CASH:
- if (sc->data[SC_VITFOOD] && sc->data[SC_VITFOOD]->val1 <= val1)
- status_change_end(bl,SC_VITFOOD,-1);
+ status_change_end(bl,SC_VITFOOD,-1);
break;
case SC_FOOD_INT_CASH:
- if (sc->data[SC_INTFOOD] && sc->data[SC_INTFOOD]->val1 <= val1)
- status_change_end(bl,SC_INTFOOD,-1);
+ status_change_end(bl,SC_INTFOOD,-1);
break;
case SC_FOOD_DEX_CASH:
- if (sc->data[SC_DEXFOOD] && sc->data[SC_DEXFOOD]->val1 <= val1)
- status_change_end(bl,SC_DEXFOOD,-1);
+ status_change_end(bl,SC_DEXFOOD,-1);
break;
case SC_FOOD_LUK_CASH:
- if (sc->data[SC_LUKFOOD] && sc->data[SC_LUKFOOD]->val1 <= val1)
- status_change_end(bl,SC_LUKFOOD,-1);
+ status_change_end(bl,SC_LUKFOOD,-1);
break;
}