summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-03-15 05:10:01 +0100
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-03-15 05:10:01 +0100
commit1af260babfdc75dde11474333ea9d7f94a9e3205 (patch)
tree14e41974e08c3257a3504e7bf0aa907fbef9cdb6 /src/map
parented5d2d7222401f17f9c8ded96ff0e86aba8e88d6 (diff)
downloadhercules-1af260babfdc75dde11474333ea9d7f94a9e3205.tar.gz
hercules-1af260babfdc75dde11474333ea9d7f94a9e3205.tar.bz2
hercules-1af260babfdc75dde11474333ea9d7f94a9e3205.tar.xz
hercules-1af260babfdc75dde11474333ea9d7f94a9e3205.zip
Make skills check if equipped ammunition type is appropriate for equipped weapon
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a1a22f74f..aa9ad33d2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -15170,10 +15170,8 @@ static int skill_check_condition_castend(struct map_session_data *sd, uint16 ski
clif->messagecolor_self(sd->fd, COLOR_RED, e_msg);
return 0;
}
- if (!(require.ammo&1<<sd->inventory_data[i]->subtype)) { //Ammo type check. Send the "wrong weapon type" message
- //which is the closest we have to wrong ammo type. [Skotlex]
- clif->arrow_fail(sd,0); //Haplo suggested we just send the equip-arrows message instead. [Skotlex]
- //clif->skill_fail(sd, skill_id, USESKILL_FAIL_THIS_WEAPON, 0, 0);
+ if ((require.ammo & (1 << sd->inventory_data[i]->subtype)) == 0 || !battle->check_arrows(sd)) { // Ammo type check.
+ clif->arrow_fail(sd, 0); // "Please equip the proper ammunition first."
return 0;
}
}