diff --git a/Source/Game/Entities/Player/Player.Combat.cs b/Source/Game/Entities/Player/Player.Combat.cs index 900aa33bf..34b5b3c56 100644 --- a/Source/Game/Entities/Player/Player.Combat.cs +++ b/Source/Game/Entities/Player/Player.Combat.cs @@ -291,17 +291,14 @@ namespace Game.Entities return true; } - public void _ApplyWeaponDamage(uint slot, Item item, bool apply) + public void _ApplyWeaponDamage(byte slot, Item item, bool apply) { ItemTemplate proto = item.GetTemplate(); - WeaponAttackType attType = WeaponAttackType.BaseAttack; + WeaponAttackType attType = GetAttackBySlot(slot, proto.GetInventoryType()); + if (attType == WeaponAttackType.Max) + return; + float damage = 0.0f; - - if (slot == EquipmentSlot.MainHand && (proto.GetInventoryType() == InventoryType.Ranged || proto.GetInventoryType() == InventoryType.RangedRight)) - attType = WeaponAttackType.RangedAttack; - else if (slot == EquipmentSlot.OffHand) - attType = WeaponAttackType.OffAttack; - uint itemLevel = item.GetItemLevel(this); float minDamage, maxDamage; proto.GetDamage(itemLevel, out minDamage, out maxDamage); diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index e99c1191c..399eec5e0 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -1702,7 +1702,7 @@ namespace Game.Spells Action flagAddFn = null; Action flagRemoveFn = null; - uint slot; + byte slot; WeaponAttackType attType; switch (type) { @@ -1742,10 +1742,10 @@ namespace Game.Spells { Player player = target.ToPlayer(); - Item item = player.GetItemByPos(InventorySlots.Bag0, (byte)slot); + Item item = player.GetItemByPos(InventorySlots.Bag0, slot); if (item != null) { - WeaponAttackType attackType = Player.GetAttackBySlot((byte)slot, item.GetTemplate().GetInventoryType()); + WeaponAttackType attackType = Player.GetAttackBySlot(slot, item.GetTemplate().GetInventoryType()); player.ApplyItemDependentAuras(item, !apply); if (attackType < WeaponAttackType.Max)