Core/Items: Implemented AzeriteItem
Port From (https://github.com/TrinityCore/TrinityCore/commit/ab6ae44b638136665e2ae6c6a434ad7426621c39)
This commit is contained in:
@@ -92,9 +92,9 @@ namespace Game.Entities
|
||||
if (item.GetTemplate().GetArtifactID() != 0 && artifactDataPair != null)
|
||||
item.LoadArtifactData(this, artifactDataPair.Item1, artifactDataPair.Item2, artifactDataPair.Item3, artifactDataPair.Item4);
|
||||
|
||||
ulong counter = result.Read<ulong>(43);
|
||||
ulong counter = result.Read<ulong>(46);
|
||||
ObjectGuid bagGuid = counter != 0 ? ObjectGuid.Create(HighGuid.Item, counter) : ObjectGuid.Empty;
|
||||
byte slot = result.Read<byte>(44);
|
||||
byte slot = result.Read<byte>(47);
|
||||
|
||||
GetSession().GetCollectionMgr().CheckHeirloomUpgrades(item);
|
||||
GetSession().GetCollectionMgr().AddItemAppearance(item);
|
||||
@@ -1228,7 +1228,7 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
Item item = Bag.NewItemOrBag(proto);
|
||||
ObjectGuid ownerGuid = result.Read<ulong>(43) != 0 ? ObjectGuid.Create(HighGuid.Player, result.Read<ulong>(43)) : ObjectGuid.Empty;
|
||||
ObjectGuid ownerGuid = result.Read<ulong>(46) != 0 ? ObjectGuid.Create(HighGuid.Player, result.Read<ulong>(46)) : ObjectGuid.Empty;
|
||||
if (!item.LoadFromDB(itemGuid, ownerGuid, result.GetFields(), itemEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Player, "Player:_LoadMailedItems - Item in mail ({0}) doesn't exist !!!! - item guid: {1}, deleted from mail", mail.messageID, itemGuid);
|
||||
@@ -3833,6 +3833,10 @@ namespace Game.Entities
|
||||
stmt.AddValue(0, guid);
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_AZERITE_BY_OWNER);
|
||||
stmt.AddValue(0, guid);
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_BY_OWNER);
|
||||
stmt.AddValue(0, guid);
|
||||
trans.Append(stmt);
|
||||
|
||||
@@ -584,6 +584,7 @@ namespace Game.Entities
|
||||
break;
|
||||
case TypeId.Item:
|
||||
case TypeId.Container:
|
||||
case TypeId.AzeriteItem:
|
||||
{
|
||||
Item item = (Item)questGiver;
|
||||
Global.ScriptMgr.OnQuestAccept(this, item, quest);
|
||||
|
||||
@@ -1244,6 +1244,17 @@ namespace Game.Entities
|
||||
return;
|
||||
}
|
||||
|
||||
if (id == CurrencyTypes.Azerite)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
Item heartOfAzeroth = GetItemByEntry(PlayerConst.ItemIdHeartOfAzeroth);
|
||||
if (heartOfAzeroth != null)
|
||||
heartOfAzeroth.ToAzeriteItem().GiveXP((ulong)count);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
uint oldTotalCount = 0;
|
||||
uint oldWeekCount = 0;
|
||||
uint oldTrackedCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user