Core/Items: Addes support for calculating item level & cleanup iterating over items.
Based on https://github.com/TrinityCore/TrinityCore/pull/26276
This commit is contained in:
@@ -65,7 +65,7 @@ namespace Game
|
||||
ActivateEssenceFailed activateEssenceResult = new();
|
||||
activateEssenceResult.AzeriteEssenceID = azeriteEssenceActivateEssence.AzeriteEssenceID;
|
||||
|
||||
Item item = _player.GetItemByEntry(PlayerConst.ItemIdHeartOfAzeroth, ItemSearchLocation.InEquipment);
|
||||
Item item = _player.GetItemByEntry(PlayerConst.ItemIdHeartOfAzeroth, ItemSearchLocation.Equipment);
|
||||
if (item == null)
|
||||
{
|
||||
activateEssenceResult.Reason = AzeriteEssenceActivateResult.NotEquipped;
|
||||
|
||||
@@ -1024,6 +1024,9 @@ namespace Game
|
||||
if (!pCurrChar.IsStandState() && !pCurrChar.HasUnitState(UnitState.Stunned))
|
||||
pCurrChar.SetStandState(UnitStandStateType.Stand);
|
||||
|
||||
pCurrChar.UpdateAverageItemLevelTotal();
|
||||
pCurrChar.UpdateAverageItemLevelEquipped();
|
||||
|
||||
m_playerLoading.Clear();
|
||||
|
||||
Global.ScriptMgr.OnPlayerLogin(pCurrChar);
|
||||
|
||||
Reference in New Issue
Block a user