From bd81482fc9432d3a447c6b102862afa0a579012d Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sat, 29 Jul 2023 14:08:48 -0300 Subject: [PATCH] add result messages to poisoning weapon a message stating which poison was selected should be displayed after the player selects one --- src/map/skill.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/map/skill.c b/src/map/skill.c index 122814f0032..4d3bb0e176a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -20323,19 +20323,20 @@ static int skill_poisoningweapon(struct map_session_data *sd, int nameid) clif->skill_fail(sd, GC_POISONINGWEAPON, USESKILL_FAIL_LEVEL, 0, 0); return 0; } - switch( nameid ) - { // t_lv used to take duration from skill->get_time2 - case ITEMID_POISON_PARALYSIS: type = SC_PARALYSE; break; - case ITEMID_POISON_FEVER: type = SC_PYREXIA; break; - case ITEMID_POISON_CONTAMINATION: type = SC_DEATHHURT; break; - case ITEMID_POISON_LEECH: type = SC_LEECHESEND; break; - case ITEMID_POISON_FATIGUE: type = SC_VENOMBLEED; break; - case ITEMID_POISON_NUMB: type = SC_TOXIN; break; - case ITEMID_POISON_LAUGHING: type = SC_MAGICMUSHROOM; break; - case ITEMID_POISON_OBLIVION: type = SC_OBLIVIONCURSE; break; - default: - clif->skill_fail(sd, GC_POISONINGWEAPON, USESKILL_FAIL_LEVEL, 0, 0); - return 0; + + int msg = 0; + switch (nameid) { + case ITEMID_POISON_PARALYSIS: msg = MSG_PARALYZE; type = SC_PARALYSE; break; + case ITEMID_POISON_FEVER: msg = MSG_PHYREXIA; type = SC_PYREXIA; break; + case ITEMID_POISON_CONTAMINATION: msg = MSG_DEATHHURT; type = SC_DEATHHURT; break; + case ITEMID_POISON_LEECH: msg = MSG_RICHEND; type = SC_LEECHESEND; break; + case ITEMID_POISON_FATIGUE: msg = MSG_VENOMBLEED; type = SC_VENOMBLEED; break; + case ITEMID_POISON_NUMB: msg = MSG_TOXIN; type = SC_TOXIN; break; + case ITEMID_POISON_LAUGHING: msg = MSG_MAGICMUSHROOM; type = SC_MAGICMUSHROOM; break; + case ITEMID_POISON_OBLIVION: msg = MSG_OBLIANCURSE; type = SC_OBLIVIONCURSE; break; + default: + clif->skill_fail(sd, GC_POISONINGWEAPON, USESKILL_FAIL_LEVEL, 0, 0); + return 0; } status_change_end(&sd->bl, SC_POISONINGWEAPON, INVALID_TIMER); // Status must be forced to end so that a new poison will be applied if a player decides to change poisons. [Rytech] @@ -20343,6 +20344,11 @@ static int skill_poisoningweapon(struct map_session_data *sd, int nameid) sc_start4(&sd->bl, &sd->bl, SC_POISONINGWEAPON, 100, pc->checkskill(sd, GC_RESEARCHNEWPOISON), //in Aegis it store the level of GC_RESEARCHNEWPOISON in val1 type, chance, 0, skill->get_time(GC_POISONINGWEAPON, sd->menuskill_val), GC_POISONINGWEAPON); +#if PACKETVER >= 20090304 + if (msg > 0) + clif->msgtable(sd, msg); +#endif + return 0; }