Core/Items: Implement azerite empowered items
Port From (https://github.com/TrinityCore/TrinityCore/commit/d934824421c83598853487c5cc9e4cbb3c5d0006)
This commit is contained in:
@@ -930,6 +930,11 @@ namespace Framework.Constants
|
||||
BonusStamina = 2
|
||||
}
|
||||
|
||||
public enum AzeriteTierUnlockSetFlags
|
||||
{
|
||||
Default = 0x1
|
||||
}
|
||||
|
||||
public enum BattlegroundBracketId // bracketId for level ranges
|
||||
{
|
||||
First = 0,
|
||||
@@ -994,7 +999,8 @@ namespace Framework.Constants
|
||||
|
||||
public enum Curves
|
||||
{
|
||||
ArtifactRelicItemLevelBonus = 1718
|
||||
ArtifactRelicItemLevelBonus = 1718,
|
||||
AzeriteEmpoweredItemRespecCost = 6785
|
||||
}
|
||||
|
||||
public enum Emote
|
||||
|
||||
@@ -346,6 +346,7 @@ namespace Framework.Constants
|
||||
Bounding = 16,
|
||||
RelicType = 17,
|
||||
OverrideRequiredLevel = 18,
|
||||
AzeriteTierUnlockSet = 19,
|
||||
OverrideCanDisenchant = 21,
|
||||
OverrideCanScrap = 22
|
||||
}
|
||||
@@ -819,6 +820,7 @@ namespace Framework.Constants
|
||||
Child = 0x00080000,
|
||||
Unk15 = 0x00100000, // ?
|
||||
NewItem = 0x00200000, // Item glows in inventory
|
||||
AzeriteEmpoweredItemViewed = 0x00400000, // Won't play azerite powers animation when viewing it
|
||||
Unk17 = 0x00400000, // ?
|
||||
Unk18 = 0x00800000, // ?
|
||||
Unk19 = 0x01000000, // ?
|
||||
@@ -833,7 +835,7 @@ namespace Framework.Constants
|
||||
|
||||
public enum ItemFieldFlags2
|
||||
{
|
||||
HeartOfAzerothEquipped = 0x1
|
||||
Equipped = 0x1
|
||||
}
|
||||
|
||||
public enum ItemFlags : long
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace Framework.Constants
|
||||
public const int MaxWorldMapOverlayArea = 4;
|
||||
public const int MaxMountCapabilities = 24;
|
||||
public const int MaxLockCase = 8;
|
||||
public const int MaxAzeriteEmpoweredTier = 5;
|
||||
public const int MaxAzeriteEssenceSlot = 3;
|
||||
public const int MaxAzeriteEssenceRank = 4;
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Framework.Database
|
||||
"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, " +
|
||||
"resettalents_time, primarySpecialization, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeonDifficulty, " +
|
||||
"totalKills, todayKills, yesterdayKills, chosenTitle, watchedFaction, drunk, health, power1, power2, power3, power4, power5, power6, instance_id, activeTalentGroup, lootSpecId, exploredZones, " +
|
||||
"knownTitles, actionBars, raidDifficulty, legacyRaidDifficulty, fishingSteps, honor, honorLevel, honorRestState, honorRestBonus " +
|
||||
"knownTitles, actionBars, raidDifficulty, legacyRaidDifficulty, fishingSteps, honor, honorLevel, honorRestState, honorRestBonus, numRespecs " +
|
||||
"FROM characters c LEFT JOIN character_fishingsteps cfs ON c.guid = cfs.guid WHERE c.guid = ?");
|
||||
|
||||
PrepareStatement(CharStatements.SEL_GROUP_MEMBER, "SELECT guid FROM group_member WHERE memberGuid = ?");
|
||||
@@ -151,6 +151,7 @@ namespace Framework.Database
|
||||
"FROM item_instance_azerite iz INNER JOIN mail_items mi ON iz.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
||||
PrepareStatement(CharStatements.SEL_MAILITEMS_AZERITE_MILESTONE_POWER, "SELECT iamp.itemGuid, iamp.azeriteItemMilestonePowerId FROM item_instance_azerite_milestone_power iamp INNER JOIN mail_items mi ON iamp.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
||||
PrepareStatement(CharStatements.SEL_MAILITEMS_AZERITE_UNLOCKED_ESSENCE, "SELECT iaue.itemGuid, iaue.azeriteEssenceId, iaue.`rank` FROM item_instance_azerite_unlocked_essence iaue INNER JOIN mail_items mi ON iaue.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
||||
PrepareStatement(CharStatements.SEL_MAILITEMS_AZERITE_EMPOWERED, "SELECT iae.itemGuid, iae.azeritePowerId1, iae.azeritePowerId2, iae.azeritePowerId3, iae.azeritePowerId4, iae.azeritePowerId5 FROM item_instance_azerite_empowered iae INNER JOIN mail_items mi ON iae.itemGuid = mi.item_guid INNER JOIN mail m ON mi.mail_id = m.id WHERE m.receiver = ?");
|
||||
PrepareStatement(CharStatements.SEL_AUCTION_ITEMS, "SELECT " + SelectItemInstanceContent + " FROM auctionhouse ah JOIN item_instance ii ON ah.itemguid = ii.guid LEFT JOIN item_instance_gems ig ON ii.guid = ig.itemGuid LEFT JOIN item_instance_transmog iit ON ii.guid = iit.itemGuid LEFT JOIN item_instance_modifiers im ON ii.guid = im.itemGuid");
|
||||
PrepareStatement(CharStatements.SEL_AUCTIONS, "SELECT id, auctioneerguid, itemguid, itemEntry, count, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit FROM auctionhouse ah INNER JOIN item_instance ii ON ii.guid = ah.itemguid");
|
||||
PrepareStatement(CharStatements.INS_AUCTION, "INSERT INTO auctionhouse (id, auctioneerguid, itemguid, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
@@ -215,6 +216,11 @@ namespace Framework.Database
|
||||
PrepareStatement(CharStatements.INS_ITEM_INSTANCE_AZERITE_UNLOCKED_ESSENCE, "INSERT INTO item_instance_azerite_unlocked_essence (itemGuid, azeriteEssenceId, `rank`) VALUES (?, ?, ?)");
|
||||
PrepareStatement(CharStatements.DEL_ITEM_INSTANCE_AZERITE_UNLOCKED_ESSENCE, "DELETE FROM item_instance_azerite_unlocked_essence WHERE itemGuid = ?");
|
||||
PrepareStatement(CharStatements.DEL_ITEM_INSTANCE_AZERITE_UNLOCKED_ESSENCE_BY_OWNER, "DELETE iaue FROM item_instance_azerite_unlocked_essence iaue LEFT JOIN item_instance ii ON iaue.itemGuid = ii.guid WHERE ii.owner_guid = ?");
|
||||
PrepareStatement(CharStatements.SEL_ITEM_INSTANCE_AZERITE_EMPOWERED, "SELECT iae.itemGuid, iae.azeritePowerId1, iae.azeritePowerId2, iae.azeritePowerId3, iae.azeritePowerId4, iae.azeritePowerId5 FROM item_instance_azerite_empowered iae INNER JOIN character_inventory ci ON iae.itemGuid = ci.item WHERE ci.guid = ?");
|
||||
PrepareStatement(CharStatements.INS_ITEM_INSTANCE_AZERITE_EMPOWERED, "INSERT INTO item_instance_azerite_empowered (itemGuid, azeritePowerId1, azeritePowerId2, azeritePowerId3, azeritePowerId4, azeritePowerId5) VALUES (?, ?, ?, ? ,? ,?)");
|
||||
PrepareStatement(CharStatements.UPD_ITEM_INSTANCE_AZERITE_EMPOWERED, "UPDATE item_instance_azerite_empowered SET azeritePowerId1 = ?, azeritePowerId2 = ?, azeritePowerId3 = ?, azeritePowerId4 = ?, azeritePowerId5 = ? WHERE itemGuid = ?");
|
||||
PrepareStatement(CharStatements.DEL_ITEM_INSTANCE_AZERITE_EMPOWERED, "DELETE FROM item_instance_azerite_empowered WHERE itemGuid = ?");
|
||||
PrepareStatement(CharStatements.DEL_ITEM_INSTANCE_AZERITE_EMPOWERED_BY_OWNER, "DELETE iae FROM item_instance_azerite_empowered iae LEFT JOIN item_instance ii ON iae.itemGuid = ii.guid WHERE ii.owner_guid = ?");
|
||||
PrepareStatement(CharStatements.UPD_GIFT_OWNER, "UPDATE character_gifts SET guid = ? WHERE item_guid = ?");
|
||||
PrepareStatement(CharStatements.DEL_GIFT, "DELETE FROM character_gifts WHERE item_guid = ?");
|
||||
PrepareStatement(CharStatements.SEL_CHARACTER_GIFT_BY_ITEM, "SELECT entry, flags FROM character_gifts WHERE item_guid = ?");
|
||||
@@ -451,7 +457,7 @@ namespace Framework.Database
|
||||
"(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
PrepareStatement(CharStatements.UPD_CHARACTER, "UPDATE characters SET name=?,race=?,class=?,gender=?,level=?,xp=?,money=?,skin=?,face=?,hairStyle=?,hairColor=?,facialStyle=?,customDisplay1=?,customDisplay2=?,customDisplay3=?,inventorySlots=?,bankSlots=?,restState=?,playerFlags=?,playerFlagsEx=?," +
|
||||
"map=?,instance_id=?,dungeonDifficulty=?,raidDifficulty=?,legacyRaidDifficulty=?,position_x=?,position_y=?,position_z=?,orientation=?,trans_x=?,trans_y=?,trans_z=?,trans_o=?,transguid=?,taximask=?,cinematic=?,totaltime=?,leveltime=?,rest_bonus=?," +
|
||||
"logout_time=?,is_logout_resting=?,resettalents_cost=?,resettalents_time=?,primarySpecialization=?,extra_flags=?,stable_slots=?,at_login=?,zone=?,death_expire_time=?,taxi_path=?," +
|
||||
"logout_time=?,is_logout_resting=?,resettalents_cost=?,resettalents_time=?,numRespecs=?,primarySpecialization=?,extra_flags=?,stable_slots=?,at_login=?,zone=?,death_expire_time=?,taxi_path=?," +
|
||||
"totalKills=?,todayKills=?,yesterdayKills=?,chosenTitle=?," +
|
||||
"watchedFaction=?,drunk=?,health=?,power1=?,power2=?,power3=?,power4=?,power5=?,power6=?,latency=?,activeTalentGroup=?,lootSpecId=?,exploredZones=?," +
|
||||
"equipmentCache=?,knownTitles=?,actionBars=?,online=?,honor=?,honorLevel=?,honorRestState=?,honorRestBonus=?,lastLoginBuild=? WHERE guid=?");
|
||||
@@ -862,6 +868,7 @@ namespace Framework.Database
|
||||
SEL_MAILITEMS_AZERITE,
|
||||
SEL_MAILITEMS_AZERITE_MILESTONE_POWER,
|
||||
SEL_MAILITEMS_AZERITE_UNLOCKED_ESSENCE,
|
||||
SEL_MAILITEMS_AZERITE_EMPOWERED,
|
||||
SEL_AUCTION_ITEMS,
|
||||
INS_AUCTION,
|
||||
DEL_AUCTION,
|
||||
@@ -917,6 +924,11 @@ namespace Framework.Database
|
||||
INS_ITEM_INSTANCE_AZERITE_UNLOCKED_ESSENCE,
|
||||
DEL_ITEM_INSTANCE_AZERITE_UNLOCKED_ESSENCE,
|
||||
DEL_ITEM_INSTANCE_AZERITE_UNLOCKED_ESSENCE_BY_OWNER,
|
||||
SEL_ITEM_INSTANCE_AZERITE_EMPOWERED,
|
||||
INS_ITEM_INSTANCE_AZERITE_EMPOWERED,
|
||||
UPD_ITEM_INSTANCE_AZERITE_EMPOWERED,
|
||||
DEL_ITEM_INSTANCE_AZERITE_EMPOWERED,
|
||||
DEL_ITEM_INSTANCE_AZERITE_EMPOWERED_BY_OWNER,
|
||||
UPD_GIFT_OWNER,
|
||||
DEL_GIFT,
|
||||
SEL_CHARACTER_GIFT_BY_ITEM,
|
||||
|
||||
@@ -100,6 +100,9 @@ namespace Framework.Database
|
||||
PrepareStatement(HotfixStatements.SEL_AUCTION_HOUSE, "SELECT ID, Name, FactionID, DepositRate, ConsignmentRate FROM auction_house ORDER BY ID DESC");
|
||||
PrepareStatement(HotfixStatements.SEL_AUCTION_HOUSE_LOCALE, "SELECT ID, Name_lang FROM auction_house_locale WHERE locale = ?");
|
||||
|
||||
// AzeriteEmpoweredItem.db2
|
||||
PrepareStatement(HotfixStatements.SEL_AZERITE_EMPOWERED_ITEM, "SELECT ID, ItemID, AzeriteTierUnlockSetID, AzeritePowerSetID FROM azerite_empowered_item ORDER BY ID DESC");
|
||||
|
||||
// AzeriteEssence.db2
|
||||
PrepareStatement(HotfixStatements.SEL_AZERITE_ESSENCE, "SELECT Name, Description, ID, SpecSetID FROM azerite_essence ORDER BY ID DESC");
|
||||
PrepareStatement(HotfixStatements.SEL_AZERITE_ESSENCE_LOCALE, "SELECT ID, Name_lang, Description_lang FROM azerite_essence_locale WHERE locale = ?");
|
||||
@@ -124,6 +127,19 @@ namespace Framework.Database
|
||||
// AzeritePower.db2
|
||||
PrepareStatement(HotfixStatements.SEL_AZERITE_POWER, "SELECT ID, SpellID, ItemBonusListID, SpecSetID, Flags FROM azerite_power ORDER BY ID DESC");
|
||||
|
||||
// AzeritePowerSetMember.db2
|
||||
PrepareStatement(HotfixStatements.SEL_AZERITE_POWER_SET_MEMBER, "SELECT ID, AzeritePowerSetID, AzeritePowerID, Class, Tier, OrderIndex FROM azerite_power_set_member ORDER BY ID DESC");
|
||||
|
||||
// AzeriteTierUnlock.db2
|
||||
PrepareStatement(HotfixStatements.SEL_AZERITE_TIER_UNLOCK, "SELECT ID, ItemCreationContext, Tier, AzeriteLevel, AzeriteTierUnlockSetID FROM azerite_tier_unlock ORDER BY ID DESC");
|
||||
|
||||
// AzeriteTierUnlockSet.db2
|
||||
PrepareStatement(HotfixStatements.SEL_AZERITE_TIER_UNLOCK_SET, "SELECT ID, Flags FROM azerite_tier_unlock_set ORDER BY ID DESC");
|
||||
|
||||
// AzeriteUnlockMapping.db2
|
||||
PrepareStatement(HotfixStatements.SEL_AZERITE_UNLOCK_MAPPING, "SELECT ID, ItemLevel, ItemBonusListHead, ItemBonusListShoulders, ItemBonusListChest, " +
|
||||
"AzeriteUnlockMappingSetID FROM azerite_unlock_mapping ORDER BY ID DESC");
|
||||
|
||||
// BankBagSlotPrices.db2
|
||||
PrepareStatement(HotfixStatements.SEL_BANK_BAG_SLOT_PRICES, "SELECT ID, Cost FROM bank_bag_slot_prices ORDER BY ID DESC");
|
||||
|
||||
@@ -1154,6 +1170,8 @@ namespace Framework.Database
|
||||
SEL_AUCTION_HOUSE,
|
||||
SEL_AUCTION_HOUSE_LOCALE,
|
||||
|
||||
SEL_AZERITE_EMPOWERED_ITEM,
|
||||
|
||||
SEL_AZERITE_ESSENCE,
|
||||
SEL_AZERITE_ESSENCE_LOCALE,
|
||||
|
||||
@@ -1170,6 +1188,14 @@ namespace Framework.Database
|
||||
|
||||
SEL_AZERITE_POWER,
|
||||
|
||||
SEL_AZERITE_POWER_SET_MEMBER,
|
||||
|
||||
SEL_AZERITE_TIER_UNLOCK,
|
||||
|
||||
SEL_AZERITE_TIER_UNLOCK_SET,
|
||||
|
||||
SEL_AZERITE_UNLOCK_MAPPING,
|
||||
|
||||
SEL_BANK_BAG_SLOT_PRICES,
|
||||
|
||||
SEL_BANNED_ADDONS,
|
||||
|
||||
@@ -65,14 +65,14 @@ namespace Game.Achievements
|
||||
if (HasAchieved(achievement.Id))
|
||||
{
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteriaTree: (Id: {0} Type {1} Achievement {2}) Achievement already earned",
|
||||
criteria.ID, criteria.Entry.Type, achievement.Id);
|
||||
criteria.Id, criteria.Entry.Type, achievement.Id);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (achievement.InstanceID != -1 && referencePlayer.GetMapId() != achievement.InstanceID)
|
||||
{
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteriaTree: (Id: {0} Type {1} Achievement {2}) Wrong map",
|
||||
criteria.ID, criteria.Entry.Type, achievement.Id);
|
||||
criteria.Id, criteria.Entry.Type, achievement.Id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Game.Achievements
|
||||
(achievement.Faction == AchievementFaction.Alliance && referencePlayer.GetTeam() != Team.Alliance))
|
||||
{
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteriaTree: (Id: {0} Type {1} Achievement {2}) Wrong faction",
|
||||
criteria.ID, criteria.Entry.Type, achievement.Id);
|
||||
criteria.Id, criteria.Entry.Type, achievement.Id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ namespace Game.Achievements
|
||||
if (achievementCriteria.Entry.FailEvent != miscValue1 || (achievementCriteria.Entry.FailAsset != 0 && achievementCriteria.Entry.FailAsset != miscValue2))
|
||||
continue;
|
||||
|
||||
var trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(achievementCriteria.ID);
|
||||
var trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(achievementCriteria.Id);
|
||||
bool allComplete = true;
|
||||
foreach (CriteriaTree tree in trees)
|
||||
{
|
||||
@@ -577,7 +577,7 @@ namespace Game.Achievements
|
||||
{
|
||||
CriteriaUpdate criteriaUpdate = new CriteriaUpdate();
|
||||
|
||||
criteriaUpdate.CriteriaID = criteria.ID;
|
||||
criteriaUpdate.CriteriaID = criteria.Id;
|
||||
criteriaUpdate.Quantity = progress.Counter;
|
||||
criteriaUpdate.PlayerGUID = _owner.GetGUID();
|
||||
criteriaUpdate.Flags = 0;
|
||||
@@ -854,11 +854,11 @@ namespace Game.Achievements
|
||||
{
|
||||
if (node.Criteria != null)
|
||||
{
|
||||
var progress = _criteriaProgress.LookupByKey(node.Criteria.ID);
|
||||
var progress = _criteriaProgress.LookupByKey(node.Criteria.Id);
|
||||
if (progress != null)
|
||||
{
|
||||
GuildCriteriaProgress guildCriteriaProgress = new GuildCriteriaProgress();
|
||||
guildCriteriaProgress.CriteriaID = node.Criteria.ID;
|
||||
guildCriteriaProgress.CriteriaID = node.Criteria.Id;
|
||||
guildCriteriaProgress.DateCreated = 0;
|
||||
guildCriteriaProgress.DateStarted = 0;
|
||||
guildCriteriaProgress.DateUpdated = progress.Date;
|
||||
@@ -971,7 +971,7 @@ namespace Game.Achievements
|
||||
GuildCriteriaUpdate guildCriteriaUpdate = new GuildCriteriaUpdate();
|
||||
|
||||
GuildCriteriaProgress guildCriteriaProgress = new GuildCriteriaProgress();
|
||||
guildCriteriaProgress.CriteriaID = entry.ID;
|
||||
guildCriteriaProgress.CriteriaID = entry.Id;
|
||||
guildCriteriaProgress.DateCreated = 0;
|
||||
guildCriteriaProgress.DateStarted = 0;
|
||||
guildCriteriaProgress.DateUpdated = progress.Date;
|
||||
@@ -981,7 +981,7 @@ namespace Game.Achievements
|
||||
|
||||
guildCriteriaUpdate.Progress.Add(guildCriteriaProgress);
|
||||
|
||||
_owner.BroadcastPacketIfTrackingAchievement(guildCriteriaUpdate, entry.ID);
|
||||
_owner.BroadcastPacketIfTrackingAchievement(guildCriteriaUpdate, entry.Id);
|
||||
}
|
||||
|
||||
public override void SendCriteriaProgressRemoved(uint criteriaId)
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Game.Achievements
|
||||
List<Criteria> criteriaList = GetCriteriaByType(type);
|
||||
foreach (Criteria criteria in criteriaList)
|
||||
{
|
||||
List<CriteriaTree> trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.ID);
|
||||
List<CriteriaTree> trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.Id);
|
||||
if (!CanUpdateCriteria(criteria, trees, miscValue1, miscValue2, miscValue3, unit, referencePlayer))
|
||||
continue;
|
||||
|
||||
@@ -482,16 +482,16 @@ namespace Game.Achievements
|
||||
if (criteria.Entry.StartAsset != entry)
|
||||
continue;
|
||||
|
||||
List<CriteriaTree> trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.ID);
|
||||
List<CriteriaTree> trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.Id);
|
||||
bool canStart = false;
|
||||
foreach (CriteriaTree tree in trees)
|
||||
{
|
||||
if (!_timeCriteriaTrees.ContainsKey(tree.ID) && !IsCompletedCriteriaTree(tree))
|
||||
if (!_timeCriteriaTrees.ContainsKey(tree.Id) && !IsCompletedCriteriaTree(tree))
|
||||
{
|
||||
// Start the timer
|
||||
if (criteria.Entry.StartTimer * Time.InMilliseconds > timeLost)
|
||||
{
|
||||
_timeCriteriaTrees[tree.ID] = (uint)(criteria.Entry.StartTimer * Time.InMilliseconds - timeLost);
|
||||
_timeCriteriaTrees[tree.Id] = (uint)(criteria.Entry.StartTimer * Time.InMilliseconds - timeLost);
|
||||
canStart = true;
|
||||
}
|
||||
}
|
||||
@@ -513,10 +513,10 @@ namespace Game.Achievements
|
||||
if (criteria.Entry.StartAsset != entry)
|
||||
continue;
|
||||
|
||||
List<CriteriaTree> trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.ID);
|
||||
List<CriteriaTree> trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.Id);
|
||||
// Remove the timer from all trees
|
||||
foreach (CriteriaTree tree in trees)
|
||||
_timeCriteriaTrees.Remove(tree.ID);
|
||||
_timeCriteriaTrees.Remove(tree.Id);
|
||||
|
||||
// remove progress
|
||||
RemoveCriteriaProgress(criteria);
|
||||
@@ -525,7 +525,7 @@ namespace Game.Achievements
|
||||
|
||||
public CriteriaProgress GetCriteriaProgress(Criteria entry)
|
||||
{
|
||||
return _criteriaProgress.LookupByKey(entry.ID);
|
||||
return _criteriaProgress.LookupByKey(entry.Id);
|
||||
}
|
||||
|
||||
public void SetCriteriaProgress(Criteria criteria, ulong changeValue, Player referencePlayer, ProgressType progressType = ProgressType.Set)
|
||||
@@ -534,14 +534,14 @@ namespace Game.Achievements
|
||||
List<CriteriaTree> trees = null;
|
||||
if (criteria.Entry.StartTimer != 0)
|
||||
{
|
||||
trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.ID);
|
||||
trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.Id);
|
||||
if (trees.Empty())
|
||||
return;
|
||||
|
||||
bool hasTreeForTimed = false;
|
||||
foreach (CriteriaTree tree in trees)
|
||||
{
|
||||
var timedIter = _timeCriteriaTrees.LookupByKey(tree.ID);
|
||||
var timedIter = _timeCriteriaTrees.LookupByKey(tree.Id);
|
||||
if (timedIter != 0)
|
||||
{
|
||||
hasTreeForTimed = true;
|
||||
@@ -553,7 +553,7 @@ namespace Game.Achievements
|
||||
return;
|
||||
}
|
||||
|
||||
Log.outDebug(LogFilter.Achievement, "SetCriteriaProgress({0}, {1}) for {2}", criteria.ID, changeValue, GetOwnerInfo());
|
||||
Log.outDebug(LogFilter.Achievement, "SetCriteriaProgress({0}, {1}) for {2}", criteria.Id, changeValue, GetOwnerInfo());
|
||||
|
||||
CriteriaProgress progress = GetCriteriaProgress(criteria);
|
||||
if (progress == null)
|
||||
@@ -597,7 +597,7 @@ namespace Game.Achievements
|
||||
progress.Changed = true;
|
||||
progress.Date = Time.UnixTime; // set the date to the latest update.
|
||||
progress.PlayerGUID = referencePlayer ? referencePlayer.GetGUID() : ObjectGuid.Empty;
|
||||
_criteriaProgress[criteria.ID] = progress;
|
||||
_criteriaProgress[criteria.Id] = progress;
|
||||
|
||||
uint timeElapsed = 0;
|
||||
if (criteria.Entry.StartTimer != 0)
|
||||
@@ -606,7 +606,7 @@ namespace Game.Achievements
|
||||
|
||||
foreach (CriteriaTree tree in trees)
|
||||
{
|
||||
var timedIter = _timeCriteriaTrees.LookupByKey(tree.ID);
|
||||
var timedIter = _timeCriteriaTrees.LookupByKey(tree.Id);
|
||||
if (timedIter != 0)
|
||||
{
|
||||
// Client expects this in packet
|
||||
@@ -614,7 +614,7 @@ namespace Game.Achievements
|
||||
|
||||
// Remove the timer, we wont need it anymore
|
||||
if (IsCompletedCriteriaTree(tree))
|
||||
_timeCriteriaTrees.Remove(tree.ID);
|
||||
_timeCriteriaTrees.Remove(tree.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -627,12 +627,12 @@ namespace Game.Achievements
|
||||
if (criteria == null)
|
||||
return;
|
||||
|
||||
if (!_criteriaProgress.ContainsKey(criteria.ID))
|
||||
if (!_criteriaProgress.ContainsKey(criteria.Id))
|
||||
return;
|
||||
|
||||
SendCriteriaProgressRemoved(criteria.ID);
|
||||
SendCriteriaProgressRemoved(criteria.Id);
|
||||
|
||||
_criteriaProgress.Remove(criteria.ID);
|
||||
_criteriaProgress.Remove(criteria.Id);
|
||||
}
|
||||
|
||||
public bool IsCompletedCriteriaTree(CriteriaTree tree)
|
||||
@@ -735,7 +735,7 @@ namespace Game.Achievements
|
||||
(tree.Entry.Flags.HasAnyFlag(CriteriaTreeFlags.AllianceOnly) && referencePlayer.GetTeam() != Team.Alliance))
|
||||
{
|
||||
Log.outTrace(LogFilter.Achievement, "CriteriaHandler.CanUpdateCriteriaTree: (Id: {0} Type {1} CriteriaTree {2}) Wrong faction",
|
||||
criteria.ID, criteria.Entry.Type, tree.Entry.Id);
|
||||
criteria.Id, criteria.Entry.Type, tree.Entry.Id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -841,9 +841,9 @@ namespace Game.Achievements
|
||||
|
||||
bool CanUpdateCriteria(Criteria criteria, List<CriteriaTree> trees, ulong miscValue1, ulong miscValue2, ulong miscValue3, Unit unit, Player referencePlayer)
|
||||
{
|
||||
if (Global.DisableMgr.IsDisabledFor(DisableType.Criteria, criteria.ID, null))
|
||||
if (Global.DisableMgr.IsDisabledFor(DisableType.Criteria, criteria.Id, null))
|
||||
{
|
||||
Log.outError(LogFilter.Achievement, "CanUpdateCriteria: (Id: {0} Type {1}) Disabled", criteria.ID, criteria.Entry.Type);
|
||||
Log.outError(LogFilter.Achievement, "CanUpdateCriteria: (Id: {0} Type {1}) Disabled", criteria.Id, criteria.Entry.Type);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -862,19 +862,19 @@ namespace Game.Achievements
|
||||
|
||||
if (!RequirementsSatisfied(criteria, miscValue1, miscValue2, miscValue3, unit, referencePlayer))
|
||||
{
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteria: (Id: {0} Type {1}) Requirements not satisfied", criteria.ID, criteria.Entry.Type);
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteria: (Id: {0} Type {1}) Requirements not satisfied", criteria.Id, criteria.Entry.Type);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (criteria.Modifier != null && !ModifierTreeSatisfied(criteria.Modifier, miscValue1, miscValue2, unit, referencePlayer))
|
||||
{
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteria: (Id: {0} Type {1}) Requirements have not been satisfied", criteria.ID, criteria.Entry.Type);
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteria: (Id: {0} Type {1}) Requirements have not been satisfied", criteria.Id, criteria.Entry.Type);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ConditionsSatisfied(criteria, referencePlayer))
|
||||
{
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteria: (Id: {0} Type {1}) Conditions have not been satisfied", criteria.ID, criteria.Entry.Type);
|
||||
Log.outTrace(LogFilter.Achievement, "CanUpdateCriteria: (Id: {0} Type {1}) Conditions have not been satisfied", criteria.Id, criteria.Entry.Type);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2577,7 +2577,7 @@ namespace Game.Achievements
|
||||
continue;
|
||||
|
||||
CriteriaTree criteriaTree = new CriteriaTree();
|
||||
criteriaTree.ID = tree.Id;
|
||||
criteriaTree.Id = tree.Id;
|
||||
criteriaTree.Achievement = achievement;
|
||||
criteriaTree.ScenarioStep = scenarioStep;
|
||||
criteriaTree.QuestObjective = questObjective;
|
||||
@@ -2626,13 +2626,13 @@ namespace Game.Achievements
|
||||
continue;
|
||||
|
||||
Criteria criteria = new Criteria();
|
||||
criteria.ID = criteriaEntry.Id;
|
||||
criteria.Id = criteriaEntry.Id;
|
||||
criteria.Entry = criteriaEntry;
|
||||
var mod = _criteriaModifiers.LookupByKey(criteriaEntry.ModifierTreeId);
|
||||
if (mod != null)
|
||||
criteria.Modifier = mod;
|
||||
|
||||
_criteria[criteria.ID] = criteria;
|
||||
_criteria[criteria.Id] = criteria;
|
||||
|
||||
foreach (CriteriaTree tree in treeList)
|
||||
{
|
||||
@@ -2791,7 +2791,7 @@ namespace Game.Achievements
|
||||
|
||||
public CriteriaDataSet GetCriteriaDataSet(Criteria criteria)
|
||||
{
|
||||
return _criteriaDataMap.LookupByKey(criteria.ID);
|
||||
return _criteriaDataMap.LookupByKey(criteria.Id);
|
||||
}
|
||||
|
||||
public static bool IsGroupCriteriaType(CriteriaTypes type)
|
||||
@@ -2845,7 +2845,7 @@ namespace Game.Achievements
|
||||
|
||||
public class Criteria
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public CriteriaRecord Entry;
|
||||
public ModifierTreeNode Modifier;
|
||||
public CriteriaFlagsCu FlagsCu;
|
||||
@@ -2853,7 +2853,7 @@ namespace Game.Achievements
|
||||
|
||||
public class CriteriaTree
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public CriteriaTreeRecord Entry;
|
||||
public AchievementRecord Achievement;
|
||||
public ScenarioStepRecord ScenarioStep;
|
||||
@@ -2895,7 +2895,7 @@ namespace Game.Achievements
|
||||
{
|
||||
if (DataType >= CriteriaDataType.Max)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` for criteria (Entry: {0}) has wrong data type ({1}), ignored.", criteria.ID, DataType);
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` for criteria (Entry: {0}) has wrong data type ({1}), ignored.", criteria.Id, DataType);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2931,7 +2931,7 @@ namespace Game.Achievements
|
||||
default:
|
||||
if (DataType != CriteriaDataType.Script)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` has data for non-supported criteria type (Entry: {0} Type: {1}), ignored.", criteria.ID, (CriteriaTypes)criteria.Entry.Type);
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` has data for non-supported criteria type (Entry: {0} Type: {1}), ignored.", criteria.Id, (CriteriaTypes)criteria.Entry.Type);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -2946,7 +2946,7 @@ namespace Game.Achievements
|
||||
if (Creature.Id == 0 || Global.ObjectMgr.GetCreatureTemplate(Creature.Id) == null)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_CREATURE ({2}) has non-existing creature id in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Creature.Id);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Creature.Id);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -2954,19 +2954,19 @@ namespace Game.Achievements
|
||||
if (ClassRace.ClassId == 0 && ClassRace.RaceId == 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE ({2}) must not have 0 in either value field, ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType);
|
||||
criteria.Id, criteria.Entry.Type, DataType);
|
||||
return false;
|
||||
}
|
||||
if (ClassRace.ClassId != 0 && ((1 << (int)(ClassRace.ClassId - 1)) & (int)Class.ClassMaskAllPlayable) == 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE ({2}) has non-existing class in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, ClassRace.ClassId);
|
||||
criteria.Id, criteria.Entry.Type, DataType, ClassRace.ClassId);
|
||||
return false;
|
||||
}
|
||||
if (ClassRace.RaceId != 0 && ((1ul << (int)(ClassRace.RaceId - 1)) & (ulong)Race.RaceMaskAllPlayable) == 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE ({2}) has non-existing race in value2 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, ClassRace.RaceId);
|
||||
criteria.Id, criteria.Entry.Type, DataType, ClassRace.RaceId);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -2974,7 +2974,7 @@ namespace Game.Achievements
|
||||
if (Health.Percent < 1 || Health.Percent > 100)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_PLAYER_LESS_HEALTH ({2}) has wrong percent value in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Health.Percent);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Health.Percent);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -2985,20 +2985,20 @@ namespace Game.Achievements
|
||||
if (spellEntry == null)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type {2} has wrong spell id in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Aura.SpellId);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Aura.SpellId);
|
||||
return false;
|
||||
}
|
||||
SpellEffectInfo effect = spellEntry.GetEffect(Difficulty.None, Aura.EffectIndex);
|
||||
if (effect == null)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type {2} has wrong spell effect index in value2 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Aura.EffectIndex);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Aura.EffectIndex);
|
||||
return false;
|
||||
}
|
||||
if (effect.ApplyAuraName == 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type {2} has non-aura spell effect (ID: {3} Effect: {4}), ignores.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Aura.SpellId, Aura.EffectIndex);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Aura.SpellId, Aura.EffectIndex);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3007,7 +3007,7 @@ namespace Game.Achievements
|
||||
if (Value.ComparisonType >= (int)ComparisionType.Max)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_VALUE ({2}) has wrong ComparisionType in value2 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Value.ComparisonType);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Value.ComparisonType);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3015,7 +3015,7 @@ namespace Game.Achievements
|
||||
if (Level.Min > SharedConst.GTMaxLevel)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_T_LEVEL ({2}) has wrong minlevel in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Level.Min);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Level.Min);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3023,7 +3023,7 @@ namespace Game.Achievements
|
||||
if (Gender.Gender > (int)Framework.Constants.Gender.None)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_T_GENDER ({2}) has wrong gender in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Gender.Gender);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Gender.Gender);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3031,7 +3031,7 @@ namespace Game.Achievements
|
||||
if (ScriptId == 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_SCRIPT ({2}) does not have ScriptName set, ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType);
|
||||
criteria.Id, criteria.Entry.Type, DataType);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3039,7 +3039,7 @@ namespace Game.Achievements
|
||||
if (MapPlayers.MaxCount <= 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT ({2}) has wrong max players count in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, MapPlayers.MaxCount);
|
||||
criteria.Id, criteria.Entry.Type, DataType, MapPlayers.MaxCount);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3047,7 +3047,7 @@ namespace Game.Achievements
|
||||
if (TeamId.Team != (int)Team.Alliance && TeamId.Team != (int)Team.Horde)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_T_TEAM ({2}) has unknown team in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, TeamId.Team);
|
||||
criteria.Id, criteria.Entry.Type, DataType, TeamId.Team);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3055,7 +3055,7 @@ namespace Game.Achievements
|
||||
if (Drunk.State >= 4)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_S_DRUNK ({2}) has unknown drunken state in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Drunk.State);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Drunk.State);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3063,7 +3063,7 @@ namespace Game.Achievements
|
||||
if (!CliDB.HolidaysStorage.ContainsKey(Holiday.Id))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data`(Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_HOLIDAY ({2}) has unknown holiday in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, Holiday.Id);
|
||||
criteria.Id, criteria.Entry.Type, DataType, Holiday.Id);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3073,7 +3073,7 @@ namespace Game.Achievements
|
||||
if (GameEvent.Id < 1 || GameEvent.Id >= events.Length)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_GAME_EVENT ({2}) has unknown game_event in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, GameEvent.Id);
|
||||
criteria.Id, criteria.Entry.Type, DataType, GameEvent.Id);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3084,7 +3084,7 @@ namespace Game.Achievements
|
||||
if (EquippedItem.ItemQuality >= (uint)ItemQuality.Max)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `achievement_criteria_requirement` (Entry: {0} Type: {1}) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM ({2}) has unknown quality state in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, EquippedItem.ItemQuality);
|
||||
criteria.Id, criteria.Entry.Type, DataType, EquippedItem.ItemQuality);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3092,26 +3092,26 @@ namespace Game.Achievements
|
||||
if (!CliDB.MapStorage.ContainsKey(MapId.Id))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_MAP_ID ({2}) contains an unknown map entry in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, MapId.Id);
|
||||
criteria.Id, criteria.Entry.Type, DataType, MapId.Id);
|
||||
}
|
||||
return true;
|
||||
case CriteriaDataType.SPlayerClassRace:
|
||||
if (ClassRace.ClassId == 0 && ClassRace.RaceId == 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE ({2}) must not have 0 in either value field, ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType);
|
||||
criteria.Id, criteria.Entry.Type, DataType);
|
||||
return false;
|
||||
}
|
||||
if (ClassRace.ClassId != 0 && ((1 << (int)(ClassRace.ClassId - 1)) & (int)Class.ClassMaskAllPlayable) == 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE ({2}) has non-existing class in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, ClassRace.ClassId);
|
||||
criteria.Id, criteria.Entry.Type, DataType, ClassRace.ClassId);
|
||||
return false;
|
||||
}
|
||||
if (ClassRace.RaceId != 0 && ((1ul << (int)(ClassRace.RaceId - 1)) & (ulong)Race.RaceMaskAllPlayable) == 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE ({2}) has non-existing race in value2 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, ClassRace.RaceId);
|
||||
criteria.Id, criteria.Entry.Type, DataType, ClassRace.RaceId);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3119,7 +3119,7 @@ namespace Game.Achievements
|
||||
if (!CliDB.CharTitlesStorage.ContainsKey(KnownTitle.Id))
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_S_KNOWN_TITLE ({2}) contains an unknown title_id in value1 ({3}), ignore.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, KnownTitle.Id);
|
||||
criteria.Id, criteria.Entry.Type, DataType, KnownTitle.Id);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -3127,12 +3127,12 @@ namespace Game.Achievements
|
||||
if (itemQuality.Quality >= (uint)ItemQuality.Max)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) for data type CRITERIA_DATA_TYPE_S_ITEM_QUALITY ({2}) contains an unknown quality state value in value1 ({3}), ignored.",
|
||||
criteria.ID, criteria.Entry.Type, DataType, itemQuality.Quality);
|
||||
criteria.Id, criteria.Entry.Type, DataType, itemQuality.Quality);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) contains data of a non-supported data type ({2}), ignored.", criteria.ID, criteria.Entry.Type, DataType);
|
||||
Log.outError(LogFilter.Sql, "Table `criteria_data` (Entry: {0} Type: {1}) contains data of a non-supported data type ({2}), ignored.", criteria.Id, criteria.Entry.Type, DataType);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,15 +412,15 @@ namespace Game.Chat
|
||||
foreach (var pair in targetFSL)
|
||||
{
|
||||
FactionState faction = pair.Value;
|
||||
FactionRecord factionEntry = CliDB.FactionStorage.LookupByKey(faction.ID);
|
||||
FactionRecord factionEntry = CliDB.FactionStorage.LookupByKey(faction.Id);
|
||||
string factionName = factionEntry != null ? factionEntry.Name[loc] : "#Not found#";
|
||||
ReputationRank rank = target.GetReputationMgr().GetRank(factionEntry);
|
||||
string rankName = handler.GetCypherString(ReputationMgr.ReputationRankStrIndex[(int)rank]);
|
||||
StringBuilder ss = new StringBuilder();
|
||||
if (handler.GetSession() != null)
|
||||
ss.AppendFormat("{0} - |cffffffff|Hfaction:{0}|h[{1} {2}]|h|r", faction.ID, factionName, loc);
|
||||
ss.AppendFormat("{0} - |cffffffff|Hfaction:{0}|h[{1} {2}]|h|r", faction.Id, factionName, loc);
|
||||
else
|
||||
ss.AppendFormat("{0} - {1} {2}", faction.ID, factionName, loc);
|
||||
ss.AppendFormat("{0} - {1} {2}", faction.Id, factionName, loc);
|
||||
|
||||
ss.AppendFormat(" {0} ({1})", rankName, target.GetReputationMgr().GetReputation(factionEntry));
|
||||
|
||||
|
||||
@@ -142,9 +142,9 @@ namespace Game.Collision
|
||||
Log.outError(LogFilter.Server, "StaticMapTree.LoadMapTile() : could not acquire WorldModel [{0}, {1}]", tileX, tileY);
|
||||
|
||||
// update tree
|
||||
if (iSpawnIndices.ContainsKey(spawn.ID))
|
||||
if (iSpawnIndices.ContainsKey(spawn.Id))
|
||||
{
|
||||
uint referencedVal = iSpawnIndices[spawn.ID];
|
||||
uint referencedVal = iSpawnIndices[spawn.Id];
|
||||
if (!iLoadedSpawns.ContainsKey(referencedVal))
|
||||
{
|
||||
if (referencedVal >= iNTreeValues)
|
||||
@@ -202,13 +202,13 @@ namespace Game.Collision
|
||||
vm.ReleaseModelInstance(spawn.name);
|
||||
|
||||
// update tree
|
||||
if (!iSpawnIndices.ContainsKey(spawn.ID))
|
||||
if (!iSpawnIndices.ContainsKey(spawn.Id))
|
||||
result = false;
|
||||
else
|
||||
{
|
||||
uint referencedNode = iSpawnIndices[spawn.ID];
|
||||
uint referencedNode = iSpawnIndices[spawn.Id];
|
||||
if (!iLoadedSpawns.ContainsKey(referencedNode))
|
||||
Log.outError(LogFilter.Server, "StaticMapTree.UnloadMapTile() : trying to unload non-referenced model '{0}' (ID:{1})", spawn.name, spawn.ID);
|
||||
Log.outError(LogFilter.Server, "StaticMapTree.UnloadMapTile() : trying to unload non-referenced model '{0}' (ID:{1})", spawn.name, spawn.Id);
|
||||
else if (--iLoadedSpawns[referencedNode] == 0)
|
||||
{
|
||||
iTreeValues[referencedNode].SetUnloaded();
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Game.Collision
|
||||
{
|
||||
flags = spawn.flags;
|
||||
adtId = spawn.adtId;
|
||||
ID = spawn.ID;
|
||||
Id = spawn.Id;
|
||||
iPos = spawn.iPos;
|
||||
iRot = spawn.iRot;
|
||||
iScale = spawn.iScale;
|
||||
@@ -50,7 +50,7 @@ namespace Game.Collision
|
||||
|
||||
spawn.flags = reader.ReadUInt32();
|
||||
spawn.adtId = reader.ReadUInt16();
|
||||
spawn.ID = reader.ReadUInt32();
|
||||
spawn.Id = reader.ReadUInt32();
|
||||
spawn.iPos = reader.Read<Vector3>();
|
||||
spawn.iRot = reader.Read<Vector3>();
|
||||
spawn.iScale = reader.ReadSingle();
|
||||
@@ -70,7 +70,7 @@ namespace Game.Collision
|
||||
|
||||
public uint flags;
|
||||
public ushort adtId;
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public Vector3 iPos;
|
||||
public Vector3 iRot;
|
||||
public float iScale;
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace Game.DataStorage
|
||||
ArtifactTierStorage = DBReader.Read<ArtifactTierRecord>("ArtifactTier.db2", HotfixStatements.SEL_ARTIFACT_TIER);
|
||||
ArtifactUnlockStorage = DBReader.Read<ArtifactUnlockRecord>("ArtifactUnlock.db2", HotfixStatements.SEL_ARTIFACT_UNLOCK);
|
||||
AuctionHouseStorage = DBReader.Read<AuctionHouseRecord>("AuctionHouse.db2", HotfixStatements.SEL_AUCTION_HOUSE, HotfixStatements.SEL_AUCTION_HOUSE_LOCALE);
|
||||
AzeriteEmpoweredItemStorage = DBReader.Read<AzeriteEmpoweredItemRecord>("AzeriteEmpoweredItem.db2", HotfixStatements.SEL_AZERITE_EMPOWERED_ITEM);
|
||||
AzeriteEssenceStorage = DBReader.Read<AzeriteEssenceRecord>("AzeriteEssence.db2", HotfixStatements.SEL_AZERITE_ESSENCE, HotfixStatements.SEL_AZERITE_ESSENCE_LOCALE);
|
||||
AzeriteEssencePowerStorage = DBReader.Read<AzeriteEssencePowerRecord>("AzeriteEssencePower.db2", HotfixStatements.SEL_AZERITE_ESSENCE_POWER, HotfixStatements.SEL_AZERITE_ESSENCE_POWER_LOCALE);
|
||||
AzeriteItemStorage = DBReader.Read<AzeriteItemRecord>("AzeriteItem.db2", HotfixStatements.SEL_AZERITE_ITEM);
|
||||
@@ -61,6 +62,10 @@ namespace Game.DataStorage
|
||||
AzeriteKnowledgeMultiplierStorage = DBReader.Read<AzeriteKnowledgeMultiplierRecord>("AzeriteKnowledgeMultiplier.db2", HotfixStatements.SEL_AZERITE_KNOWLEDGE_MULTIPLIER);
|
||||
AzeriteLevelInfoStorage = DBReader.Read<AzeriteLevelInfoRecord>("AzeriteLevelInfo.db2", HotfixStatements.SEL_AZERITE_LEVEL_INFO);
|
||||
AzeritePowerStorage = DBReader.Read<AzeritePowerRecord>("AzeritePower.db2", HotfixStatements.SEL_AZERITE_POWER);
|
||||
AzeritePowerSetMemberStorage = DBReader.Read<AzeritePowerSetMemberRecord> ("AzeritePowerSetMember.db2", HotfixStatements.SEL_AZERITE_POWER_SET_MEMBER);
|
||||
AzeriteTierUnlockStorage = DBReader.Read<AzeriteTierUnlockRecord> ("AzeriteTierUnlock.db2", HotfixStatements.SEL_AZERITE_TIER_UNLOCK);
|
||||
AzeriteTierUnlockSetStorage = DBReader.Read<AzeriteTierUnlockSetRecord> ("AzeriteTierUnlockSet.db2", HotfixStatements.SEL_AZERITE_TIER_UNLOCK_SET);
|
||||
AzeriteUnlockMappingStorage = DBReader.Read<AzeriteUnlockMappingRecord> ("AzeriteUnlockMapping.db2", HotfixStatements.SEL_AZERITE_UNLOCK_MAPPING);
|
||||
BankBagSlotPricesStorage = DBReader.Read<BankBagSlotPricesRecord>("BankBagSlotPrices.db2", HotfixStatements.SEL_BANK_BAG_SLOT_PRICES);
|
||||
//BannedAddOnsStorage = DBReader.Read<BannedAddOnsRecord>("BannedAddons.db2", HotfixStatements.SEL_BANNED_ADDONS);
|
||||
BarberShopStyleStorage = DBReader.Read<BarberShopStyleRecord>("BarberShopStyle.db2", HotfixStatements.SEL_BARBER_SHOP_STYLE, HotfixStatements.SEL_BARBER_SHOP_STYLE_LOCALE);
|
||||
@@ -406,6 +411,7 @@ namespace Game.DataStorage
|
||||
public static DB6Storage<ArtifactTierRecord> ArtifactTierStorage;
|
||||
public static DB6Storage<ArtifactUnlockRecord> ArtifactUnlockStorage;
|
||||
public static DB6Storage<AuctionHouseRecord> AuctionHouseStorage;
|
||||
public static DB6Storage<AzeriteEmpoweredItemRecord> AzeriteEmpoweredItemStorage;
|
||||
public static DB6Storage<AzeriteEssenceRecord> AzeriteEssenceStorage;
|
||||
public static DB6Storage<AzeriteEssencePowerRecord> AzeriteEssencePowerStorage;
|
||||
public static DB6Storage<AzeriteItemRecord> AzeriteItemStorage;
|
||||
@@ -413,6 +419,10 @@ namespace Game.DataStorage
|
||||
public static DB6Storage<AzeriteKnowledgeMultiplierRecord> AzeriteKnowledgeMultiplierStorage;
|
||||
public static DB6Storage<AzeriteLevelInfoRecord> AzeriteLevelInfoStorage;
|
||||
public static DB6Storage<AzeritePowerRecord> AzeritePowerStorage;
|
||||
public static DB6Storage<AzeritePowerSetMemberRecord> AzeritePowerSetMemberStorage;
|
||||
public static DB6Storage<AzeriteTierUnlockRecord> AzeriteTierUnlockStorage;
|
||||
public static DB6Storage<AzeriteTierUnlockSetRecord> AzeriteTierUnlockSetStorage;
|
||||
public static DB6Storage<AzeriteUnlockMappingRecord> AzeriteUnlockMappingStorage;
|
||||
public static DB6Storage<BankBagSlotPricesRecord> BankBagSlotPricesStorage;
|
||||
//public static DB6Storage<BannedAddOnsRecord> BannedAddOnsStorage;
|
||||
public static DB6Storage<BarberShopStyleRecord> BarberShopStyleStorage;
|
||||
|
||||
@@ -63,8 +63,11 @@ namespace Game.DataStorage
|
||||
|
||||
CliDB.ArtifactPowerRankStorage.Clear();
|
||||
|
||||
foreach (AzeriteEmpoweredItemRecord azeriteEmpoweredItem in CliDB.AzeriteEmpoweredItemStorage.Values)
|
||||
_azeriteEmpoweredItems[azeriteEmpoweredItem.ItemID] = azeriteEmpoweredItem;
|
||||
|
||||
foreach (AzeriteEssencePowerRecord azeriteEssencePower in CliDB.AzeriteEssencePowerStorage.Values)
|
||||
_azeriteEssencePowersByIdAndRank[Tuple.Create((uint)azeriteEssencePower.AzeriteEssenceID, (uint)azeriteEssencePower.Tier)] = azeriteEssencePower;
|
||||
_azeriteEssencePowersByIdAndRank[((uint)azeriteEssencePower.AzeriteEssenceID, (uint)azeriteEssencePower.Tier)] = azeriteEssencePower;
|
||||
|
||||
foreach (AzeriteItemMilestonePowerRecord azeriteItemMilestonePower in CliDB.AzeriteItemMilestonePowerStorage.Values)
|
||||
_azeriteItemMilestonePowers.Add(azeriteItemMilestonePower);
|
||||
@@ -81,7 +84,25 @@ namespace Game.DataStorage
|
||||
_azeriteItemMilestonePowerByEssenceSlot[azeriteEssenceSlot] = azeriteItemMilestonePower;
|
||||
++azeriteEssenceSlot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (AzeritePowerSetMemberRecord azeritePowerSetMember in CliDB.AzeritePowerSetMemberStorage.Values)
|
||||
if (CliDB.AzeritePowerStorage.ContainsKey(azeritePowerSetMember.AzeritePowerID))
|
||||
_azeritePowers.Add(azeritePowerSetMember.AzeritePowerSetID, azeritePowerSetMember);
|
||||
|
||||
foreach (AzeriteTierUnlockRecord azeriteTierUnlock in CliDB.AzeriteTierUnlockStorage.Values)
|
||||
{
|
||||
var key = (azeriteTierUnlock.AzeriteTierUnlockSetID, (ItemContext)azeriteTierUnlock.ItemCreationContext);
|
||||
|
||||
if (!_azeriteTierUnlockLevels.ContainsKey(key))
|
||||
_azeriteTierUnlockLevels[key] = new byte[SharedConst.MaxAzeriteEmpoweredTier];
|
||||
|
||||
_azeriteTierUnlockLevels[key][azeriteTierUnlock.Tier] = azeriteTierUnlock.AzeriteLevel;
|
||||
}
|
||||
|
||||
MultiMap<uint, AzeriteUnlockMappingRecord> azeriteUnlockMappings = new MultiMap<uint, AzeriteUnlockMappingRecord>();
|
||||
foreach (AzeriteUnlockMappingRecord azeriteUnlockMapping in CliDB.AzeriteUnlockMappingStorage.Values)
|
||||
azeriteUnlockMappings.Add(azeriteUnlockMapping.AzeriteUnlockMappingSetID, azeriteUnlockMapping);
|
||||
|
||||
foreach (CharacterFacialHairStylesRecord characterFacialStyle in CliDB.CharacterFacialHairStylesStorage.Values)
|
||||
_characterFacialHairStyles.Add(Tuple.Create(characterFacialStyle.RaceID, characterFacialStyle.SexID, (uint)characterFacialStyle.VariationID));
|
||||
@@ -286,6 +307,9 @@ namespace Game.DataStorage
|
||||
|
||||
CliDB.ItemXBonusTreeStorage.Clear();
|
||||
|
||||
foreach (var pair in _azeriteEmpoweredItems)
|
||||
LoadAzeriteEmpoweredItemUnlockMappings(azeriteUnlockMappings, pair.Key);
|
||||
|
||||
foreach (MapDifficultyRecord entry in CliDB.MapDifficultyStorage.Values)
|
||||
{
|
||||
if (!_mapDifficulties.ContainsKey(entry.MapID))
|
||||
@@ -745,6 +769,11 @@ namespace Game.DataStorage
|
||||
return _artifactPowerRanks.LookupByKey(Tuple.Create(artifactPowerId, rank));
|
||||
}
|
||||
|
||||
public AzeriteEmpoweredItemRecord GetAzeriteEmpoweredItem(uint itemId)
|
||||
{
|
||||
return _azeriteEmpoweredItems.LookupByKey(itemId);
|
||||
}
|
||||
|
||||
public bool IsAzeriteItem(uint itemId)
|
||||
{
|
||||
return CliDB.AzeriteItemStorage.Any(pair => pair.Value.ItemID == itemId);
|
||||
@@ -766,6 +795,33 @@ namespace Game.DataStorage
|
||||
return _azeriteItemMilestonePowerByEssenceSlot[slot];
|
||||
}
|
||||
|
||||
public List<AzeritePowerSetMemberRecord> GetAzeritePowers(uint itemId)
|
||||
{
|
||||
AzeriteEmpoweredItemRecord azeriteEmpoweredItem = GetAzeriteEmpoweredItem(itemId);
|
||||
if (azeriteEmpoweredItem != null)
|
||||
return _azeritePowers.LookupByKey(azeriteEmpoweredItem.AzeritePowerSetID);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public uint GetRequiredAzeriteLevelForAzeritePowerTier(uint azeriteUnlockSetId, ItemContext context, uint tier)
|
||||
{
|
||||
//ASSERT(tier < MAX_AZERITE_EMPOWERED_TIER);
|
||||
var levels = _azeriteTierUnlockLevels.LookupByKey((azeriteUnlockSetId, context));
|
||||
if (levels != null)
|
||||
return levels[tier];
|
||||
|
||||
AzeriteTierUnlockSetRecord azeriteTierUnlockSet = CliDB.AzeriteTierUnlockSetStorage.LookupByKey(azeriteUnlockSetId);
|
||||
if (azeriteTierUnlockSet != null && azeriteTierUnlockSet.Flags.HasAnyFlag(AzeriteTierUnlockSetFlags.Default))
|
||||
{
|
||||
levels = _azeriteTierUnlockLevels.LookupByKey((azeriteUnlockSetId, ItemContext.None));
|
||||
if (levels != null)
|
||||
return levels[tier];
|
||||
}
|
||||
|
||||
return (uint)CliDB.AzeriteLevelInfoStorage.Count;
|
||||
}
|
||||
|
||||
public string GetBroadcastTextValue(BroadcastTextRecord broadcastText, LocaleConstant locale = LocaleConstant.enUS, Gender gender = Gender.Male, bool forceGender = false)
|
||||
{
|
||||
if ((gender == Gender.Female || gender == Gender.None) && (forceGender || broadcastText.Text1.HasString(SharedConst.DefaultLocale)))
|
||||
@@ -1208,12 +1264,65 @@ namespace Game.DataStorage
|
||||
bonusListIDs.Add(itemSelectorQuality.QualityItemBonusListID);
|
||||
}
|
||||
}
|
||||
|
||||
AzeriteUnlockMappingRecord azeriteUnlockMapping = _azeriteUnlockMappings.LookupByKey((proto.Id, itemContext));
|
||||
if (azeriteUnlockMapping != null)
|
||||
{
|
||||
switch (proto.inventoryType)
|
||||
{
|
||||
case InventoryType.Head:
|
||||
bonusListIDs.Add(azeriteUnlockMapping.ItemBonusListHead);
|
||||
break;
|
||||
case InventoryType.Shoulders:
|
||||
bonusListIDs.Add(azeriteUnlockMapping.ItemBonusListShoulders);
|
||||
break;
|
||||
case InventoryType.Chest:
|
||||
case InventoryType.Robe:
|
||||
bonusListIDs.Add(azeriteUnlockMapping.ItemBonusListChest);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return bonusListIDs;
|
||||
}
|
||||
|
||||
void LoadAzeriteEmpoweredItemUnlockMappings(MultiMap<uint, AzeriteUnlockMappingRecord> azeriteUnlockMappingsBySet, uint itemId)
|
||||
{
|
||||
ItemSparseRecord proto = CliDB.ItemSparseStorage.LookupByKey(itemId);
|
||||
if (proto == null)
|
||||
return;
|
||||
|
||||
VisitItemBonusTree(itemId, bonusTreeNode =>
|
||||
{
|
||||
if (bonusTreeNode.ChildItemBonusListID == 0 && bonusTreeNode.ChildItemLevelSelectorID != 0)
|
||||
{
|
||||
ItemLevelSelectorRecord selector = CliDB.ItemLevelSelectorStorage.LookupByKey(bonusTreeNode.ChildItemLevelSelectorID);
|
||||
if (selector == null)
|
||||
return;
|
||||
|
||||
var azeriteUnlockMappings = azeriteUnlockMappingsBySet.LookupByKey(selector.AzeriteUnlockMappingSet);
|
||||
if (azeriteUnlockMappings != null)
|
||||
{
|
||||
AzeriteUnlockMappingRecord selectedAzeriteUnlockMapping = null;
|
||||
foreach (AzeriteUnlockMappingRecord azeriteUnlockMapping in azeriteUnlockMappings)
|
||||
{
|
||||
if (azeriteUnlockMapping.ItemLevel > selector.MinItemLevel ||
|
||||
(selectedAzeriteUnlockMapping != null && selectedAzeriteUnlockMapping.ItemLevel > azeriteUnlockMapping.ItemLevel))
|
||||
continue;
|
||||
|
||||
selectedAzeriteUnlockMapping = azeriteUnlockMapping;
|
||||
}
|
||||
|
||||
if (selectedAzeriteUnlockMapping != null)
|
||||
_azeriteUnlockMappings[(proto.Id, (ItemContext)bonusTreeNode.ItemContext)] = selectedAzeriteUnlockMapping;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public ItemChildEquipmentRecord GetItemChildEquipment(uint itemId)
|
||||
{
|
||||
return _itemChildEquipment.LookupByKey(itemId);
|
||||
@@ -1988,9 +2097,13 @@ namespace Game.DataStorage
|
||||
MultiMap<uint, ArtifactPowerRecord> _artifactPowers = new MultiMap<uint, ArtifactPowerRecord>();
|
||||
MultiMap<uint, uint> _artifactPowerLinks = new MultiMap<uint, uint>();
|
||||
Dictionary<Tuple<uint, byte>, ArtifactPowerRankRecord> _artifactPowerRanks = new Dictionary<Tuple<uint, byte>, ArtifactPowerRankRecord>();
|
||||
Dictionary<Tuple<uint, uint>, AzeriteEssencePowerRecord> _azeriteEssencePowersByIdAndRank = new Dictionary<Tuple<uint, uint>, AzeriteEssencePowerRecord>();
|
||||
Dictionary<uint, AzeriteEmpoweredItemRecord> _azeriteEmpoweredItems = new Dictionary<uint, AzeriteEmpoweredItemRecord>();
|
||||
Dictionary<(uint azeriteEssenceId, uint rank), AzeriteEssencePowerRecord> _azeriteEssencePowersByIdAndRank = new Dictionary<(uint azeriteEssenceId, uint rank), AzeriteEssencePowerRecord>();
|
||||
List<AzeriteItemMilestonePowerRecord> _azeriteItemMilestonePowers = new List<AzeriteItemMilestonePowerRecord>();
|
||||
AzeriteItemMilestonePowerRecord[] _azeriteItemMilestonePowerByEssenceSlot = new AzeriteItemMilestonePowerRecord[SharedConst.MaxAzeriteEssenceSlot];
|
||||
MultiMap<uint, AzeritePowerSetMemberRecord> _azeritePowers = new MultiMap<uint, AzeritePowerSetMemberRecord>();
|
||||
Dictionary<(uint azeriteUnlockSetId, ItemContext itemContext), byte[]> _azeriteTierUnlockLevels = new Dictionary<(uint azeriteUnlockSetId, ItemContext itemContext), byte[]>();
|
||||
Dictionary<(uint itemId, ItemContext itemContext), AzeriteUnlockMappingRecord> _azeriteUnlockMappings = new Dictionary<(uint itemId, ItemContext itemContext), AzeriteUnlockMappingRecord>();
|
||||
List<Tuple<byte, byte, uint>> _characterFacialHairStyles = new List<Tuple<byte, byte, uint>>();
|
||||
MultiMap<Tuple<byte, byte, CharBaseSectionVariation>, CharSectionsRecord> _charSections = new MultiMap<Tuple<byte, byte, CharBaseSectionVariation>, CharSectionsRecord>();
|
||||
Dictionary<uint, CharStartOutfitRecord> _charStartOutfits = new Dictionary<uint, CharStartOutfitRecord>();
|
||||
|
||||
@@ -254,17 +254,25 @@ namespace Game.DataStorage
|
||||
public byte ConsignmentRate;
|
||||
}
|
||||
|
||||
public sealed class AzeriteEmpoweredItemRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint ItemID;
|
||||
public uint AzeriteTierUnlockSetID;
|
||||
public uint AzeritePowerSetID;
|
||||
}
|
||||
|
||||
public sealed class AzeriteEssenceRecord
|
||||
{
|
||||
public string Name;
|
||||
public string Description;
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public int SpecSetID;
|
||||
}
|
||||
|
||||
public sealed class AzeriteEssencePowerRecord
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public string SourceAlliance;
|
||||
public string SourceHorde;
|
||||
public int AzeriteEssenceID;
|
||||
@@ -277,13 +285,13 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class AzeriteItemRecord
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public uint ItemID;
|
||||
}
|
||||
|
||||
public sealed class AzeriteItemMilestonePowerRecord
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public int RequiredLevel;
|
||||
public int AzeritePowerID;
|
||||
public int Type;
|
||||
@@ -292,13 +300,13 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class AzeriteKnowledgeMultiplierRecord
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public float Multiplier;
|
||||
}
|
||||
|
||||
public sealed class AzeriteLevelInfoRecord
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public ulong BaseExperienceToNextLevel;
|
||||
public ulong MinimumExperienceToNextLevel;
|
||||
public uint ItemLevel;
|
||||
@@ -306,10 +314,45 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class AzeritePowerRecord
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public uint SpellID;
|
||||
public int ItemBonusListID;
|
||||
public uint ItemBonusListID;
|
||||
public int SpecSetID;
|
||||
public int Flags;
|
||||
}
|
||||
|
||||
public sealed class AzeritePowerSetMemberRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint AzeritePowerSetID;
|
||||
public int AzeritePowerID;
|
||||
public int Class;
|
||||
public int Tier;
|
||||
public uint OrderIndex;
|
||||
}
|
||||
|
||||
public sealed class AzeriteTierUnlockRecord
|
||||
{
|
||||
public uint Id;
|
||||
public byte ItemCreationContext;
|
||||
public byte Tier;
|
||||
public byte AzeriteLevel;
|
||||
public uint AzeriteTierUnlockSetID;
|
||||
}
|
||||
|
||||
public sealed class AzeriteTierUnlockSetRecord
|
||||
{
|
||||
public uint Id;
|
||||
public AzeriteTierUnlockSetFlags Flags;
|
||||
}
|
||||
|
||||
public sealed class AzeriteUnlockMappingRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int ItemLevel;
|
||||
public uint ItemBonusListHead;
|
||||
public uint ItemBonusListShoulders;
|
||||
public uint ItemBonusListChest;
|
||||
public uint AzeriteUnlockMappingSetID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,11 +36,11 @@ namespace Game.DataStorage
|
||||
{
|
||||
public TaxiPathBySourceAndDestination(uint _id, uint _price)
|
||||
{
|
||||
ID = _id;
|
||||
Id = _id;
|
||||
price = _price;
|
||||
}
|
||||
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public uint price;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class SpecSetMemberRecord
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public uint ChrSpecializationID;
|
||||
public uint SpecSetID;
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace Game.Misc
|
||||
}
|
||||
|
||||
GossipPOI packet = new GossipPOI();
|
||||
packet.ID = pointOfInterest.ID;
|
||||
packet.Id = pointOfInterest.Id;
|
||||
packet.Name = pointOfInterest.Name;
|
||||
|
||||
LocaleConstant locale = _session.GetSessionDbLocaleIndex();
|
||||
@@ -468,7 +468,7 @@ namespace Game.Misc
|
||||
for (int i = 0; i < objs.Count; ++i)
|
||||
{
|
||||
var obj = new QuestObjectiveSimple();
|
||||
obj.ID = objs[i].ID;
|
||||
obj.Id = objs[i].Id;
|
||||
obj.ObjectID = objs[i].ObjectID;
|
||||
obj.Amount = objs[i].Amount;
|
||||
obj.Type = (byte)objs[i].Type;
|
||||
@@ -504,7 +504,7 @@ namespace Game.Misc
|
||||
|
||||
foreach (QuestObjective questObjective in queryQuestInfoResponse.Info.Objectives)
|
||||
{
|
||||
QuestObjectivesLocale questObjectivesLocaleData = Global.ObjectMgr.GetQuestObjectivesLocale(questObjective.ID);
|
||||
QuestObjectivesLocale questObjectivesLocaleData = Global.ObjectMgr.GetQuestObjectivesLocale(questObjective.Id);
|
||||
if (questObjectivesLocaleData != null)
|
||||
ObjectManager.GetLocaleString(questObjectivesLocaleData.Description, loc, ref questObjective.Description);
|
||||
}
|
||||
@@ -777,7 +777,7 @@ namespace Game.Misc
|
||||
|
||||
public class PointOfInterest
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public Vector2 Pos;
|
||||
public uint Icon;
|
||||
public uint Flags;
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2019 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Game.Network;
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Game.Network.Packets;
|
||||
using Game.DataStorage;
|
||||
using System.Linq;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
public class AzeriteEmpoweredItem : Item
|
||||
{
|
||||
AzeriteEmpoweredItemData m_azeriteEmpoweredItemData;
|
||||
List<AzeritePowerSetMemberRecord> m_azeritePowers;
|
||||
int m_maxTier;
|
||||
|
||||
public AzeriteEmpoweredItem()
|
||||
{
|
||||
ObjectTypeMask |= TypeMask.AzeriteEmpoweredItem;
|
||||
ObjectTypeId = TypeId.AzeriteEmpoweredItem;
|
||||
|
||||
m_azeriteEmpoweredItemData = new AzeriteEmpoweredItemData();
|
||||
}
|
||||
|
||||
public override bool Create(ulong guidlow, uint itemId, ItemContext context, Player owner)
|
||||
{
|
||||
if (!base.Create(guidlow, itemId, context, owner))
|
||||
return false;
|
||||
|
||||
InitAzeritePowerData();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void SaveToDB(SQLTransaction trans)
|
||||
{
|
||||
base.SaveToDB(trans);
|
||||
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_AZERITE_EMPOWERED);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_ITEM_INSTANCE_AZERITE_EMPOWERED);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
for (int i = 0; i < SharedConst.MaxAzeriteEmpoweredTier; ++i)
|
||||
stmt.AddValue(1 + i, m_azeriteEmpoweredItemData.Selections[i]);
|
||||
|
||||
trans.Append(stmt);
|
||||
}
|
||||
|
||||
public void LoadAzeriteEmpoweredItemData(Player owner, AzeriteEmpoweredData azeriteEmpoweredItem)
|
||||
{
|
||||
InitAzeritePowerData();
|
||||
bool needSave = false;
|
||||
if (m_azeritePowers != null)
|
||||
{
|
||||
for (int i = SharedConst.MaxAzeriteEmpoweredTier; --i >= 0;)
|
||||
{
|
||||
int selection = azeriteEmpoweredItem.SelectedAzeritePowers[i];
|
||||
if (GetTierForAzeritePower(owner.GetClass(), selection) != i)
|
||||
{
|
||||
needSave = true;
|
||||
break;
|
||||
}
|
||||
|
||||
SetSelectedAzeritePower(i, selection);
|
||||
}
|
||||
}
|
||||
else
|
||||
needSave = true;
|
||||
|
||||
if (needSave)
|
||||
{
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_ITEM_INSTANCE_AZERITE_EMPOWERED);
|
||||
for (int i = 0; i < SharedConst.MaxAzeriteEmpoweredTier; ++i)
|
||||
stmt.AddValue(i, m_azeriteEmpoweredItemData.Selections[i]);
|
||||
|
||||
stmt.AddValue(5, GetGUID().GetCounter());
|
||||
DB.Characters.Execute(stmt);
|
||||
}
|
||||
}
|
||||
|
||||
public static new void DeleteFromDB(SQLTransaction trans, ulong itemGuid)
|
||||
{
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_AZERITE_EMPOWERED);
|
||||
stmt.AddValue(0, itemGuid);
|
||||
DB.Characters.ExecuteOrAppend(trans, stmt);
|
||||
}
|
||||
|
||||
public override void DeleteFromDB(SQLTransaction trans)
|
||||
{
|
||||
DeleteFromDB(trans, GetGUID().GetCounter());
|
||||
base.DeleteFromDB(trans);
|
||||
}
|
||||
|
||||
public uint GetRequiredAzeriteLevelForTier(uint tier)
|
||||
{
|
||||
return Global.DB2Mgr.GetRequiredAzeriteLevelForAzeritePowerTier(_bonusData.AzeriteTierUnlockSetId, GetContext(), tier);
|
||||
}
|
||||
|
||||
public int GetTierForAzeritePower(Class playerClass, int azeritePowerId)
|
||||
{
|
||||
var azeritePowerItr = m_azeritePowers.Find(power =>
|
||||
{
|
||||
return power.AzeritePowerID == azeritePowerId && power.Class == (int)playerClass;
|
||||
});
|
||||
|
||||
if (azeritePowerItr != null)
|
||||
return azeritePowerItr.Tier;
|
||||
|
||||
return SharedConst.MaxAzeriteEmpoweredTier;
|
||||
}
|
||||
|
||||
public void SetSelectedAzeritePower(int tier, int azeritePowerId)
|
||||
{
|
||||
SetUpdateFieldValue(ref m_values.ModifyValue(m_azeriteEmpoweredItemData).ModifyValue(m_azeriteEmpoweredItemData.Selections, tier), azeritePowerId);
|
||||
|
||||
// Not added to UF::ItemData::BonusListIDs, client fakes it on its own too
|
||||
_bonusData.AddBonusList(CliDB.AzeritePowerStorage.LookupByKey(azeritePowerId).ItemBonusListID);
|
||||
}
|
||||
|
||||
void ClearSelectedAzeritePowers()
|
||||
{
|
||||
for (int i = 0; i < SharedConst.MaxAzeriteEmpoweredTier; ++i)
|
||||
SetUpdateFieldValue(ref m_values.ModifyValue(m_azeriteEmpoweredItemData).ModifyValue(m_azeriteEmpoweredItemData.Selections, i), 0);
|
||||
|
||||
_bonusData = new BonusData(GetTemplate());
|
||||
foreach (uint bonusListID in (List<uint>)m_itemData.BonusListIDs)
|
||||
_bonusData.AddBonusList(bonusListID);
|
||||
}
|
||||
|
||||
public long GetRespecCost()
|
||||
{
|
||||
Player owner = GetOwner();
|
||||
if (owner != null)
|
||||
return (long)(MoneyConstants.Gold * Global.DB2Mgr.GetCurveValueAt((uint)Curves.AzeriteEmpoweredItemRespecCost, (float)owner.GetNumRespecs()));
|
||||
|
||||
return (long)PlayerConst.MaxMoneyAmount + 1;
|
||||
}
|
||||
|
||||
public override void BuildValuesCreate(WorldPacket data, Player target)
|
||||
{
|
||||
UpdateFieldFlag flags = GetUpdateFieldFlagsFor(target);
|
||||
WorldPacket buffer = new WorldPacket();
|
||||
|
||||
buffer.WriteUInt8((byte)flags);
|
||||
m_objectData.WriteCreate(buffer, flags, this, target);
|
||||
m_itemData.WriteCreate(buffer, flags, this, target);
|
||||
m_azeriteEmpoweredItemData.WriteCreate(buffer, flags, this, target);
|
||||
|
||||
data.WriteUInt32(buffer.GetSize());
|
||||
data.WriteBytes(buffer);
|
||||
}
|
||||
|
||||
public override void BuildValuesUpdate(WorldPacket data, Player target)
|
||||
{
|
||||
UpdateFieldFlag flags = GetUpdateFieldFlagsFor(target);
|
||||
WorldPacket buffer = new WorldPacket();
|
||||
|
||||
if (m_values.HasChanged(TypeId.Object))
|
||||
m_objectData.WriteUpdate(buffer, flags, this, target);
|
||||
|
||||
if (m_values.HasChanged(TypeId.Item))
|
||||
m_itemData.WriteUpdate(buffer, flags, this, target);
|
||||
|
||||
if (m_values.HasChanged(TypeId.AzeriteEmpoweredItem))
|
||||
m_azeriteEmpoweredItemData.WriteUpdate(buffer, flags, this, target);
|
||||
|
||||
data.WriteUInt32(buffer.GetSize());
|
||||
data.WriteUInt32(m_values.GetChangedObjectTypeMask());
|
||||
data.WriteBytes(buffer);
|
||||
}
|
||||
|
||||
public override void ClearUpdateMask(bool remove)
|
||||
{
|
||||
m_values.ClearChangesMask(m_azeriteEmpoweredItemData);
|
||||
base.ClearUpdateMask(remove);
|
||||
}
|
||||
|
||||
void InitAzeritePowerData()
|
||||
{
|
||||
m_azeritePowers = Global.DB2Mgr.GetAzeritePowers(GetEntry());
|
||||
if (m_azeritePowers != null)
|
||||
m_maxTier = m_azeritePowers.Aggregate((a1, a2) => a1.Tier < a2.Tier ? a2 : a1).Tier;
|
||||
}
|
||||
|
||||
public int GetMaxAzeritePowerTier() { return m_maxTier; }
|
||||
public uint GetSelectedAzeritePower(int tier)
|
||||
{
|
||||
return (uint)m_azeriteEmpoweredItemData.Selections[tier];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,7 +314,7 @@ namespace Game.Entities
|
||||
public bool HasUnlockedEssenceSlot(byte slot)
|
||||
{
|
||||
AzeriteItemMilestonePowerRecord milestone = Global.DB2Mgr.GetAzeriteItemMilestonePower(slot);
|
||||
return m_azeriteItemData.UnlockedEssenceMilestones.FindIndex(milestone.ID) != -1;
|
||||
return m_azeriteItemData.UnlockedEssenceMilestones.FindIndex(milestone.Id) != -1;
|
||||
}
|
||||
|
||||
public bool HasUnlockedEssenceMilestone(uint azeriteItemMilestonePowerId) { return m_azeriteItemData.UnlockedEssenceMilestones.FindIndex(azeriteItemMilestonePowerId) != -1; }
|
||||
@@ -487,12 +487,12 @@ namespace Game.Entities
|
||||
if (milestone.RequiredLevel > GetLevel())
|
||||
break;
|
||||
|
||||
if (HasUnlockedEssenceMilestone(milestone.ID))
|
||||
if (HasUnlockedEssenceMilestone(milestone.Id))
|
||||
continue;
|
||||
|
||||
if (milestone.AutoUnlock != 0)
|
||||
{
|
||||
AddUnlockedEssenceMilestone(milestone.ID);
|
||||
AddUnlockedEssenceMilestone(milestone.Id);
|
||||
hasPreviousMilestone = true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -47,11 +47,11 @@ namespace Game.Entities
|
||||
loot = new Loot();
|
||||
}
|
||||
|
||||
public virtual bool Create(ulong guidlow, uint itemid, ItemContext context, Player owner)
|
||||
public virtual bool Create(ulong guidlow, uint itemId, ItemContext context, Player owner)
|
||||
{
|
||||
_Create(ObjectGuid.Create(HighGuid.Item, guidlow));
|
||||
|
||||
SetEntry(itemid);
|
||||
SetEntry(itemId);
|
||||
SetObjectScale(1.0f);
|
||||
|
||||
if (owner)
|
||||
@@ -60,7 +60,7 @@ namespace Game.Entities
|
||||
SetContainedIn(owner.GetGUID());
|
||||
}
|
||||
|
||||
ItemTemplate itemProto = Global.ObjectMgr.GetItemTemplate(itemid);
|
||||
ItemTemplate itemProto = Global.ObjectMgr.GetItemTemplate(itemId);
|
||||
if (itemProto == null)
|
||||
return false;
|
||||
|
||||
@@ -998,59 +998,50 @@ namespace Game.Entities
|
||||
{
|
||||
BonusData gemBonus = new BonusData(gemTemplate);
|
||||
foreach (var bonusListId in gem.BonusListIDs)
|
||||
gemBonus.AddBonusList(bonusListId);
|
||||
|
||||
uint gemBaseItemLevel = gemTemplate.GetBaseItemLevel();
|
||||
ScalingStatDistributionRecord ssd = CliDB.ScalingStatDistributionStorage.LookupByKey(gemBonus.ScalingStatDistribution);
|
||||
if (ssd != null)
|
||||
{
|
||||
uint scaledIlvl = (uint)Global.DB2Mgr.GetCurveValueAt(ssd.PlayerLevelToItemLevelCurveID, gemScalingLevel);
|
||||
if (scaledIlvl != 0)
|
||||
gemBaseItemLevel = scaledIlvl;
|
||||
}
|
||||
|
||||
var bonuses = Global.DB2Mgr.GetItemBonusList(bonusListId);
|
||||
if (bonuses != null)
|
||||
_bonusData.GemRelicType[slot] = gemBonus.RelicType;
|
||||
|
||||
for (uint i = 0; i < ItemConst.MaxItemEnchantmentEffects; ++i)
|
||||
{
|
||||
switch (gemEnchant.Effect[i])
|
||||
{
|
||||
|
||||
foreach (ItemBonusRecord itemBonus in bonuses)
|
||||
gemBonus.AddBonus(itemBonus.BonusType, itemBonus.Value);
|
||||
}
|
||||
|
||||
uint gemBaseItemLevel = gemTemplate.GetBaseItemLevel();
|
||||
ScalingStatDistributionRecord ssd = CliDB.ScalingStatDistributionStorage.LookupByKey(gemBonus.ScalingStatDistribution);
|
||||
if (ssd != null)
|
||||
{
|
||||
uint scaledIlvl = (uint)Global.DB2Mgr.GetCurveValueAt(ssd.PlayerLevelToItemLevelCurveID, gemScalingLevel);
|
||||
if (scaledIlvl != 0)
|
||||
gemBaseItemLevel = scaledIlvl;
|
||||
}
|
||||
|
||||
_bonusData.GemRelicType[slot] = gemBonus.RelicType;
|
||||
|
||||
for (uint i = 0; i < ItemConst.MaxItemEnchantmentEffects; ++i)
|
||||
{
|
||||
switch (gemEnchant.Effect[i])
|
||||
{
|
||||
case ItemEnchantmentType.BonusListID:
|
||||
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;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2160,14 +2151,7 @@ namespace Game.Entities
|
||||
SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.BonusListIDs), bonusListIDs);
|
||||
|
||||
foreach (uint bonusListID in (List<uint>)m_itemData.BonusListIDs)
|
||||
{
|
||||
var bonuses = Global.DB2Mgr.GetItemBonusList(bonusListID);
|
||||
if (bonuses != null)
|
||||
{
|
||||
foreach (ItemBonusRecord bonus in bonuses)
|
||||
_bonusData.AddBonus(bonus.BonusType, bonus.Value);
|
||||
}
|
||||
}
|
||||
_bonusData.AddBonusList(bonusListID);
|
||||
|
||||
SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.ItemAppearanceModID), (byte)_bonusData.AppearanceModID);
|
||||
}
|
||||
@@ -2444,6 +2428,9 @@ namespace Game.Entities
|
||||
if (Global.DB2Mgr.IsAzeriteItem(proto.GetId()))
|
||||
return new AzeriteItem();
|
||||
|
||||
if (Global.DB2Mgr.GetAzeriteEmpoweredItem(proto.GetId()) != null)
|
||||
return new AzeriteEmpoweredItem();
|
||||
|
||||
return new Item();
|
||||
}
|
||||
|
||||
@@ -2596,17 +2583,19 @@ namespace Game.Entities
|
||||
public void AddItemFlag(ItemFieldFlags flags) { SetUpdateFieldFlagValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.DynamicFlags), (uint)flags); }
|
||||
public void RemoveItemFlag(ItemFieldFlags flags) { RemoveUpdateFieldFlagValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.DynamicFlags), (uint)flags); }
|
||||
public void SetItemFlags(ItemFieldFlags flags) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.DynamicFlags), (uint)flags); }
|
||||
bool HasItemFlag2(ItemFieldFlags2 flag) { return (m_itemData.DynamicFlags2 & (uint)flag) != 0; }
|
||||
void AddItemFlag2(ItemFieldFlags2 flags) { SetUpdateFieldFlagValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.DynamicFlags2), (uint)flags); }
|
||||
void RemoveItemFlag2(ItemFieldFlags2 flags) { RemoveUpdateFieldFlagValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.DynamicFlags2), (uint)flags); }
|
||||
void SetItemFlags2(ItemFieldFlags2 flags) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.DynamicFlags2), (uint)flags); }
|
||||
public bool HasItemFlag2(ItemFieldFlags2 flag) { return (m_itemData.DynamicFlags2 & (uint)flag) != 0; }
|
||||
public void AddItemFlag2(ItemFieldFlags2 flags) { SetUpdateFieldFlagValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.DynamicFlags2), (uint)flags); }
|
||||
public void RemoveItemFlag2(ItemFieldFlags2 flags) { RemoveUpdateFieldFlagValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.DynamicFlags2), (uint)flags); }
|
||||
public void SetItemFlags2(ItemFieldFlags2 flags) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.DynamicFlags2), (uint)flags); }
|
||||
|
||||
public Bag ToBag() { return IsBag() ? this as Bag : null; }
|
||||
public AzeriteItem ToAzeriteItem() { return IsAzeriteItem() ? this as AzeriteItem : null; }
|
||||
public AzeriteEmpoweredItem ToAzeriteEmpoweredItem() { return IsAzeriteEmpoweredItem() ? this as AzeriteEmpoweredItem : null; }
|
||||
|
||||
public bool IsLocked() { return !HasItemFlag(ItemFieldFlags.Unlocked); }
|
||||
public bool IsBag() { return GetTemplate().GetInventoryType() == InventoryType.Bag; }
|
||||
public bool IsAzeriteItem() { return GetTypeId() == TypeId.AzeriteItem; }
|
||||
public bool IsAzeriteEmpoweredItem() { return GetTypeId() == TypeId.AzeriteEmpoweredItem; }
|
||||
public bool IsCurrencyToken() { return GetTemplate().IsCurrencyToken(); }
|
||||
public bool IsBroken() { return m_itemData.MaxDurability > 0 && m_itemData.Durability == 0; }
|
||||
public void SetDurability(uint durability) { SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.Durability), durability); }
|
||||
@@ -2863,11 +2852,18 @@ namespace Game.Entities
|
||||
RelicType = -1;
|
||||
HasFixedLevel = false;
|
||||
RequiredLevelOverride = 0;
|
||||
AzeriteTierUnlockSetId = 0;
|
||||
|
||||
AzeriteEmpoweredItemRecord azeriteEmpoweredItem = Global.DB2Mgr.GetAzeriteEmpoweredItem(proto.GetId());
|
||||
if (azeriteEmpoweredItem != null)
|
||||
AzeriteTierUnlockSetId = azeriteEmpoweredItem.AzeriteTierUnlockSetID;
|
||||
|
||||
CanDisenchant = !proto.GetFlags().HasAnyFlag(ItemFlags.NoDisenchant);
|
||||
CanScrap = proto.GetFlags4().HasAnyFlag(ItemFlags4.Scrapable);
|
||||
|
||||
_state.AppearanceModPriority = int.MaxValue;
|
||||
_state.ScalingStatDistributionPriority = int.MaxValue;
|
||||
_state.AzeriteTierUnlockSetPriority = int.MaxValue;
|
||||
_state.HasQualityBonus = false;
|
||||
}
|
||||
|
||||
@@ -2876,17 +2872,18 @@ namespace Game.Entities
|
||||
if (itemInstance.ItemBonus.HasValue)
|
||||
{
|
||||
foreach (uint bonusListID in itemInstance.ItemBonus.Value.BonusListIDs)
|
||||
{
|
||||
var bonuses = Global.DB2Mgr.GetItemBonusList(bonusListID);
|
||||
if (bonuses != null)
|
||||
{
|
||||
foreach (ItemBonusRecord bonus in bonuses)
|
||||
AddBonus(bonus.BonusType, bonus.Value);
|
||||
}
|
||||
}
|
||||
AddBonusList(bonusListID);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddBonusList(uint bonusListId)
|
||||
{
|
||||
var bonuses = Global.DB2Mgr.GetItemBonusList(bonusListId);
|
||||
if (bonuses != null)
|
||||
foreach (ItemBonusRecord bonus in bonuses)
|
||||
AddBonus(bonus.BonusType, bonus.Value);
|
||||
}
|
||||
|
||||
public void AddBonus(ItemBonusType type, int[] values)
|
||||
{
|
||||
switch (type)
|
||||
@@ -2962,6 +2959,13 @@ namespace Game.Entities
|
||||
case ItemBonusType.OverrideRequiredLevel:
|
||||
RequiredLevelOverride = values[0];
|
||||
break;
|
||||
case ItemBonusType.AzeriteTierUnlockSet:
|
||||
if (values[1] < _state.AzeriteTierUnlockSetPriority)
|
||||
{
|
||||
AzeriteTierUnlockSetId = (uint)values[0];
|
||||
_state.AzeriteTierUnlockSetPriority = values[1];
|
||||
}
|
||||
break;
|
||||
case ItemBonusType.OverrideCanDisenchant:
|
||||
CanDisenchant = values[0] != 0;
|
||||
break;
|
||||
@@ -2989,6 +2993,7 @@ namespace Game.Entities
|
||||
public ushort[] GemRelicRankBonus = new ushort[ItemConst.MaxGemSockets];
|
||||
public int RelicType;
|
||||
public int RequiredLevelOverride;
|
||||
public uint AzeriteTierUnlockSetId;
|
||||
public bool CanDisenchant;
|
||||
public bool CanScrap;
|
||||
public bool HasFixedLevel;
|
||||
@@ -2998,6 +3003,7 @@ namespace Game.Entities
|
||||
{
|
||||
public int AppearanceModPriority;
|
||||
public int ScalingStatDistributionPriority;
|
||||
public int AzeriteTierUnlockSetPriority;
|
||||
public bool HasQualityBonus;
|
||||
}
|
||||
}
|
||||
@@ -3017,12 +3023,19 @@ namespace Game.Entities
|
||||
public List<ArtifactPowerData> ArtifactPowers = new List<ArtifactPowerData>();
|
||||
}
|
||||
|
||||
public class AzeriteEmpoweredData
|
||||
{
|
||||
public Array<int> SelectedAzeritePowers = new Array<int>(SharedConst.MaxAzeriteEmpoweredTier);
|
||||
}
|
||||
|
||||
class ItemAdditionalLoadInfo
|
||||
{
|
||||
public ArtifactData Artifact;
|
||||
public AzeriteData AzeriteItem;
|
||||
public AzeriteEmpoweredData AzeriteEmpoweredItem;
|
||||
|
||||
public static void Init(Dictionary<ulong, ItemAdditionalLoadInfo> loadInfo, SQLResult artifactResult, SQLResult azeriteItemResult, SQLResult azeriteItemMilestonePowersResult, SQLResult azeriteItemUnlockedEssencesResult)
|
||||
public static void Init(Dictionary<ulong, ItemAdditionalLoadInfo> loadInfo, SQLResult artifactResult, SQLResult azeriteItemResult, SQLResult azeriteItemMilestonePowersResult,
|
||||
SQLResult azeriteItemUnlockedEssencesResult, SQLResult azeriteEmpoweredItemResult)
|
||||
{
|
||||
ItemAdditionalLoadInfo GetOrCreateLoadInfo(ulong guid)
|
||||
{
|
||||
@@ -3091,7 +3104,7 @@ namespace Game.Entities
|
||||
if (azeriteEssence == null || !Global.DB2Mgr.IsSpecSetMember(azeriteEssence.SpecSetID, specializationId))
|
||||
continue;
|
||||
|
||||
info.AzeriteItem.SelectedAzeriteEssences[i].AzeriteEssenceId[j] = azeriteEssence.ID;
|
||||
info.AzeriteItem.SelectedAzeriteEssences[i].AzeriteEssenceId[j] = azeriteEssence.Id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3127,6 +3140,21 @@ namespace Game.Entities
|
||||
}
|
||||
while (azeriteItemUnlockedEssencesResult.NextRow());
|
||||
}
|
||||
|
||||
if (!azeriteEmpoweredItemResult.IsEmpty())
|
||||
{
|
||||
do
|
||||
{
|
||||
ItemAdditionalLoadInfo info = GetOrCreateLoadInfo(azeriteEmpoweredItemResult.Read<ulong>(0));
|
||||
if (info.AzeriteEmpoweredItem == null)
|
||||
info.AzeriteEmpoweredItem = new AzeriteEmpoweredData();
|
||||
|
||||
for (int i = 0; i < SharedConst.MaxAzeriteEmpoweredTier; ++i)
|
||||
if (CliDB.AzeritePowerStorage.ContainsKey(azeriteEmpoweredItemResult.Read<int>(1 + i)))
|
||||
info.AzeriteEmpoweredItem.SelectedAzeritePowers[i] = azeriteEmpoweredItemResult.Read<int>(1 + i);
|
||||
|
||||
} while (azeriteEmpoweredItemResult.NextRow());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -602,7 +602,7 @@ namespace Game.Entities
|
||||
{
|
||||
public UpdateFieldArray<int> Selections = new UpdateFieldArray<int>(5, 0, 1);
|
||||
|
||||
public AzeriteEmpoweredItemData() : base(6) { }
|
||||
public AzeriteEmpoweredItemData() : base(0, TypeId.AzeriteEmpoweredItem, 6) { }
|
||||
|
||||
public override void WriteCreate(WorldPacket data, UpdateFieldFlag fieldVisibilityFlags, Item owner, Player receiver)
|
||||
{
|
||||
|
||||
@@ -38,10 +38,10 @@ namespace Game.Entities
|
||||
{
|
||||
public partial class Player
|
||||
{
|
||||
void _LoadInventory(SQLResult result, SQLResult artifactsResult, SQLResult azeriteResult, SQLResult azeriteItemMilestonePowersResult, SQLResult azeriteItemUnlockedEssencesResult, uint timeDiff)
|
||||
void _LoadInventory(SQLResult result, SQLResult artifactsResult, SQLResult azeriteResult, SQLResult azeriteItemMilestonePowersResult, SQLResult azeriteItemUnlockedEssencesResult, SQLResult azeriteEmpoweredItemResult, uint timeDiff)
|
||||
{
|
||||
Dictionary<ulong, ItemAdditionalLoadInfo> additionalData = new Dictionary<ulong, ItemAdditionalLoadInfo>();
|
||||
ItemAdditionalLoadInfo.Init(additionalData, artifactsResult, azeriteResult, azeriteItemMilestonePowersResult, azeriteItemUnlockedEssencesResult);
|
||||
ItemAdditionalLoadInfo.Init(additionalData, artifactsResult, azeriteResult, azeriteItemMilestonePowersResult, azeriteItemUnlockedEssencesResult, azeriteEmpoweredItemResult);
|
||||
|
||||
if (!result.IsEmpty())
|
||||
{
|
||||
@@ -70,6 +70,13 @@ namespace Game.Entities
|
||||
if (azeriteItem != null)
|
||||
azeriteItem.LoadAzeriteItemData(this, addionalData.AzeriteItem);
|
||||
}
|
||||
|
||||
if (addionalData.AzeriteEmpoweredItem != null)
|
||||
{
|
||||
AzeriteEmpoweredItem azeriteEmpoweredItem = item.ToAzeriteEmpoweredItem();
|
||||
if (azeriteEmpoweredItem != null)
|
||||
azeriteEmpoweredItem.LoadAzeriteEmpoweredItemData(this, addionalData.AzeriteEmpoweredItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -328,6 +335,7 @@ namespace Game.Entities
|
||||
Item.DeleteFromInventoryDB(trans, itemGuid);
|
||||
Item.DeleteFromDB(trans, itemGuid);
|
||||
AzeriteItem.DeleteFromDB(trans, itemGuid);
|
||||
AzeriteEmpoweredItem.DeleteFromDB(trans, itemGuid);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
@@ -1201,8 +1209,12 @@ namespace Game.Entities
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
SQLResult azeriteItemUnlockedEssencesResult = DB.Characters.Query(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_MAILITEMS_AZERITE_EMPOWERED);
|
||||
stmt.AddValue(0, GetGUID().GetCounter());
|
||||
SQLResult azeriteEmpoweredItemResult = DB.Characters.Query(stmt);
|
||||
|
||||
Dictionary<ulong, ItemAdditionalLoadInfo> additionalData = new Dictionary<ulong, ItemAdditionalLoadInfo>();
|
||||
ItemAdditionalLoadInfo.Init(additionalData, artifactResult, azeriteResult, azeriteItemMilestonePowersResult, azeriteItemUnlockedEssencesResult);
|
||||
ItemAdditionalLoadInfo.Init(additionalData, artifactResult, azeriteResult, azeriteItemMilestonePowersResult, azeriteItemUnlockedEssencesResult, azeriteEmpoweredItemResult);
|
||||
|
||||
do
|
||||
{
|
||||
@@ -1233,6 +1245,7 @@ namespace Game.Entities
|
||||
|
||||
Item.DeleteFromDB(trans, itemGuid);
|
||||
AzeriteItem.DeleteFromDB(trans, itemGuid);
|
||||
AzeriteEmpoweredItem.DeleteFromDB(trans, itemGuid);
|
||||
|
||||
DB.Characters.CommitTransaction(trans);
|
||||
return null;
|
||||
@@ -1266,6 +1279,13 @@ namespace Game.Entities
|
||||
if (azeriteItem != null)
|
||||
azeriteItem.LoadAzeriteItemData(player, addionalData.AzeriteItem);
|
||||
}
|
||||
|
||||
if (addionalData.AzeriteEmpoweredItem != null)
|
||||
{
|
||||
AzeriteEmpoweredItem azeriteEmpoweredItem = item.ToAzeriteEmpoweredItem();
|
||||
if (azeriteEmpoweredItem != null)
|
||||
azeriteEmpoweredItem.LoadAzeriteEmpoweredItemData(player, addionalData.AzeriteEmpoweredItem);
|
||||
}
|
||||
}
|
||||
|
||||
if (mail != null)
|
||||
@@ -2083,6 +2103,7 @@ namespace Game.Entities
|
||||
{
|
||||
Item.DeleteFromDB(trans, mailItemInfo.item_guid);
|
||||
AzeriteItem.DeleteFromDB(trans, mailItemInfo.item_guid);
|
||||
AzeriteEmpoweredItem.DeleteFromDB(trans, mailItemInfo.item_guid);
|
||||
}
|
||||
}
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_MAIL_BY_ID);
|
||||
@@ -2862,6 +2883,7 @@ namespace Game.Entities
|
||||
_LoadSkills(holder.GetResult(PlayerLoginQueryLoad.Skills));
|
||||
UpdateSkillsForLevel();
|
||||
|
||||
SetNumRespecs(result.Read<byte>(76));
|
||||
SetPrimarySpecialization(result.Read<uint>(36));
|
||||
SetActiveTalentGroup(result.Read<byte>(64));
|
||||
ChrSpecializationRecord primarySpec = CliDB.ChrSpecializationStorage.LookupByKey(GetPrimarySpecialization());
|
||||
@@ -2913,8 +2935,8 @@ namespace Game.Entities
|
||||
// must be before inventory (some items required reputation check)
|
||||
reputationMgr.LoadFromDB(holder.GetResult(PlayerLoginQueryLoad.Reputation));
|
||||
|
||||
_LoadInventory(holder.GetResult(PlayerLoginQueryLoad.Inventory), holder.GetResult(PlayerLoginQueryLoad.Artifacts), holder.GetResult(PlayerLoginQueryLoad.LoadAzerite),
|
||||
holder.GetResult(PlayerLoginQueryLoad.LoadAzeriteMilestonePowers), holder.GetResult(PlayerLoginQueryLoad.LoadAzeriteUnlockedEssences), time_diff);
|
||||
_LoadInventory(holder.GetResult(PlayerLoginQueryLoad.Inventory), holder.GetResult(PlayerLoginQueryLoad.Artifacts), holder.GetResult(PlayerLoginQueryLoad.Azerite),
|
||||
holder.GetResult(PlayerLoginQueryLoad.AzeriteMilestonePowers), holder.GetResult(PlayerLoginQueryLoad.AzeriteUnlockedEssences), holder.GetResult(PlayerLoginQueryLoad.AzeriteEmpowered), time_diff);
|
||||
|
||||
if (IsVoidStorageUnlocked())
|
||||
_LoadVoidStorage(holder.GetResult(PlayerLoginQueryLoad.VoidStorage));
|
||||
@@ -3173,6 +3195,7 @@ namespace Game.Entities
|
||||
//save, but in tavern/city
|
||||
stmt.AddValue(index++, GetTalentResetCost());
|
||||
stmt.AddValue(index++, GetTalentResetTime());
|
||||
stmt.AddValue(index++, GetNumRespecs());
|
||||
stmt.AddValue(index++, GetPrimarySpecialization());
|
||||
stmt.AddValue(index++, (ushort)m_ExtraFlags);
|
||||
stmt.AddValue(index++, m_stableSlots);
|
||||
@@ -3665,8 +3688,12 @@ namespace Game.Entities
|
||||
stmt.AddValue(0, guid);
|
||||
SQLResult azeriteItemUnlockedEssencesResult = DB.Characters.Query(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_MAILITEMS_AZERITE_EMPOWERED);
|
||||
stmt.AddValue(0, guid);
|
||||
SQLResult azeriteEmpoweredItemResult = DB.Characters.Query(stmt);
|
||||
|
||||
Dictionary<ulong, ItemAdditionalLoadInfo> additionalData = new Dictionary<ulong, ItemAdditionalLoadInfo>();
|
||||
ItemAdditionalLoadInfo.Init(additionalData, artifactResult, azeriteResult, azeriteItemMilestonePowersResult, azeriteItemUnlockedEssencesResult);
|
||||
ItemAdditionalLoadInfo.Init(additionalData, artifactResult, azeriteResult, azeriteItemMilestonePowersResult, azeriteItemUnlockedEssencesResult, azeriteEmpoweredItemResult);
|
||||
|
||||
do
|
||||
{
|
||||
@@ -3884,6 +3911,10 @@ namespace Game.Entities
|
||||
stmt.AddValue(0, guid);
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_ITEM_INSTANCE_AZERITE_EMPOWERED_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);
|
||||
|
||||
@@ -1655,6 +1655,8 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
pItem.AddItemFlag2(ItemFieldFlags2.Equipped);
|
||||
|
||||
if (IsInWorld && update)
|
||||
{
|
||||
pItem.AddToWorld();
|
||||
@@ -1824,6 +1826,8 @@ namespace Game.Entities
|
||||
byte slot = (byte)(pos & 255);
|
||||
VisualizeItem(slot, pItem);
|
||||
|
||||
pItem.AddItemFlag2(ItemFieldFlags2.Equipped);
|
||||
|
||||
if (IsInWorld)
|
||||
{
|
||||
pItem.AddToWorld();
|
||||
@@ -1933,6 +1937,7 @@ namespace Game.Entities
|
||||
Item.RemoveItemsSetItem(this, pProto);
|
||||
|
||||
_ApplyItemMods(pItem, slot, false, update);
|
||||
pItem.RemoveItemFlag2(ItemFieldFlags2.Equipped);
|
||||
|
||||
// remove item dependent auras and casts (only weapon and armor slots)
|
||||
if (slot < EquipmentSlot.End)
|
||||
@@ -4475,6 +4480,20 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyAllAzeriteEmpoweredItemMods(bool apply)
|
||||
{
|
||||
for (byte i = 0; i < InventorySlots.BagEnd; ++i)
|
||||
{
|
||||
if (m_items[i])
|
||||
{
|
||||
if (!m_items[i].IsAzeriteEmpoweredItem() || m_items[i].IsBroken() || !CanUseAttackType(Player.GetAttackBySlot(i, m_items[i].GetTemplate().GetInventoryType())))
|
||||
continue;
|
||||
|
||||
ApplyAzeritePowers(m_items[i], apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ObjectGuid GetLootWorldObjectGUID(ObjectGuid lootObjectGuid)
|
||||
{
|
||||
var guid = m_AELootView.LookupByKey(lootObjectGuid);
|
||||
@@ -5520,6 +5539,22 @@ namespace Game.Entities
|
||||
(AzeriteItemMilestoneType)Global.DB2Mgr.GetAzeriteItemMilestonePower(slot).Type == AzeriteItemMilestoneType.MajorEssence, apply);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AzeriteEmpoweredItem azeriteEmpoweredItem = item.ToAzeriteEmpoweredItem();
|
||||
if (azeriteEmpoweredItem)
|
||||
{
|
||||
if (!apply || GetItemByEntry(PlayerConst.ItemIdHeartOfAzeroth, ItemSearchLocation.InEquipment))
|
||||
{
|
||||
for (int i = 0; i < SharedConst.MaxAzeriteEmpoweredTier; ++i)
|
||||
{
|
||||
AzeritePowerRecord azeritePower = CliDB.AzeritePowerStorage.LookupByKey(azeriteEmpoweredItem.GetSelectedAzeritePower(i));
|
||||
if (azeritePower != null)
|
||||
ApplyAzeritePower(azeriteEmpoweredItem, azeritePower, apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ApplyAzeriteItemMilestonePower(AzeriteItem item, AzeriteItemMilestonePowerRecord azeriteItemMilestonePower, bool apply)
|
||||
@@ -5591,6 +5626,17 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public void ApplyAzeritePower(AzeriteEmpoweredItem item, AzeritePowerRecord azeritePower, bool apply)
|
||||
{
|
||||
if (apply)
|
||||
{
|
||||
if (azeritePower.SpecSetID == 0 || Global.DB2Mgr.IsSpecSetMember(azeritePower.SpecSetID, GetPrimarySpecialization()))
|
||||
CastSpell(this, azeritePower.SpellID, true, item);
|
||||
}
|
||||
else
|
||||
RemoveAurasDueToItemSpell(azeritePower.SpellID, item.GetGUID());
|
||||
}
|
||||
|
||||
public bool HasItemOrGemWithIdEquipped(uint item, uint count, byte except_slot = ItemConst.NullSlot)
|
||||
{
|
||||
uint tempcount = 0;
|
||||
|
||||
@@ -429,12 +429,18 @@ namespace Game.Entities
|
||||
if (azeriteItem != null)
|
||||
{
|
||||
if (azeriteItem.IsEquipped())
|
||||
{
|
||||
ApplyAllAzeriteEmpoweredItemMods(false);
|
||||
ApplyAzeritePowers(azeriteItem, false);
|
||||
}
|
||||
|
||||
azeriteItem.SetSelectedAzeriteEssences(spec.Id);
|
||||
|
||||
if (azeriteItem.IsEquipped())
|
||||
{
|
||||
ApplyAzeritePowers(azeriteItem, true);
|
||||
ApplyAllAzeriteEmpoweredItemMods(true);
|
||||
}
|
||||
|
||||
azeriteItem.SetState(ItemUpdateState.Changed, this);
|
||||
}
|
||||
|
||||
@@ -1912,7 +1912,7 @@ namespace Game.Entities
|
||||
if (transport)
|
||||
{
|
||||
transferPending.Ship.HasValue = true;
|
||||
transferPending.Ship.Value.ID = transport.GetEntry();
|
||||
transferPending.Ship.Value.Id = transport.GetEntry();
|
||||
transferPending.Ship.Value.OriginMapID = (int)GetMapId();
|
||||
}
|
||||
|
||||
@@ -7443,6 +7443,9 @@ namespace Game.Entities
|
||||
public void RemovePlayerLocalFlag(PlayerLocalFlags flags) { RemoveUpdateFieldFlagValue(m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.LocalFlags), (int)flags); }
|
||||
public void SetPlayerLocalFlags(PlayerLocalFlags flags) { SetUpdateFieldValue(m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.LocalFlags), (int)flags); }
|
||||
|
||||
public byte GetNumRespecs() { return m_activePlayerData.NumRespecs; }
|
||||
public void SetNumRespecs(byte numRespecs) { SetUpdateFieldValue(m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.NumRespecs), numRespecs); }
|
||||
|
||||
public void SetWatchedFactionIndex(uint index) { SetUpdateFieldValue(m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.WatchedFactionIndex), index); }
|
||||
|
||||
public void AddAuraVision(PlayerFieldByte2Flags flags) { SetUpdateFieldFlagValue(m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.AuraVision), (byte)flags); }
|
||||
|
||||
@@ -688,7 +688,7 @@ namespace Game
|
||||
uint id = result.Read<uint>(0);
|
||||
|
||||
PointOfInterest POI = new PointOfInterest();
|
||||
POI.ID = id;
|
||||
POI.Id = id;
|
||||
POI.Pos = new Vector2(result.Read<float>(1), result.Read<float>(2));
|
||||
POI.Icon = result.Read<uint>(3);
|
||||
POI.Flags = result.Read<uint>(4);
|
||||
@@ -6702,7 +6702,7 @@ namespace Game
|
||||
foreach (QuestObjective obj in qinfo.Objectives)
|
||||
{
|
||||
// Store objective for lookup by id
|
||||
_questObjectives[obj.ID] = obj;
|
||||
_questObjectives[obj.Id] = obj;
|
||||
|
||||
// Check storage index for objectives which store data
|
||||
if (obj.StorageIndex < 0)
|
||||
@@ -6717,7 +6717,7 @@ namespace Game
|
||||
case QuestObjectiveType.AreaTrigger:
|
||||
case QuestObjectiveType.WinPetBattleAgainstNpc:
|
||||
case QuestObjectiveType.ObtainCurrency:
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has invalid StorageIndex = {2} for objective type {3}", qinfo.Id, obj.ID, obj.StorageIndex, obj.Type);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has invalid StorageIndex = {2} for objective type {3}", qinfo.Id, obj.Id, obj.StorageIndex, obj.Type);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -6729,17 +6729,17 @@ namespace Game
|
||||
case QuestObjectiveType.Item:
|
||||
qinfo.SetSpecialFlag(QuestSpecialFlags.Deliver);
|
||||
if (GetItemTemplate((uint)obj.ObjectID) == null)
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing item entry {2}, quest can't be done.", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing item entry {2}, quest can't be done.", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
break;
|
||||
case QuestObjectiveType.Monster:
|
||||
qinfo.SetSpecialFlag(QuestSpecialFlags.Kill | QuestSpecialFlags.Cast);
|
||||
if (GetCreatureTemplate((uint)obj.ObjectID) == null)
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing creature entry {2}, quest can't be done.", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing creature entry {2}, quest can't be done.", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
break;
|
||||
case QuestObjectiveType.GameObject:
|
||||
qinfo.SetSpecialFlag(QuestSpecialFlags.Kill | QuestSpecialFlags.Cast);
|
||||
if (GetGameObjectTemplate((uint)obj.ObjectID) == null)
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing gameobject entry {2}, quest can't be done.", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing gameobject entry {2}, quest can't be done.", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
break;
|
||||
case QuestObjectiveType.TalkTo:
|
||||
// Need checks (is it creature only?)
|
||||
@@ -6748,46 +6748,46 @@ namespace Game
|
||||
case QuestObjectiveType.MinReputation:
|
||||
case QuestObjectiveType.MaxReputation:
|
||||
if (!CliDB.FactionStorage.ContainsKey((uint)obj.ObjectID))
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing faction id {2}", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing faction id {2}", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
break;
|
||||
case QuestObjectiveType.PlayerKills:
|
||||
qinfo.SetSpecialFlag(QuestSpecialFlags.Kill);
|
||||
if (obj.Amount <= 0)
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has invalid player kills count {2}", qinfo.Id, obj.ID, obj.Amount);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has invalid player kills count {2}", qinfo.Id, obj.Id, obj.Amount);
|
||||
break;
|
||||
case QuestObjectiveType.Currency:
|
||||
case QuestObjectiveType.HaveCurrency:
|
||||
case QuestObjectiveType.ObtainCurrency:
|
||||
if (!CliDB.CurrencyTypesStorage.ContainsKey((uint)obj.ObjectID))
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing currency {2}", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing currency {2}", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
if (obj.Amount <= 0)
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has invalid currency amount {2}", qinfo.Id, obj.ID, obj.Amount);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has invalid currency amount {2}", qinfo.Id, obj.Id, obj.Amount);
|
||||
break;
|
||||
case QuestObjectiveType.LearnSpell:
|
||||
if (!Global.SpellMgr.HasSpellInfo((uint)obj.ObjectID))
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing spell id {2}", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing spell id {2}", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
break;
|
||||
case QuestObjectiveType.WinPetBattleAgainstNpc:
|
||||
if (obj.ObjectID != 0 && Global.ObjectMgr.GetCreatureTemplate((uint)obj.ObjectID) == null)
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing creature entry {2}, quest can't be done.", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing creature entry {2}, quest can't be done.", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
break;
|
||||
case QuestObjectiveType.DefeatBattlePet:
|
||||
if (!CliDB.BattlePetSpeciesStorage.ContainsKey((uint)obj.ObjectID))
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing battlepet species id {2}", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing battlepet species id {2}", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
break;
|
||||
case QuestObjectiveType.CriteriaTree:
|
||||
if (!CliDB.CriteriaTreeStorage.ContainsKey((uint)obj.ObjectID))
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing criteria tree id {2}", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing criteria tree id {2}", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
break;
|
||||
case QuestObjectiveType.AreaTrigger:
|
||||
if (!CliDB.AreaTriggerStorage.ContainsKey((uint)obj.ObjectID) && obj.ObjectID != -1)
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing areatrigger id {2}", qinfo.Id, obj.ID, obj.ObjectID);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has non existing areatrigger id {2}", qinfo.Id, obj.Id, obj.ObjectID);
|
||||
break;
|
||||
case QuestObjectiveType.Money:
|
||||
case QuestObjectiveType.WinPvpPetBattles:
|
||||
break;
|
||||
default:
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has unhandled type {2}", qinfo.Id, obj.ID, obj.Type);
|
||||
Log.outError(LogFilter.Sql, "Quest {0} objective {1} has unhandled type {2}", qinfo.Id, obj.Id, obj.Type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -8751,6 +8751,7 @@ namespace Game
|
||||
{
|
||||
Item.DeleteFromDB(null, itemInfo.item_guid);
|
||||
AzeriteItem.DeleteFromDB(null, itemInfo.item_guid);
|
||||
AzeriteEmpoweredItem.DeleteFromDB(null, itemInfo.item_guid);
|
||||
}
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_MAIL_ITEM_BY_ID);
|
||||
@@ -9459,7 +9460,7 @@ namespace Game
|
||||
}
|
||||
|
||||
cost = dest_i.price;
|
||||
path = dest_i.ID;
|
||||
path = dest_i.Id;
|
||||
}
|
||||
public uint GetTaxiMountDisplayId(uint id, Team team, bool allowed_alt_team = false)
|
||||
{
|
||||
|
||||
@@ -327,7 +327,7 @@ namespace Game.Guilds
|
||||
CriteriaManager.WalkCriteriaTree(tree, node =>
|
||||
{
|
||||
if (node.Criteria != null)
|
||||
criteriaIds.Add(node.Criteria.ID);
|
||||
criteriaIds.Add(node.Criteria.Id);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@ namespace Game
|
||||
if (previousMilestone == milestonePower)
|
||||
break;
|
||||
|
||||
if (!azeriteItem.HasUnlockedEssenceMilestone(previousMilestone.ID))
|
||||
if (!azeriteItem.HasUnlockedEssenceMilestone(previousMilestone.Id))
|
||||
return;
|
||||
}
|
||||
|
||||
azeriteItem.AddUnlockedEssenceMilestone(milestonePower.ID);
|
||||
azeriteItem.AddUnlockedEssenceMilestone(milestonePower.Id);
|
||||
_player.ApplyAzeriteItemMilestonePower(azeriteItem, milestonePower, true);
|
||||
azeriteItem.SetState(ItemUpdateState.Changed, _player);
|
||||
}
|
||||
@@ -176,5 +176,72 @@ namespace Game
|
||||
|
||||
azeriteItem.SetState(ItemUpdateState.Changed, _player);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.AzeriteEmpoweredItemViewed)]
|
||||
void HandleAzeriteEmpoweredItemViewed(AzeriteEmpoweredItemViewed azeriteEmpoweredItemViewed)
|
||||
{
|
||||
Item item = _player.GetItemByGuid(azeriteEmpoweredItemViewed.ItemGUID);
|
||||
if (item == null || !item.IsAzeriteEmpoweredItem())
|
||||
return;
|
||||
|
||||
item.AddItemFlag(ItemFieldFlags.AzeriteEmpoweredItemViewed);
|
||||
item.SetState(ItemUpdateState.Changed, _player);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.AzeriteEmpoweredItemSelectPower)]
|
||||
void HandleAzeriteEmpoweredItemSelectPower(AzeriteEmpoweredItemSelectPower azeriteEmpoweredItemSelectPower)
|
||||
{
|
||||
Item item = _player.GetItemByPos(azeriteEmpoweredItemSelectPower.ContainerSlot, azeriteEmpoweredItemSelectPower.Slot);
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
AzeritePowerRecord azeritePower = CliDB.AzeritePowerStorage.LookupByKey(azeriteEmpoweredItemSelectPower.AzeritePowerID);
|
||||
if (azeritePower == null)
|
||||
return;
|
||||
|
||||
AzeriteEmpoweredItem azeriteEmpoweredItem = item.ToAzeriteEmpoweredItem();
|
||||
if (azeriteEmpoweredItem == null)
|
||||
return;
|
||||
|
||||
// Validate tier
|
||||
int actualTier = azeriteEmpoweredItem.GetTierForAzeritePower(_player.GetClass(), azeriteEmpoweredItemSelectPower.AzeritePowerID);
|
||||
if (azeriteEmpoweredItemSelectPower.Tier > SharedConst.MaxAzeriteEmpoweredTier || azeriteEmpoweredItemSelectPower.Tier != actualTier)
|
||||
return;
|
||||
|
||||
uint azeriteLevel = 0;
|
||||
Item heartOfAzeroth = _player.GetItemByEntry(PlayerConst.ItemIdHeartOfAzeroth, ItemSearchLocation.Everywhere);
|
||||
if (heartOfAzeroth == null)
|
||||
return;
|
||||
|
||||
AzeriteItem azeriteItem = heartOfAzeroth.ToAzeriteItem();
|
||||
if (azeriteItem != null)
|
||||
azeriteLevel = azeriteItem.GetEffectiveLevel();
|
||||
|
||||
// Check required heart of azeroth level
|
||||
if (azeriteLevel < azeriteEmpoweredItem.GetRequiredAzeriteLevelForTier((uint)actualTier))
|
||||
return;
|
||||
|
||||
// tiers are ordered backwards, you first select the highest one
|
||||
for (int i = actualTier + 1; i < azeriteEmpoweredItem.GetMaxAzeritePowerTier(); ++i)
|
||||
if (azeriteEmpoweredItem.GetSelectedAzeritePower(i) == 0)
|
||||
return;
|
||||
|
||||
bool activateAzeritePower = azeriteEmpoweredItem.IsEquipped() && heartOfAzeroth.IsEquipped();
|
||||
if (azeritePower.ItemBonusListID != 0 && activateAzeritePower)
|
||||
_player._ApplyItemMods(azeriteEmpoweredItem, azeriteEmpoweredItem.GetSlot(), false);
|
||||
|
||||
azeriteEmpoweredItem.SetSelectedAzeritePower(actualTier, azeriteEmpoweredItemSelectPower.AzeritePowerID);
|
||||
|
||||
if (activateAzeritePower)
|
||||
{
|
||||
// apply all item mods when azerite power grants a bonus, item level changes and that affects stats and auras that scale with item level
|
||||
if (azeritePower.ItemBonusListID != 0)
|
||||
_player._ApplyItemMods(azeriteEmpoweredItem, azeriteEmpoweredItem.GetSlot(), true);
|
||||
else
|
||||
_player.ApplyAzeritePower(azeriteEmpoweredItem, azeritePower, true);
|
||||
}
|
||||
|
||||
azeriteEmpoweredItem.SetState(ItemUpdateState.Changed, _player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2461,15 +2461,19 @@ namespace Game
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_ITEM_INSTANCE_AZERITE);
|
||||
stmt.AddValue(0, lowGuid);
|
||||
SetQuery(PlayerLoginQueryLoad.LoadAzerite, stmt);
|
||||
SetQuery(PlayerLoginQueryLoad.Azerite, stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_ITEM_INSTANCE_AZERITE_MILESTONE_POWER);
|
||||
stmt.AddValue(0, lowGuid);
|
||||
SetQuery(PlayerLoginQueryLoad.LoadAzeriteMilestonePowers, stmt);
|
||||
SetQuery(PlayerLoginQueryLoad.AzeriteMilestonePowers, stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_ITEM_INSTANCE_AZERITE_UNLOCKED_ESSENCE);
|
||||
stmt.AddValue(0, lowGuid);
|
||||
SetQuery(PlayerLoginQueryLoad.LoadAzeriteUnlockedEssences, stmt);
|
||||
SetQuery(PlayerLoginQueryLoad.AzeriteUnlockedEssences, stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_ITEM_INSTANCE_AZERITE_EMPOWERED);
|
||||
stmt.AddValue(0, lowGuid);
|
||||
SetQuery(PlayerLoginQueryLoad.AzeriteEmpowered, stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_CHAR_VOID_STORAGE);
|
||||
stmt.AddValue(0, lowGuid);
|
||||
@@ -2633,9 +2637,10 @@ namespace Game
|
||||
Reputation,
|
||||
Inventory,
|
||||
Artifacts,
|
||||
LoadAzerite,
|
||||
LoadAzeriteMilestonePowers,
|
||||
LoadAzeriteUnlockedEssences,
|
||||
Azerite,
|
||||
AzeriteMilestonePowers,
|
||||
AzeriteUnlockedEssences,
|
||||
AzeriteEmpowered,
|
||||
Actions,
|
||||
MailCount,
|
||||
MailDate,
|
||||
|
||||
@@ -29,15 +29,15 @@ namespace Game
|
||||
switch (collectionItemSetFavorite.Type)
|
||||
{
|
||||
case CollectionType.Toybox:
|
||||
GetCollectionMgr().ToySetFavorite(collectionItemSetFavorite.ID, collectionItemSetFavorite.IsFavorite);
|
||||
GetCollectionMgr().ToySetFavorite(collectionItemSetFavorite.Id, collectionItemSetFavorite.IsFavorite);
|
||||
break;
|
||||
case CollectionType.Appearance:
|
||||
{
|
||||
var pair = GetCollectionMgr().HasItemAppearance(collectionItemSetFavorite.ID);
|
||||
var pair = GetCollectionMgr().HasItemAppearance(collectionItemSetFavorite.Id);
|
||||
if (!pair.Item1 || pair.Item2)
|
||||
return;
|
||||
|
||||
GetCollectionMgr().SetAppearanceIsFavorite(collectionItemSetFavorite.ID, collectionItemSetFavorite.IsFavorite);
|
||||
GetCollectionMgr().SetAppearanceIsFavorite(collectionItemSetFavorite.Id, collectionItemSetFavorite.IsFavorite);
|
||||
break;
|
||||
}
|
||||
case CollectionType.TransmogSet:
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace Game
|
||||
break;
|
||||
|
||||
QueryPageTextResponse.PageTextInfo page;
|
||||
page.ID = pageID;
|
||||
page.Id = pageID;
|
||||
page.NextPageID = pageText.NextPageID;
|
||||
page.Text = pageText.Text;
|
||||
page.PlayerConditionID = pageText.PlayerConditionID;
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace Game.Movement
|
||||
packet.MoverGUID = unit.GetGUID();
|
||||
packet.Pos = new Vector3(loc.X, loc.Y, loc.Z);
|
||||
packet.SplineData.StopDistanceTolerance = 2;
|
||||
packet.SplineData.ID = move_spline.GetId();
|
||||
packet.SplineData.Id = move_spline.GetId();
|
||||
|
||||
if (transport)
|
||||
{
|
||||
|
||||
@@ -99,4 +99,62 @@ namespace Game.Network.Packets
|
||||
public uint AzeriteEssenceID;
|
||||
public byte? Slot;
|
||||
}
|
||||
|
||||
class AzeriteEmpoweredItemViewed : ClientPacket
|
||||
{
|
||||
public AzeriteEmpoweredItemViewed(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
ItemGUID = _worldPacket.ReadPackedGuid();
|
||||
}
|
||||
|
||||
public ObjectGuid ItemGUID;
|
||||
}
|
||||
|
||||
class AzeriteEmpoweredItemSelectPower : ClientPacket
|
||||
{
|
||||
public AzeriteEmpoweredItemSelectPower(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
Tier = _worldPacket.ReadInt32();
|
||||
AzeritePowerID = _worldPacket.ReadInt32();
|
||||
ContainerSlot = _worldPacket.ReadUInt8();
|
||||
Slot = _worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public int Tier;
|
||||
public int AzeritePowerID;
|
||||
public byte ContainerSlot;
|
||||
public byte Slot;
|
||||
}
|
||||
|
||||
class AzeriteEmpoweredItemEquippedStatusChanged : ServerPacket
|
||||
{
|
||||
public AzeriteEmpoweredItemEquippedStatusChanged() : base(ServerOpcodes.AzeriteEmpoweredItemEquippedStatusChanged) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBit(IsHeartEquipped);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public bool IsHeartEquipped;
|
||||
}
|
||||
|
||||
class AzeriteEmpoweredItemRespecOpen : ServerPacket
|
||||
{
|
||||
public AzeriteEmpoweredItemRespecOpen(ObjectGuid npcGuid) : base(ServerOpcodes.AzeriteEmpoweredItemRespecOpen)
|
||||
{
|
||||
NpcGUID = npcGuid;
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(NpcGUID);
|
||||
}
|
||||
|
||||
public ObjectGuid NpcGUID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,12 +32,12 @@ namespace Game.Network.Packets
|
||||
public override void Read()
|
||||
{
|
||||
Type = (CollectionType)_worldPacket.ReadUInt32();
|
||||
ID = _worldPacket.ReadUInt32();
|
||||
Id = _worldPacket.ReadUInt32();
|
||||
IsFavorite = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
public CollectionType Type;
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public bool IsFavorite;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public void InitializeSplineData(MoveSpline moveSpline)
|
||||
{
|
||||
SplineData.ID = moveSpline.GetId();
|
||||
SplineData.Id = moveSpline.GetId();
|
||||
MovementSpline movementSpline = SplineData.Move;
|
||||
|
||||
MoveSplineFlag splineFlags = moveSpline.splineflags;
|
||||
@@ -514,7 +514,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(TransferSpellID.HasValue);
|
||||
if (Ship.HasValue)
|
||||
{
|
||||
_worldPacket.WriteUInt32(Ship.Value.ID);
|
||||
_worldPacket.WriteUInt32(Ship.Value.Id);
|
||||
_worldPacket.WriteInt32(Ship.Value.OriginMapID);
|
||||
}
|
||||
|
||||
@@ -531,7 +531,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public struct ShipTransferPending
|
||||
{
|
||||
public uint ID; // gameobject_template.entry of the transport the player is teleporting on
|
||||
public uint Id; // gameobject_template.entry of the transport the player is teleporting on
|
||||
public int OriginMapID; // Map id the player is currently on (before teleport)
|
||||
}
|
||||
}
|
||||
@@ -1320,7 +1320,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(ID);
|
||||
data.WriteUInt32(Id);
|
||||
data.WriteVector3(Destination);
|
||||
data.WriteBit(CrzTeleport);
|
||||
data.WriteBits(StopDistanceTolerance, 3);
|
||||
@@ -1328,7 +1328,7 @@ namespace Game.Network.Packets
|
||||
Move.Write(data);
|
||||
}
|
||||
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public Vector3 Destination;
|
||||
public bool CrzTeleport;
|
||||
public byte StopDistanceTolerance; // Determines how far from spline destination the mover is allowed to stop in place 0, 0, 3.0, 2.76, numeric_limits<float>::max, 1.1, float(INT_MAX); default before this field existed was distance 3.0 (index 2)
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(ID);
|
||||
_worldPacket.WriteUInt32(Id);
|
||||
_worldPacket.WriteFloat(Pos.X);
|
||||
_worldPacket.WriteFloat(Pos.Y);
|
||||
_worldPacket.WriteUInt32(Icon);
|
||||
@@ -220,7 +220,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteString(Name);
|
||||
}
|
||||
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public uint Flags;
|
||||
public Vector2 Pos;
|
||||
public uint Icon;
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(ID);
|
||||
data.WriteUInt32(Id);
|
||||
data.WriteUInt32(NextPageID);
|
||||
data.WriteInt32(PlayerConditionID);
|
||||
data.WriteUInt8(Flags);
|
||||
@@ -205,7 +205,7 @@ namespace Game.Network.Packets
|
||||
data.WriteString(Text);
|
||||
}
|
||||
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public uint NextPageID;
|
||||
public int PlayerConditionID;
|
||||
public byte Flags;
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace Game.Network.Packets
|
||||
|
||||
foreach (QuestObjective questObjective in Info.Objectives)
|
||||
{
|
||||
_worldPacket.WriteUInt32(questObjective.ID);
|
||||
_worldPacket.WriteUInt32(questObjective.Id);
|
||||
_worldPacket.WriteUInt8((byte)questObjective.Type);
|
||||
_worldPacket.WriteInt8(questObjective.StorageIndex);
|
||||
_worldPacket.WriteInt32(questObjective.ObjectID);
|
||||
@@ -442,7 +442,7 @@ namespace Game.Network.Packets
|
||||
|
||||
foreach (QuestObjectiveSimple obj in Objectives)
|
||||
{
|
||||
_worldPacket.WriteUInt32(obj.ID);
|
||||
_worldPacket.WriteUInt32(obj.Id);
|
||||
_worldPacket.WriteInt32(obj.ObjectID);
|
||||
_worldPacket.WriteInt32(obj.Amount);
|
||||
_worldPacket.WriteUInt8(obj.Type);
|
||||
@@ -1122,7 +1122,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public struct QuestObjectiveSimple
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public int ObjectID;
|
||||
public int Amount;
|
||||
public byte Type;
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(ItemID);
|
||||
break;
|
||||
case TradeStatus.Initiated:
|
||||
_worldPacket.WriteUInt32(ID);
|
||||
_worldPacket.WriteUInt32(Id);
|
||||
break;
|
||||
case TradeStatus.Proposed:
|
||||
_worldPacket.WritePackedGuid(Partner);
|
||||
@@ -181,7 +181,7 @@ namespace Game.Network.Packets
|
||||
public bool FailureForYou;
|
||||
public InventoryResult BagResult;
|
||||
public uint ItemID;
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public bool PartnerIsSameBnetAccount;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(WhichPlayer);
|
||||
_worldPacket.WriteUInt32(ID);
|
||||
_worldPacket.WriteUInt32(Id);
|
||||
_worldPacket.WriteUInt32(ClientStateIndex);
|
||||
_worldPacket.WriteUInt32(CurrentStateIndex);
|
||||
_worldPacket.WriteUInt64(Gold);
|
||||
@@ -261,7 +261,7 @@ namespace Game.Network.Packets
|
||||
public uint ClientStateIndex;
|
||||
public List<TradeItem> Items = new List<TradeItem>();
|
||||
public int CurrencyType;
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public int ProposedEnchantment;
|
||||
public int CurrencyQuantity;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace Game
|
||||
public void LoadQuestObjective(SQLFields fields)
|
||||
{
|
||||
QuestObjective obj = new QuestObjective();
|
||||
obj.ID = fields.Read<uint>(0);
|
||||
obj.Id = fields.Read<uint>(0);
|
||||
obj.QuestID = fields.Read<uint>(1);
|
||||
obj.Type = (QuestObjectiveType)fields.Read<byte>(2);
|
||||
obj.StorageIndex = fields.Read<sbyte>(3);
|
||||
@@ -238,7 +238,7 @@ namespace Game
|
||||
|
||||
foreach (QuestObjective obj in Objectives)
|
||||
{
|
||||
if (obj.ID == objID)
|
||||
if (obj.Id == objID)
|
||||
{
|
||||
byte effectIndex = fields.Read<byte>(3);
|
||||
if (obj.VisualEffects == null)
|
||||
@@ -728,7 +728,7 @@ namespace Game
|
||||
|
||||
public class QuestObjective
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public uint QuestID;
|
||||
public QuestObjectiveType Type;
|
||||
public sbyte StorageIndex;
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace Game
|
||||
if (playerCriteria.Entry.FailEvent != miscValue1 || (playerCriteria.Entry.FailAsset != 0 && playerCriteria.Entry.FailAsset != miscValue2))
|
||||
continue;
|
||||
|
||||
var trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(playerCriteria.ID);
|
||||
var trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(playerCriteria.Id);
|
||||
bool allComplete = true;
|
||||
foreach (CriteriaTree tree in trees)
|
||||
{
|
||||
@@ -239,19 +239,19 @@ namespace Game
|
||||
|
||||
Log.outInfo(LogFilter.Player, "QuestObjectiveCriteriaMgr.CompletedObjective({questObjective.ID}). {GetOwnerInfo()}");
|
||||
|
||||
_completedObjectives.Add(questObjective.ID);
|
||||
_completedObjectives.Add(questObjective.Id);
|
||||
}
|
||||
|
||||
public bool HasCompletedObjective(QuestObjective questObjective)
|
||||
{
|
||||
return _completedObjectives.Contains(questObjective.ID);
|
||||
return _completedObjectives.Contains(questObjective.Id);
|
||||
}
|
||||
|
||||
public override void SendCriteriaUpdate(Criteria criteria, CriteriaProgress progress, uint timeElapsed, bool timedCompleted)
|
||||
{
|
||||
CriteriaUpdate criteriaUpdate = new CriteriaUpdate();
|
||||
|
||||
criteriaUpdate.CriteriaID = criteria.ID;
|
||||
criteriaUpdate.CriteriaID = criteria.Id;
|
||||
criteriaUpdate.Quantity = progress.Counter;
|
||||
criteriaUpdate.PlayerGUID = _owner.GetGUID();
|
||||
criteriaUpdate.Flags = 0;
|
||||
|
||||
@@ -247,7 +247,7 @@ namespace Game
|
||||
if (factionEntry.CanHaveReputation())
|
||||
{
|
||||
FactionState newFaction = new FactionState();
|
||||
newFaction.ID = factionEntry.Id;
|
||||
newFaction.Id = factionEntry.Id;
|
||||
newFaction.ReputationListID = (uint)factionEntry.ReputationIndex;
|
||||
newFaction.Standing = 0;
|
||||
newFaction.Flags = (FactionFlags)(GetDefaultStateFlags(factionEntry) & 0xFF);//todo fixme for higher value then byte?????
|
||||
@@ -559,12 +559,12 @@ namespace Game
|
||||
{
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_CHAR_REPUTATION_BY_FACTION);
|
||||
stmt.AddValue(0, _player.GetGUID().GetCounter());
|
||||
stmt.AddValue(1, factionState.ID);
|
||||
stmt.AddValue(1, factionState.Id);
|
||||
trans.Append(stmt);
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.INS_CHAR_REPUTATION_BY_FACTION);
|
||||
stmt.AddValue(0, _player.GetGUID().GetCounter());
|
||||
stmt.AddValue(1, factionState.ID);
|
||||
stmt.AddValue(1, factionState.Id);
|
||||
stmt.AddValue(2, factionState.Standing);
|
||||
stmt.AddValue(3, factionState.Flags);
|
||||
trans.Append(stmt);
|
||||
@@ -660,7 +660,7 @@ namespace Game
|
||||
}
|
||||
public class FactionState
|
||||
{
|
||||
public uint ID;
|
||||
public uint Id;
|
||||
public uint ReputationListID;
|
||||
public int Standing;
|
||||
public FactionFlags Flags;
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace Game.Scenarios
|
||||
|
||||
SetCriteriaProgress(criteria, counter, null, ProgressType.Set);
|
||||
|
||||
List<CriteriaTree> trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.ID);
|
||||
List<CriteriaTree> trees = Global.CriteriaMgr.GetCriteriaTreesByCriteria(criteria.Id);
|
||||
if (trees != null)
|
||||
{
|
||||
foreach (CriteriaTree tree in trees)
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace Game.Scenarios
|
||||
public override void SendCriteriaUpdate(Criteria criteria, CriteriaProgress progress, uint timeElapsed, bool timedCompleted)
|
||||
{
|
||||
ScenarioProgressUpdate progressUpdate = new ScenarioProgressUpdate();
|
||||
progressUpdate.CriteriaProgress.Id = criteria.ID;
|
||||
progressUpdate.CriteriaProgress.Id = criteria.Id;
|
||||
progressUpdate.CriteriaProgress.Quantity = progress.Counter;
|
||||
progressUpdate.CriteriaProgress.Player = progress.PlayerGUID;
|
||||
progressUpdate.CriteriaProgress.Date = progress.Date;
|
||||
|
||||
@@ -6234,6 +6234,37 @@ namespace Game.Spells
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SpellEffectName.RespecAzeriteEmpoweredItem:
|
||||
{
|
||||
Item item = m_targets.GetItemTarget();
|
||||
if (item == null)
|
||||
return SpellCastResult.AzeriteEmpoweredOnly;
|
||||
|
||||
if (item.GetOwnerGUID() != m_caster.GetGUID())
|
||||
return SpellCastResult.DontReport;
|
||||
|
||||
AzeriteEmpoweredItem azeriteEmpoweredItem = item.ToAzeriteEmpoweredItem();
|
||||
if (azeriteEmpoweredItem == null)
|
||||
return SpellCastResult.AzeriteEmpoweredOnly;
|
||||
|
||||
bool hasSelections = false;
|
||||
for (int tier = 0; tier < azeriteEmpoweredItem.GetMaxAzeritePowerTier(); ++tier)
|
||||
{
|
||||
if (azeriteEmpoweredItem.GetSelectedAzeritePower(tier) != 0)
|
||||
{
|
||||
hasSelections = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasSelections)
|
||||
return SpellCastResult.AzeriteEmpoweredNoChoicesToUndo;
|
||||
|
||||
if (!m_caster.ToPlayer().HasEnoughMoney(azeriteEmpoweredItem.GetRespecCost()))
|
||||
return SpellCastResult.DontReport;
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1694,6 +1694,7 @@ CREATE TABLE `characters` (
|
||||
`rest_bonus` float NOT NULL DEFAULT '0',
|
||||
`resettalents_cost` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`resettalents_time` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`numRespecs` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`primarySpecialization` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`trans_x` float NOT NULL DEFAULT '0',
|
||||
`trans_y` float NOT NULL DEFAULT '0',
|
||||
@@ -2897,6 +2898,33 @@ LOCK TABLES `item_instance_azerite` WRITE;
|
||||
/*!40000 ALTER TABLE `item_instance_azerite` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `item_instance_azerite_empowered`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `item_instance_azerite_empowered`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `item_instance_azerite_empowered` (
|
||||
`itemGuid` bigint(20) unsigned NOT NULL,
|
||||
`azeritePowerId1` int(11) NOT NULL,
|
||||
`azeritePowerId2` int(11) NOT NULL,
|
||||
`azeritePowerId3` int(11) NOT NULL,
|
||||
`azeritePowerId4` int(11) NOT NULL,
|
||||
`azeritePowerId5` int(11) NOT NULL,
|
||||
PRIMARY KEY (`itemGuid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `item_instance_azerite_empowered`
|
||||
--
|
||||
|
||||
LOCK TABLES `item_instance_azerite_empowered` WRITE;
|
||||
/*!40000 ALTER TABLE `item_instance_azerite_empowered` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `item_instance_azerite_empowered` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `item_instance_azerite_milestone_power`
|
||||
--
|
||||
@@ -3662,7 +3690,8 @@ INSERT INTO `updates` VALUES
|
||||
('2019_11_03_00_characters.sql','DC789597F85B890E9A7901B4443DAD9CAEE2A02A','RELEASED','2019-11-03 14:13:27',0),
|
||||
('2019_11_12_00_characters.sql','D4C642B4D48DAE9F56329BDE51C258323A132A91','RELEASED','2019-11-12 16:31:29',0),
|
||||
('2019_11_22_00_characters.sql','95DFA71DBD75542C098CD86E9C0051C9690902F0','RELEASED','2019-11-20 15:10:12',0),
|
||||
('2019_11_30_00_characters.sql','D0678E62B651AECA60C2DD6989BF80BD999AD12B','RELEASED','2019-11-29 22:42:01',0);
|
||||
('2019_11_30_00_characters.sql','D0678E62B651AECA60C2DD6989BF80BD999AD12B','RELEASED','2019-11-29 22:42:01',0),
|
||||
('2019_12_05_00_characters.sql','EA381C9634A5646A3168F15DF4E06A708A622762','RELEASED','2019-12-05 20:56:58',0);
|
||||
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
ALTER TABLE `characters` ADD `numRespecs` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `resettalents_time`;
|
||||
|
||||
--
|
||||
-- Table structure for table `item_instance_azerite_empowered`
|
||||
--
|
||||
DROP TABLE IF EXISTS `item_instance_azerite_empowered`;
|
||||
CREATE TABLE `item_instance_azerite_empowered` (
|
||||
`itemGuid` bigint(20) unsigned NOT NULL,
|
||||
`azeritePowerId1` int(11) NOT NULL,
|
||||
`azeritePowerId2` int(11) NOT NULL,
|
||||
`azeritePowerId3` int(11) NOT NULL,
|
||||
`azeritePowerId4` int(11) NOT NULL,
|
||||
`azeritePowerId5` int(11) NOT NULL,
|
||||
PRIMARY KEY (`itemGuid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -0,0 +1,67 @@
|
||||
--
|
||||
-- Table structure for table `azerite_empowered_item`
|
||||
--
|
||||
DROP TABLE IF EXISTS `azerite_empowered_item`;
|
||||
CREATE TABLE `azerite_empowered_item` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`ItemID` int(11) NOT NULL DEFAULT '0',
|
||||
`AzeriteTierUnlockSetID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`AzeritePowerSetID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `azerite_power_set_member`
|
||||
--
|
||||
DROP TABLE IF EXISTS `azerite_power_set_member`;
|
||||
CREATE TABLE `azerite_power_set_member` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`AzeritePowerSetID` int(11) NOT NULL DEFAULT '0',
|
||||
`AzeritePowerID` int(11) NOT NULL DEFAULT '0',
|
||||
`Class` int(11) NOT NULL DEFAULT '0',
|
||||
`Tier` int(11) NOT NULL DEFAULT '0',
|
||||
`OrderIndex` int(11) NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `azerite_tier_unlock`
|
||||
--
|
||||
DROP TABLE IF EXISTS `azerite_tier_unlock`;
|
||||
CREATE TABLE `azerite_tier_unlock` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`ItemCreationContext` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`Tier` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`AzeriteLevel` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`AzeriteTierUnlockSetID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `azerite_tier_unlock_set`
|
||||
--
|
||||
DROP TABLE IF EXISTS `azerite_tier_unlock_set`;
|
||||
CREATE TABLE `azerite_tier_unlock_set` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Flags` int(11) NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Table structure for table `azerite_unlock_mapping`
|
||||
--
|
||||
DROP TABLE IF EXISTS `azerite_unlock_mapping`;
|
||||
CREATE TABLE `azerite_unlock_mapping` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`ItemLevel` int(11) NOT NULL DEFAULT '0',
|
||||
`ItemBonusListHead` int(11) NOT NULL DEFAULT '0',
|
||||
`ItemBonusListShoulders` int(11) NOT NULL DEFAULT '0',
|
||||
`ItemBonusListChest` int(11) NOT NULL DEFAULT '0',
|
||||
`AzeriteUnlockMappingSetID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
Reference in New Issue
Block a user