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;
|
||||
|
||||
+334
-299
@@ -149,226 +149,243 @@ namespace Game.Entities
|
||||
{
|
||||
case ItemUpdateState.New:
|
||||
case ItemUpdateState.Changed:
|
||||
{
|
||||
byte index = 0;
|
||||
stmt = DB.Characters.GetPreparedStatement(uState == ItemUpdateState.New ? CharStatements.REP_ITEM_INSTANCE : CharStatements.UPD_ITEM_INSTANCE);
|
||||
stmt.AddValue(index, GetEntry());
|
||||
stmt.AddValue(++index, GetOwnerGUID().GetCounter());
|
||||
stmt.AddValue(++index, GetCreator().GetCounter());
|
||||
stmt.AddValue(++index, GetGiftCreator().GetCounter());
|
||||
stmt.AddValue(++index, GetCount());
|
||||
stmt.AddValue(++index, (uint)m_itemData.Expiration);
|
||||
|
||||
StringBuilder ss = new();
|
||||
for (byte i = 0; i < m_itemData.SpellCharges.GetSize() && i < _bonusData.EffectCount; ++i)
|
||||
ss.AppendFormat("{0} ", GetSpellCharges(i));
|
||||
|
||||
stmt.AddValue(++index, ss.ToString());
|
||||
stmt.AddValue(++index, (uint)m_itemData.DynamicFlags);
|
||||
|
||||
ss.Clear();
|
||||
for (EnchantmentSlot slot = 0; slot < EnchantmentSlot.Max; ++slot)
|
||||
ss.AppendFormat("{0} {1} {2} ", GetEnchantmentId(slot), GetEnchantmentDuration(slot), GetEnchantmentCharges(slot));
|
||||
|
||||
stmt.AddValue(++index, ss.ToString());
|
||||
stmt.AddValue(++index, m_randomBonusListId);
|
||||
stmt.AddValue(++index, (uint)m_itemData.Durability);
|
||||
stmt.AddValue(++index, (uint)m_itemData.CreatePlayedTime);
|
||||
stmt.AddValue(++index, m_text);
|
||||
stmt.AddValue(++index, GetModifier(ItemModifier.BattlePetSpeciesId));
|
||||
stmt.AddValue(++index, GetModifier(ItemModifier.BattlePetBreedData));
|
||||
stmt.AddValue(++index, GetModifier(ItemModifier.BattlePetLevel));
|
||||
stmt.AddValue(++index, GetModifier(ItemModifier.BattlePetDisplayId));
|
||||
stmt.AddValue(++index, (byte)m_itemData.Context);
|
||||
|
||||
ss.Clear();
|
||||
|
||||
foreach (int bonusListID in (List<uint>)m_itemData.BonusListIDs)
|
||||
ss.Append($"{bonusListID} ");
|
||||
|
||||
stmt.AddValue(++index, ss.ToString());
|
||||
stmt.AddValue(++index, GetGUID().GetCounter());
|
||||
|
||||
DB.Characters.Execute(stmt);
|
||||
|
||||
if ((uState == ItemUpdateState.Changed) && HasItemFlag(ItemFieldFlags.Wrapped))
|
||||
{
|
||||
byte index = 0;
|
||||
stmt = DB.Characters.GetPreparedStatement(uState == ItemUpdateState.New ? CharStatements.REP_ITEM_INSTANCE : CharStatements.UPD_ITEM_INSTANCE);
|
||||
stmt.AddValue(index, GetEntry());
|
||||
stmt.AddValue(++index, GetOwnerGUID().GetCounter());
|
||||
stmt.AddValue(++index, GetCreator().GetCounter());
|
||||
stmt.AddValue(++index, GetGiftCreator().GetCounter());
|
||||
stmt.AddValue(++index, GetCount());
|
||||
stmt.AddValue(++index, (uint)m_itemData.Expiration);
|
||||
|
||||
StringBuilder ss = new();
|
||||
for (byte i = 0; i < m_itemData.SpellCharges.GetSize() && i < _bonusData.EffectCount; ++i)
|
||||
ss.AppendFormat("{0} ", GetSpellCharges(i));
|
||||
|
||||
stmt.AddValue(++index, ss.ToString());
|
||||
stmt.AddValue(++index, (uint)m_itemData.DynamicFlags);
|
||||
|
||||
ss.Clear();
|
||||
for (EnchantmentSlot slot = 0; slot < EnchantmentSlot.Max; ++slot)
|
||||
ss.AppendFormat("{0} {1} {2} ", GetEnchantmentId(slot), GetEnchantmentDuration(slot), GetEnchantmentCharges(slot));
|
||||
|
||||
stmt.AddValue(++index, ss.ToString());
|
||||
stmt.AddValue(++index, m_randomBonusListId);
|
||||
stmt.AddValue(++index, (uint)m_itemData.Durability);
|
||||
stmt.AddValue(++index, (uint)m_itemData.CreatePlayedTime);
|
||||
stmt.AddValue(++index, m_text);
|
||||
stmt.AddValue(++index, GetModifier(ItemModifier.BattlePetSpeciesId));
|
||||
stmt.AddValue(++index, GetModifier(ItemModifier.BattlePetBreedData));
|
||||
stmt.AddValue(++index, GetModifier(ItemModifier.BattlePetLevel));
|
||||
stmt.AddValue(++index, GetModifier(ItemModifier.BattlePetDisplayId));
|
||||
stmt.AddValue(++index, (byte)m_itemData.Context);
|
||||
|
||||
ss.Clear();
|
||||
|
||||
foreach (int bonusListID in (List<uint>)m_itemData.BonusListIDs)
|
||||
ss.Append($"{bonusListID} ");
|
||||
|
||||
stmt.AddValue(++index, ss.ToString());
|
||||
stmt.AddValue(++index, GetGUID().GetCounter());
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_GIFT_OWNER);
|
||||
stmt.AddValue(0, GetOwnerGUID().GetCounter());
|
||||
stmt.AddValue(1, GetGUID().GetCounter());
|
||||
DB.Characters.Execute(stmt);
|
||||
}
|
||||
|
||||
if ((uState == ItemUpdateState.Changed) && HasItemFlag(ItemFieldFlags.Wrapped))
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_GIFT_OWNER);
|
||||
stmt.AddValue(0, GetOwnerGUID().GetCounter());
|
||||
stmt.AddValue(1, GetGUID().GetCounter());
|
||||
DB.Characters.Execute(stmt);
|
||||
}
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_GEMS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_GEMS);
|
||||
if (m_itemData.Gems.Size() != 0)
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_GEMS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
int i = 0;
|
||||
int gemFields = 4;
|
||||
|
||||
if (m_itemData.Gems.Size() != 0)
|
||||
foreach (SocketedGem gemData in m_itemData.Gems)
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_GEMS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
int i = 0;
|
||||
int gemFields = 4;
|
||||
|
||||
foreach (SocketedGem gemData in m_itemData.Gems)
|
||||
if (gemData.ItemId != 0)
|
||||
{
|
||||
if (gemData.ItemId != 0)
|
||||
stmt.AddValue(1 + i * gemFields, (uint)gemData.ItemId);
|
||||
StringBuilder gemBonusListIDs = new();
|
||||
foreach (ushort bonusListID in gemData.BonusListIDs)
|
||||
{
|
||||
stmt.AddValue(1 + i * gemFields, (uint)gemData.ItemId);
|
||||
StringBuilder gemBonusListIDs = new();
|
||||
foreach (ushort bonusListID in gemData.BonusListIDs)
|
||||
{
|
||||
if (bonusListID != 0)
|
||||
gemBonusListIDs.AppendFormat("{0} ", bonusListID);
|
||||
}
|
||||
if (bonusListID != 0)
|
||||
gemBonusListIDs.AppendFormat("{0} ", bonusListID);
|
||||
}
|
||||
|
||||
stmt.AddValue(2 + i * gemFields, gemBonusListIDs.ToString());
|
||||
stmt.AddValue(3 + i * gemFields, (byte)gemData.Context);
|
||||
stmt.AddValue(4 + i * gemFields, m_gemScalingLevels[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
stmt.AddValue(1 + i * gemFields, 0);
|
||||
stmt.AddValue(2 + i * gemFields, "");
|
||||
stmt.AddValue(3 + i * gemFields, 0);
|
||||
stmt.AddValue(4 + i * gemFields, 0);
|
||||
}
|
||||
++i;
|
||||
stmt.AddValue(2 + i * gemFields, gemBonusListIDs.ToString());
|
||||
stmt.AddValue(3 + i * gemFields, (byte)gemData.Context);
|
||||
stmt.AddValue(4 + i * gemFields, m_gemScalingLevels[i]);
|
||||
}
|
||||
|
||||
for (; i < ItemConst.MaxGemSockets; ++i)
|
||||
else
|
||||
{
|
||||
stmt.AddValue(1 + i * gemFields, 0);
|
||||
stmt.AddValue(2 + i * gemFields, "");
|
||||
stmt.AddValue(3 + i * gemFields, 0);
|
||||
stmt.AddValue(4 + i * gemFields, 0);
|
||||
}
|
||||
trans.Append(stmt);
|
||||
++i;
|
||||
}
|
||||
|
||||
ItemModifier[] transmogMods =
|
||||
for (; i < ItemConst.MaxGemSockets; ++i)
|
||||
{
|
||||
ItemModifier.TransmogAppearanceAllSpecs,
|
||||
ItemModifier.TransmogAppearanceSpec1,
|
||||
ItemModifier.TransmogAppearanceSpec2,
|
||||
ItemModifier.TransmogAppearanceSpec3,
|
||||
ItemModifier.TransmogAppearanceSpec4,
|
||||
stmt.AddValue(1 + i * gemFields, 0);
|
||||
stmt.AddValue(2 + i * gemFields, "");
|
||||
stmt.AddValue(3 + i * gemFields, 0);
|
||||
stmt.AddValue(4 + i * gemFields, 0);
|
||||
}
|
||||
trans.Append(stmt);
|
||||
}
|
||||
|
||||
ItemModifier.EnchantIllusionAllSpecs,
|
||||
ItemModifier.EnchantIllusionSpec1,
|
||||
ItemModifier.EnchantIllusionSpec2,
|
||||
ItemModifier.EnchantIllusionSpec3,
|
||||
ItemModifier.EnchantIllusionSpec4,
|
||||
};
|
||||
ItemModifier[] transmogMods =
|
||||
{
|
||||
ItemModifier.TransmogAppearanceAllSpecs,
|
||||
ItemModifier.TransmogAppearanceSpec1,
|
||||
ItemModifier.TransmogAppearanceSpec2,
|
||||
ItemModifier.TransmogAppearanceSpec3,
|
||||
ItemModifier.TransmogAppearanceSpec4,
|
||||
ItemModifier.TransmogAppearanceSpec5,
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_TRANSMOG);
|
||||
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);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
if (transmogMods.Any(modifier => GetModifier(modifier) != 0))
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_TRANSMOG);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
stmt.AddValue(1, GetModifier(ItemModifier.TransmogAppearanceAllSpecs));
|
||||
stmt.AddValue(2, GetModifier(ItemModifier.TransmogAppearanceSpec1));
|
||||
stmt.AddValue(3, GetModifier(ItemModifier.TransmogAppearanceSpec2));
|
||||
stmt.AddValue(4, GetModifier(ItemModifier.TransmogAppearanceSpec3));
|
||||
stmt.AddValue(5, GetModifier(ItemModifier.TransmogAppearanceSpec4));
|
||||
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);
|
||||
}
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_ARTIFACT);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_ARTIFACT_POWERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
if (GetTemplate().GetArtifactID() != 0)
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_ARTIFACT);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
stmt.AddValue(1, (ulong)m_itemData.ArtifactXP);
|
||||
stmt.AddValue(2, GetModifier(ItemModifier.ArtifactAppearanceId));
|
||||
stmt.AddValue(3, GetModifier(ItemModifier.ArtifactTier));
|
||||
trans.Append(stmt);
|
||||
|
||||
if (transmogMods.Any(modifier => GetModifier(modifier) != 0))
|
||||
foreach (ArtifactPower artifactPower in m_itemData.ArtifactPowers)
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_TRANSMOG);
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_ARTIFACT_POWERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
stmt.AddValue(1, GetModifier(ItemModifier.TransmogAppearanceAllSpecs));
|
||||
stmt.AddValue(2, GetModifier(ItemModifier.TransmogAppearanceSpec1));
|
||||
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(1, artifactPower.ArtifactPowerId);
|
||||
stmt.AddValue(2, artifactPower.PurchasedRank);
|
||||
trans.Append(stmt);
|
||||
}
|
||||
}
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_ARTIFACT);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_ARTIFACT_POWERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
if (GetTemplate().GetArtifactID() != 0)
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_ARTIFACT);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
stmt.AddValue(1, (ulong)m_itemData.ArtifactXP);
|
||||
stmt.AddValue(2, GetModifier(ItemModifier.ArtifactAppearanceId));
|
||||
stmt.AddValue(3, GetModifier(ItemModifier.ArtifactTier));
|
||||
trans.Append(stmt);
|
||||
|
||||
foreach (ArtifactPower artifactPower in m_itemData.ArtifactPowers)
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_ARTIFACT_POWERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
stmt.AddValue(1, artifactPower.ArtifactPowerId);
|
||||
stmt.AddValue(2, artifactPower.PurchasedRank);
|
||||
trans.Append(stmt);
|
||||
}
|
||||
}
|
||||
|
||||
ItemModifier[] modifiersTable =
|
||||
{
|
||||
ItemModifier[] modifiersTable =
|
||||
{
|
||||
ItemModifier.TimewalkerLevel,
|
||||
ItemModifier.ArtifactKnowledgeLevel
|
||||
};
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_MODIFIERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_MODIFIERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
if (modifiersTable.Any(modifier => GetModifier(modifier) != 0))
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_MODIFIERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
stmt.AddValue(1, GetModifier(ItemModifier.TimewalkerLevel));
|
||||
stmt.AddValue(2, GetModifier(ItemModifier.ArtifactKnowledgeLevel));
|
||||
trans.Append(stmt);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemUpdateState.Removed:
|
||||
if (modifiersTable.Any(modifier => GetModifier(modifier) != 0))
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE);
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_MODIFIERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
stmt.AddValue(1, GetModifier(ItemModifier.TimewalkerLevel));
|
||||
stmt.AddValue(2, GetModifier(ItemModifier.ArtifactKnowledgeLevel));
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_GEMS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_TRANSMOG);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_ARTIFACT);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_ARTIFACT_POWERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_MODIFIERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
if (HasItemFlag(ItemFieldFlags.Wrapped))
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_GIFT);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
}
|
||||
|
||||
// Delete the items if this is a container
|
||||
if (!loot.IsLooted())
|
||||
Global.LootItemStorage.RemoveStoredLootForContainer(GetGUID().GetCounter());
|
||||
|
||||
Dispose();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemUpdateState.Removed:
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_GEMS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_TRANSMOG);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_ARTIFACT);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_ARTIFACT_POWERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_MODIFIERS);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
if (HasItemFlag(ItemFieldFlags.Wrapped))
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_GIFT);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
}
|
||||
|
||||
// Delete the items if this is a container
|
||||
if (!loot.IsLooted())
|
||||
Global.LootItemStorage.RemoveStoredLootForContainer(GetGUID().GetCounter());
|
||||
|
||||
Dispose();
|
||||
return;
|
||||
}
|
||||
case ItemUpdateState.Unchanged:
|
||||
break;
|
||||
}
|
||||
@@ -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), ' ');
|
||||
@@ -1025,30 +1051,30 @@ namespace Game.Entities
|
||||
switch (gemEnchant.Effect[i])
|
||||
{
|
||||
case ItemEnchantmentType.BonusListID:
|
||||
{
|
||||
var bonusesEffect = Global.DB2Mgr.GetItemBonusList(gemEnchant.EffectArg[i]);
|
||||
if (bonusesEffect != null)
|
||||
{
|
||||
var bonusesEffect = Global.DB2Mgr.GetItemBonusList(gemEnchant.EffectArg[i]);
|
||||
foreach (ItemBonusRecord itemBonus in bonusesEffect)
|
||||
if (itemBonus.BonusType == ItemBonusType.ItemLevel)
|
||||
|
||||
_bonusData.GemItemLevelBonus[slot] += (uint)itemBonus.Value[0];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemEnchantmentType.BonusListCurve:
|
||||
{
|
||||
uint artifactrBonusListId = Global.DB2Mgr.GetItemBonusListForItemLevelDelta((short)Global.DB2Mgr.GetCurveValueAt((uint)Curves.ArtifactRelicItemLevelBonus, gemBaseItemLevel + gemBonus.ItemLevelBonus));
|
||||
if (artifactrBonusListId != 0)
|
||||
{
|
||||
var bonusesEffect = Global.DB2Mgr.GetItemBonusList(artifactrBonusListId);
|
||||
if (bonusesEffect != null)
|
||||
{
|
||||
foreach (ItemBonusRecord itemBonus in bonusesEffect)
|
||||
if (itemBonus.BonusType == ItemBonusType.ItemLevel)
|
||||
|
||||
_bonusData.GemItemLevelBonus[slot] += (uint)itemBonus.Value[0];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemEnchantmentType.BonusListCurve:
|
||||
{
|
||||
uint artifactrBonusListId = Global.DB2Mgr.GetItemBonusListForItemLevelDelta((short)Global.DB2Mgr.GetCurveValueAt((uint)Curves.ArtifactRelicItemLevelBonus, gemBaseItemLevel + gemBonus.ItemLevelBonus));
|
||||
if (artifactrBonusListId != 0)
|
||||
{
|
||||
var bonusesEffect = Global.DB2Mgr.GetItemBonusList(artifactrBonusListId);
|
||||
if (bonusesEffect != null)
|
||||
foreach (ItemBonusRecord itemBonus in bonusesEffect)
|
||||
if (itemBonus.BonusType == ItemBonusType.ItemLevel)
|
||||
_bonusData.GemItemLevelBonus[slot] += (uint)itemBonus.Value[0];
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1643,42 +1669,42 @@ namespace Game.Entities
|
||||
case InventoryType.Trinket:
|
||||
case InventoryType.Cloak:
|
||||
case InventoryType.Holdable:
|
||||
{
|
||||
var armorPrice = CliDB.ImportPriceArmorStorage.LookupByKey(inventoryType);
|
||||
if (armorPrice == null)
|
||||
return 0;
|
||||
|
||||
switch ((ItemSubClassArmor)proto.GetSubClass())
|
||||
{
|
||||
var armorPrice = CliDB.ImportPriceArmorStorage.LookupByKey(inventoryType);
|
||||
if (armorPrice == null)
|
||||
return 0;
|
||||
|
||||
switch ((ItemSubClassArmor)proto.GetSubClass())
|
||||
{
|
||||
case ItemSubClassArmor.Miscellaneous:
|
||||
case ItemSubClassArmor.Cloth:
|
||||
typeFactor = armorPrice.ClothModifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Leather:
|
||||
typeFactor = armorPrice.LeatherModifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Mail:
|
||||
typeFactor = armorPrice.ChainModifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Plate:
|
||||
typeFactor = armorPrice.PlateModifier;
|
||||
break;
|
||||
default:
|
||||
typeFactor = 1.0f;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case ItemSubClassArmor.Miscellaneous:
|
||||
case ItemSubClassArmor.Cloth:
|
||||
typeFactor = armorPrice.ClothModifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Leather:
|
||||
typeFactor = armorPrice.LeatherModifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Mail:
|
||||
typeFactor = armorPrice.ChainModifier;
|
||||
break;
|
||||
case ItemSubClassArmor.Plate:
|
||||
typeFactor = armorPrice.PlateModifier;
|
||||
break;
|
||||
default:
|
||||
typeFactor = 1.0f;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case InventoryType.Shield:
|
||||
{
|
||||
var shieldPrice = CliDB.ImportPriceShieldStorage.LookupByKey(2); // it only has two rows, it's unclear which is the one used
|
||||
if (shieldPrice == null)
|
||||
return 0;
|
||||
{
|
||||
var shieldPrice = CliDB.ImportPriceShieldStorage.LookupByKey(2); // it only has two rows, it's unclear which is the one used
|
||||
if (shieldPrice == null)
|
||||
return 0;
|
||||
|
||||
typeFactor = shieldPrice.Data;
|
||||
break;
|
||||
}
|
||||
typeFactor = shieldPrice.Data;
|
||||
break;
|
||||
}
|
||||
case InventoryType.WeaponMainhand:
|
||||
weapType = 0;
|
||||
break;
|
||||
@@ -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()]);
|
||||
@@ -2112,7 +2147,7 @@ namespace Game.Entities
|
||||
|
||||
return purchased + extraUnlocked;
|
||||
}
|
||||
|
||||
|
||||
public uint GetTotalPurchasedArtifactPowers()
|
||||
{
|
||||
uint purchasedRanks = 0;
|
||||
@@ -2132,54 +2167,54 @@ namespace Game.Entities
|
||||
switch (enchant.Effect[i])
|
||||
{
|
||||
case ItemEnchantmentType.ArtifactPowerBonusRankByType:
|
||||
{
|
||||
for (int artifactPowerIndex = 0; artifactPowerIndex < m_itemData.ArtifactPowers.Size(); ++artifactPowerIndex)
|
||||
{
|
||||
for (int artifactPowerIndex = 0; artifactPowerIndex < m_itemData.ArtifactPowers.Size(); ++artifactPowerIndex)
|
||||
ArtifactPower artifactPower = m_itemData.ArtifactPowers[artifactPowerIndex];
|
||||
if (CliDB.ArtifactPowerStorage.LookupByKey(artifactPower.ArtifactPowerId).Label == enchant.EffectArg[i])
|
||||
{
|
||||
ArtifactPower artifactPower = m_itemData.ArtifactPowers[artifactPowerIndex];
|
||||
if (CliDB.ArtifactPowerStorage.LookupByKey(artifactPower.ArtifactPowerId).Label == enchant.EffectArg[i])
|
||||
{
|
||||
byte newRank = artifactPower.CurrentRankWithBonus;
|
||||
if (apply)
|
||||
newRank += (byte)enchant.EffectPointsMin[i];
|
||||
else
|
||||
newRank -= (byte)enchant.EffectPointsMin[i];
|
||||
|
||||
artifactPower = m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.ArtifactPowers, artifactPowerIndex);
|
||||
SetUpdateFieldValue(ref artifactPower.CurrentRankWithBonus, newRank);
|
||||
|
||||
if (IsEquipped())
|
||||
{
|
||||
ArtifactPowerRankRecord artifactPowerRank = Global.DB2Mgr.GetArtifactPowerRank(artifactPower.ArtifactPowerId, (byte)(newRank != 0 ? newRank - 1 : 0));
|
||||
if (artifactPowerRank != null)
|
||||
owner.ApplyArtifactPowerRank(this, artifactPowerRank, newRank != 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ItemEnchantmentType.ArtifactPowerBonusRankByID:
|
||||
{
|
||||
ushort artifactPowerIndex = m_artifactPowerIdToIndex.LookupByKey(enchant.EffectArg[i]);
|
||||
if (artifactPowerIndex != 0)
|
||||
{
|
||||
byte newRank = m_itemData.ArtifactPowers[artifactPowerIndex].CurrentRankWithBonus;
|
||||
byte newRank = artifactPower.CurrentRankWithBonus;
|
||||
if (apply)
|
||||
newRank += (byte)enchant.EffectPointsMin[i];
|
||||
else
|
||||
newRank -= (byte)enchant.EffectPointsMin[i];
|
||||
|
||||
ArtifactPower artifactPower = m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.ArtifactPowers, artifactPowerIndex);
|
||||
artifactPower = m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.ArtifactPowers, artifactPowerIndex);
|
||||
SetUpdateFieldValue(ref artifactPower.CurrentRankWithBonus, newRank);
|
||||
|
||||
if (IsEquipped())
|
||||
{
|
||||
ArtifactPowerRankRecord artifactPowerRank = Global.DB2Mgr.GetArtifactPowerRank(m_itemData.ArtifactPowers[artifactPowerIndex].ArtifactPowerId, (byte)(newRank != 0 ? newRank - 1 : 0));
|
||||
ArtifactPowerRankRecord artifactPowerRank = Global.DB2Mgr.GetArtifactPowerRank(artifactPower.ArtifactPowerId, (byte)(newRank != 0 ? newRank - 1 : 0));
|
||||
if (artifactPowerRank != null)
|
||||
owner.ApplyArtifactPowerRank(this, artifactPowerRank, newRank != 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ItemEnchantmentType.ArtifactPowerBonusRankByID:
|
||||
{
|
||||
ushort artifactPowerIndex = m_artifactPowerIdToIndex.LookupByKey(enchant.EffectArg[i]);
|
||||
if (artifactPowerIndex != 0)
|
||||
{
|
||||
byte newRank = m_itemData.ArtifactPowers[artifactPowerIndex].CurrentRankWithBonus;
|
||||
if (apply)
|
||||
newRank += (byte)enchant.EffectPointsMin[i];
|
||||
else
|
||||
newRank -= (byte)enchant.EffectPointsMin[i];
|
||||
|
||||
ArtifactPower artifactPower = m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.ArtifactPowers, artifactPowerIndex);
|
||||
SetUpdateFieldValue(ref artifactPower.CurrentRankWithBonus, newRank);
|
||||
|
||||
if (IsEquipped())
|
||||
{
|
||||
ArtifactPowerRankRecord artifactPowerRank = Global.DB2Mgr.GetArtifactPowerRank(m_itemData.ArtifactPowers[artifactPowerIndex].ArtifactPowerId, (byte)(newRank != 0 ? newRank - 1 : 0));
|
||||
if (artifactPowerRank != null)
|
||||
owner.ApplyArtifactPowerRank(this, artifactPowerRank, newRank != 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ItemEnchantmentType.ArtifactPowerBonusRankPicker:
|
||||
if (slot >= EnchantmentSlot.Sock1 && slot <= EnchantmentSlot.Sock3 && _bonusData.GemRelicType[slot - EnchantmentSlot.Sock1] != -1)
|
||||
{
|
||||
@@ -2264,7 +2299,7 @@ namespace Game.Entities
|
||||
SetState(ItemUpdateState.Changed, owner);
|
||||
}
|
||||
|
||||
public ItemContext GetContext() { return (ItemContext)(int)m_itemData.Context; }
|
||||
public ItemContext GetContext() { return (ItemContext)(int)m_itemData.Context; }
|
||||
public void SetContext(ItemContext context) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.Context), (int)context); }
|
||||
|
||||
public void SetPetitionId(uint petitionId)
|
||||
@@ -2442,11 +2477,11 @@ namespace Game.Entities
|
||||
|
||||
public ObjectGuid GetOwnerGUID() { return m_itemData.Owner; }
|
||||
public void SetOwnerGUID(ObjectGuid guid) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.Owner), guid); }
|
||||
public ObjectGuid GetContainedIn() { return m_itemData.ContainedIn; }
|
||||
public ObjectGuid GetContainedIn() { return m_itemData.ContainedIn; }
|
||||
public void SetContainedIn(ObjectGuid guid) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.ContainedIn), guid); }
|
||||
public ObjectGuid GetCreator() { return m_itemData.Creator; }
|
||||
public ObjectGuid GetCreator() { return m_itemData.Creator; }
|
||||
public void SetCreator(ObjectGuid guid) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.Creator), guid); }
|
||||
public ObjectGuid GetGiftCreator() { return m_itemData.GiftCreator; }
|
||||
public ObjectGuid GetGiftCreator() { return m_itemData.GiftCreator; }
|
||||
public void SetGiftCreator(ObjectGuid guid) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.GiftCreator), guid); }
|
||||
|
||||
void SetExpiration(uint expiration) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.Expiration), expiration); }
|
||||
@@ -2785,19 +2820,19 @@ namespace Game.Entities
|
||||
ItemLevelBonus += values[0];
|
||||
break;
|
||||
case ItemBonusType.Stat:
|
||||
{
|
||||
uint statIndex;
|
||||
for (statIndex = 0; statIndex < ItemConst.MaxStats; ++statIndex)
|
||||
if (ItemStatType[statIndex] == values[0] || ItemStatType[statIndex] == -1)
|
||||
break;
|
||||
{
|
||||
uint statIndex;
|
||||
for (statIndex = 0; statIndex < ItemConst.MaxStats; ++statIndex)
|
||||
if (ItemStatType[statIndex] == values[0] || ItemStatType[statIndex] == -1)
|
||||
break;
|
||||
|
||||
if (statIndex < ItemConst.MaxStats)
|
||||
{
|
||||
ItemStatType[statIndex] = values[0];
|
||||
StatPercentEditor[statIndex] += values[1];
|
||||
}
|
||||
break;
|
||||
if (statIndex < ItemConst.MaxStats)
|
||||
{
|
||||
ItemStatType[statIndex] = values[0];
|
||||
StatPercentEditor[statIndex] += values[1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemBonusType.Quality:
|
||||
if (!_state.HasQualityBonus)
|
||||
{
|
||||
@@ -2815,18 +2850,18 @@ namespace Game.Entities
|
||||
}
|
||||
break;
|
||||
case ItemBonusType.Socket:
|
||||
{
|
||||
uint socketCount = (uint)values[0];
|
||||
for (uint i = 0; i < ItemConst.MaxGemSockets && socketCount != 0; ++i)
|
||||
{
|
||||
uint socketCount = (uint)values[0];
|
||||
for (uint i = 0; i < ItemConst.MaxGemSockets && socketCount != 0; ++i)
|
||||
if (socketColor[i] == 0)
|
||||
{
|
||||
if (socketColor[i] == 0)
|
||||
{
|
||||
socketColor[i] = (SocketColor)values[1];
|
||||
--socketCount;
|
||||
}
|
||||
socketColor[i] = (SocketColor)values[1];
|
||||
--socketCount;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ItemBonusType.Appearance:
|
||||
if (values[1] < _state.AppearanceModPriority)
|
||||
{
|
||||
@@ -2954,7 +2989,7 @@ namespace Game.Entities
|
||||
public AzeriteData AzeriteItem;
|
||||
public AzeriteEmpoweredData AzeriteEmpoweredItem;
|
||||
|
||||
public static void Init(Dictionary<ulong, ItemAdditionalLoadInfo> loadInfo, SQLResult artifactResult, SQLResult azeriteItemResult, SQLResult azeriteItemMilestonePowersResult,
|
||||
public static void Init(Dictionary<ulong, ItemAdditionalLoadInfo> loadInfo, SQLResult artifactResult, SQLResult azeriteItemResult, SQLResult azeriteItemMilestonePowersResult,
|
||||
SQLResult azeriteItemUnlockedEssencesResult, SQLResult azeriteEmpoweredItemResult)
|
||||
{
|
||||
ItemAdditionalLoadInfo GetOrCreateLoadInfo(ulong guid)
|
||||
|
||||
@@ -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