Core/Achievements: Implement many new ModifierTree types
Port From (https://github.com/TrinityCore/TrinityCore/commit/aa8ad4d2fd6144fca3b69261a90a663df682e571)
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Game.Entities
|
||||
{
|
||||
public class AzeriteItem : Item
|
||||
{
|
||||
AzeriteItemData m_azeriteItemData;
|
||||
public AzeriteItemData m_azeriteItemData;
|
||||
|
||||
public AzeriteItem()
|
||||
{
|
||||
@@ -208,6 +208,15 @@ namespace Game.Entities
|
||||
owner.SendPacket(xpGain);
|
||||
}
|
||||
|
||||
public SelectedAzeriteEssences GetSelectedAzeriteEssences()
|
||||
{
|
||||
foreach (SelectedAzeriteEssences essences in m_azeriteItemData.SelectedEssences)
|
||||
if (essences.Enabled != 0)
|
||||
return essences;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void BuildValuesCreate(WorldPacket data, Player target)
|
||||
{
|
||||
UpdateFieldFlag flags = GetUpdateFieldFlagsFor(target);
|
||||
|
||||
@@ -263,6 +263,11 @@ namespace Game.Entities
|
||||
_updateMask[block] &= ~(uint)UpdateMask.GetBlockFlag(index);
|
||||
}
|
||||
|
||||
public bool Empty()
|
||||
{
|
||||
return _values.Empty();
|
||||
}
|
||||
|
||||
public int Size()
|
||||
{
|
||||
return _values.Count;
|
||||
|
||||
@@ -656,9 +656,9 @@ namespace Game.Entities
|
||||
|
||||
public class SelectedAzeriteEssences : BaseUpdateData<AzeriteItem>
|
||||
{
|
||||
UpdateField<uint> SpecializationID = new UpdateField<uint>(0, 1);
|
||||
UpdateField<uint> Enabled = new UpdateField<uint>(0, 2);
|
||||
UpdateFieldArray<uint> AzeriteEssenceID = new UpdateFieldArray<uint>(3, 3, 4);
|
||||
public UpdateField<uint> SpecializationID = new UpdateField<uint>(0, 1);
|
||||
public UpdateField<uint> Enabled = new UpdateField<uint>(0, 2);
|
||||
public UpdateFieldArray<uint> AzeriteEssenceID = new UpdateFieldArray<uint>(3, 3, 4);
|
||||
|
||||
public SelectedAzeriteEssences() : base(7) { }
|
||||
|
||||
|
||||
@@ -585,6 +585,7 @@ namespace Game.Entities
|
||||
case TypeId.Item:
|
||||
case TypeId.Container:
|
||||
case TypeId.AzeriteItem:
|
||||
case TypeId.AzeriteEmpoweredItem:
|
||||
{
|
||||
Item item = (Item)questGiver;
|
||||
Global.ScriptMgr.OnQuestAccept(this, item, quest);
|
||||
@@ -1122,7 +1123,7 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
if (quest.QuestSortID > 0)
|
||||
UpdateCriteria(CriteriaTypes.CompleteQuestsInZone, (ulong)quest.QuestSortID);
|
||||
UpdateCriteria(CriteriaTypes.CompleteQuestsInZone, quest.Id);
|
||||
|
||||
UpdateCriteria(CriteriaTypes.CompleteQuestCount);
|
||||
UpdateCriteria(CriteriaTypes.CompleteQuest, quest.Id);
|
||||
|
||||
@@ -1392,6 +1392,13 @@ namespace Game.Entities
|
||||
|
||||
return playerCurrency.WeeklyQuantity;
|
||||
}
|
||||
public uint GetTrackedCurrencyCount(uint id)
|
||||
{
|
||||
if (!_currencyStorage.ContainsKey(id))
|
||||
return 0;
|
||||
|
||||
return _currencyStorage[id].TrackedQuantity;
|
||||
}
|
||||
|
||||
//Action Buttons - CUF Profile
|
||||
public void SaveCUFProfile(byte id, CUFProfile profile) { _CUFProfiles[id] = profile; }
|
||||
|
||||
Reference in New Issue
Block a user