Core/Spells: Implemented using base weapon damage in spell attack power formulas

Port From (https://github.com/TrinityCore/TrinityCore/commit/dd21e7ff404aed1d449b09db2b7fcbe2be8536c3)
This commit is contained in:
hondacrx
2020-09-10 19:53:09 -04:00
parent c0e06c540c
commit 0c036ef4db
8 changed files with 67 additions and 35 deletions
+3 -12
View File
@@ -4230,21 +4230,12 @@ namespace Game.Entities
}
}
uint armor = item.GetArmor(this);
uint armor = proto.GetArmor(itemLevel);
if (armor != 0)
HandleStatFlatModifier(UnitMods.Armor, UnitModifierFlatType.Base, (float)armor, apply);
WeaponAttackType attType = WeaponAttackType.BaseAttack;
if (slot == EquipmentSlot.MainHand && (proto.GetInventoryType() == InventoryType.Ranged || proto.GetInventoryType() == InventoryType.RangedRight))
{
attType = WeaponAttackType.RangedAttack;
}
else if (slot == EquipmentSlot.OffHand)
{
attType = WeaponAttackType.OffAttack;
}
if (CanUseAttackType(attType))
WeaponAttackType attType = GetAttackBySlot(slot, proto.GetInventoryType());
if (attType != WeaponAttackType.Max && CanUseAttackType(attType))
_ApplyWeaponDamage(slot, item, apply);
}