Core/Items: Fixed crash in selecting azerite essences

Port From (https://github.com/TrinityCore/TrinityCore/commit/bec4ed0f16d100f74c76e4aca06ed9ea42e21ec4)
This commit is contained in:
hondacrx
2019-12-02 14:15:23 -05:00
parent cdb225a4b6
commit e24c69dd89
4 changed files with 67 additions and 51 deletions
+2 -2
View File
@@ -570,7 +570,7 @@ namespace Game.Entities
if (artifactPowerPicker != null)
{
PlayerConditionRecord playerCondition = CliDB.PlayerConditionStorage.LookupByKey(artifactPowerPicker.PlayerConditionID);
if (playerCondition == null || ConditionManager.IsPlayerMeetingCondition(owner, playerCondition))
if (playerCondition == null || (owner != null && ConditionManager.IsPlayerMeetingCondition(owner, playerCondition)))
if (artifactPower.Label == _bonusData.GemRelicType[e - EnchantmentSlot.Sock1])
power.CurrentRankWithBonus += (byte)enchant.EffectPointsMin[i];
}
@@ -595,7 +595,7 @@ namespace Game.Entities
SetArtifactPower((ushort)power.ArtifactPowerId, power.PurchasedRank, (byte)(totalPurchasedRanks + 1));
}
CheckArtifactRelicSlotUnlock(owner != null ? owner : GetOwner());
CheckArtifactRelicSlotUnlock(owner);
}
public void CheckArtifactRelicSlotUnlock(Player owner)