Core/Items: Implement azerite empowered items

Port From (https://github.com/TrinityCore/TrinityCore/commit/d934824421c83598853487c5cc9e4cbb3c5d0006)
This commit is contained in:
hondacrx
2019-12-05 22:55:44 -05:00
parent 86e1065da0
commit 5b9ad41953
47 changed files with 1050 additions and 239 deletions
+7 -1
View File
@@ -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
+3 -1
View File
@@ -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,