Core/Items: Classify wands as ranged weapons (fixes wand shooting)

Port From (https://github.com/TrinityCore/TrinityCore/commit/bd87381eab32f0e136675ade503fe70285590803)
This commit is contained in:
Hondacrx
2025-08-17 23:05:05 -04:00
parent 6abf251446
commit 590b5ce1c5
2 changed files with 15 additions and 3 deletions
+15 -2
View File
@@ -335,8 +335,21 @@ namespace Game.Entities
public bool IsRangedWeapon()
{
return IsWeapon() && (GetSubClass() == (uint)ItemSubClassWeapon.Bow ||
GetSubClass() == (uint)ItemSubClassWeapon.Gun || GetSubClass() == (uint)ItemSubClassWeapon.Crossbow);
if (!IsWeapon())
return false;
switch ((ItemSubClassWeapon)GetSubClass())
{
case ItemSubClassWeapon.Bow:
case ItemSubClassWeapon.Gun:
case ItemSubClassWeapon.Crossbow:
case ItemSubClassWeapon.Wand:
return true;
default:
break;
}
return false;
}
public uint MaxDurability;