summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-09-22 19:29:05 +0200
committerGitHub <noreply@github.com>2019-09-22 19:29:05 +0200
commit863aa757302070fa424fbc9019f6a71466537965 (patch)
tree49c2a55991dfd4df4fc39980749167fc5fb60dbc /src/map/clif.c
parente59f8b1ecf8eb09287efe840a25141a737312225 (diff)
parentd3205c2fac99c0ef42249664c98505c7adf324b4 (diff)
downloadhercules-863aa757302070fa424fbc9019f6a71466537965.tar.gz
hercules-863aa757302070fa424fbc9019f6a71466537965.tar.bz2
hercules-863aa757302070fa424fbc9019f6a71466537965.tar.xz
hercules-863aa757302070fa424fbc9019f6a71466537965.zip
Merge pull request #2515 from Emistry/pc_have_siegfried_token
Update Siegfried Tokens support.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 8908369f2..c7f81a471 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16404,10 +16404,14 @@ static void clif_parse_AutoRevive(int fd, struct map_session_data *sd)
{
if (pc_istrading(sd) || pc_isvending(sd))
return;
+
if (!pc_isdead(sd))
return;
- int item_position = pc->search_inventory(sd, ITEMID_TOKEN_OF_SIEGFRIED);
+ if (sd->sc.data[SC_HELLPOWER]) //Cannot res while under the effect of SC_HELLPOWER.
+ return;
+
+ int item_position = pc->have_item_chain(sd, ECC_SIEGFRIED);
int hpsp = 100;
if (item_position == INDEX_NOT_FOUND) {
@@ -16417,18 +16421,15 @@ static void clif_parse_AutoRevive(int fd, struct map_session_data *sd)
return;
}
- if (sd->sc.data[SC_HELLPOWER]) //Cannot res while under the effect of SC_HELLPOWER.
- return;
-
if (!status->revive(&sd->bl, hpsp, hpsp))
return;
if (item_position == INDEX_NOT_FOUND)
- status_change_end(&sd->bl,SC_LIGHT_OF_REGENE,INVALID_TIMER);
+ status_change_end(&sd->bl, SC_LIGHT_OF_REGENE, INVALID_TIMER);
else
pc->delitem(sd, item_position, 1, 0, DELITEM_SKILLUSE, LOG_TYPE_CONSUME);
- clif->skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION, 4, 1);
+ clif->skill_nodamage(&sd->bl, &sd->bl, ALL_RESURRECTION, 4, 1);
}
/// Information about character's status values (ZC_ACK_STATUS_GM).