summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbrahim Hossam <ibrahem.h.basyone@gmail.com>2014-08-20 04:56:15 +0300
committerIbrahim Hossam <ibrahem.h.basyone@gmail.com>2014-08-20 05:07:11 +0300
commitb294026e6614a652c23bb0cea8a0d4dc69d8b125 (patch)
tree35c049199b3dd0288d53585f8943ec2455543c44
parent49d60479ac8a7ad2a9e51a9c2afd699f3fac8069 (diff)
downloadhercules-b294026e6614a652c23bb0cea8a0d4dc69d8b125.tar.gz
hercules-b294026e6614a652c23bb0cea8a0d4dc69d8b125.tar.bz2
hercules-b294026e6614a652c23bb0cea8a0d4dc69d8b125.tar.xz
hercules-b294026e6614a652c23bb0cea8a0d4dc69d8b125.zip
Fixed an issue when Token_Of_Siegfried is used, under certain conditions
- If the Token_Of_Siegfried is the first item in inventory, it would not get detected and consumed correctly.
-rw-r--r--src/map/clif.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index afc9fa314..e6953d7a2 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -14615,7 +14615,7 @@ void clif_parse_AutoRevive(int fd, struct map_session_data *sd) {
int item_position = pc->search_inventory(sd, ITEMID_TOKEN_OF_SIEGFRIED);
int hpsp = 100;
- if (item_position < 0){
+ if (item_position < 0) {
if (sd->sc.data[SC_LIGHT_OF_REGENE])
hpsp = 20 * sd->sc.data[SC_LIGHT_OF_REGENE]->val1;
else
@@ -14628,10 +14628,10 @@ void clif_parse_AutoRevive(int fd, struct map_session_data *sd) {
if (!status->revive(&sd->bl, hpsp, hpsp))
return;
- if ( item_position > 0)
- pc->delitem(sd, item_position, 1, 0, 1, LOG_TYPE_CONSUME);
- else
+ if ( item_position < 0)
status_change_end(&sd->bl,SC_LIGHT_OF_REGENE,INVALID_TIMER);
+ else
+ pc->delitem(sd, item_position, 1, 0, 1, LOG_TYPE_CONSUME);
clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
}