Core/Items: Implemented secondary shoulder transmog appearance
Port From (https://github.com/TrinityCore/TrinityCore/commit/03f09ea16ab683fac0f3be3c0656fdb80b63154e)
This commit is contained in:
@@ -23,8 +23,9 @@ namespace Framework.Database
|
||||
{
|
||||
const string SelectItemInstanceContent = "ii.guid, ii.itemEntry, ii.creatorGuid, ii.giftCreatorGuid, ii.count, ii.duration, ii.charges, ii.flags, ii.enchantments, ii.randomBonusListId, " +
|
||||
"ii.durability, ii.playedTime, ii.text, ii.battlePetSpeciesId, ii.battlePetBreedData, ii.battlePetLevel, ii.battlePetDisplayId, ii.context, ii.bonusListIDs, " +
|
||||
"iit.itemModifiedAppearanceAllSpecs, iit.itemModifiedAppearanceSpec1, iit.itemModifiedAppearanceSpec2, iit.itemModifiedAppearanceSpec3, iit.itemModifiedAppearanceSpec4, " +
|
||||
"iit.spellItemEnchantmentAllSpecs, iit.spellItemEnchantmentSpec1, iit.spellItemEnchantmentSpec2, iit.spellItemEnchantmentSpec3, iit.spellItemEnchantmentSpec4, " +
|
||||
"iit.itemModifiedAppearanceAllSpecs, iit.itemModifiedAppearanceSpec1, iit.itemModifiedAppearanceSpec2, iit.itemModifiedAppearanceSpec3, iit.itemModifiedAppearanceSpec4, iit.itemModifiedAppearanceSpec5, " +
|
||||
"iit.spellItemEnchantmentAllSpecs, iit.spellItemEnchantmentSpec1, iit.spellItemEnchantmentSpec2, iit.spellItemEnchantmentSpec3, iit.spellItemEnchantmentSpec4, iit.spellItemEnchantmentSpec5, " +
|
||||
"iit.secondaryItemModifiedAppearanceAllSpecs, iit.secondaryItemModifiedAppearanceSpec1, iit.secondaryItemModifiedAppearanceSpec2, iit.secondaryItemModifiedAppearanceSpec3, iit.secondaryItemModifiedAppearanceSpec4, iit.itemModifiedAppearanceSpec5, " +
|
||||
"ig.gemItemId1, ig.gemBonuses1, ig.gemContext1, ig.gemScalingLevel1, ig.gemItemId2, ig.gemBonuses2, ig.gemContext2, ig.gemScalingLevel2, ig.gemItemId3, ig.gemBonuses3, ig.gemContext3, ig.gemScalingLevel3, " +
|
||||
"im.fixedScalingLevel, im.artifactKnowledgeLevel";
|
||||
|
||||
@@ -198,8 +199,9 @@ namespace Framework.Database
|
||||
PrepareStatement(CharStatements.INS_ITEM_INSTANCE_GEMS, "INSERT INTO item_instance_gems (itemGuid, gemItemId1, gemBonuses1, gemContext1, gemScalingLevel1, gemItemId2, gemBonuses2, gemContext2, gemScalingLevel2, gemItemId3, gemBonuses3, gemContext3, gemScalingLevel3) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
PrepareStatement(CharStatements.DEL_ITEM_INSTANCE_GEMS, "DELETE FROM item_instance_gems WHERE itemGuid = ?");
|
||||
PrepareStatement(CharStatements.DEL_ITEM_INSTANCE_GEMS_BY_OWNER, "DELETE iig FROM item_instance_gems iig LEFT JOIN item_instance ii ON iig.itemGuid = ii.guid WHERE ii.owner_guid = ?");
|
||||
PrepareStatement(CharStatements.INS_ITEM_INSTANCE_TRANSMOG, "INSERT INTO item_instance_transmog (itemGuid, itemModifiedAppearanceAllSpecs, itemModifiedAppearanceSpec1, itemModifiedAppearanceSpec2, itemModifiedAppearanceSpec3, itemModifiedAppearanceSpec4, " +
|
||||
"spellItemEnchantmentAllSpecs, spellItemEnchantmentSpec1, spellItemEnchantmentSpec2, spellItemEnchantmentSpec3, spellItemEnchantmentSpec4) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
PrepareStatement(CharStatements.INS_ITEM_INSTANCE_TRANSMOG, "INSERT INTO item_instance_transmog (itemGuid, itemModifiedAppearanceAllSpecs, itemModifiedAppearanceSpec1, itemModifiedAppearanceSpec2, itemModifiedAppearanceSpec3, itemModifiedAppearanceSpec4, itemModifiedAppearanceSpec5, " +
|
||||
"spellItemEnchantmentAllSpecs, spellItemEnchantmentSpec1, spellItemEnchantmentSpec2, spellItemEnchantmentSpec3, spellItemEnchantmentSpec4, spellItemEnchantmentSpec5, " +
|
||||
"secondaryItemModifiedAppearanceAllSpecs, secondaryItemModifiedAppearanceSpec1, secondaryItemModifiedAppearanceSpec2, secondaryItemModifiedAppearanceSpec3, secondaryItemModifiedAppearanceSpec4, secondaryItemModifiedAppearanceSpec5) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
PrepareStatement(CharStatements.DEL_ITEM_INSTANCE_TRANSMOG, "DELETE FROM item_instance_transmog WHERE itemGuid = ?");
|
||||
PrepareStatement(CharStatements.DEL_ITEM_INSTANCE_TRANSMOG_BY_OWNER, "DELETE iit FROM item_instance_transmog iit LEFT JOIN item_instance ii ON iit.itemGuid = ii.guid WHERE ii.owner_guid = ?");
|
||||
PrepareStatement(CharStatements.SEL_ITEM_INSTANCE_ARTIFACT, "SELECT a.itemGuid, a.xp, a.artifactAppearanceId, a.artifactTierId, ap.artifactPowerId, ap.purchasedRank FROM item_instance_artifact_powers ap LEFT JOIN item_instance_artifact a ON ap.itemGuid = a.itemGuid INNER JOIN character_inventory ci ON ci.item = ap.itemGuid WHERE ci.guid = ?");
|
||||
|
||||
@@ -180,13 +180,13 @@ namespace Game
|
||||
}
|
||||
|
||||
Item item = Item.NewItemOrBag(proto);
|
||||
if (!item.LoadFromDB(itemGuid, ObjectGuid.Create(HighGuid.Player, result.Read<ulong>(43)), result.GetFields(), itemEntry))
|
||||
if (!item.LoadFromDB(itemGuid, ObjectGuid.Create(HighGuid.Player, result.Read<ulong>(51)), result.GetFields(), itemEntry))
|
||||
{
|
||||
item.Dispose();
|
||||
continue;
|
||||
}
|
||||
|
||||
uint auctionId = result.Read<uint>(44);
|
||||
uint auctionId = result.Read<uint>(52);
|
||||
itemsByAuction.Add(auctionId, item);
|
||||
|
||||
++count;
|
||||
|
||||
@@ -253,12 +253,21 @@ namespace Game.Entities
|
||||
ItemModifier.TransmogAppearanceSpec2,
|
||||
ItemModifier.TransmogAppearanceSpec3,
|
||||
ItemModifier.TransmogAppearanceSpec4,
|
||||
ItemModifier.TransmogAppearanceSpec5,
|
||||
|
||||
ItemModifier.EnchantIllusionAllSpecs,
|
||||
ItemModifier.EnchantIllusionSpec1,
|
||||
ItemModifier.EnchantIllusionSpec2,
|
||||
ItemModifier.EnchantIllusionSpec3,
|
||||
ItemModifier.EnchantIllusionSpec4,
|
||||
ItemModifier.EnchantIllusionSpec5,
|
||||
|
||||
ItemModifier.TransmogSecondaryAppearanceAllSpecs,
|
||||
ItemModifier.TransmogSecondaryAppearanceSpec1,
|
||||
ItemModifier.TransmogSecondaryAppearanceSpec2,
|
||||
ItemModifier.TransmogSecondaryAppearanceSpec3,
|
||||
ItemModifier.TransmogSecondaryAppearanceSpec4,
|
||||
ItemModifier.TransmogSecondaryAppearanceSpec5
|
||||
};
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_TRANSMOG);
|
||||
@@ -274,11 +283,19 @@ namespace Game.Entities
|
||||
stmt.AddValue(3, GetModifier(ItemModifier.TransmogAppearanceSpec2));
|
||||
stmt.AddValue(4, GetModifier(ItemModifier.TransmogAppearanceSpec3));
|
||||
stmt.AddValue(5, GetModifier(ItemModifier.TransmogAppearanceSpec4));
|
||||
stmt.AddValue(6, GetModifier(ItemModifier.EnchantIllusionAllSpecs));
|
||||
stmt.AddValue(7, GetModifier(ItemModifier.EnchantIllusionSpec1));
|
||||
stmt.AddValue(8, GetModifier(ItemModifier.EnchantIllusionSpec2));
|
||||
stmt.AddValue(9, GetModifier(ItemModifier.EnchantIllusionSpec3));
|
||||
stmt.AddValue(10, GetModifier(ItemModifier.EnchantIllusionSpec4));
|
||||
stmt.AddValue(6, GetModifier(ItemModifier.TransmogAppearanceSpec5));
|
||||
stmt.AddValue(7, GetModifier(ItemModifier.EnchantIllusionAllSpecs));
|
||||
stmt.AddValue(8, GetModifier(ItemModifier.EnchantIllusionSpec1));
|
||||
stmt.AddValue(9, GetModifier(ItemModifier.EnchantIllusionSpec2));
|
||||
stmt.AddValue(10, GetModifier(ItemModifier.EnchantIllusionSpec3));
|
||||
stmt.AddValue(11, GetModifier(ItemModifier.EnchantIllusionSpec4));
|
||||
stmt.AddValue(12, GetModifier(ItemModifier.EnchantIllusionSpec5));
|
||||
stmt.AddValue(13, GetModifier(ItemModifier.TransmogSecondaryAppearanceAllSpecs));
|
||||
stmt.AddValue(14, GetModifier(ItemModifier.TransmogSecondaryAppearanceSpec1));
|
||||
stmt.AddValue(15, GetModifier(ItemModifier.TransmogSecondaryAppearanceSpec2));
|
||||
stmt.AddValue(16, GetModifier(ItemModifier.TransmogSecondaryAppearanceSpec3));
|
||||
stmt.AddValue(17, GetModifier(ItemModifier.TransmogSecondaryAppearanceSpec4));
|
||||
stmt.AddValue(18, GetModifier(ItemModifier.TransmogSecondaryAppearanceSpec5));
|
||||
trans.Append(stmt);
|
||||
}
|
||||
|
||||
@@ -467,20 +484,29 @@ namespace Game.Entities
|
||||
SetModifier(ItemModifier.TransmogAppearanceSpec2, fields.Read<uint>(21));
|
||||
SetModifier(ItemModifier.TransmogAppearanceSpec3, fields.Read<uint>(22));
|
||||
SetModifier(ItemModifier.TransmogAppearanceSpec4, fields.Read<uint>(23));
|
||||
SetModifier(ItemModifier.TransmogAppearanceSpec5, fields.Read<uint>(24));
|
||||
|
||||
SetModifier(ItemModifier.EnchantIllusionAllSpecs, fields.Read<uint>(24));
|
||||
SetModifier(ItemModifier.EnchantIllusionSpec1, fields.Read<uint>(25));
|
||||
SetModifier(ItemModifier.EnchantIllusionSpec2, fields.Read<uint>(26));
|
||||
SetModifier(ItemModifier.EnchantIllusionSpec3, fields.Read<uint>(27));
|
||||
SetModifier(ItemModifier.EnchantIllusionSpec4, fields.Read<uint>(28));
|
||||
SetModifier(ItemModifier.EnchantIllusionAllSpecs, fields.Read<uint>(25));
|
||||
SetModifier(ItemModifier.EnchantIllusionSpec1, fields.Read<uint>(26));
|
||||
SetModifier(ItemModifier.EnchantIllusionSpec2, fields.Read<uint>(27));
|
||||
SetModifier(ItemModifier.EnchantIllusionSpec3, fields.Read<uint>(28));
|
||||
SetModifier(ItemModifier.EnchantIllusionSpec4, fields.Read<uint>(29));
|
||||
SetModifier(ItemModifier.EnchantIllusionSpec4, fields.Read<uint>(30));
|
||||
|
||||
SetModifier(ItemModifier.TransmogSecondaryAppearanceAllSpecs, fields.Read<uint>(31));
|
||||
SetModifier(ItemModifier.TransmogSecondaryAppearanceSpec1, fields.Read<uint>(32));
|
||||
SetModifier(ItemModifier.TransmogSecondaryAppearanceSpec2, fields.Read<uint>(33));
|
||||
SetModifier(ItemModifier.TransmogSecondaryAppearanceSpec3, fields.Read<uint>(34));
|
||||
SetModifier(ItemModifier.TransmogSecondaryAppearanceSpec4, fields.Read<uint>(35));
|
||||
SetModifier(ItemModifier.TransmogSecondaryAppearanceSpec5, fields.Read<uint>(36));
|
||||
|
||||
int gemFields = 4;
|
||||
ItemDynamicFieldGems[] gemData = new ItemDynamicFieldGems[ItemConst.MaxGemSockets];
|
||||
for (int i = 0; i < ItemConst.MaxGemSockets; ++i)
|
||||
{
|
||||
gemData[i] = new ItemDynamicFieldGems();
|
||||
gemData[i].ItemId = fields.Read<uint>(29 + i * gemFields);
|
||||
var gemBonusListIDs = new StringArray(fields.Read<string>(30 + i * gemFields), ' ');
|
||||
gemData[i].ItemId = fields.Read<uint>(37 + i * gemFields);
|
||||
var gemBonusListIDs = new StringArray(fields.Read<string>(38 + i * gemFields), ' ');
|
||||
if (!gemBonusListIDs.IsEmpty())
|
||||
{
|
||||
uint b = 0;
|
||||
@@ -491,13 +517,13 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
gemData[i].Context = fields.Read<byte>(31 + i * gemFields);
|
||||
gemData[i].Context = fields.Read<byte>(39 + i * gemFields);
|
||||
if (gemData[i].ItemId != 0)
|
||||
SetGem((ushort)i, gemData[i], fields.Read<uint>(32 + i * gemFields));
|
||||
SetGem((ushort)i, gemData[i], fields.Read<uint>(40 + i * gemFields));
|
||||
}
|
||||
|
||||
SetModifier(ItemModifier.TimewalkerLevel, fields.Read<uint>(41));
|
||||
SetModifier(ItemModifier.ArtifactKnowledgeLevel, fields.Read<uint>(42));
|
||||
SetModifier(ItemModifier.TimewalkerLevel, fields.Read<uint>(49));
|
||||
SetModifier(ItemModifier.ArtifactKnowledgeLevel, fields.Read<uint>(50));
|
||||
|
||||
// Enchants must be loaded after all other bonus/scaling data
|
||||
var enchantmentTokens = new StringArray(fields.Read<string>(8), ' ');
|
||||
@@ -1970,6 +1996,15 @@ namespace Game.Entities
|
||||
return (ushort)GetAppearanceModId();
|
||||
}
|
||||
|
||||
public uint GetVisibleSecondaryModifiedAppearanceId(Player owner)
|
||||
{
|
||||
uint itemModifiedAppearanceId = GetModifier(ItemConst.SecondaryAppearanceModifierSlotBySpec[owner.GetActiveTalentGroup()]);
|
||||
if (itemModifiedAppearanceId == 0)
|
||||
itemModifiedAppearanceId = GetModifier(ItemModifier.TransmogSecondaryAppearanceAllSpecs);
|
||||
|
||||
return itemModifiedAppearanceId;
|
||||
}
|
||||
|
||||
public uint GetVisibleEnchantmentId(Player owner)
|
||||
{
|
||||
uint enchantmentId = GetModifier(ItemConst.IllusionModifierSlotBySpec[owner.GetActiveTalentGroup()]);
|
||||
|
||||
@@ -1031,7 +1031,7 @@ namespace Game.Entities
|
||||
public class VisibleItem : BaseUpdateData<Unit>
|
||||
{
|
||||
public UpdateField<uint> ItemID = new(0, 1);
|
||||
public UpdateField<int> ItemModifiedAppearanceID = new(0, 2);
|
||||
public UpdateField<uint> SecondaryItemModifiedAppearanceID = new(0, 2);
|
||||
public UpdateField<ushort> ItemAppearanceModID = new(0, 3);
|
||||
public UpdateField<ushort> ItemVisual = new(0, 4);
|
||||
|
||||
@@ -1040,7 +1040,7 @@ namespace Game.Entities
|
||||
public void WriteCreate(WorldPacket data, Unit owner, Player receiver)
|
||||
{
|
||||
data.WriteUInt32(ItemID);
|
||||
data.WriteInt32(ItemModifiedAppearanceID);
|
||||
data.WriteUInt32(SecondaryItemModifiedAppearanceID);
|
||||
data.WriteUInt16(ItemAppearanceModID);
|
||||
data.WriteUInt16(ItemVisual);
|
||||
}
|
||||
@@ -1062,7 +1062,7 @@ namespace Game.Entities
|
||||
}
|
||||
if (changesMask[2])
|
||||
{
|
||||
data.WriteInt32(ItemModifiedAppearanceID);
|
||||
data.WriteUInt32(SecondaryItemModifiedAppearanceID);
|
||||
}
|
||||
if (changesMask[3])
|
||||
{
|
||||
@@ -1078,7 +1078,7 @@ namespace Game.Entities
|
||||
public override void ClearChangesMask()
|
||||
{
|
||||
ClearChangesMask(ItemID);
|
||||
ClearChangesMask(ItemModifiedAppearanceID);
|
||||
ClearChangesMask(SecondaryItemModifiedAppearanceID);
|
||||
ClearChangesMask(ItemAppearanceModID);
|
||||
ClearChangesMask(ItemVisual);
|
||||
_changesMask.ResetAll();
|
||||
|
||||
@@ -80,9 +80,9 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
|
||||
ulong counter = result.Read<ulong>(43);
|
||||
ulong counter = result.Read<ulong>(51);
|
||||
ObjectGuid bagGuid = counter != 0 ? ObjectGuid.Create(HighGuid.Item, counter) : ObjectGuid.Empty;
|
||||
byte slot = result.Read<byte>(44);
|
||||
byte slot = result.Read<byte>(52);
|
||||
|
||||
GetSession().GetCollectionMgr().CheckHeirloomUpgrades(item);
|
||||
GetSession().GetCollectionMgr().AddItemAppearance(item);
|
||||
@@ -1226,7 +1226,7 @@ namespace Game.Entities
|
||||
|
||||
do
|
||||
{
|
||||
uint mailId = result.Read<uint>(44);
|
||||
uint mailId = result.Read<uint>(52);
|
||||
_LoadMailedItem(GetGUID(), this, mailId, mailById[mailId], result.GetFields(), additionalData.LookupByKey(result.Read<ulong>(0)));
|
||||
}
|
||||
while (result.NextRow());
|
||||
@@ -1260,7 +1260,7 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
Item item = Bag.NewItemOrBag(proto);
|
||||
ObjectGuid ownerGuid = fields.Read<ulong>(43) != 0 ? ObjectGuid.Create(HighGuid.Player, fields.Read<ulong>(43)) : ObjectGuid.Empty;
|
||||
ObjectGuid ownerGuid = fields.Read<ulong>(51) != 0 ? ObjectGuid.Create(HighGuid.Player, fields.Read<ulong>(51)) : ObjectGuid.Empty;
|
||||
if (!item.LoadFromDB(itemGuid, ownerGuid, fields, itemEntry))
|
||||
{
|
||||
Log.outError(LogFilter.Player, $"Player._LoadMailedItems: Item (GUID: {itemGuid}) in mail ({mailId}) doesn't exist, deleted from mail.");
|
||||
@@ -3446,10 +3446,10 @@ namespace Game.Entities
|
||||
else
|
||||
ss.Append('0');
|
||||
|
||||
ss.Append($" {(uint)CliDB.ItemStorage.LookupByKey(item.GetVisibleEntry(this)).SubclassID} ");
|
||||
ss.Append($" {(uint)CliDB.ItemStorage.LookupByKey(item.GetVisibleEntry(this)).SubclassID} {(uint)item.GetVisibleSecondaryModifiedAppearanceId(this)} ");
|
||||
}
|
||||
else
|
||||
ss.Append("0 0 0 0 ");
|
||||
ss.Append("0 0 0 0 0 ");
|
||||
}
|
||||
|
||||
stmt.AddValue(index++, ss.ToString());
|
||||
@@ -3587,10 +3587,10 @@ namespace Game.Entities
|
||||
else
|
||||
ss.Append('0');
|
||||
|
||||
ss.Append($" {(uint)CliDB.ItemStorage.LookupByKey(item.GetVisibleEntry(this)).SubclassID} ");
|
||||
ss.Append($" {(uint)CliDB.ItemStorage.LookupByKey(item.GetVisibleEntry(this)).SubclassID} {(uint)item.GetVisibleSecondaryModifiedAppearanceId(this)} ");
|
||||
}
|
||||
else
|
||||
ss.Append("0 0 0 0 ");
|
||||
ss.Append("0 0 0 0 0 ");
|
||||
}
|
||||
|
||||
stmt.AddValue(index++, ss.ToString());
|
||||
|
||||
@@ -5353,12 +5353,14 @@ namespace Game.Entities
|
||||
if (pItem != null)
|
||||
{
|
||||
SetUpdateFieldValue(itemField.ModifyValue(itemField.ItemID), pItem.GetVisibleEntry(this));
|
||||
SetUpdateFieldValue(itemField.ModifyValue(itemField.SecondaryItemModifiedAppearanceID), pItem.GetVisibleSecondaryModifiedAppearanceId(this));
|
||||
SetUpdateFieldValue(itemField.ModifyValue(itemField.ItemAppearanceModID), pItem.GetVisibleAppearanceModId(this));
|
||||
SetUpdateFieldValue(itemField.ModifyValue(itemField.ItemVisual), pItem.GetVisibleItemVisual(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetUpdateFieldValue(itemField.ModifyValue(itemField.ItemID), 0u);
|
||||
SetUpdateFieldValue(itemField.ModifyValue(itemField.SecondaryItemModifiedAppearanceID), 0u);
|
||||
SetUpdateFieldValue(itemField.ModifyValue(itemField.ItemAppearanceModID), (ushort)0);
|
||||
SetUpdateFieldValue(itemField.ModifyValue(itemField.ItemVisual), (ushort)0);
|
||||
}
|
||||
|
||||
@@ -1338,7 +1338,7 @@ namespace Game.Guilds
|
||||
|
||||
public bool LoadBankItemFromDB(SQLFields field)
|
||||
{
|
||||
byte tabId = field.Read<byte>(44);
|
||||
byte tabId = field.Read<byte>(52);
|
||||
if (tabId >= _GetPurchasedTabsSize())
|
||||
{
|
||||
Log.outError(LogFilter.Guild, "Invalid tab for item (GUID: {0}, id: {1}) in guild bank, skipped.",
|
||||
@@ -3249,7 +3249,7 @@ namespace Game.Guilds
|
||||
|
||||
public bool LoadItemFromDB(SQLFields field)
|
||||
{
|
||||
byte slotId = field.Read<byte>(45);
|
||||
byte slotId = field.Read<byte>(53);
|
||||
uint itemGuid = field.Read<uint>(0);
|
||||
uint itemEntry = field.Read<uint>(1);
|
||||
if (slotId >= GuildConst.MaxBankSlots)
|
||||
|
||||
@@ -382,7 +382,7 @@ namespace Game
|
||||
uint count = 0;
|
||||
do
|
||||
{
|
||||
ulong guildId = result.Read<ulong>(43);
|
||||
ulong guildId = result.Read<ulong>(51);
|
||||
Guild guild = GetGuildById(guildId);
|
||||
if (guild)
|
||||
guild.LoadBankItemFromDB(result.GetFields());
|
||||
|
||||
@@ -116,10 +116,10 @@ namespace Game
|
||||
|
||||
if (transmogItem.ItemModifiedAppearanceID != 0 || transmogItem.SecondaryItemModifiedAppearanceID != 0)
|
||||
{
|
||||
if (!validateAndStoreTransmogItem(itemTransmogrified, (uint)transmogItem.ItemModifiedAppearanceID, false))
|
||||
if (transmogItem.ItemModifiedAppearanceID != 0 && !validateAndStoreTransmogItem(itemTransmogrified, (uint)transmogItem.ItemModifiedAppearanceID, false))
|
||||
return;
|
||||
|
||||
if (!validateAndStoreTransmogItem(itemTransmogrified, (uint)transmogItem.SecondaryItemModifiedAppearanceID, true))
|
||||
if (transmogItem.SecondaryItemModifiedAppearanceID != 0 && !validateAndStoreTransmogItem(itemTransmogrified, (uint)transmogItem.SecondaryItemModifiedAppearanceID, true))
|
||||
return;
|
||||
|
||||
// add cost
|
||||
|
||||
@@ -157,6 +157,7 @@ namespace Game.Networking.Packets
|
||||
VisualItems[slot].DisplayId = equipment.NextUInt32();
|
||||
VisualItems[slot].DisplayEnchantId = equipment.NextUInt32();
|
||||
VisualItems[slot].Subclass = (byte)equipment.NextUInt32();
|
||||
VisualItems[slot].SecondaryItemModifiedAppearanceID = equipment.NextUInt32();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,14 +263,14 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
data.WriteUInt32(DisplayId);
|
||||
data.WriteUInt32(DisplayEnchantId);
|
||||
data.WriteInt32(ItemModifiedAppearanceID);
|
||||
data.WriteUInt32(SecondaryItemModifiedAppearanceID);
|
||||
data.WriteUInt8(InvType);
|
||||
data.WriteUInt8(Subclass);
|
||||
}
|
||||
|
||||
public uint DisplayId;
|
||||
public uint DisplayEnchantId;
|
||||
public int ItemModifiedAppearanceID; // also -1 is some special value
|
||||
public uint SecondaryItemModifiedAppearanceID; // also -1 is some special value
|
||||
public byte InvType;
|
||||
public byte Subclass;
|
||||
}
|
||||
|
||||
@@ -3193,11 +3193,19 @@ CREATE TABLE `item_instance_transmog` (
|
||||
`itemModifiedAppearanceSpec2` int(11) NOT NULL DEFAULT '0',
|
||||
`itemModifiedAppearanceSpec3` int(11) NOT NULL DEFAULT '0',
|
||||
`itemModifiedAppearanceSpec4` int(11) NOT NULL DEFAULT '0',
|
||||
`itemModifiedAppearanceSpec5` int(11) NOT NULL DEFAULT '0',
|
||||
`spellItemEnchantmentAllSpecs` int(11) NOT NULL DEFAULT '0',
|
||||
`spellItemEnchantmentSpec1` int(11) NOT NULL DEFAULT '0',
|
||||
`spellItemEnchantmentSpec2` int(11) NOT NULL DEFAULT '0',
|
||||
`spellItemEnchantmentSpec3` int(11) NOT NULL DEFAULT '0',
|
||||
`spellItemEnchantmentSpec4` int(11) NOT NULL DEFAULT '0',
|
||||
`spellItemEnchantmentSpec5` int(11) NOT NULL DEFAULT '0',
|
||||
`secondaryItemModifiedAppearanceAllSpecs` int(11) NOT NULL DEFAULT '0',
|
||||
`secondaryItemModifiedAppearanceSpec1` int(11) NOT NULL DEFAULT '0',
|
||||
`secondaryItemModifiedAppearanceSpec2` int(11) NOT NULL DEFAULT '0',
|
||||
`secondaryItemModifiedAppearanceSpec3` int(11) NOT NULL DEFAULT '0',
|
||||
`secondaryItemModifiedAppearanceSpec4` int(11) NOT NULL DEFAULT '0',
|
||||
`secondaryItemModifiedAppearanceSpec5` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`itemGuid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
@@ -3858,7 +3866,8 @@ INSERT INTO `updates` VALUES
|
||||
('2021_04_05_00_characters.sql','33D656995E0F3578FFE1A658ED1692CA5310AB30','ARCHIVED','2021-04-05 23:44:54',0),
|
||||
('2021_05_10_00_characters.sql','0A406242BC18BDA5A65CDE3E2AFEE760D79F819F','ARCHIVED','2021-05-10 23:30:34',0),
|
||||
('2021_05_11_00_characters.sql','C3F0337CE8363F970AB4FDB9D23BBB7C650A0B0E','ARCHIVED','2021-05-11 15:39:26',0),
|
||||
('2021_07_04_00_characters.sql','E0E7AD664DDB553E96B457DD9ED8976665E94007','ARCHIVED','2021-07-04 22:23:24',0);
|
||||
('2021_07_04_00_characters.sql','E0E7AD664DDB553E96B457DD9ED8976665E94007','ARCHIVED','2021-07-04 22:23:24',0),
|
||||
('2021_08_11_00_characters.sql','2137A52A45B045104B97D39626CE3C0214625B17','RELEASED','2021-08-11 21:48:57',0);
|
||||
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
UPDATE `characters` SET `equipmentCache`=CONCAT(
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -93), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -89), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -85), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -81), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -77), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -73), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -69), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -65), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -61), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -57), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -53), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -49), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -45), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -41), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -37), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -33), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -29), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -25), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -21), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -17), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -13), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -9), ' ', 4), ' 0 '),
|
||||
CONCAT(SUBSTRING_INDEX(SUBSTRING_INDEX(`equipmentCache`, ' ', -5), ' ', 4), ' 0 ')
|
||||
) WHERE LENGTH(`equipmentCache`) > 0;
|
||||
|
||||
ALTER TABLE `item_instance_transmog`
|
||||
ADD `itemModifiedAppearanceSpec5` int(11) NOT NULL DEFAULT '0' AFTER `itemModifiedAppearanceSpec4`,
|
||||
ADD `spellItemEnchantmentSpec5` int(11) NOT NULL DEFAULT '0' AFTER `spellItemEnchantmentSpec4`,
|
||||
ADD `secondaryItemModifiedAppearanceAllSpecs` int(11) NOT NULL DEFAULT '0' AFTER `spellItemEnchantmentSpec5`,
|
||||
ADD `secondaryItemModifiedAppearanceSpec1` int(11) NOT NULL DEFAULT '0' AFTER `secondaryItemModifiedAppearanceAllSpecs`,
|
||||
ADD `secondaryItemModifiedAppearanceSpec2` int(11) NOT NULL DEFAULT '0' AFTER `secondaryItemModifiedAppearanceSpec1`,
|
||||
ADD `secondaryItemModifiedAppearanceSpec3` int(11) NOT NULL DEFAULT '0' AFTER `secondaryItemModifiedAppearanceSpec2`,
|
||||
ADD `secondaryItemModifiedAppearanceSpec4` int(11) NOT NULL DEFAULT '0' AFTER `secondaryItemModifiedAppearanceSpec3`,
|
||||
ADD `secondaryItemModifiedAppearanceSpec5` int(11) NOT NULL DEFAULT '0' AFTER `secondaryItemModifiedAppearanceSpec4`;
|
||||
@@ -1,66 +0,0 @@
|
||||
--
|
||||
-- Table structure for table `adventure_journal`
|
||||
--
|
||||
DROP TABLE IF EXISTS `adventure_journal`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `adventure_journal` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Name` text DEFAULT NULL,
|
||||
`Description` text DEFAULT NULL,
|
||||
`ButtonText` text DEFAULT NULL,
|
||||
`RewardDescription` text DEFAULT NULL,
|
||||
`ContinueDescription` text DEFAULT NULL,
|
||||
`Type` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`PlayerConditionId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Flags` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`ButtonActionType` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`TextureFileDataId` int(11) NOT NULL DEFAULT '0',
|
||||
`LfgDungeonId` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`QuestId` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`BattleMasterListId` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`PriorityMin` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`PriorityMax` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`ItemId` int(11) NOT NULL DEFAULT '0',
|
||||
`ItemQuantity` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`CurrencyType` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`CurrencyQuantity` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`UiMapId` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`BonusPlayerConditionId1` int(11) NOT NULL DEFAULT '0',
|
||||
`BonusPlayerConditionId2` int(11) NOT NULL DEFAULT '0',
|
||||
`BonusValue1` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`BonusValue2` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `adventure_journal_locale`
|
||||
--
|
||||
DROP TABLE IF EXISTS `adventure_journal_locale`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `adventure_journal_locale` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`locale` varchar(4) NOT NULL,
|
||||
`Name_lang` text DEFAULT NULL,
|
||||
`Description_lang` text DEFAULT NULL,
|
||||
`ButtonText_lang` text DEFAULT NULL,
|
||||
`RewardDescription_lang` text DEFAULT NULL,
|
||||
`ContinueDescription_lang` text DEFAULT NULL,
|
||||
`VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`locale`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
/*!50500 PARTITION BY LIST COLUMNS(locale)
|
||||
(PARTITION deDE VALUES IN ('deDE') ENGINE = InnoDB,
|
||||
PARTITION esES VALUES IN ('esES') ENGINE = InnoDB,
|
||||
PARTITION esMX VALUES IN ('esMX') ENGINE = InnoDB,
|
||||
PARTITION frFR VALUES IN ('frFR') ENGINE = InnoDB,
|
||||
PARTITION itIT VALUES IN ('itIT') ENGINE = InnoDB,
|
||||
PARTITION koKR VALUES IN ('koKR') ENGINE = InnoDB,
|
||||
PARTITION ptBR VALUES IN ('ptBR') ENGINE = InnoDB,
|
||||
PARTITION ruRU VALUES IN ('ruRU') ENGINE = InnoDB,
|
||||
PARTITION zhCN VALUES IN ('zhCN') ENGINE = InnoDB,
|
||||
PARTITION zhTW VALUES IN ('zhTW') ENGINE = InnoDB) */;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
Reference in New Issue
Block a user