Core/Entities: Port some refactors

Port From (https://github.com/TrinityCore/TrinityCore/commit/431a326e6974d3c86452192767368ab6c4ea9b0b)
This commit is contained in:
hondacrx
2021-06-22 20:43:41 -04:00
parent 24f666a59d
commit aae86fe4d1
6 changed files with 181 additions and 170 deletions
@@ -1739,6 +1739,15 @@ namespace Game.Entities
public Dictionary<uint, PlayerSpell> GetSpellMap() { return m_spells; }
public override SpellSchoolMask GetMeleeDamageSchoolMask(WeaponAttackType attackType = WeaponAttackType.BaseAttack)
{
Item weapon = GetWeaponForAttack(attackType, true);
if (weapon != null)
return (SpellSchoolMask)(1 << (int)weapon.GetTemplate().GetDamageType());
return SpellSchoolMask.Normal;
}
void CastAllObtainSpells()
{
int inventoryEnd = InventorySlots.ItemStart + GetInventorySlotCount();