summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-03 14:13:13 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-03 14:13:13 +0000
commit33c862fabb849bbd93ef0bbba4688c149aefeccf (patch)
tree6fc804f30a9721f083bbb5160f1d2a137d9c10d6 /src/map/skill.c
parent46b54cfef91120e710a87b4af484bc2f67393200 (diff)
downloadhercules-33c862fabb849bbd93ef0bbba4688c149aefeccf.tar.gz
hercules-33c862fabb849bbd93ef0bbba4688c149aefeccf.tar.bz2
hercules-33c862fabb849bbd93ef0bbba4688c149aefeccf.tar.xz
hercules-33c862fabb849bbd93ef0bbba4688c149aefeccf.zip
- Cleaned up (fixed?) a possible overflow in pc_isUseitem, thanks to foobar.
- When you have the wrong ammo-type equipped the skill-failed message is now "skill can't be used with this weapon", which is less misleading than "please equip arrows first". - Corrected pet-equipment display (I originally assumed they went in the shield view-position, when they actually go in the head-bottom position). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5883 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 5540a4790..fcb0547af 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8070,12 +8070,17 @@ int skill_check_condition(struct map_session_data *sd,int skill, int lv, int typ
if(ammo) { //Skill requires stuff equipped in the arrow slot.
if((i=sd->equip_index[10]) < 0 ||
!sd->inventory_data[i] ||
- sd->status.inventory[i].amount < ammo_qty ||
- !(ammo&1<<sd->inventory_data[i]->look)
+ sd->status.inventory[i].amount < ammo_qty
) {
clif_arrow_fail(sd,0);
return 0;
}
+ if (!(ammo&1<<sd->inventory_data[i]->look))
+ { //Ammo type check. Send the "wrong weapon type" message
+ //which is the closest we have to wrong ammo type. [Skotlex]
+ clif_skill_fail(sd,skill,6,0);
+ return 0;
+ }
}
if( spiritball > 0 && sd->spiritball < spiritball) {
clif_skill_fail(sd,skill,0,0); // Ÿ†‹…•s‘«