summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-09-05 00:07:08 +0200
committerHaru <haru@dotalux.com>2017-09-17 17:48:11 +0200
commita98b2d93f3727d18d8add5cb5c35830cbb171114 (patch)
tree39eda9621cf0a0f5f734a2d0d9360db3eeff73ff /src/map/battle.c
parent00570591031eb6fc99c7c26ba58a2a7efb144e7f (diff)
downloadhercules-a98b2d93f3727d18d8add5cb5c35830cbb171114.tar.gz
hercules-a98b2d93f3727d18d8add5cb5c35830cbb171114.tar.bz2
hercules-a98b2d93f3727d18d8add5cb5c35830cbb171114.tar.xz
hercules-a98b2d93f3727d18d8add5cb5c35830cbb171114.zip
Split 'View' in two different fields in the item database
- The field was used both for sprite view IDs and for weapon or ammunition subtypes. Now the fields 'ViewSprite' and 'Subtype' are used respectively. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index b5ad62407..9d67242a2 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4575,8 +4575,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
if(!skill_id) {
//Skills ALWAYS use ONLY your right-hand weapon (tested on Aegis 10.2)
- if (sd && sd->weapontype1 == 0 && sd->weapontype2 > 0)
- {
+ if (sd && sd->weapontype1 == W_FIST && sd->weapontype2 != W_FIST) {
flag.rh=0;
flag.lh=1;
}
@@ -6102,7 +6101,7 @@ bool battle_check_arrows(struct map_session_data *sd)
if (sd->inventory_data[index]) {
switch (sd->status.weapon) {
case W_BOW:
- if (sd->inventory_data[index]->look != A_ARROW) {
+ if (sd->inventory_data[index]->subtype != A_ARROW) {
clif->arrow_fail(sd, 0);
return false;
}
@@ -6111,13 +6110,13 @@ bool battle_check_arrows(struct map_session_data *sd)
case W_RIFLE:
case W_GATLING:
case W_SHOTGUN:
- if (sd->inventory_data[index]->look != A_BULLET) {
+ if (sd->inventory_data[index]->subtype != A_BULLET) {
clif->skill_fail(sd, 0, USESKILL_FAIL_NEED_MORE_BULLET, 0);
return false;
}
break;
case W_GRENADE:
- if (sd->inventory_data[index]->look != A_GRENADE) {
+ if (sd->inventory_data[index]->subtype != A_GRENADE) {
clif->skill_fail(sd, 0, USESKILL_FAIL_NEED_MORE_BULLET, 0);
return false;
}