Core/Criteria: Implemented CriteriaType EarnArtifactXP

Port From (https://github.com/TrinityCore/TrinityCore/commit/d1d8f907fe0f1e42d9a8569ef2afdd89e2739b3a)
This commit is contained in:
Hondacrx
2024-08-24 21:07:37 -04:00
parent 507b69771e
commit 77be3fd94b
3 changed files with 7 additions and 3 deletions
+3
View File
@@ -2304,6 +2304,7 @@ namespace Game.Entities
}
public void SetArtifactXP(ulong xp) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.ArtifactXP), xp); }
public void GiveArtifactXp(ulong amount, Item sourceItem, ArtifactCategory artifactCategoryId)
{
Player owner = GetOwner();
@@ -2336,6 +2337,8 @@ namespace Game.Entities
owner.SendPacket(artifactXpGain);
SetState(ItemUpdateState.Changed, owner);
owner.UpdateCriteria(CriteriaType.EarnArtifactXP, amount);
}
public ItemContext GetContext() { return (ItemContext)(int)m_itemData.Context; }