summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskyleo <skyleo@skyleo.de>2020-02-06 00:28:07 +0100
committerskyleo <skyleo@skyleo.de>2020-02-06 00:28:07 +0100
commitd29e1f49ade177e675b9760efa91777392243c8c (patch)
tree83ab94cc4123da5b14155f3af6345488b4b616e3 /src
parentc03722679a01e5f181c2138565e95a6b0981a124 (diff)
downloadhercules-d29e1f49ade177e675b9760efa91777392243c8c.tar.gz
hercules-d29e1f49ade177e675b9760efa91777392243c8c.tar.bz2
hercules-d29e1f49ade177e675b9760efa91777392243c8c.tar.xz
hercules-d29e1f49ade177e675b9760efa91777392243c8c.zip
Fix W_RIFLE damage calculation being too low than intended
Rifle type weapons had a broken call to battle_calc_base_damage2 since they were passing the flag value 18 and flag&16 != 0 as stated by the documentation shall only be the case when no gun or bow is equipped. This bug existed since 2006 and got introduced by the commit e24d467f1ae47475e3441d7453f549e22f46f541 .
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 0b88f17c9..40e7d3161 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4977,6 +4977,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
switch (sd->weapontype) {
case W_BOW:
case W_REVOLVER:
+ case W_RIFLE:
case W_GATLING:
case W_SHOTGUN:
case W_GRENADE: