Core: Updated to 10.0.2
This commit is contained in:
@@ -1138,7 +1138,7 @@ CREATE TABLE `character_inventory` (
|
||||
`slot` tinyint unsigned NOT NULL DEFAULT '0',
|
||||
`item` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'Item Global Unique Identifier',
|
||||
PRIMARY KEY (`item`),
|
||||
UNIQUE KEY `guid` (`guid`,`bag`,`slot`),
|
||||
UNIQUE KEY `uk_location` (`guid`,`bag`,`slot`),
|
||||
KEY `idx_guid` (`guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Player System';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
ALTER TABLE `character_inventory` ADD `newSlot` tinyint unsigned;
|
||||
ALTER TABLE `character_inventory` DROP INDEX `guid`;
|
||||
UPDATE `character_inventory` SET `newSlot`=`slot`;
|
||||
UPDATE `character_inventory` SET `newSlot`=`slot`+12 WHERE `slot`>=23 AND `bag`=0; -- free up space for reagent bag
|
||||
UPDATE `character_inventory` SET `newSlot`=`slot`+11 WHERE `slot` BETWEEN 19 AND 22 AND `bag`=0; -- free up space for profession equipment
|
||||
UPDATE `character_inventory` SET `slot`=`newSlot`;
|
||||
ALTER TABLE `character_inventory` ADD UNIQUE KEY `uk_location` (`guid`,`bag`,`slot`);
|
||||
ALTER TABLE `character_inventory` DROP `newSlot`;
|
||||
|
||||
UPDATE `characters` SET `equipmentCache`=CONCAT(`equipmentCache`, '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ');
|
||||
@@ -0,0 +1,343 @@
|
||||
--
|
||||
-- Table structure for table `battle_pet_breed_quality`
|
||||
--
|
||||
ALTER TABLE `battle_pet_breed_quality` ADD `MaxQualityRoll` int NOT NULL DEFAULT 0 AFTER `ID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `battle_pet_species`
|
||||
--
|
||||
ALTER TABLE `battle_pet_species` MODIFY `Flags` int NOT NULL DEFAULT 0 AFTER `PetTypeEnum`;
|
||||
|
||||
--
|
||||
-- Table structure for table `battlemaster_list`
|
||||
--
|
||||
ALTER TABLE `battlemaster_list` MODIFY `MaxPlayers` int NOT NULL DEFAULT 0 AFTER `MinPlayers`;
|
||||
|
||||
--
|
||||
-- Table structure for table `battlemaster_list`
|
||||
--
|
||||
ALTER TABLE `character_loadout` MODIFY `Purpose` int NOT NULL DEFAULT 0 AFTER `ChrClassID`;
|
||||
ALTER TABLE `character_loadout` CHANGE `Unused910` `ItemContext` tinyint NOT NULL DEFAULT 0 AFTER `Purpose`;
|
||||
|
||||
--
|
||||
-- Table structure for table `chr_customization_choice`
|
||||
--
|
||||
ALTER TABLE `chr_customization_choice` ADD `ChrCustomizationVisReqID` int NOT NULL DEFAULT 0 AFTER `ChrCustomizationReqID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `chr_customization_element`
|
||||
--
|
||||
ALTER TABLE `chr_customization_element` ADD `ChrCustomizationVoiceID` int NOT NULL DEFAULT 0 AFTER `ChrCustItemGeoModifyID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `chr_customization_req`
|
||||
--
|
||||
ALTER TABLE `chr_customization_req`
|
||||
ADD `ReqSource` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL AFTER `ID`,
|
||||
ADD `QuestID` int NOT NULL DEFAULT 0 AFTER `AchievementID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `chr_customization_req_locale`
|
||||
--
|
||||
DROP TABLE IF EXISTS `chr_customization_req_locale`;
|
||||
CREATE TABLE `chr_customization_req_locale` (
|
||||
`ID` int unsigned NOT NULL DEFAULT '0',
|
||||
`locale` varchar(4) NOT NULL,
|
||||
`ReqSource_lang` text,
|
||||
`VerifiedBuild` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`locale`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
PARTITION BY LIST COLUMNS(locale)
|
||||
(PARTITION deDE VALUES IN ('deDE') ENGINE = InnoDB,
|
||||
PARTITION esES VALUES IN ('esES') ENGINE = InnoDB,
|
||||
PARTITION esMX VALUES IN ('esMX') ENGINE = InnoDB,
|
||||
PARTITION frFR VALUES IN ('frFR') ENGINE = InnoDB,
|
||||
PARTITION itIT VALUES IN ('itIT') ENGINE = InnoDB,
|
||||
PARTITION koKR VALUES IN ('koKR') ENGINE = InnoDB,
|
||||
PARTITION ptBR VALUES IN ('ptBR') ENGINE = InnoDB,
|
||||
PARTITION ruRU VALUES IN ('ruRU') ENGINE = InnoDB,
|
||||
PARTITION zhCN VALUES IN ('zhCN') ENGINE = InnoDB,
|
||||
PARTITION zhTW VALUES IN ('zhTW') ENGINE = InnoDB);
|
||||
|
||||
--
|
||||
-- Table structure for table `chr_model`
|
||||
--
|
||||
ALTER TABLE `chr_model` MODIFY `DisplayID` int NOT NULL DEFAULT 0 AFTER `Sex`;
|
||||
|
||||
--
|
||||
-- Table structure for table `chr_model`
|
||||
--
|
||||
ALTER TABLE `chr_race_x_chr_model`
|
||||
ADD `Sex` int NOT NULL DEFAULT 0 AFTER `ChrModelID`,
|
||||
ADD `AllowedTransmogSlots` int NOT NULL DEFAULT 0 AFTER `Sex`;
|
||||
|
||||
--
|
||||
-- Table structure for table `chr_races`
|
||||
--
|
||||
ALTER TABLE `chr_races` ADD `Unknown1000` int NOT NULL DEFAULT 0 AFTER `Unknown910_23`;
|
||||
|
||||
--
|
||||
-- Table structure for table `cinematic_camera`
|
||||
--
|
||||
ALTER TABLE `cinematic_camera` CHANGE `Unknown915` `ConversationID` int unsigned NOT NULL DEFAULT 0 AFTER `FileDataID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `creature_display_info`
|
||||
--
|
||||
ALTER TABLE `creature_display_info` ADD `TextureVariationFileDataID4` int NOT NULL DEFAULT 0 AFTER `TextureVariationFileDataID3`;
|
||||
|
||||
--
|
||||
-- Table structure for table `currency_types`
|
||||
--
|
||||
ALTER TABLE `currency_types`
|
||||
ADD `RechargingAmountPerCycle` int unsigned NOT NULL DEFAULT 0 AFTER `MaxQtyWorldStateID`,
|
||||
ADD `RechargingCycleDurationMS` int unsigned NOT NULL DEFAULT 0 AFTER `RechargingAmountPerCycle`;
|
||||
|
||||
--
|
||||
-- Table structure for table `curve_point`
|
||||
--
|
||||
ALTER TABLE `curve_point` MODIFY `ID` int unsigned NOT NULL DEFAULT 0 AFTER `PreSLSquishPosY`;
|
||||
|
||||
--
|
||||
-- Table structure for table `dungeon_encounter`
|
||||
--
|
||||
ALTER TABLE `dungeon_encounter` DROP `CreatureDisplayID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `faction`
|
||||
--
|
||||
ALTER TABLE `faction`
|
||||
ADD `RenownFactionID` int NOT NULL DEFAULT 0 AFTER `ParagonFactionID`,
|
||||
ADD `RenownCurrencyID` int NOT NULL DEFAULT 0 AFTER `RenownFactionID`,
|
||||
MODIFY `Flags` int NOT NULL DEFAULT 0 AFTER `FriendshipRepID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `faction_template`
|
||||
--
|
||||
ALTER TABLE `faction_template`
|
||||
ADD `Enemies5` smallint unsigned NOT NULL DEFAULT 0 AFTER `Enemies4`,
|
||||
ADD `Enemies6` smallint unsigned NOT NULL DEFAULT 0 AFTER `Enemies5`,
|
||||
ADD `Enemies7` smallint unsigned NOT NULL DEFAULT 0 AFTER `Enemies6`,
|
||||
ADD `Enemies8` smallint unsigned NOT NULL DEFAULT 0 AFTER `Enemies7`,
|
||||
ADD `Friend5` smallint unsigned NOT NULL DEFAULT 0 AFTER `Friend4`,
|
||||
ADD `Friend6` smallint unsigned NOT NULL DEFAULT 0 AFTER `Friend5`,
|
||||
ADD `Friend7` smallint unsigned NOT NULL DEFAULT 0 AFTER `Friend6`,
|
||||
ADD `Friend8` smallint unsigned NOT NULL DEFAULT 0 AFTER `Friend7`;
|
||||
|
||||
--
|
||||
-- Table structure for table `garr_talent_tree`
|
||||
--
|
||||
ALTER TABLE `garr_talent_tree` MODIFY `FeatureTypeIndex` tinyint unsigned NOT NULL DEFAULT 0 AFTER `PlayerConditionID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `gossip_npc_option`
|
||||
--
|
||||
DROP TABLE IF EXISTS `gossip_npc_option`;
|
||||
CREATE TABLE `gossip_npc_option` (
|
||||
`ID` int unsigned NOT NULL DEFAULT '0',
|
||||
`GossipNpcOption` int NOT NULL DEFAULT '0',
|
||||
`LFGDungeonsID` int NOT NULL DEFAULT '0',
|
||||
`TrainerID` int NOT NULL DEFAULT '0',
|
||||
`GarrFollowerTypeID` int NOT NULL DEFAULT '0',
|
||||
`CharShipmentID` int NOT NULL DEFAULT '0',
|
||||
`GarrTalentTreeID` int NOT NULL DEFAULT '0',
|
||||
`UiMapID` int NOT NULL DEFAULT '0',
|
||||
`UiItemInteractionID` int NOT NULL DEFAULT '0',
|
||||
`Unknown_1000_8` int NOT NULL DEFAULT '0',
|
||||
`Unknown_1000_9` int NOT NULL DEFAULT '0',
|
||||
`CovenantID` int NOT NULL DEFAULT '0',
|
||||
`GossipOptionID` int NOT NULL DEFAULT '0',
|
||||
`TraitTreeID` int NOT NULL DEFAULT '0',
|
||||
`ProfessionID` int NOT NULL DEFAULT '0',
|
||||
`Unknown_1002_14` int NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `item`
|
||||
--
|
||||
ALTER TABLE `item` ADD `CraftingQualityID` int NOT NULL DEFAULT 0 AFTER `ModifiedCraftingReagentItemID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `item_extended_cost`
|
||||
--
|
||||
ALTER TABLE `item_extended_cost` MODIFY `MinReputation` int NOT NULL DEFAULT 0 AFTER `MinFactionID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `item_search_name`
|
||||
--
|
||||
ALTER TABLE `item_search_name` MODIFY `MinReputation` int NOT NULL DEFAULT 0 AFTER `MinFactionID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `item_sparse`
|
||||
--
|
||||
ALTER TABLE `item_sparse` MODIFY `MinReputation` int NOT NULL DEFAULT 0 AFTER `MaxCount`;
|
||||
|
||||
--
|
||||
-- Table structure for table `journal_instance`
|
||||
--
|
||||
ALTER TABLE `journal_instance` DROP `OrderIndex`;
|
||||
|
||||
--
|
||||
-- Table structure for table `map`
|
||||
--
|
||||
ALTER TABLE `map` ADD `NavigationMaxDistance` int NOT NULL DEFAULT 0 AFTER `WdtFileDataID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `mount_capability`
|
||||
--
|
||||
ALTER TABLE `mount_capability` ADD `FlightCapabilityID` int NOT NULL DEFAULT 0 AFTER `PlayerConditionID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `player_condition`
|
||||
--
|
||||
ALTER TABLE `player_condition`
|
||||
ADD `TraitNodeEntryLogic` int unsigned NOT NULL DEFAULT 0 AFTER `CovenantID`,
|
||||
ADD `TraitNodeEntryID1` int NOT NULL DEFAULT 0 AFTER `MovementFlags2`,
|
||||
ADD `TraitNodeEntryID2` int NOT NULL DEFAULT 0 AFTER `TraitNodeEntryID1`,
|
||||
ADD `TraitNodeEntryID3` int NOT NULL DEFAULT 0 AFTER `TraitNodeEntryID2`,
|
||||
ADD `TraitNodeEntryID4` int NOT NULL DEFAULT 0 AFTER `TraitNodeEntryID3`,
|
||||
ADD `TraitNodeEntryMinRank1` smallint unsigned NOT NULL DEFAULT 0 AFTER `TraitNodeEntryID4`,
|
||||
ADD `TraitNodeEntryMinRank2` smallint unsigned NOT NULL DEFAULT 0 AFTER `TraitNodeEntryMinRank1`,
|
||||
ADD `TraitNodeEntryMinRank3` smallint unsigned NOT NULL DEFAULT 0 AFTER `TraitNodeEntryMinRank2`,
|
||||
ADD `TraitNodeEntryMinRank4` smallint unsigned NOT NULL DEFAULT 0 AFTER `TraitNodeEntryMinRank3`,
|
||||
ADD `TraitNodeEntryMaxRank1` smallint unsigned NOT NULL DEFAULT 0 AFTER `TraitNodeEntryMinRank4`,
|
||||
ADD `TraitNodeEntryMaxRank2` smallint unsigned NOT NULL DEFAULT 0 AFTER `TraitNodeEntryMaxRank1`,
|
||||
ADD `TraitNodeEntryMaxRank3` smallint unsigned NOT NULL DEFAULT 0 AFTER `TraitNodeEntryMaxRank2`,
|
||||
ADD `TraitNodeEntryMaxRank4` smallint unsigned NOT NULL DEFAULT 0 AFTER `TraitNodeEntryMaxRank3`;
|
||||
|
||||
--
|
||||
-- Table structure for table `power_type`
|
||||
--
|
||||
ALTER TABLE `power_type`
|
||||
MODIFY `MinPower` int NOT NULL DEFAULT 0 AFTER `PowerTypeEnum`,
|
||||
MODIFY `MaxBasePower` int NOT NULL DEFAULT 0 AFTER `MinPower`,
|
||||
MODIFY `CenterPower` int NOT NULL DEFAULT 0 AFTER `MaxBasePower`,
|
||||
MODIFY `DefaultPower` int NOT NULL DEFAULT 0 AFTER `CenterPower`,
|
||||
MODIFY `DisplayModifier` int NOT NULL DEFAULT 0 AFTER `DefaultPower`,
|
||||
MODIFY `RegenInterruptTimeMS` int NOT NULL DEFAULT 0 AFTER `DisplayModifier`;
|
||||
|
||||
--
|
||||
-- Table structure for table `pvp_talent`
|
||||
--
|
||||
ALTER TABLE `pvp_talent` ADD `PlayerConditionID` int NOT NULL DEFAULT 0 AFTER `LevelRequired`;
|
||||
|
||||
--
|
||||
-- Table structure for table `quest_info`
|
||||
--
|
||||
ALTER TABLE `quest_info` MODIFY `Profession` int NOT NULL DEFAULT 0 AFTER `Modifiers`;
|
||||
|
||||
--
|
||||
-- Table structure for table `quest_v2`
|
||||
--
|
||||
ALTER TABLE `quest_v2` ADD `UiQuestDetailsTheme` int NOT NULL DEFAULT 0 AFTER `UniqueBitFlag`;
|
||||
|
||||
--
|
||||
-- Table structure for table `quest_v2`
|
||||
--
|
||||
ALTER TABLE `skill_line`
|
||||
ADD `ExpansionNameSharedStringID` int NOT NULL DEFAULT 0 AFTER `SpellBookSpellID`,
|
||||
ADD `HordeExpansionNameSharedStringID` int NOT NULL DEFAULT 0 AFTER `ExpansionNameSharedStringID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `quest_v2`
|
||||
--
|
||||
ALTER TABLE `skill_line_ability`
|
||||
ADD `AbilityVerb` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL AFTER `RaceMask`,
|
||||
ADD `AbilityAllVerb` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL AFTER `AbilityVerb`;
|
||||
|
||||
--
|
||||
-- Table structure for table `skill_line_ability_locale`
|
||||
--
|
||||
DROP TABLE IF EXISTS `skill_line_ability_locale`;
|
||||
CREATE TABLE `skill_line_ability_locale` (
|
||||
`ID` int unsigned NOT NULL DEFAULT '0',
|
||||
`locale` varchar(4) NOT NULL,
|
||||
`AbilityVerb_lang` text,
|
||||
`AbilityAllVerb_lang` text,
|
||||
`VerifiedBuild` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`locale`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
PARTITION BY LIST COLUMNS(locale)
|
||||
(PARTITION deDE VALUES IN ('deDE') ENGINE = InnoDB,
|
||||
PARTITION esES VALUES IN ('esES') ENGINE = InnoDB,
|
||||
PARTITION esMX VALUES IN ('esMX') ENGINE = InnoDB,
|
||||
PARTITION frFR VALUES IN ('frFR') ENGINE = InnoDB,
|
||||
PARTITION itIT VALUES IN ('itIT') ENGINE = InnoDB,
|
||||
PARTITION koKR VALUES IN ('koKR') ENGINE = InnoDB,
|
||||
PARTITION ptBR VALUES IN ('ptBR') ENGINE = InnoDB,
|
||||
PARTITION ruRU VALUES IN ('ruRU') ENGINE = InnoDB,
|
||||
PARTITION zhCN VALUES IN ('zhCN') ENGINE = InnoDB,
|
||||
PARTITION zhTW VALUES IN ('zhTW') ENGINE = InnoDB);
|
||||
|
||||
--
|
||||
-- Table structure for table `skill_line_ability_locale`
|
||||
--
|
||||
ALTER TABLE `sound_kit`
|
||||
MODIFY `Flags` int NOT NULL DEFAULT 0 AFTER `VolumeFloat`,
|
||||
ADD `SoundMixGroupID` int unsigned NOT NULL DEFAULT 0 AFTER `MaxInstances`;
|
||||
|
||||
--
|
||||
-- Table structure for table `spell_aura_restrictions`
|
||||
--
|
||||
ALTER TABLE `spell_aura_restrictions`
|
||||
MODIFY `DifficultyID` int NOT NULL DEFAULT 0 AFTER `ID`,
|
||||
MODIFY `CasterAuraState` int NOT NULL DEFAULT 0 AFTER `DifficultyID`,
|
||||
MODIFY `TargetAuraState` int NOT NULL DEFAULT 0 AFTER `CasterAuraState`,
|
||||
MODIFY `ExcludeCasterAuraState` int NOT NULL DEFAULT 0 AFTER `TargetAuraState`,
|
||||
MODIFY `ExcludeTargetAuraState` int NOT NULL DEFAULT 0 AFTER `ExcludeCasterAuraState`,
|
||||
ADD `CasterAuraType` int NOT NULL DEFAULT 0 AFTER `ExcludeTargetAuraSpell`,
|
||||
ADD `TargetAuraType` int NOT NULL DEFAULT 0 AFTER `CasterAuraType`,
|
||||
ADD `ExcludeCasterAuraType` int NOT NULL DEFAULT 0 AFTER `TargetAuraType`,
|
||||
ADD `ExcludeTargetAuraType` int NOT NULL DEFAULT 0 AFTER `ExcludeCasterAuraType`;
|
||||
|
||||
--
|
||||
-- Table structure for table `spell_casting_requirements`
|
||||
--
|
||||
ALTER TABLE `spell_casting_requirements` MODIFY `MinReputation` int NOT NULL DEFAULT 0 AFTER `MinFactionID`;
|
||||
|
||||
--
|
||||
-- Table structure for table `spell_cooldowns`
|
||||
--
|
||||
ALTER TABLE `spell_cooldowns` ADD `AuraSpellID` int NOT NULL DEFAULT 0 AFTER `StartRecoveryTime`;
|
||||
|
||||
--
|
||||
-- Table structure for table `spell_item_enchantment`
|
||||
--
|
||||
ALTER TABLE `spell_item_enchantment` ADD `Duration` int NOT NULL DEFAULT 0 AFTER `HordeName`;
|
||||
|
||||
--
|
||||
-- Table structure for table `spell_power`
|
||||
--
|
||||
ALTER TABLE `spell_power` ADD `OptionalCostPct` float NOT NULL DEFAULT 0 AFTER `PowerCostMaxPct`;
|
||||
|
||||
--
|
||||
-- Table structure for table `spell_power`
|
||||
--
|
||||
ALTER TABLE `spell_reagents` ADD `ReagentRecraftCount1` smallint NOT NULL DEFAULT 0 AFTER `ReagentCount8`,
|
||||
ADD `ReagentRecraftCount2` smallint NOT NULL DEFAULT 0 AFTER `ReagentRecraftCount1`,
|
||||
ADD `ReagentRecraftCount3` smallint NOT NULL DEFAULT 0 AFTER `ReagentRecraftCount2`,
|
||||
ADD `ReagentRecraftCount4` smallint NOT NULL DEFAULT 0 AFTER `ReagentRecraftCount3`,
|
||||
ADD `ReagentRecraftCount5` smallint NOT NULL DEFAULT 0 AFTER `ReagentRecraftCount4`,
|
||||
ADD `ReagentRecraftCount6` smallint NOT NULL DEFAULT 0 AFTER `ReagentRecraftCount5`,
|
||||
ADD `ReagentRecraftCount7` smallint NOT NULL DEFAULT 0 AFTER `ReagentRecraftCount6`,
|
||||
ADD `ReagentRecraftCount8` smallint NOT NULL DEFAULT 0 AFTER `ReagentRecraftCount7`,
|
||||
ADD `ReagentSource1` tinyint unsigned NOT NULL DEFAULT 0 AFTER `ReagentRecraftCount8`,
|
||||
ADD `ReagentSource2` tinyint unsigned NOT NULL DEFAULT 0 AFTER `ReagentSource1`,
|
||||
ADD `ReagentSource3` tinyint unsigned NOT NULL DEFAULT 0 AFTER `ReagentSource2`,
|
||||
ADD `ReagentSource4` tinyint unsigned NOT NULL DEFAULT 0 AFTER `ReagentSource3`,
|
||||
ADD `ReagentSource5` tinyint unsigned NOT NULL DEFAULT 0 AFTER `ReagentSource4`,
|
||||
ADD `ReagentSource6` tinyint unsigned NOT NULL DEFAULT 0 AFTER `ReagentSource5`,
|
||||
ADD `ReagentSource7` tinyint unsigned NOT NULL DEFAULT 0 AFTER `ReagentSource6`,
|
||||
ADD `ReagentSource8` tinyint unsigned NOT NULL DEFAULT 0 AFTER `ReagentSource7`;
|
||||
|
||||
--
|
||||
-- Table structure for table `spell_x_spell_visual`
|
||||
--
|
||||
ALTER TABLE `spell_x_spell_visual` ADD `Flags` int NOT NULL DEFAULT 0 AFTER `Probability`;
|
||||
|
||||
--
|
||||
-- Table structure for table `ui_map_link`
|
||||
--
|
||||
ALTER TABLE `ui_map_link` ADD `PlayerConditionID` int NOT NULL DEFAULT 0 AFTER `ChildUiMapID`;
|
||||
@@ -3,3 +3,87 @@
|
||||
--
|
||||
ALTER TABLE `creature_template` MODIFY `mechanic_immune_mask` bigint unsigned NOT NULL DEFAULT 0;
|
||||
|
||||
--
|
||||
-- Table structure for table `gossip_menu_option`
|
||||
--
|
||||
ALTER TABLE `gossip_menu_option`
|
||||
ADD `GossipOptionID` int NOT NULL DEFAULT 0 AFTER `MenuID`,
|
||||
ADD `Flags` int NOT NULL DEFAULT 0 AFTER `Language`,
|
||||
ADD `GossipNpcOptionID` int NULL DEFAULT NULL AFTER `ActionPoiID`,
|
||||
ADD `SpellID` int NULL DEFAULT NULL AFTER `BoxBroadcastTextID`,
|
||||
ADD `OverrideIconID` int NULL DEFAULT NULL AFTER `SpellID`;
|
||||
|
||||
-- give it a temporary dummy unique value
|
||||
UPDATE `gossip_menu_option` SET `GossipOptionID`=-((`MenuID`<<8) | `OptionID`);
|
||||
|
||||
DROP TABLE IF EXISTS `gossip_menu_option_addon`;
|
||||
|
||||
--
|
||||
-- Table structure for table `quest_completion_log_conditional`
|
||||
--
|
||||
DROP TABLE IF EXISTS `quest_completion_log_conditional`;
|
||||
CREATE TABLE `quest_completion_log_conditional` (
|
||||
`QuestId` int NOT NULL,
|
||||
`PlayerConditionId` int NOT NULL,
|
||||
`QuestgiverCreatureId` int NOT NULL,
|
||||
`locale` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`Text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`OrderIndex` int NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`QuestId`,`PlayerConditionId`,`QuestgiverCreatureId`,`locale`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `quest_description_conditional`
|
||||
--
|
||||
DROP TABLE IF EXISTS `quest_description_conditional`;
|
||||
CREATE TABLE `quest_description_conditional` (
|
||||
`QuestId` int NOT NULL,
|
||||
`PlayerConditionId` int NOT NULL,
|
||||
`QuestgiverCreatureId` int NOT NULL,
|
||||
`locale` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`Text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`OrderIndex` int NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`QuestId`,`PlayerConditionId`,`QuestgiverCreatureId`,`locale`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
ALTER TABLE `creature_template` MODIFY `mechanic_immune_mask` bigint unsigned NOT NULL DEFAULT 0;
|
||||
|
||||
--
|
||||
-- Table structure for table `quest_offer_reward_conditional`
|
||||
--
|
||||
DROP TABLE IF EXISTS `quest_offer_reward_conditional`;
|
||||
CREATE TABLE `quest_offer_reward_conditional` (
|
||||
`QuestId` int NOT NULL,
|
||||
`PlayerConditionId` int NOT NULL,
|
||||
`QuestgiverCreatureId` int NOT NULL,
|
||||
`locale` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`Text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`OrderIndex` int NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`QuestId`,`PlayerConditionId`,`QuestgiverCreatureId`,`locale`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `quest_request_items_conditional`
|
||||
--
|
||||
DROP TABLE IF EXISTS `quest_request_items_conditional`;
|
||||
CREATE TABLE `quest_request_items_conditional` (
|
||||
`QuestId` int NOT NULL,
|
||||
`PlayerConditionId` int NOT NULL,
|
||||
`QuestgiverCreatureId` int NOT NULL,
|
||||
`locale` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`Text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
`OrderIndex` int NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`QuestId`,`PlayerConditionId`,`QuestgiverCreatureId`,`locale`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Table structure for table `serverside_spell`
|
||||
--
|
||||
ALTER TABLE `serverside_spell`
|
||||
ADD `CasterAuraType` int NOT NULL DEFAULT 0 AFTER `ExcludeTargetAuraSpell`,
|
||||
ADD `TargetAuraType` int NOT NULL DEFAULT 0 AFTER `CasterAuraType`,
|
||||
ADD `ExcludeCasterAuraType` int NOT NULL DEFAULT 0 AFTER `TargetAuraType`,
|
||||
ADD `ExcludeTargetAuraType` int NOT NULL DEFAULT 0 AFTER `ExcludeCasterAuraType`;
|
||||
|
||||
@@ -238,7 +238,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
" WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// BattlePetBreedQuality.db2
|
||||
PrepareStatement(HOTFIX_SEL_BATTLE_PET_BREED_QUALITY, "SELECT ID, StateMultiplier, QualityEnum FROM battle_pet_breed_quality"
|
||||
PrepareStatement(HOTFIX_SEL_BATTLE_PET_BREED_QUALITY, "SELECT ID, MaxQualityRoll, StateMultiplier, QualityEnum FROM battle_pet_breed_quality"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_BATTLE_PET_BREED_QUALITY, "SELECT MAX(ID) + 1 FROM battle_pet_breed_quality", CONNECTION_SYNCH);
|
||||
|
||||
@@ -293,7 +293,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
" AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// CharacterLoadout.db2
|
||||
PrepareStatement(HOTFIX_SEL_CHARACTER_LOADOUT, "SELECT ID, RaceMask, ChrClassID, Purpose, Unused910 FROM character_loadout"
|
||||
PrepareStatement(HOTFIX_SEL_CHARACTER_LOADOUT, "SELECT ID, RaceMask, ChrClassID, Purpose, ItemContext FROM character_loadout"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CHARACTER_LOADOUT, "SELECT MAX(ID) + 1 FROM character_loadout", CONNECTION_SYNCH);
|
||||
|
||||
@@ -334,8 +334,9 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES, "SELECT MAX(ID) + 1 FROM chr_classes_x_power_types", CONNECTION_SYNCH);
|
||||
|
||||
// ChrCustomizationChoice.db2
|
||||
PrepareStatement(HOTFIX_SEL_CHR_CUSTOMIZATION_CHOICE, "SELECT Name, ID, ChrCustomizationOptionID, ChrCustomizationReqID, SortOrder, UiOrderIndex, "
|
||||
"Flags, AddedInPatch, SwatchColor1, SwatchColor2 FROM chr_customization_choice WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_CHR_CUSTOMIZATION_CHOICE, "SELECT Name, ID, ChrCustomizationOptionID, ChrCustomizationReqID, "
|
||||
"ChrCustomizationVisReqID, SortOrder, UiOrderIndex, Flags, AddedInPatch, SwatchColor1, SwatchColor2 FROM chr_customization_choice"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CHR_CUSTOMIZATION_CHOICE, "SELECT MAX(ID) + 1 FROM chr_customization_choice", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_CUSTOMIZATION_CHOICE, "SELECT ID, Name_lang FROM chr_customization_choice_locale"
|
||||
" WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
@@ -348,7 +349,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
// ChrCustomizationElement.db2
|
||||
PrepareStatement(HOTFIX_SEL_CHR_CUSTOMIZATION_ELEMENT, "SELECT ID, ChrCustomizationChoiceID, RelatedChrCustomizationChoiceID, "
|
||||
"ChrCustomizationGeosetID, ChrCustomizationSkinnedModelID, ChrCustomizationMaterialID, ChrCustomizationBoneSetID, "
|
||||
"ChrCustomizationCondModelID, ChrCustomizationDisplayInfoID, ChrCustItemGeoModifyID FROM chr_customization_element"
|
||||
"ChrCustomizationCondModelID, ChrCustomizationDisplayInfoID, ChrCustItemGeoModifyID, ChrCustomizationVoiceID FROM chr_customization_element"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CHR_CUSTOMIZATION_ELEMENT, "SELECT MAX(ID) + 1 FROM chr_customization_element", CONNECTION_SYNCH);
|
||||
|
||||
@@ -361,9 +362,11 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
" WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// ChrCustomizationReq.db2
|
||||
PrepareStatement(HOTFIX_SEL_CHR_CUSTOMIZATION_REQ, "SELECT ID, Flags, ClassMask, AchievementID, OverrideArchive, ItemModifiedAppearanceID"
|
||||
" FROM chr_customization_req WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_CHR_CUSTOMIZATION_REQ, "SELECT ID, ReqSource, Flags, ClassMask, AchievementID, QuestID, OverrideArchive, "
|
||||
"ItemModifiedAppearanceID FROM chr_customization_req WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CHR_CUSTOMIZATION_REQ, "SELECT MAX(ID) + 1 FROM chr_customization_req", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_CUSTOMIZATION_REQ, "SELECT ID, ReqSource_lang FROM chr_customization_req_locale WHERE (`VerifiedBuild` > 0) = ?"
|
||||
" AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// ChrCustomizationReqChoice.db2
|
||||
PrepareStatement(HOTFIX_SEL_CHR_CUSTOMIZATION_REQ_CHOICE, "SELECT ID, ChrCustomizationChoiceID, ChrCustomizationReqID"
|
||||
@@ -378,7 +381,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CHR_MODEL, "SELECT MAX(ID) + 1 FROM chr_model", CONNECTION_SYNCH);
|
||||
|
||||
// ChrRaceXChrModel.db2
|
||||
PrepareStatement(HOTFIX_SEL_CHR_RACE_X_CHR_MODEL, "SELECT ID, ChrRacesID, ChrModelID FROM chr_race_x_chr_model WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_CHR_RACE_X_CHR_MODEL, "SELECT ID, ChrRacesID, ChrModelID, Sex, AllowedTransmogSlots FROM chr_race_x_chr_model"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CHR_RACE_X_CHR_MODEL, "SELECT MAX(ID) + 1 FROM chr_race_x_chr_model", CONNECTION_SYNCH);
|
||||
|
||||
// ChrRaces.db2
|
||||
@@ -391,7 +395,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
"MaleModelFallbackRaceID, FemaleModelFallbackRaceID, MaleTextureFallbackRaceID, FemaleTextureFallbackRaceID, PlayableRaceBit, "
|
||||
"HelmetAnimScalingRaceID, TransmogrifyDisabledSlotMask, UnalteredVisualCustomizationRaceID, AlteredFormCustomizeOffsetFallback1, "
|
||||
"AlteredFormCustomizeOffsetFallback2, AlteredFormCustomizeOffsetFallback3, AlteredFormCustomizeRotationFallback, Unknown910_11, "
|
||||
"Unknown910_12, Unknown910_13, Unknown910_21, Unknown910_22, Unknown910_23, BaseLanguage, CreatureType, MaleModelFallbackSex, "
|
||||
"Unknown910_12, Unknown910_13, Unknown910_21, Unknown910_22, Unknown910_23, Unknown1000, BaseLanguage, CreatureType, MaleModelFallbackSex, "
|
||||
"FemaleModelFallbackSex, MaleTextureFallbackSex, FemaleTextureFallbackSex FROM chr_races WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CHR_RACES, "SELECT MAX(ID) + 1 FROM chr_races", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_CHR_RACES, "SELECT ID, Name_lang, NameFemale_lang, NameLowercase_lang, NameFemaleLowercase_lang, LoreName_lang, "
|
||||
@@ -407,7 +411,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
" WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// CinematicCamera.db2
|
||||
PrepareStatement(HOTFIX_SEL_CINEMATIC_CAMERA, "SELECT ID, OriginX, OriginY, OriginZ, SoundID, OriginFacing, FileDataID, Unknown915"
|
||||
PrepareStatement(HOTFIX_SEL_CINEMATIC_CAMERA, "SELECT ID, OriginX, OriginY, OriginZ, SoundID, OriginFacing, FileDataID, ConversationID"
|
||||
" FROM cinematic_camera WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CINEMATIC_CAMERA, "SELECT MAX(ID) + 1 FROM cinematic_camera", CONNECTION_SYNCH);
|
||||
|
||||
@@ -441,7 +445,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
"ExtendedDisplayInfoID, NPCSoundID, ParticleColorID, PortraitCreatureDisplayInfoID, PortraitTextureFileDataID, ObjectEffectPackageID, "
|
||||
"AnimReplacementSetID, Flags, StateSpellVisualKitID, PlayerOverrideScale, PetInstanceScale, UnarmedWeaponType, MountPoofSpellVisualKitID, "
|
||||
"DissolveEffectID, Gender, DissolveOutEffectID, CreatureModelMinLod, TextureVariationFileDataID1, TextureVariationFileDataID2, "
|
||||
"TextureVariationFileDataID3 FROM creature_display_info WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"TextureVariationFileDataID3, TextureVariationFileDataID4 FROM creature_display_info WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CREATURE_DISPLAY_INFO, "SELECT MAX(ID) + 1 FROM creature_display_info", CONNECTION_SYNCH);
|
||||
|
||||
// CreatureDisplayInfoExtra.db2
|
||||
@@ -490,8 +494,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// CurrencyTypes.db2
|
||||
PrepareStatement(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, Name, Description, CategoryID, InventoryIconFileID, SpellWeight, SpellCategory, MaxQty, "
|
||||
"MaxEarnablePerWeek, Quality, FactionID, ItemGroupSoundsID, XpQuestDifficulty, AwardConditionID, MaxQtyWorldStateID, Flags1, Flags2"
|
||||
" FROM currency_types WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"MaxEarnablePerWeek, Quality, FactionID, ItemGroupSoundsID, XpQuestDifficulty, AwardConditionID, MaxQtyWorldStateID, "
|
||||
"RechargingAmountPerCycle, RechargingCycleDurationMS, Flags1, Flags2 FROM currency_types WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CURRENCY_TYPES, "SELECT MAX(ID) + 1 FROM currency_types", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, Name_lang, Description_lang FROM currency_types_locale WHERE (`VerifiedBuild` > 0) = ?"
|
||||
" AND locale = ?", CONNECTION_SYNCH);
|
||||
@@ -501,7 +505,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CURVE, "SELECT MAX(ID) + 1 FROM curve", CONNECTION_SYNCH);
|
||||
|
||||
// CurvePoint.db2
|
||||
PrepareStatement(HOTFIX_SEL_CURVE_POINT, "SELECT ID, PosX, PosY, PreSLSquishPosX, PreSLSquishPosY, CurveID, OrderIndex FROM curve_point"
|
||||
PrepareStatement(HOTFIX_SEL_CURVE_POINT, "SELECT PosX, PosY, PreSLSquishPosX, PreSLSquishPosY, ID, CurveID, OrderIndex FROM curve_point"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_CURVE_POINT, "SELECT MAX(ID) + 1 FROM curve_point", CONNECTION_SYNCH);
|
||||
|
||||
@@ -521,8 +525,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_DIFFICULTY, "SELECT ID, Name_lang FROM difficulty_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// DungeonEncounter.db2
|
||||
PrepareStatement(HOTFIX_SEL_DUNGEON_ENCOUNTER, "SELECT Name, ID, MapID, DifficultyID, OrderIndex, CompleteWorldStateID, Bit, CreatureDisplayID, "
|
||||
"Flags, SpellIconFileID, Faction FROM dungeon_encounter WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_DUNGEON_ENCOUNTER, "SELECT Name, ID, MapID, DifficultyID, OrderIndex, CompleteWorldStateID, Bit, Flags, "
|
||||
"SpellIconFileID, Faction FROM dungeon_encounter WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_DUNGEON_ENCOUNTER, "SELECT MAX(ID) + 1 FROM dungeon_encounter", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_DUNGEON_ENCOUNTER, "SELECT ID, Name_lang FROM dungeon_encounter_locale WHERE (`VerifiedBuild` > 0) = ?"
|
||||
" AND locale = ?", CONNECTION_SYNCH);
|
||||
@@ -568,16 +572,18 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// Faction.db2
|
||||
PrepareStatement(HOTFIX_SEL_FACTION, "SELECT ID, ReputationRaceMask1, ReputationRaceMask2, ReputationRaceMask3, ReputationRaceMask4, Name, "
|
||||
"Description, ReputationIndex, ParentFactionID, Expansion, FriendshipRepID, Flags, ParagonFactionID, ReputationClassMask1, "
|
||||
"ReputationClassMask2, ReputationClassMask3, ReputationClassMask4, ReputationFlags1, ReputationFlags2, ReputationFlags3, ReputationFlags4, "
|
||||
"ReputationBase1, ReputationBase2, ReputationBase3, ReputationBase4, ReputationMax1, ReputationMax2, ReputationMax3, ReputationMax4, "
|
||||
"ParentFactionMod1, ParentFactionMod2, ParentFactionCap1, ParentFactionCap2 FROM faction WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"Description, ReputationIndex, ParentFactionID, Expansion, FriendshipRepID, Flags, ParagonFactionID, RenownFactionID, RenownCurrencyID, "
|
||||
"ReputationClassMask1, ReputationClassMask2, ReputationClassMask3, ReputationClassMask4, ReputationFlags1, ReputationFlags2, "
|
||||
"ReputationFlags3, ReputationFlags4, ReputationBase1, ReputationBase2, ReputationBase3, ReputationBase4, ReputationMax1, ReputationMax2, "
|
||||
"ReputationMax3, ReputationMax4, ParentFactionMod1, ParentFactionMod2, ParentFactionCap1, ParentFactionCap2 FROM faction"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_FACTION, "SELECT MAX(ID) + 1 FROM faction", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_FACTION, "SELECT ID, Name_lang, Description_lang FROM faction_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// FactionTemplate.db2
|
||||
PrepareStatement(HOTFIX_SEL_FACTION_TEMPLATE, "SELECT ID, Faction, Flags, FactionGroup, FriendGroup, EnemyGroup, Enemies1, Enemies2, Enemies3, "
|
||||
"Enemies4, Friend1, Friend2, Friend3, Friend4 FROM faction_template WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"Enemies4, Enemies5, Enemies6, Enemies7, Enemies8, Friend1, Friend2, Friend3, Friend4, Friend5, Friend6, Friend7, Friend8"
|
||||
" FROM faction_template WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_FACTION_TEMPLATE, "SELECT MAX(ID) + 1 FROM faction_template", CONNECTION_SYNCH);
|
||||
|
||||
// FriendshipRepReaction.db2
|
||||
@@ -717,6 +723,12 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_GLYPH_REQUIRED_SPEC, "SELECT MAX(ID) + 1 FROM glyph_required_spec", CONNECTION_SYNCH);
|
||||
|
||||
// GossipNpcOption.db2
|
||||
PrepareStatement(HOTFIX_SEL_GOSSIP_NPC_OPTION, "SELECT ID, GossipNpcOption, LFGDungeonsID, TrainerID, GarrFollowerTypeID, CharShipmentID, "
|
||||
"GarrTalentTreeID, UiMapID, UiItemInteractionID, Unknown_1000_8, Unknown_1000_9, CovenantID, GossipOptionID, TraitTreeID, ProfessionID, "
|
||||
"Unknown_1002_14 FROM gossip_npc_option WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_GOSSIP_NPC_OPTION, "SELECT MAX(ID) + 1 FROM gossip_npc_option", CONNECTION_SYNCH);
|
||||
|
||||
// GuildColorBackground.db2
|
||||
PrepareStatement(HOTFIX_SEL_GUILD_COLOR_BACKGROUND, "SELECT ID, Red, Blue, Green FROM guild_color_background WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_GUILD_COLOR_BACKGROUND, "SELECT MAX(ID) + 1 FROM guild_color_background", CONNECTION_SYNCH);
|
||||
@@ -769,7 +781,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// Item.db2
|
||||
PrepareStatement(HOTFIX_SEL_ITEM, "SELECT ID, ClassID, SubclassID, Material, InventoryType, SheatheType, SoundOverrideSubclassID, IconFileDataID, "
|
||||
"ItemGroupSoundsID, ContentTuningID, ModifiedCraftingReagentItemID FROM item WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"ItemGroupSoundsID, ContentTuningID, ModifiedCraftingReagentItemID, CraftingQualityID FROM item WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM, "SELECT MAX(ID) + 1 FROM item", CONNECTION_SYNCH);
|
||||
|
||||
// ItemAppearance.db2
|
||||
@@ -940,14 +952,14 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
"StatPercentageOfSocket2, StatPercentageOfSocket3, StatPercentageOfSocket4, StatPercentageOfSocket5, StatPercentageOfSocket6, "
|
||||
"StatPercentageOfSocket7, StatPercentageOfSocket8, StatPercentageOfSocket9, StatPercentageOfSocket10, StatPercentEditor1, StatPercentEditor2, "
|
||||
"StatPercentEditor3, StatPercentEditor4, StatPercentEditor5, StatPercentEditor6, StatPercentEditor7, StatPercentEditor8, StatPercentEditor9, "
|
||||
"StatPercentEditor10, Stackable, MaxCount, RequiredAbility, SellPrice, BuyPrice, VendorStackCount, PriceVariance, PriceRandomValue, Flags1, "
|
||||
"Flags2, Flags3, Flags4, FactionRelated, ModifiedCraftingReagentItemID, ContentTuningID, PlayerLevelToItemLevelCurveID, "
|
||||
"ItemNameDescriptionID, RequiredTransmogHoliday, RequiredHoliday, GemProperties, SocketMatchEnchantmentId, TotemCategoryID, InstanceBound, "
|
||||
"ZoneBound1, ZoneBound2, ItemSet, LockID, PageID, ItemDelay, MinFactionID, RequiredSkillRank, RequiredSkill, ItemLevel, AllowableClass, "
|
||||
"ArtifactID, SpellWeight, SpellWeightCategory, SocketType1, SocketType2, SocketType3, SheatheType, Material, PageMaterialID, Bonding, "
|
||||
"DamageDamageType, StatModifierBonusStat1, StatModifierBonusStat2, StatModifierBonusStat3, StatModifierBonusStat4, StatModifierBonusStat5, "
|
||||
"StatModifierBonusStat6, StatModifierBonusStat7, StatModifierBonusStat8, StatModifierBonusStat9, StatModifierBonusStat10, ContainerSlots, "
|
||||
"MinReputation, RequiredPVPMedal, RequiredPVPRank, RequiredLevel, InventoryType, OverallQualityID FROM item_sparse"
|
||||
"StatPercentEditor10, Stackable, MaxCount, MinReputation, RequiredAbility, SellPrice, BuyPrice, VendorStackCount, PriceVariance, "
|
||||
"PriceRandomValue, Flags1, Flags2, Flags3, Flags4, FactionRelated, ModifiedCraftingReagentItemID, ContentTuningID, "
|
||||
"PlayerLevelToItemLevelCurveID, ItemNameDescriptionID, RequiredTransmogHoliday, RequiredHoliday, GemProperties, SocketMatchEnchantmentId, "
|
||||
"TotemCategoryID, InstanceBound, ZoneBound1, ZoneBound2, ItemSet, LockID, PageID, ItemDelay, MinFactionID, RequiredSkillRank, RequiredSkill, "
|
||||
"ItemLevel, AllowableClass, ArtifactID, SpellWeight, SpellWeightCategory, SocketType1, SocketType2, SocketType3, SheatheType, Material, "
|
||||
"PageMaterialID, Bonding, DamageDamageType, StatModifierBonusStat1, StatModifierBonusStat2, StatModifierBonusStat3, StatModifierBonusStat4, "
|
||||
"StatModifierBonusStat5, StatModifierBonusStat6, StatModifierBonusStat7, StatModifierBonusStat8, StatModifierBonusStat9, "
|
||||
"StatModifierBonusStat10, ContainerSlots, RequiredPVPMedal, RequiredPVPRank, RequiredLevel, InventoryType, OverallQualityID FROM item_sparse"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_SPARSE, "SELECT MAX(ID) + 1 FROM item_sparse", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Description_lang, Display3_lang, Display2_lang, Display1_lang, Display_lang"
|
||||
@@ -987,7 +999,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// JournalInstance.db2
|
||||
PrepareStatement(HOTFIX_SEL_JOURNAL_INSTANCE, "SELECT ID, Name, Description, MapID, BackgroundFileDataID, ButtonFileDataID, "
|
||||
"ButtonSmallFileDataID, LoreFileDataID, OrderIndex, Flags, AreaID FROM journal_instance WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"ButtonSmallFileDataID, LoreFileDataID, Flags, AreaID FROM journal_instance WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_JOURNAL_INSTANCE, "SELECT MAX(ID) + 1 FROM journal_instance", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_JOURNAL_INSTANCE, "SELECT ID, Name_lang, Description_lang FROM journal_instance_locale"
|
||||
" WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
@@ -1057,8 +1069,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
// Map.db2
|
||||
PrepareStatement(HOTFIX_SEL_MAP, "SELECT ID, Directory, MapName, MapDescription0, MapDescription1, PvpShortDescription, PvpLongDescription, "
|
||||
"CorpseX, CorpseY, MapType, InstanceType, ExpansionID, AreaTableID, LoadingScreenID, TimeOfDayOverride, ParentMapID, CosmeticParentMapID, "
|
||||
"TimeOffset, MinimapIconScale, CorpseMapID, MaxPlayers, WindSettingsID, ZmpFileDataID, WdtFileDataID, Flags1, Flags2, Flags3 FROM map"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"TimeOffset, MinimapIconScale, CorpseMapID, MaxPlayers, WindSettingsID, ZmpFileDataID, WdtFileDataID, NavigationMaxDistance, Flags1, Flags2, "
|
||||
"Flags3 FROM map WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_MAP, "SELECT MAX(ID) + 1 FROM map", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_MAP, "SELECT ID, MapName_lang, MapDescription0_lang, MapDescription1_lang, PvpShortDescription_lang, "
|
||||
"PvpLongDescription_lang FROM map_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
@@ -1102,7 +1114,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// MountCapability.db2
|
||||
PrepareStatement(HOTFIX_SEL_MOUNT_CAPABILITY, "SELECT ID, Flags, ReqRidingSkill, ReqAreaID, ReqSpellAuraID, ReqSpellKnownID, ModSpellAuraID, "
|
||||
"ReqMapID, PlayerConditionID FROM mount_capability WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"ReqMapID, PlayerConditionID, FlightCapabilityID FROM mount_capability WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_MOUNT_CAPABILITY, "SELECT MAX(ID) + 1 FROM mount_capability", CONNECTION_SYNCH);
|
||||
|
||||
// MountTypeXCapability.db2
|
||||
@@ -1166,16 +1178,18 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
"MinExpansionLevel, MaxExpansionLevel, MinAvgItemLevel, MaxAvgItemLevel, MinAvgEquippedItemLevel, MaxAvgEquippedItemLevel, PhaseUseFlags, "
|
||||
"PhaseID, PhaseGroupID, Flags, ChrSpecializationIndex, ChrSpecializationRole, ModifierTreeID, PowerType, PowerTypeComp, PowerTypeValue, "
|
||||
"WeaponSubclassMask, MaxGuildLevel, MinGuildLevel, MaxExpansionTier, MinExpansionTier, MinPVPRank, MaxPVPRank, ContentTuningID, CovenantID, "
|
||||
"SkillID1, SkillID2, SkillID3, SkillID4, MinSkill1, MinSkill2, MinSkill3, MinSkill4, MaxSkill1, MaxSkill2, MaxSkill3, MaxSkill4, "
|
||||
"MinFactionID1, MinFactionID2, MinFactionID3, MinReputation1, MinReputation2, MinReputation3, PrevQuestID1, PrevQuestID2, PrevQuestID3, "
|
||||
"PrevQuestID4, CurrQuestID1, CurrQuestID2, CurrQuestID3, CurrQuestID4, CurrentCompletedQuestID1, CurrentCompletedQuestID2, "
|
||||
"TraitNodeEntryLogic, SkillID1, SkillID2, SkillID3, SkillID4, MinSkill1, MinSkill2, MinSkill3, MinSkill4, MaxSkill1, MaxSkill2, MaxSkill3, "
|
||||
"MaxSkill4, MinFactionID1, MinFactionID2, MinFactionID3, MinReputation1, MinReputation2, MinReputation3, PrevQuestID1, PrevQuestID2, "
|
||||
"PrevQuestID3, PrevQuestID4, CurrQuestID1, CurrQuestID2, CurrQuestID3, CurrQuestID4, CurrentCompletedQuestID1, CurrentCompletedQuestID2, "
|
||||
"CurrentCompletedQuestID3, CurrentCompletedQuestID4, SpellID1, SpellID2, SpellID3, SpellID4, ItemID1, ItemID2, ItemID3, ItemID4, ItemCount1, "
|
||||
"ItemCount2, ItemCount3, ItemCount4, Explored1, Explored2, Time1, Time2, AuraSpellID1, AuraSpellID2, AuraSpellID3, AuraSpellID4, AuraStacks1, "
|
||||
"AuraStacks2, AuraStacks3, AuraStacks4, Achievement1, Achievement2, Achievement3, Achievement4, AreaID1, AreaID2, AreaID3, AreaID4, "
|
||||
"LfgStatus1, LfgStatus2, LfgStatus3, LfgStatus4, LfgCompare1, LfgCompare2, LfgCompare3, LfgCompare4, LfgValue1, LfgValue2, LfgValue3, "
|
||||
"LfgValue4, CurrencyID1, CurrencyID2, CurrencyID3, CurrencyID4, CurrencyCount1, CurrencyCount2, CurrencyCount3, CurrencyCount4, "
|
||||
"QuestKillMonster1, QuestKillMonster2, QuestKillMonster3, QuestKillMonster4, QuestKillMonster5, QuestKillMonster6, MovementFlags1, "
|
||||
"MovementFlags2 FROM player_condition WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"MovementFlags2, TraitNodeEntryID1, TraitNodeEntryID2, TraitNodeEntryID3, TraitNodeEntryID4, TraitNodeEntryMinRank1, TraitNodeEntryMinRank2, "
|
||||
"TraitNodeEntryMinRank3, TraitNodeEntryMinRank4, TraitNodeEntryMaxRank1, TraitNodeEntryMaxRank2, TraitNodeEntryMaxRank3, "
|
||||
"TraitNodeEntryMaxRank4 FROM player_condition WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_PLAYER_CONDITION, "SELECT MAX(ID) + 1 FROM player_condition", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_PLAYER_CONDITION, "SELECT ID, FailureDescription_lang FROM player_condition_locale WHERE (`VerifiedBuild` > 0) = ?"
|
||||
" AND locale = ?", CONNECTION_SYNCH);
|
||||
@@ -1207,7 +1221,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// PvpTalent.db2
|
||||
PrepareStatement(HOTFIX_SEL_PVP_TALENT, "SELECT Description, ID, SpecID, SpellID, OverridesSpellID, Flags, ActionBarSpellID, PvpTalentCategoryID, "
|
||||
"LevelRequired FROM pvp_talent WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"LevelRequired, PlayerConditionID FROM pvp_talent WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_PVP_TALENT, "SELECT MAX(ID) + 1 FROM pvp_talent", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_PVP_TALENT, "SELECT ID, Description_lang FROM pvp_talent_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
@@ -1257,7 +1271,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_QUEST_SORT, "SELECT ID, SortName_lang FROM quest_sort_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// QuestV2.db2
|
||||
PrepareStatement(HOTFIX_SEL_QUEST_V2, "SELECT ID, UniqueBitFlag FROM quest_v2 WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_QUEST_V2, "SELECT ID, UniqueBitFlag, UiQuestDetailsTheme FROM quest_v2 WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_QUEST_V2, "SELECT MAX(ID) + 1 FROM quest_v2", CONNECTION_SYNCH);
|
||||
|
||||
// QuestXp.db2
|
||||
@@ -1318,17 +1332,19 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// SkillLine.db2
|
||||
PrepareStatement(HOTFIX_SEL_SKILL_LINE, "SELECT DisplayName, AlternateVerb, Description, HordeDisplayName, OverrideSourceInfoDisplayName, ID, "
|
||||
"CategoryID, SpellIconFileID, CanLink, ParentSkillLineID, ParentTierIndex, Flags, SpellBookSpellID FROM skill_line"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"CategoryID, SpellIconFileID, CanLink, ParentSkillLineID, ParentTierIndex, Flags, SpellBookSpellID, ExpansionNameSharedStringID, "
|
||||
"HordeExpansionNameSharedStringID FROM skill_line WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SKILL_LINE, "SELECT MAX(ID) + 1 FROM skill_line", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_SKILL_LINE, "SELECT ID, DisplayName_lang, AlternateVerb_lang, Description_lang, HordeDisplayName_lang"
|
||||
" FROM skill_line_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// SkillLineAbility.db2
|
||||
PrepareStatement(HOTFIX_SEL_SKILL_LINE_ABILITY, "SELECT RaceMask, ID, SkillLine, Spell, MinSkillLineRank, ClassMask, SupercedesSpell, "
|
||||
"AcquireMethod, TrivialSkillLineRankHigh, TrivialSkillLineRankLow, Flags, NumSkillUps, UniqueBit, TradeSkillCategoryID, SkillupSkillLineID"
|
||||
" FROM skill_line_ability WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_SKILL_LINE_ABILITY, "SELECT RaceMask, AbilityVerb, AbilityAllVerb, ID, SkillLine, Spell, MinSkillLineRank, ClassMask, "
|
||||
"SupercedesSpell, AcquireMethod, TrivialSkillLineRankHigh, TrivialSkillLineRankLow, Flags, NumSkillUps, UniqueBit, TradeSkillCategoryID, "
|
||||
"SkillupSkillLineID FROM skill_line_ability WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SKILL_LINE_ABILITY, "SELECT MAX(ID) + 1 FROM skill_line_ability", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_SKILL_LINE_ABILITY, "SELECT ID, AbilityVerb_lang, AbilityAllVerb_lang FROM skill_line_ability_locale"
|
||||
" WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// SkillRaceClassInfo.db2
|
||||
PrepareStatement(HOTFIX_SEL_SKILL_RACE_CLASS_INFO, "SELECT ID, RaceMask, SkillID, ClassMask, Flags, Availability, MinLevel, SkillTierID"
|
||||
@@ -1342,8 +1358,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// SoundKit.db2
|
||||
PrepareStatement(HOTFIX_SEL_SOUND_KIT, "SELECT ID, SoundType, VolumeFloat, Flags, MinDistance, DistanceCutoff, EAXDef, SoundKitAdvancedID, "
|
||||
"VolumeVariationPlus, VolumeVariationMinus, PitchVariationPlus, PitchVariationMinus, DialogType, PitchAdjust, BusOverwriteID, MaxInstances"
|
||||
" FROM sound_kit WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"VolumeVariationPlus, VolumeVariationMinus, PitchVariationPlus, PitchVariationMinus, DialogType, PitchAdjust, BusOverwriteID, MaxInstances, "
|
||||
"SoundMixGroupID FROM sound_kit WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SOUND_KIT, "SELECT MAX(ID) + 1 FROM sound_kit", CONNECTION_SYNCH);
|
||||
|
||||
// SpecializationSpells.db2
|
||||
@@ -1364,8 +1380,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// SpellAuraRestrictions.db2
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_AURA_RESTRICTIONS, "SELECT ID, DifficultyID, CasterAuraState, TargetAuraState, ExcludeCasterAuraState, "
|
||||
"ExcludeTargetAuraState, CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, ExcludeTargetAuraSpell, SpellID"
|
||||
" FROM spell_aura_restrictions WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"ExcludeTargetAuraState, CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, ExcludeTargetAuraSpell, CasterAuraType, TargetAuraType, "
|
||||
"ExcludeCasterAuraType, ExcludeTargetAuraType, SpellID FROM spell_aura_restrictions WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_AURA_RESTRICTIONS, "SELECT MAX(ID) + 1 FROM spell_aura_restrictions", CONNECTION_SYNCH);
|
||||
|
||||
// SpellCastTimes.db2
|
||||
@@ -1394,8 +1410,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_CLASS_OPTIONS, "SELECT MAX(ID) + 1 FROM spell_class_options", CONNECTION_SYNCH);
|
||||
|
||||
// SpellCooldowns.db2
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_COOLDOWNS, "SELECT ID, DifficultyID, CategoryRecoveryTime, RecoveryTime, StartRecoveryTime, SpellID"
|
||||
" FROM spell_cooldowns WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_COOLDOWNS, "SELECT ID, DifficultyID, CategoryRecoveryTime, RecoveryTime, StartRecoveryTime, AuraSpellID, "
|
||||
"SpellID FROM spell_cooldowns WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_COOLDOWNS, "SELECT MAX(ID) + 1 FROM spell_cooldowns", CONNECTION_SYNCH);
|
||||
|
||||
// SpellDuration.db2
|
||||
@@ -1428,10 +1444,10 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_INTERRUPTS, "SELECT MAX(ID) + 1 FROM spell_interrupts", CONNECTION_SYNCH);
|
||||
|
||||
// SpellItemEnchantment.db2
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, Name, HordeName, EffectArg1, EffectArg2, EffectArg3, EffectScalingPoints1, "
|
||||
"EffectScalingPoints2, EffectScalingPoints3, IconFileDataID, MinItemLevel, MaxItemLevel, TransmogUseConditionID, TransmogCost, "
|
||||
"EffectPointsMin1, EffectPointsMin2, EffectPointsMin3, ItemVisual, Flags, RequiredSkillID, RequiredSkillRank, ItemLevel, Charges, Effect1, "
|
||||
"Effect2, Effect3, ScalingClass, ScalingClassRestricted, ConditionID, MinLevel, MaxLevel FROM spell_item_enchantment"
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, Name, HordeName, Duration, EffectArg1, EffectArg2, EffectArg3, "
|
||||
"EffectScalingPoints1, EffectScalingPoints2, EffectScalingPoints3, IconFileDataID, MinItemLevel, MaxItemLevel, TransmogUseConditionID, "
|
||||
"TransmogCost, EffectPointsMin1, EffectPointsMin2, EffectPointsMin3, ItemVisual, Flags, RequiredSkillID, RequiredSkillRank, ItemLevel, "
|
||||
"Charges, Effect1, Effect2, Effect3, ScalingClass, ScalingClassRestricted, ConditionID, MinLevel, MaxLevel FROM spell_item_enchantment"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT MAX(ID) + 1 FROM spell_item_enchantment", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT, "SELECT ID, Name_lang, HordeName_lang FROM spell_item_enchantment_locale"
|
||||
@@ -1473,7 +1489,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// SpellPower.db2
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_POWER, "SELECT ID, OrderIndex, ManaCost, ManaCostPerLevel, ManaPerSecond, PowerDisplayID, AltPowerBarID, "
|
||||
"PowerCostPct, PowerCostMaxPct, PowerPctPerSecond, PowerType, RequiredAuraSpellID, OptionalCost, SpellID FROM spell_power"
|
||||
"PowerCostPct, PowerCostMaxPct, OptionalCostPct, PowerPctPerSecond, PowerType, RequiredAuraSpellID, OptionalCost, SpellID FROM spell_power"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_POWER, "SELECT MAX(ID) + 1 FROM spell_power", CONNECTION_SYNCH);
|
||||
|
||||
@@ -1505,8 +1521,10 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
|
||||
// SpellReagents.db2
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_REAGENTS, "SELECT ID, SpellID, Reagent1, Reagent2, Reagent3, Reagent4, Reagent5, Reagent6, Reagent7, Reagent8, "
|
||||
"ReagentCount1, ReagentCount2, ReagentCount3, ReagentCount4, ReagentCount5, ReagentCount6, ReagentCount7, ReagentCount8 FROM spell_reagents"
|
||||
" WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
"ReagentCount1, ReagentCount2, ReagentCount3, ReagentCount4, ReagentCount5, ReagentCount6, ReagentCount7, ReagentCount8, "
|
||||
"ReagentRecraftCount1, ReagentRecraftCount2, ReagentRecraftCount3, ReagentRecraftCount4, ReagentRecraftCount5, ReagentRecraftCount6, "
|
||||
"ReagentRecraftCount7, ReagentRecraftCount8, ReagentSource1, ReagentSource2, ReagentSource3, ReagentSource4, ReagentSource5, ReagentSource6, "
|
||||
"ReagentSource7, ReagentSource8 FROM spell_reagents WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_REAGENTS, "SELECT MAX(ID) + 1 FROM spell_reagents", CONNECTION_SYNCH);
|
||||
|
||||
// SpellReagentsCurrency.db2
|
||||
@@ -1570,7 +1588,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_VISUAL_KIT, "SELECT MAX(ID) + 1 FROM spell_visual_kit", CONNECTION_SYNCH);
|
||||
|
||||
// SpellXSpellVisual.db2
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_X_SPELL_VISUAL, "SELECT ID, DifficultyID, SpellVisualID, Probability, Priority, SpellIconFileID, "
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_X_SPELL_VISUAL, "SELECT ID, DifficultyID, SpellVisualID, Probability, Flags, Priority, SpellIconFileID, "
|
||||
"ActiveIconFileID, ViewerUnitConditionID, ViewerPlayerConditionID, CasterUnitConditionID, CasterPlayerConditionID, SpellID"
|
||||
" FROM spell_x_spell_visual WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_SPELL_X_SPELL_VISUAL, "SELECT MAX(ID) + 1 FROM spell_x_spell_visual", CONNECTION_SYNCH);
|
||||
@@ -1666,7 +1684,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_UI_MAP_ASSIGNMENT, "SELECT MAX(ID) + 1 FROM ui_map_assignment", CONNECTION_SYNCH);
|
||||
|
||||
// UiMapLink.db2
|
||||
PrepareStatement(HOTFIX_SEL_UI_MAP_LINK, "SELECT UiMinX, UiMinY, UiMaxX, UiMaxY, ID, ParentUiMapID, OrderIndex, ChildUiMapID, "
|
||||
PrepareStatement(HOTFIX_SEL_UI_MAP_LINK, "SELECT UiMinX, UiMinY, UiMaxX, UiMaxY, ID, ParentUiMapID, OrderIndex, ChildUiMapID, PlayerConditionID, "
|
||||
"OverrideHighlightFileDataID, OverrideHighlightAtlasID, Flags FROM ui_map_link WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_UI_MAP_LINK, "SELECT MAX(ID) + 1 FROM ui_map_link", CONNECTION_SYNCH);
|
||||
|
||||
|
||||
@@ -221,6 +221,7 @@ enum HotfixDatabaseStatements : uint32
|
||||
|
||||
HOTFIX_SEL_CHR_CUSTOMIZATION_REQ,
|
||||
HOTFIX_SEL_CHR_CUSTOMIZATION_REQ_MAX_ID,
|
||||
HOTFIX_SEL_CHR_CUSTOMIZATION_REQ_LOCALE,
|
||||
|
||||
HOTFIX_SEL_CHR_CUSTOMIZATION_REQ_CHOICE,
|
||||
HOTFIX_SEL_CHR_CUSTOMIZATION_REQ_CHOICE_MAX_ID,
|
||||
@@ -412,6 +413,9 @@ enum HotfixDatabaseStatements : uint32
|
||||
HOTFIX_SEL_GLYPH_REQUIRED_SPEC,
|
||||
HOTFIX_SEL_GLYPH_REQUIRED_SPEC_MAX_ID,
|
||||
|
||||
HOTFIX_SEL_GOSSIP_NPC_OPTION,
|
||||
HOTFIX_SEL_GOSSIP_NPC_OPTION_MAX_ID,
|
||||
|
||||
HOTFIX_SEL_GUILD_COLOR_BACKGROUND,
|
||||
HOTFIX_SEL_GUILD_COLOR_BACKGROUND_MAX_ID,
|
||||
|
||||
@@ -771,6 +775,7 @@ enum HotfixDatabaseStatements : uint32
|
||||
|
||||
HOTFIX_SEL_SKILL_LINE_ABILITY,
|
||||
HOTFIX_SEL_SKILL_LINE_ABILITY_MAX_ID,
|
||||
HOTFIX_SEL_SKILL_LINE_ABILITY_LOCALE,
|
||||
|
||||
HOTFIX_SEL_SKILL_RACE_CLASS_INFO,
|
||||
HOTFIX_SEL_SKILL_RACE_CLASS_INFO_MAX_ID,
|
||||
|
||||
@@ -40,15 +40,15 @@ void ClearGossipMenuFor(Player* player)
|
||||
}
|
||||
|
||||
// Using provided text, not from DB
|
||||
void AddGossipItemFor(Player* player, GossipOptionNpc optionNpc, std::string const& text, uint32 sender, uint32 action)
|
||||
void AddGossipItemFor(Player* player, GossipOptionNpc optionNpc, std::string text, uint32 sender, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, optionNpc, text, sender, action, "", 0);
|
||||
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(0, -1, optionNpc, std::move(text), 0, GossipOptionFlags::None, {}, false, 0, "", {}, {}, sender, action);
|
||||
}
|
||||
|
||||
// Using provided texts, not from DB
|
||||
void AddGossipItemFor(Player* player, GossipOptionNpc optionNpc, std::string const& text, uint32 sender, uint32 action, std::string const& popupText, uint32 popupMoney, bool coded)
|
||||
void AddGossipItemFor(Player* player, GossipOptionNpc optionNpc, std::string text, uint32 sender, uint32 action, std::string popupText, uint32 popupMoney, bool coded)
|
||||
{
|
||||
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(-1, optionNpc, text, sender, action, popupText, popupMoney, coded);
|
||||
player->PlayerTalkClass->GetGossipMenu().AddMenuItem(0, -1, optionNpc, std::move(text), 0, GossipOptionFlags::None, {}, coded, popupMoney, std::move(popupText), {}, {}, sender, action);
|
||||
}
|
||||
|
||||
// Uses gossip item info from DB
|
||||
|
||||
@@ -91,9 +91,9 @@ uint32 TC_GAME_API GetGossipActionFor(Player* player, uint32 gossipListId);
|
||||
void TC_GAME_API InitGossipMenuFor(Player* player, uint32 menuId);
|
||||
void TC_GAME_API ClearGossipMenuFor(Player* player);
|
||||
// Using provided text, not from DB
|
||||
void TC_GAME_API AddGossipItemFor(Player* player, GossipOptionNpc optionNpc, std::string const& text, uint32 sender, uint32 action);
|
||||
void TC_GAME_API AddGossipItemFor(Player* player, GossipOptionNpc optionNpc, std::string text, uint32 sender, uint32 action);
|
||||
// Using provided texts, not from DB
|
||||
void TC_GAME_API AddGossipItemFor(Player* player, GossipOptionNpc optionNpc, std::string const& text, uint32 sender, uint32 action, std::string const& popupText, uint32 popupMoney, bool coded);
|
||||
void TC_GAME_API AddGossipItemFor(Player* player, GossipOptionNpc optionNpc, std::string text, uint32 sender, uint32 action, std::string popupText, uint32 popupMoney, bool coded);
|
||||
// Uses gossip item info from DB
|
||||
void TC_GAME_API AddGossipItemFor(Player* player, uint32 gossipMenuID, uint32 gossipMenuItemID, uint32 sender, uint32 action);
|
||||
void TC_GAME_API SendGossipMenuFor(Player* player, uint32 npcTextID, ObjectGuid const& guid);
|
||||
|
||||
@@ -3095,7 +3095,7 @@ bool CriteriaHandler::ModifierSatisfied(ModifierTreeEntry const* modifier, uint6
|
||||
|
||||
bool bagScanReachedEnd = referencePlayer->ForEachItem(ItemSearchLocation::Everywhere, [&bonusListIDs](Item const* item)
|
||||
{
|
||||
bool hasBonus = std::any_of(item->m_itemData->BonusListIDs->begin(), item->m_itemData->BonusListIDs->end(), [&bonusListIDs](int32 bonusListID)
|
||||
bool hasBonus = std::any_of(item->GetBonusListIDs().begin(), item->GetBonusListIDs().end(), [&bonusListIDs](int32 bonusListID)
|
||||
{
|
||||
return bonusListIDs.find(bonusListID) != bonusListIDs.end();
|
||||
});
|
||||
@@ -3762,6 +3762,109 @@ bool CriteriaHandler::ModifierSatisfied(ModifierTreeEntry const* modifier, uint6
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case ModifierTreeType::PlayerAuraWithLabelStackCountEqualOrGreaterThan: // 335
|
||||
{
|
||||
uint32 count = 0;
|
||||
referencePlayer->HasAura([secondaryAsset, &count](Aura const* aura)
|
||||
{
|
||||
if (aura->GetSpellInfo()->HasLabel(secondaryAsset))
|
||||
count += aura->GetStackAmount();
|
||||
return false;
|
||||
});
|
||||
if (count < reqValue)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case ModifierTreeType::PlayerAuraWithLabelStackCountEqual: // 336
|
||||
{
|
||||
uint32 count = 0;
|
||||
referencePlayer->HasAura([secondaryAsset, &count](Aura const* aura)
|
||||
{
|
||||
if (aura->GetSpellInfo()->HasLabel(secondaryAsset))
|
||||
count += aura->GetStackAmount();
|
||||
return false;
|
||||
});
|
||||
if (count != reqValue)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case ModifierTreeType::PlayerAuraWithLabelStackCountEqualOrLessThan: // 337
|
||||
{
|
||||
uint32 count = 0;
|
||||
referencePlayer->HasAura([secondaryAsset, &count](Aura const* aura)
|
||||
{
|
||||
if (aura->GetSpellInfo()->HasLabel(secondaryAsset))
|
||||
count += aura->GetStackAmount();
|
||||
return false;
|
||||
});
|
||||
if (count > reqValue)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case ModifierTreeType::PlayerIsInCrossFactionGroup: // 338
|
||||
{
|
||||
Group const* group = referencePlayer->GetGroup();
|
||||
if (!(group->GetGroupFlags() & GROUP_FLAG_CROSS_FACTION))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case ModifierTreeType::PlayerHasTraitNodeEntryInActiveConfig: // 340
|
||||
{
|
||||
auto hasTraitNodeEntry = [referencePlayer, reqValue]()
|
||||
{
|
||||
for (UF::TraitConfig const& traitConfig : referencePlayer->m_activePlayerData->TraitConfigs)
|
||||
{
|
||||
if (TraitConfigType(*traitConfig.Type) == TraitConfigType::Combat)
|
||||
{
|
||||
if (int32(*referencePlayer->m_activePlayerData->ActiveCombatTraitConfigID) != traitConfig.ID
|
||||
|| !EnumFlag(TraitCombatConfigFlags(*traitConfig.CombatConfigFlags)).HasFlag(TraitCombatConfigFlags::ActiveForSpec))
|
||||
continue;
|
||||
}
|
||||
|
||||
for (UF::TraitEntry const& traitEntry : traitConfig.Entries)
|
||||
if (traitEntry.TraitNodeEntryID == int32(reqValue))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}();
|
||||
if (!hasTraitNodeEntry)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case ModifierTreeType::PlayerHasTraitNodeEntryInActiveConfigRankGreaterOrEqualThan: // 341
|
||||
{
|
||||
auto traitNodeEntryRank = [referencePlayer, secondaryAsset]() -> Optional<uint16>
|
||||
{
|
||||
for (UF::TraitConfig const& traitConfig : referencePlayer->m_activePlayerData->TraitConfigs)
|
||||
{
|
||||
if (TraitConfigType(*traitConfig.Type) == TraitConfigType::Combat)
|
||||
{
|
||||
if (int32(*referencePlayer->m_activePlayerData->ActiveCombatTraitConfigID) != traitConfig.ID
|
||||
|| !EnumFlag(TraitCombatConfigFlags(*traitConfig.CombatConfigFlags)).HasFlag(TraitCombatConfigFlags::ActiveForSpec))
|
||||
continue;
|
||||
}
|
||||
|
||||
for (UF::TraitEntry const& traitEntry : traitConfig.Entries)
|
||||
if (traitEntry.TraitNodeEntryID == int32(secondaryAsset))
|
||||
return traitEntry.Rank;
|
||||
}
|
||||
return {};
|
||||
}();
|
||||
if (!traitNodeEntryRank || traitNodeEntryRank < int32(reqValue))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case ModifierTreeType::PlayerDaysSinceLogout: // 344
|
||||
if (GameTime::GetGameTime() - referencePlayer->m_playerData->LogoutTime < int64(reqValue) * DAY)
|
||||
return false;
|
||||
break;
|
||||
case ModifierTreeType::PlayerCanUseItem: // 351
|
||||
{
|
||||
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(reqValue);
|
||||
if (!itemTemplate || !referencePlayer->CanUseItem(itemTemplate))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ uint64 AuctionHouseMgr::GetItemAuctionDeposit(Player* player, Item* item, Minute
|
||||
std::string AuctionHouseMgr::BuildItemAuctionMailSubject(AuctionMailType type, AuctionPosting const* auction)
|
||||
{
|
||||
return BuildAuctionMailSubject(auction->Items[0]->GetEntry(), type, auction->Id, auction->GetTotalItemCount(),
|
||||
auction->Items[0]->GetModifier(ITEM_MODIFIER_BATTLE_PET_SPECIES_ID), auction->Items[0]->GetContext(), *auction->Items[0]->m_itemData->BonusListIDs);
|
||||
auction->Items[0]->GetModifier(ITEM_MODIFIER_BATTLE_PET_SPECIES_ID), auction->Items[0]->GetContext(), auction->Items[0]->GetBonusListIDs());
|
||||
}
|
||||
|
||||
std::string AuctionHouseMgr::BuildCommodityAuctionMailSubject(AuctionMailType type, uint32 itemId, uint32 itemCount)
|
||||
@@ -1231,7 +1231,7 @@ void AuctionHouseObject::BuildListBuckets(WorldPackets::AuctionHouse::AuctionLis
|
||||
if (!(classFilters->Classes[bucketData->ItemClass].SubclassMask & (1 << bucketData->ItemSubClass)))
|
||||
continue;
|
||||
|
||||
if (!(classFilters->Classes[bucketData->ItemClass].InvTypes[bucketData->ItemSubClass] & (1 << bucketData->InventoryType)))
|
||||
if (!(classFilters->Classes[bucketData->ItemClass].InvTypes[bucketData->ItemSubClass] & (UI64LIT(1) << bucketData->InventoryType)))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ struct AuctionSearchClassFilters
|
||||
struct SubclassFilter
|
||||
{
|
||||
uint32 SubclassMask = FILTER_SKIP_CLASS;
|
||||
std::array<uint32, MAX_ITEM_SUBCLASS_TOTAL> InvTypes = { };
|
||||
std::array<uint64, MAX_ITEM_SUBCLASS_TOTAL> InvTypes = { };
|
||||
};
|
||||
|
||||
std::array<SubclassFilter, MAX_ITEM_CLASS> Classes = { };
|
||||
|
||||
@@ -1547,7 +1547,7 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond) const
|
||||
Trinity::IteratorPair pMenuItemBounds = sObjectMgr->GetGossipMenuItemsMapBoundsNonConst(cond->SourceGroup);
|
||||
for (auto& [_, gossipMenuItem] : pMenuItemBounds)
|
||||
{
|
||||
if (gossipMenuItem.MenuID == cond->SourceGroup && gossipMenuItem.OptionID == uint32(cond->SourceEntry))
|
||||
if (gossipMenuItem.MenuID == cond->SourceGroup && gossipMenuItem.OrderIndex == uint32(cond->SourceEntry))
|
||||
{
|
||||
gossipMenuItem.Conditions.push_back(cond);
|
||||
return true;
|
||||
@@ -3350,6 +3350,46 @@ bool ConditionMgr::IsPlayerMeetingCondition(Player const* player, PlayerConditio
|
||||
if (condition->CovenantID && player->m_playerData->CovenantID != condition->CovenantID)
|
||||
return false;
|
||||
|
||||
if (std::any_of(condition->TraitNodeEntryID.begin(), condition->TraitNodeEntryID.end(), [](int32 traitNodeEntryId) { return traitNodeEntryId != 0; }))
|
||||
{
|
||||
auto getTraitNodeEntryRank = [player](int32 traitNodeEntryId) -> Optional<uint16>
|
||||
{
|
||||
for (UF::TraitConfig const& traitConfig : player->m_activePlayerData->TraitConfigs)
|
||||
{
|
||||
if (TraitConfigType(*traitConfig.Type) == TraitConfigType::Combat)
|
||||
{
|
||||
if (int32(*player->m_activePlayerData->ActiveCombatTraitConfigID) != traitConfig.ID
|
||||
|| !EnumFlag(TraitCombatConfigFlags(*traitConfig.CombatConfigFlags)).HasFlag(TraitCombatConfigFlags::ActiveForSpec))
|
||||
continue;
|
||||
}
|
||||
|
||||
for (UF::TraitEntry const& traitEntry : traitConfig.Entries)
|
||||
if (traitEntry.TraitNodeEntryID == traitNodeEntryId)
|
||||
return traitEntry.Rank;
|
||||
}
|
||||
return {};
|
||||
};
|
||||
|
||||
std::array<bool, std::tuple_size_v<decltype(condition->TraitNodeEntryID)>> results;
|
||||
results.fill(true);
|
||||
for (std::size_t i = 0; i < condition->TraitNodeEntryID.size(); ++i)
|
||||
{
|
||||
if (!condition->TraitNodeEntryID[i])
|
||||
continue;
|
||||
|
||||
Optional<int32> rank = getTraitNodeEntryRank(condition->TraitNodeEntryID[i]);
|
||||
if (!rank)
|
||||
results[i] = false;
|
||||
else if (condition->TraitNodeEntryMinRank[i] && rank < condition->TraitNodeEntryMinRank[i])
|
||||
results[i] = false;
|
||||
else if (condition->TraitNodeEntryMaxRank[i] && rank > condition->TraitNodeEntryMaxRank[i])
|
||||
results[i] = false;
|
||||
}
|
||||
|
||||
if (!PlayerConditionLogic(condition->TraitNodeEntryLogic, results))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -753,6 +753,7 @@ struct BattlePetBreedQualityLoadInfo
|
||||
static constexpr DB2FieldMeta fields[] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_INT, "MaxQualityRoll" },
|
||||
{ false, FT_FLOAT, "StateMultiplier" },
|
||||
{ true, FT_BYTE, "QualityEnum" },
|
||||
};
|
||||
@@ -790,7 +791,7 @@ struct BattlePetSpeciesLoadInfo
|
||||
{ true, FT_INT, "SummonSpellID" },
|
||||
{ true, FT_INT, "IconFileDataID" },
|
||||
{ true, FT_BYTE, "PetTypeEnum" },
|
||||
{ false, FT_SHORT, "Flags" },
|
||||
{ true, FT_INT, "Flags" },
|
||||
{ true, FT_BYTE, "SourceTypeEnum" },
|
||||
{ true, FT_INT, "CardUIModelSceneID" },
|
||||
{ true, FT_INT, "LoadoutUIModelSceneID" },
|
||||
@@ -833,7 +834,7 @@ struct BattlemasterListLoadInfo
|
||||
{ true, FT_BYTE, "MaxLevel" },
|
||||
{ true, FT_BYTE, "RatedPlayers" },
|
||||
{ true, FT_BYTE, "MinPlayers" },
|
||||
{ true, FT_BYTE, "MaxPlayers" },
|
||||
{ true, FT_INT, "MaxPlayers" },
|
||||
{ true, FT_BYTE, "GroupsAllowed" },
|
||||
{ true, FT_BYTE, "MaxGroupSize" },
|
||||
{ true, FT_SHORT, "HolidayWorldState" },
|
||||
@@ -951,8 +952,8 @@ struct CharacterLoadoutLoadInfo
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_LONG, "RaceMask" },
|
||||
{ true, FT_BYTE, "ChrClassID" },
|
||||
{ true, FT_BYTE, "Purpose" },
|
||||
{ true, FT_BYTE, "Unused910" },
|
||||
{ true, FT_INT, "Purpose" },
|
||||
{ true, FT_BYTE, "ItemContext" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), CharacterLoadoutMeta::Instance(), HOTFIX_SEL_CHARACTER_LOADOUT);
|
||||
return &loadInfo;
|
||||
@@ -1084,6 +1085,7 @@ struct ChrCustomizationChoiceLoadInfo
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_INT, "ChrCustomizationOptionID" },
|
||||
{ true, FT_INT, "ChrCustomizationReqID" },
|
||||
{ true, FT_INT, "ChrCustomizationVisReqID" },
|
||||
{ false, FT_SHORT, "SortOrder" },
|
||||
{ false, FT_SHORT, "UiOrderIndex" },
|
||||
{ true, FT_INT, "Flags" },
|
||||
@@ -1129,6 +1131,7 @@ struct ChrCustomizationElementLoadInfo
|
||||
{ true, FT_INT, "ChrCustomizationCondModelID" },
|
||||
{ true, FT_INT, "ChrCustomizationDisplayInfoID" },
|
||||
{ true, FT_INT, "ChrCustItemGeoModifyID" },
|
||||
{ true, FT_INT, "ChrCustomizationVoiceID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), ChrCustomizationElementMeta::Instance(), HOTFIX_SEL_CHR_CUSTOMIZATION_ELEMENT);
|
||||
return &loadInfo;
|
||||
@@ -1167,9 +1170,11 @@ struct ChrCustomizationReqLoadInfo
|
||||
static constexpr DB2FieldMeta fields[] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_STRING, "ReqSource" },
|
||||
{ true, FT_INT, "Flags" },
|
||||
{ true, FT_INT, "ClassMask" },
|
||||
{ true, FT_INT, "AchievementID" },
|
||||
{ true, FT_INT, "QuestID" },
|
||||
{ true, FT_INT, "OverrideArchive" },
|
||||
{ true, FT_INT, "ItemModifiedAppearanceID" },
|
||||
};
|
||||
@@ -1235,6 +1240,8 @@ struct ChrRaceXChrModelLoadInfo
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_INT, "ChrRacesID" },
|
||||
{ true, FT_INT, "ChrModelID" },
|
||||
{ true, FT_INT, "Sex" },
|
||||
{ true, FT_INT, "AllowedTransmogSlots" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), ChrRaceXChrModelMeta::Instance(), HOTFIX_SEL_CHR_RACE_X_CHR_MODEL);
|
||||
return &loadInfo;
|
||||
@@ -1303,6 +1310,7 @@ struct ChrRacesLoadInfo
|
||||
{ false, FT_FLOAT, "Unknown910_21" },
|
||||
{ false, FT_FLOAT, "Unknown910_22" },
|
||||
{ false, FT_FLOAT, "Unknown910_23" },
|
||||
{ true, FT_INT, "Unknown1000" },
|
||||
{ true, FT_BYTE, "BaseLanguage" },
|
||||
{ true, FT_BYTE, "CreatureType" },
|
||||
{ true, FT_BYTE, "MaleModelFallbackSex" },
|
||||
@@ -1354,7 +1362,7 @@ struct CinematicCameraLoadInfo
|
||||
{ false, FT_INT, "SoundID" },
|
||||
{ false, FT_FLOAT, "OriginFacing" },
|
||||
{ false, FT_INT, "FileDataID" },
|
||||
{ true, FT_INT, "Unknown915" },
|
||||
{ false, FT_INT, "ConversationID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), CinematicCameraMeta::Instance(), HOTFIX_SEL_CINEMATIC_CAMERA);
|
||||
return &loadInfo;
|
||||
@@ -1495,6 +1503,7 @@ struct CreatureDisplayInfoLoadInfo
|
||||
{ true, FT_INT, "TextureVariationFileDataID1" },
|
||||
{ true, FT_INT, "TextureVariationFileDataID2" },
|
||||
{ true, FT_INT, "TextureVariationFileDataID3" },
|
||||
{ true, FT_INT, "TextureVariationFileDataID4" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), CreatureDisplayInfoMeta::Instance(), HOTFIX_SEL_CREATURE_DISPLAY_INFO);
|
||||
return &loadInfo;
|
||||
@@ -1694,6 +1703,8 @@ struct CurrencyTypesLoadInfo
|
||||
{ true, FT_INT, "XpQuestDifficulty" },
|
||||
{ true, FT_INT, "AwardConditionID" },
|
||||
{ true, FT_INT, "MaxQtyWorldStateID" },
|
||||
{ false, FT_INT, "RechargingAmountPerCycle" },
|
||||
{ false, FT_INT, "RechargingCycleDurationMS" },
|
||||
{ true, FT_INT, "Flags1" },
|
||||
{ true, FT_INT, "Flags2" },
|
||||
};
|
||||
@@ -1723,11 +1734,11 @@ struct CurvePointLoadInfo
|
||||
{
|
||||
static constexpr DB2FieldMeta fields[] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_FLOAT, "PosX" },
|
||||
{ false, FT_FLOAT, "PosY" },
|
||||
{ false, FT_FLOAT, "PreSLSquishPosX" },
|
||||
{ false, FT_FLOAT, "PreSLSquishPosY" },
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_SHORT, "CurveID" },
|
||||
{ false, FT_BYTE, "OrderIndex" },
|
||||
};
|
||||
@@ -1810,7 +1821,6 @@ struct DungeonEncounterLoadInfo
|
||||
{ true, FT_INT, "OrderIndex" },
|
||||
{ true, FT_INT, "CompleteWorldStateID" },
|
||||
{ true, FT_BYTE, "Bit" },
|
||||
{ true, FT_INT, "CreatureDisplayID" },
|
||||
{ true, FT_INT, "Flags" },
|
||||
{ true, FT_INT, "SpellIconFileID" },
|
||||
{ true, FT_INT, "Faction" },
|
||||
@@ -1994,8 +2004,10 @@ struct FactionLoadInfo
|
||||
{ false, FT_SHORT, "ParentFactionID" },
|
||||
{ false, FT_BYTE, "Expansion" },
|
||||
{ false, FT_INT, "FriendshipRepID" },
|
||||
{ false, FT_BYTE, "Flags" },
|
||||
{ true, FT_INT, "Flags" },
|
||||
{ false, FT_SHORT, "ParagonFactionID" },
|
||||
{ true, FT_INT, "RenownFactionID" },
|
||||
{ true, FT_INT, "RenownCurrencyID" },
|
||||
{ true, FT_SHORT, "ReputationClassMask1" },
|
||||
{ true, FT_SHORT, "ReputationClassMask2" },
|
||||
{ true, FT_SHORT, "ReputationClassMask3" },
|
||||
@@ -2038,10 +2050,18 @@ struct FactionTemplateLoadInfo
|
||||
{ false, FT_SHORT, "Enemies2" },
|
||||
{ false, FT_SHORT, "Enemies3" },
|
||||
{ false, FT_SHORT, "Enemies4" },
|
||||
{ false, FT_SHORT, "Enemies5" },
|
||||
{ false, FT_SHORT, "Enemies6" },
|
||||
{ false, FT_SHORT, "Enemies7" },
|
||||
{ false, FT_SHORT, "Enemies8" },
|
||||
{ false, FT_SHORT, "Friend1" },
|
||||
{ false, FT_SHORT, "Friend2" },
|
||||
{ false, FT_SHORT, "Friend3" },
|
||||
{ false, FT_SHORT, "Friend4" },
|
||||
{ false, FT_SHORT, "Friend5" },
|
||||
{ false, FT_SHORT, "Friend6" },
|
||||
{ false, FT_SHORT, "Friend7" },
|
||||
{ false, FT_SHORT, "Friend8" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), FactionTemplateMeta::Instance(), HOTFIX_SEL_FACTION_TEMPLATE);
|
||||
return &loadInfo;
|
||||
@@ -2472,7 +2492,7 @@ struct GarrTalentTreeLoadInfo
|
||||
{ false, FT_SHORT, "UiTextureKitID" },
|
||||
{ true, FT_INT, "GarrTalentTreeType" },
|
||||
{ true, FT_INT, "PlayerConditionID" },
|
||||
{ true, FT_BYTE, "FeatureTypeIndex" },
|
||||
{ false, FT_BYTE, "FeatureTypeIndex" },
|
||||
{ true, FT_BYTE, "FeatureSubtypeIndex" },
|
||||
{ true, FT_INT, "CurrencyID" },
|
||||
};
|
||||
@@ -2558,6 +2578,34 @@ struct GlyphRequiredSpecLoadInfo
|
||||
}
|
||||
};
|
||||
|
||||
struct GossipNpcOptionLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
{
|
||||
static constexpr DB2FieldMeta fields[] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_INT, "GossipNpcOption" },
|
||||
{ true, FT_INT, "LFGDungeonsID" },
|
||||
{ true, FT_INT, "TrainerID" },
|
||||
{ true, FT_INT, "GarrFollowerTypeID" },
|
||||
{ true, FT_INT, "CharShipmentID" },
|
||||
{ true, FT_INT, "GarrTalentTreeID" },
|
||||
{ true, FT_INT, "UiMapID" },
|
||||
{ true, FT_INT, "UiItemInteractionID" },
|
||||
{ true, FT_INT, "Unknown_1000_8" },
|
||||
{ true, FT_INT, "Unknown_1000_9" },
|
||||
{ true, FT_INT, "CovenantID" },
|
||||
{ true, FT_INT, "GossipOptionID" },
|
||||
{ true, FT_INT, "TraitTreeID" },
|
||||
{ true, FT_INT, "ProfessionID" },
|
||||
{ true, FT_INT, "Unknown_1002_14" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), GossipNPCOptionMeta::Instance(), HOTFIX_SEL_GOSSIP_NPC_OPTION);
|
||||
return &loadInfo;
|
||||
}
|
||||
};
|
||||
|
||||
struct GuildColorBackgroundLoadInfo
|
||||
{
|
||||
static DB2LoadInfo const* Instance()
|
||||
@@ -2797,6 +2845,7 @@ struct ItemLoadInfo
|
||||
{ false, FT_BYTE, "ItemGroupSoundsID" },
|
||||
{ true, FT_INT, "ContentTuningID" },
|
||||
{ true, FT_INT, "ModifiedCraftingReagentItemID" },
|
||||
{ true, FT_INT, "CraftingQualityID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), ItemMeta::Instance(), HOTFIX_SEL_ITEM);
|
||||
return &loadInfo;
|
||||
@@ -3152,7 +3201,7 @@ struct ItemExtendedCostLoadInfo
|
||||
{ true, FT_BYTE, "ArenaBracket" },
|
||||
{ false, FT_BYTE, "Flags" },
|
||||
{ false, FT_BYTE, "MinFactionID" },
|
||||
{ false, FT_BYTE, "MinReputation" },
|
||||
{ true, FT_INT, "MinReputation" },
|
||||
{ false, FT_BYTE, "RequiredAchievement" },
|
||||
{ true, FT_INT, "ItemID1" },
|
||||
{ true, FT_INT, "ItemID2" },
|
||||
@@ -3338,7 +3387,7 @@ struct ItemSearchNameLoadInfo
|
||||
{ false, FT_BYTE, "OverallQualityID" },
|
||||
{ true, FT_INT, "ExpansionID" },
|
||||
{ false, FT_SHORT, "MinFactionID" },
|
||||
{ false, FT_BYTE, "MinReputation" },
|
||||
{ true, FT_INT, "MinReputation" },
|
||||
{ true, FT_INT, "AllowableClass" },
|
||||
{ true, FT_BYTE, "RequiredLevel" },
|
||||
{ false, FT_SHORT, "RequiredSkill" },
|
||||
@@ -3450,6 +3499,7 @@ struct ItemSparseLoadInfo
|
||||
{ true, FT_INT, "StatPercentEditor10" },
|
||||
{ true, FT_INT, "Stackable" },
|
||||
{ true, FT_INT, "MaxCount" },
|
||||
{ true, FT_INT, "MinReputation" },
|
||||
{ false, FT_INT, "RequiredAbility" },
|
||||
{ false, FT_INT, "SellPrice" },
|
||||
{ false, FT_INT, "BuyPrice" },
|
||||
@@ -3504,7 +3554,6 @@ struct ItemSparseLoadInfo
|
||||
{ true, FT_BYTE, "StatModifierBonusStat9" },
|
||||
{ true, FT_BYTE, "StatModifierBonusStat10" },
|
||||
{ false, FT_BYTE, "ContainerSlots" },
|
||||
{ false, FT_BYTE, "MinReputation" },
|
||||
{ false, FT_BYTE, "RequiredPVPMedal" },
|
||||
{ false, FT_BYTE, "RequiredPVPRank" },
|
||||
{ true, FT_BYTE, "RequiredLevel" },
|
||||
@@ -3647,7 +3696,6 @@ struct JournalInstanceLoadInfo
|
||||
{ true, FT_INT, "ButtonFileDataID" },
|
||||
{ true, FT_INT, "ButtonSmallFileDataID" },
|
||||
{ true, FT_INT, "LoreFileDataID" },
|
||||
{ false, FT_BYTE, "OrderIndex" },
|
||||
{ true, FT_INT, "Flags" },
|
||||
{ false, FT_SHORT, "AreaID" },
|
||||
};
|
||||
@@ -3992,6 +4040,7 @@ struct MapLoadInfo
|
||||
{ true, FT_SHORT, "WindSettingsID" },
|
||||
{ true, FT_INT, "ZmpFileDataID" },
|
||||
{ true, FT_INT, "WdtFileDataID" },
|
||||
{ true, FT_INT, "NavigationMaxDistance" },
|
||||
{ true, FT_INT, "Flags1" },
|
||||
{ true, FT_INT, "Flags2" },
|
||||
{ true, FT_INT, "Flags3" },
|
||||
@@ -4137,6 +4186,7 @@ struct MountCapabilityLoadInfo
|
||||
{ true, FT_INT, "ModSpellAuraID" },
|
||||
{ true, FT_SHORT, "ReqMapID" },
|
||||
{ true, FT_INT, "PlayerConditionID" },
|
||||
{ true, FT_INT, "FlightCapabilityID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), MountCapabilityMeta::Instance(), HOTFIX_SEL_MOUNT_CAPABILITY);
|
||||
return &loadInfo;
|
||||
@@ -4401,6 +4451,7 @@ struct PlayerConditionLoadInfo
|
||||
{ false, FT_BYTE, "MaxPVPRank" },
|
||||
{ true, FT_INT, "ContentTuningID" },
|
||||
{ true, FT_INT, "CovenantID" },
|
||||
{ false, FT_INT, "TraitNodeEntryLogic" },
|
||||
{ false, FT_SHORT, "SkillID1" },
|
||||
{ false, FT_SHORT, "SkillID2" },
|
||||
{ false, FT_SHORT, "SkillID3" },
|
||||
@@ -4491,6 +4542,18 @@ struct PlayerConditionLoadInfo
|
||||
{ false, FT_INT, "QuestKillMonster6" },
|
||||
{ true, FT_INT, "MovementFlags1" },
|
||||
{ true, FT_INT, "MovementFlags2" },
|
||||
{ true, FT_INT, "TraitNodeEntryID1" },
|
||||
{ true, FT_INT, "TraitNodeEntryID2" },
|
||||
{ true, FT_INT, "TraitNodeEntryID3" },
|
||||
{ true, FT_INT, "TraitNodeEntryID4" },
|
||||
{ false, FT_SHORT, "TraitNodeEntryMinRank1" },
|
||||
{ false, FT_SHORT, "TraitNodeEntryMinRank2" },
|
||||
{ false, FT_SHORT, "TraitNodeEntryMinRank3" },
|
||||
{ false, FT_SHORT, "TraitNodeEntryMinRank4" },
|
||||
{ false, FT_SHORT, "TraitNodeEntryMaxRank1" },
|
||||
{ false, FT_SHORT, "TraitNodeEntryMaxRank2" },
|
||||
{ false, FT_SHORT, "TraitNodeEntryMaxRank3" },
|
||||
{ false, FT_SHORT, "TraitNodeEntryMaxRank4" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), PlayerConditionMeta::Instance(), HOTFIX_SEL_PLAYER_CONDITION);
|
||||
return &loadInfo;
|
||||
@@ -4525,12 +4588,12 @@ struct PowerTypeLoadInfo
|
||||
{ false, FT_STRING_NOT_LOCALIZED, "CostGlobalStringTag" },
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_BYTE, "PowerTypeEnum" },
|
||||
{ true, FT_BYTE, "MinPower" },
|
||||
{ true, FT_SHORT, "MaxBasePower" },
|
||||
{ true, FT_BYTE, "CenterPower" },
|
||||
{ true, FT_BYTE, "DefaultPower" },
|
||||
{ true, FT_BYTE, "DisplayModifier" },
|
||||
{ true, FT_SHORT, "RegenInterruptTimeMS" },
|
||||
{ true, FT_INT, "MinPower" },
|
||||
{ true, FT_INT, "MaxBasePower" },
|
||||
{ true, FT_INT, "CenterPower" },
|
||||
{ true, FT_INT, "DefaultPower" },
|
||||
{ true, FT_INT, "DisplayModifier" },
|
||||
{ true, FT_INT, "RegenInterruptTimeMS" },
|
||||
{ false, FT_FLOAT, "RegenPeace" },
|
||||
{ false, FT_FLOAT, "RegenCombat" },
|
||||
{ true, FT_SHORT, "Flags" },
|
||||
@@ -4605,6 +4668,7 @@ struct PvpTalentLoadInfo
|
||||
{ true, FT_INT, "ActionBarSpellID" },
|
||||
{ true, FT_INT, "PvpTalentCategoryID" },
|
||||
{ true, FT_INT, "LevelRequired" },
|
||||
{ true, FT_INT, "PlayerConditionID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), PvpTalentMeta::Instance(), HOTFIX_SEL_PVP_TALENT);
|
||||
return &loadInfo;
|
||||
@@ -4696,7 +4760,7 @@ struct QuestInfoLoadInfo
|
||||
{ false, FT_STRING, "InfoName" },
|
||||
{ true, FT_BYTE, "Type" },
|
||||
{ true, FT_INT, "Modifiers" },
|
||||
{ false, FT_SHORT, "Profession" },
|
||||
{ true, FT_INT, "Profession" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), QuestInfoMeta::Instance(), HOTFIX_SEL_QUEST_INFO);
|
||||
return &loadInfo;
|
||||
@@ -4783,6 +4847,7 @@ struct QuestV2LoadInfo
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_SHORT, "UniqueBitFlag" },
|
||||
{ true, FT_INT, "UiQuestDetailsTheme" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), QuestV2Meta::Instance(), HOTFIX_SEL_QUEST_V2);
|
||||
return &loadInfo;
|
||||
@@ -5032,6 +5097,8 @@ struct SkillLineLoadInfo
|
||||
{ true, FT_INT, "ParentTierIndex" },
|
||||
{ false, FT_SHORT, "Flags" },
|
||||
{ true, FT_INT, "SpellBookSpellID" },
|
||||
{ true, FT_INT, "ExpansionNameSharedStringID" },
|
||||
{ true, FT_INT, "HordeExpansionNameSharedStringID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), SkillLineMeta::Instance(), HOTFIX_SEL_SKILL_LINE);
|
||||
return &loadInfo;
|
||||
@@ -5045,6 +5112,8 @@ struct SkillLineAbilityLoadInfo
|
||||
static constexpr DB2FieldMeta fields[] =
|
||||
{
|
||||
{ true, FT_LONG, "RaceMask" },
|
||||
{ false, FT_STRING, "AbilityVerb" },
|
||||
{ false, FT_STRING, "AbilityAllVerb" },
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_SHORT, "SkillLine" },
|
||||
{ true, FT_INT, "Spell" },
|
||||
@@ -5111,7 +5180,7 @@ struct SoundKitLoadInfo
|
||||
{ false, FT_INT, "ID" },
|
||||
{ true, FT_INT, "SoundType" },
|
||||
{ false, FT_FLOAT, "VolumeFloat" },
|
||||
{ false, FT_SHORT, "Flags" },
|
||||
{ true, FT_INT, "Flags" },
|
||||
{ false, FT_FLOAT, "MinDistance" },
|
||||
{ false, FT_FLOAT, "DistanceCutoff" },
|
||||
{ false, FT_BYTE, "EAXDef" },
|
||||
@@ -5124,6 +5193,7 @@ struct SoundKitLoadInfo
|
||||
{ false, FT_FLOAT, "PitchAdjust" },
|
||||
{ false, FT_SHORT, "BusOverwriteID" },
|
||||
{ false, FT_BYTE, "MaxInstances" },
|
||||
{ false, FT_INT, "SoundMixGroupID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), SoundKitMeta::Instance(), HOTFIX_SEL_SOUND_KIT);
|
||||
return &loadInfo;
|
||||
@@ -5192,15 +5262,19 @@ struct SpellAuraRestrictionsLoadInfo
|
||||
static constexpr DB2FieldMeta fields[] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_BYTE, "DifficultyID" },
|
||||
{ false, FT_BYTE, "CasterAuraState" },
|
||||
{ false, FT_BYTE, "TargetAuraState" },
|
||||
{ false, FT_BYTE, "ExcludeCasterAuraState" },
|
||||
{ false, FT_BYTE, "ExcludeTargetAuraState" },
|
||||
{ true, FT_INT, "DifficultyID" },
|
||||
{ true, FT_INT, "CasterAuraState" },
|
||||
{ true, FT_INT, "TargetAuraState" },
|
||||
{ true, FT_INT, "ExcludeCasterAuraState" },
|
||||
{ true, FT_INT, "ExcludeTargetAuraState" },
|
||||
{ true, FT_INT, "CasterAuraSpell" },
|
||||
{ true, FT_INT, "TargetAuraSpell" },
|
||||
{ true, FT_INT, "ExcludeCasterAuraSpell" },
|
||||
{ true, FT_INT, "ExcludeTargetAuraSpell" },
|
||||
{ true, FT_INT, "CasterAuraType" },
|
||||
{ true, FT_INT, "TargetAuraType" },
|
||||
{ true, FT_INT, "ExcludeCasterAuraType" },
|
||||
{ true, FT_INT, "ExcludeTargetAuraType" },
|
||||
{ false, FT_INT, "SpellID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), SpellAuraRestrictionsMeta::Instance(), HOTFIX_SEL_SPELL_AURA_RESTRICTIONS);
|
||||
@@ -5233,7 +5307,7 @@ struct SpellCastingRequirementsLoadInfo
|
||||
{ true, FT_INT, "SpellID" },
|
||||
{ false, FT_BYTE, "FacingCasterFlags" },
|
||||
{ false, FT_SHORT, "MinFactionID" },
|
||||
{ true, FT_BYTE, "MinReputation" },
|
||||
{ true, FT_INT, "MinReputation" },
|
||||
{ false, FT_SHORT, "RequiredAreasID" },
|
||||
{ false, FT_BYTE, "RequiredAuraVision" },
|
||||
{ false, FT_SHORT, "RequiresSpellFocus" },
|
||||
@@ -5315,6 +5389,7 @@ struct SpellCooldownsLoadInfo
|
||||
{ true, FT_INT, "CategoryRecoveryTime" },
|
||||
{ true, FT_INT, "RecoveryTime" },
|
||||
{ true, FT_INT, "StartRecoveryTime" },
|
||||
{ true, FT_INT, "AuraSpellID" },
|
||||
{ false, FT_INT, "SpellID" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), SpellCooldownsMeta::Instance(), HOTFIX_SEL_SPELL_COOLDOWNS);
|
||||
@@ -5445,6 +5520,7 @@ struct SpellItemEnchantmentLoadInfo
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_STRING, "Name" },
|
||||
{ false, FT_STRING, "HordeName" },
|
||||
{ true, FT_INT, "Duration" },
|
||||
{ false, FT_INT, "EffectArg1" },
|
||||
{ false, FT_INT, "EffectArg2" },
|
||||
{ false, FT_INT, "EffectArg3" },
|
||||
@@ -5644,6 +5720,7 @@ struct SpellPowerLoadInfo
|
||||
{ true, FT_INT, "AltPowerBarID" },
|
||||
{ false, FT_FLOAT, "PowerCostPct" },
|
||||
{ false, FT_FLOAT, "PowerCostMaxPct" },
|
||||
{ false, FT_FLOAT, "OptionalCostPct" },
|
||||
{ false, FT_FLOAT, "PowerPctPerSecond" },
|
||||
{ true, FT_BYTE, "PowerType" },
|
||||
{ true, FT_INT, "RequiredAuraSpellID" },
|
||||
@@ -5763,6 +5840,22 @@ struct SpellReagentsLoadInfo
|
||||
{ true, FT_SHORT, "ReagentCount6" },
|
||||
{ true, FT_SHORT, "ReagentCount7" },
|
||||
{ true, FT_SHORT, "ReagentCount8" },
|
||||
{ true, FT_SHORT, "ReagentRecraftCount1" },
|
||||
{ true, FT_SHORT, "ReagentRecraftCount2" },
|
||||
{ true, FT_SHORT, "ReagentRecraftCount3" },
|
||||
{ true, FT_SHORT, "ReagentRecraftCount4" },
|
||||
{ true, FT_SHORT, "ReagentRecraftCount5" },
|
||||
{ true, FT_SHORT, "ReagentRecraftCount6" },
|
||||
{ true, FT_SHORT, "ReagentRecraftCount7" },
|
||||
{ true, FT_SHORT, "ReagentRecraftCount8" },
|
||||
{ false, FT_BYTE, "ReagentSource1" },
|
||||
{ false, FT_BYTE, "ReagentSource2" },
|
||||
{ false, FT_BYTE, "ReagentSource3" },
|
||||
{ false, FT_BYTE, "ReagentSource4" },
|
||||
{ false, FT_BYTE, "ReagentSource5" },
|
||||
{ false, FT_BYTE, "ReagentSource6" },
|
||||
{ false, FT_BYTE, "ReagentSource7" },
|
||||
{ false, FT_BYTE, "ReagentSource8" },
|
||||
};
|
||||
static DB2LoadInfo const loadInfo(&fields[0], std::size(fields), SpellReagentsMeta::Instance(), HOTFIX_SEL_SPELL_REAGENTS);
|
||||
return &loadInfo;
|
||||
@@ -6017,6 +6110,7 @@ struct SpellXSpellVisualLoadInfo
|
||||
{ false, FT_BYTE, "DifficultyID" },
|
||||
{ false, FT_INT, "SpellVisualID" },
|
||||
{ false, FT_FLOAT, "Probability" },
|
||||
{ true, FT_INT, "Flags" },
|
||||
{ true, FT_INT, "Priority" },
|
||||
{ true, FT_INT, "SpellIconFileID" },
|
||||
{ true, FT_INT, "ActiveIconFileID" },
|
||||
@@ -6398,6 +6492,7 @@ struct UiMapLinkLoadInfo
|
||||
{ true, FT_INT, "ParentUiMapID" },
|
||||
{ true, FT_INT, "OrderIndex" },
|
||||
{ true, FT_INT, "ChildUiMapID" },
|
||||
{ true, FT_INT, "PlayerConditionID" },
|
||||
{ true, FT_INT, "OverrideHighlightFileDataID" },
|
||||
{ true, FT_INT, "OverrideHighlightAtlasID" },
|
||||
{ true, FT_INT, "Flags" },
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -154,6 +154,7 @@ DB2Storage<GlobalCurveEntry> sGlobalCurveStore("GlobalCurve.d
|
||||
DB2Storage<GlyphBindableSpellEntry> sGlyphBindableSpellStore("GlyphBindableSpell.db2", GlyphBindableSpellLoadInfo::Instance());
|
||||
DB2Storage<GlyphPropertiesEntry> sGlyphPropertiesStore("GlyphProperties.db2", GlyphPropertiesLoadInfo::Instance());
|
||||
DB2Storage<GlyphRequiredSpecEntry> sGlyphRequiredSpecStore("GlyphRequiredSpec.db2", GlyphRequiredSpecLoadInfo::Instance());
|
||||
DB2Storage<GossipNPCOptionEntry> sGossipNPCOptionStore("GossipNPCOption.db2", GossipNpcOptionLoadInfo::Instance());
|
||||
DB2Storage<GuildColorBackgroundEntry> sGuildColorBackgroundStore("GuildColorBackground.db2", GuildColorBackgroundLoadInfo::Instance());
|
||||
DB2Storage<GuildColorBorderEntry> sGuildColorBorderStore("GuildColorBorder.db2", GuildColorBorderLoadInfo::Instance());
|
||||
DB2Storage<GuildColorEmblemEntry> sGuildColorEmblemStore("GuildColorEmblem.db2", GuildColorEmblemLoadInfo::Instance());
|
||||
@@ -370,7 +371,7 @@ typedef std::unordered_map<uint32 /*bonusListId*/, DB2Manager::ItemBonusList> It
|
||||
typedef std::unordered_map<int16, uint32> ItemBonusListLevelDeltaContainer;
|
||||
typedef std::unordered_multimap<uint32 /*itemId*/, uint32 /*bonusTreeId*/> ItemToBonusTreeContainer;
|
||||
typedef std::unordered_map<uint32 /*itemId*/, ItemChildEquipmentEntry const*> ItemChildEquipmentContainer;
|
||||
typedef std::array<ItemClassEntry const*, 19> ItemClassByOldEnumContainer;
|
||||
typedef std::array<ItemClassEntry const*, 20> ItemClassByOldEnumContainer;
|
||||
typedef std::unordered_map<uint32, std::vector<ItemLimitCategoryConditionEntry const*>> ItemLimitCategoryConditionContainer;
|
||||
typedef std::set<ItemLevelSelectorQualityEntry const*, ItemLevelSelectorQualityEntryComparator> ItemLevelSelectorQualities;
|
||||
typedef std::unordered_map<uint32 /*itemId | appearanceMod << 24*/, ItemModifiedAppearanceEntry const*> ItemModifiedAppearanceByItemContainer;
|
||||
@@ -729,6 +730,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
|
||||
LOAD_DB2(sGlyphBindableSpellStore);
|
||||
LOAD_DB2(sGlyphPropertiesStore);
|
||||
LOAD_DB2(sGlyphRequiredSpecStore);
|
||||
LOAD_DB2(sGossipNPCOptionStore);
|
||||
LOAD_DB2(sGuildColorBackgroundStore);
|
||||
LOAD_DB2(sGuildColorBorderStore);
|
||||
LOAD_DB2(sGuildColorEmblemStore);
|
||||
@@ -925,13 +927,13 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
|
||||
}
|
||||
|
||||
// Check loaded DB2 files proper version
|
||||
if (!sAreaTableStore.LookupEntry(14083) || // last area added in 9.2.7 (45114)
|
||||
!sCharTitlesStore.LookupEntry(727) || // last char title added in 9.2.7 (45114)
|
||||
!sGemPropertiesStore.LookupEntry(3922) || // last gem property added in 9.2.7 (45114)
|
||||
!sItemStore.LookupEntry(199202) || // last item added in 9.2.7 (45114)
|
||||
!sItemExtendedCostStore.LookupEntry(7316) || // last item extended cost added in 9.2.7 (45114)
|
||||
!sMapStore.LookupEntry(2559) || // last map added in 9.2.7 (45114)
|
||||
!sSpellNameStore.LookupEntry(387936)) // last spell added in 9.2.7 (45114)
|
||||
if (!sAreaTableStore.LookupEntry(14618) || // last area added in 10.0.2 (46741)
|
||||
!sCharTitlesStore.LookupEntry(749) || // last char title added in 10.0.2 (46741)
|
||||
!sGemPropertiesStore.LookupEntry(4028) || // last gem property added in 10.0.2 (46741)
|
||||
!sItemStore.LookupEntry(202712) || // last item added in 10.0.2 (46741)
|
||||
!sItemExtendedCostStore.LookupEntry(7862) || // last item extended cost added in 10.0.2 (46741)
|
||||
!sMapStore.LookupEntry(2582) || // last map added in 10.0.2 (46741)
|
||||
!sSpellNameStore.LookupEntry(399311)) // last spell added in 10.0.2 (46741)
|
||||
{
|
||||
TC_LOG_ERROR("misc", "You have _outdated_ DB2 files. Please extract correct versions from current using client.");
|
||||
exit(1);
|
||||
@@ -1001,7 +1003,9 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
|
||||
if (battlemaster->MaxPlayers < battlemaster->MinPlayers)
|
||||
{
|
||||
TC_LOG_ERROR("db2.hotfix.battlemaster_list", "Battlemaster (%u) contains bad values for MinPlayers (%u) and MaxPlayers (%u). Swapping values.", battlemaster->ID, battlemaster->MinPlayers, battlemaster->MaxPlayers);
|
||||
std::swap(const_cast<BattlemasterListEntry*>(battlemaster)->MaxPlayers, const_cast<BattlemasterListEntry*>(battlemaster)->MinPlayers);
|
||||
int8 minPlayers = battlemaster->MinPlayers;
|
||||
const_cast<BattlemasterListEntry*>(battlemaster)->MinPlayers = battlemaster->MaxPlayers;
|
||||
const_cast<BattlemasterListEntry*>(battlemaster)->MaxPlayers = minPlayers;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1072,16 +1076,16 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
|
||||
{
|
||||
if (ChrModelEntry const* model = sChrModelStore.LookupEntry(raceModel->ChrModelID))
|
||||
{
|
||||
_chrModelsByRaceAndGender[{ uint8(raceModel->ChrRacesID), uint8(model->Sex) }] = model;
|
||||
_chrModelsByRaceAndGender[{ uint8(raceModel->ChrRacesID), uint8(raceModel->Sex) }] = model;
|
||||
|
||||
if (std::vector<ChrCustomizationOptionEntry const*> const* customizationOptionsForModel = Trinity::Containers::MapGetValuePtr(customizationOptionsByModel, model->ID))
|
||||
{
|
||||
std::vector<ChrCustomizationOptionEntry const*>& raceOptions = _chrCustomizationOptionsByRaceAndGender[{ uint8(raceModel->ChrRacesID), uint8(model->Sex) }];
|
||||
std::vector<ChrCustomizationOptionEntry const*>& raceOptions = _chrCustomizationOptionsByRaceAndGender[{ uint8(raceModel->ChrRacesID), uint8(raceModel->Sex) }];
|
||||
raceOptions.insert(raceOptions.end(), customizationOptionsForModel->begin(), customizationOptionsForModel->end());
|
||||
|
||||
if (uint32 const* parentRace = Trinity::Containers::MapGetValuePtr(parentRaces, raceModel->ChrRacesID))
|
||||
{
|
||||
std::vector<ChrCustomizationOptionEntry const*>& parentRaceOptions = _chrCustomizationOptionsByRaceAndGender[{ uint8(*parentRace), uint8(model->Sex) }];
|
||||
std::vector<ChrCustomizationOptionEntry const*>& parentRaceOptions = _chrCustomizationOptionsByRaceAndGender[{ uint8(*parentRace), uint8(raceModel->Sex) }];
|
||||
parentRaceOptions.insert(parentRaceOptions.end(), customizationOptionsForModel->begin(), customizationOptionsForModel->end());
|
||||
}
|
||||
}
|
||||
@@ -1089,7 +1093,7 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
|
||||
// link shapeshift displays to race/gender/form
|
||||
for (std::pair<uint32 const, std::pair<uint32, uint8>> const& shapeshiftOptionsForModel : Trinity::Containers::MapEqualRange(shapeshiftFormByModel, model->ID))
|
||||
{
|
||||
ShapeshiftFormModelData& data = _chrCustomizationChoicesForShapeshifts[{ uint8(raceModel->ChrRacesID), uint8(model->Sex), shapeshiftOptionsForModel.second.second }];
|
||||
ShapeshiftFormModelData& data = _chrCustomizationChoicesForShapeshifts[{ uint8(raceModel->ChrRacesID), uint8(raceModel->Sex), shapeshiftOptionsForModel.second.second }];
|
||||
data.OptionID = shapeshiftOptionsForModel.second.first;
|
||||
data.Choices = Trinity::Containers::MapGetValuePtr(_chrCustomizationChoicesByOption, shapeshiftOptionsForModel.second.first);
|
||||
if (data.Choices)
|
||||
|
||||
@@ -120,6 +120,7 @@ TC_GAME_API extern DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLev
|
||||
TC_GAME_API extern DB2Storage<GarrTalentTreeEntry> sGarrTalentTreeStore;
|
||||
TC_GAME_API extern DB2Storage<GemPropertiesEntry> sGemPropertiesStore;
|
||||
TC_GAME_API extern DB2Storage<GlyphPropertiesEntry> sGlyphPropertiesStore;
|
||||
TC_GAME_API extern DB2Storage<GossipNPCOptionEntry> sGossipNPCOptionStore;
|
||||
TC_GAME_API extern DB2Storage<GuildColorBackgroundEntry> sGuildColorBackgroundStore;
|
||||
TC_GAME_API extern DB2Storage<GuildColorBorderEntry> sGuildColorBorderStore;
|
||||
TC_GAME_API extern DB2Storage<GuildColorEmblemEntry> sGuildColorEmblemStore;
|
||||
|
||||
@@ -451,6 +451,7 @@ struct BarberShopStyleEntry
|
||||
struct BattlePetBreedQualityEntry
|
||||
{
|
||||
uint32 ID;
|
||||
int32 MaxQualityRoll;
|
||||
float StateMultiplier;
|
||||
int8 QualityEnum;
|
||||
};
|
||||
@@ -472,7 +473,7 @@ struct BattlePetSpeciesEntry
|
||||
int32 SummonSpellID;
|
||||
int32 IconFileDataID;
|
||||
int8 PetTypeEnum;
|
||||
uint16 Flags;
|
||||
int32 Flags;
|
||||
int8 SourceTypeEnum;
|
||||
int32 CardUIModelSceneID;
|
||||
int32 LoadoutUIModelSceneID;
|
||||
@@ -501,7 +502,7 @@ struct BattlemasterListEntry
|
||||
int8 MaxLevel;
|
||||
int8 RatedPlayers;
|
||||
int8 MinPlayers;
|
||||
int8 MaxPlayers;
|
||||
int32 MaxPlayers;
|
||||
int8 GroupsAllowed;
|
||||
int8 MaxGroupSize;
|
||||
int16 HolidayWorldState;
|
||||
@@ -563,8 +564,8 @@ struct CharacterLoadoutEntry
|
||||
uint32 ID;
|
||||
Trinity::RaceMask<int64> RaceMask;
|
||||
int8 ChrClassID;
|
||||
int8 Purpose;
|
||||
int8 Unused910;
|
||||
int32 Purpose;
|
||||
int8 ItemContext;
|
||||
|
||||
bool IsForNewCharacter() const { return Purpose == 9; }
|
||||
};
|
||||
@@ -650,6 +651,7 @@ struct ChrCustomizationChoiceEntry
|
||||
uint32 ID;
|
||||
int32 ChrCustomizationOptionID;
|
||||
int32 ChrCustomizationReqID;
|
||||
int32 ChrCustomizationVisReqID;
|
||||
uint16 SortOrder;
|
||||
uint16 UiOrderIndex;
|
||||
int32 Flags;
|
||||
@@ -678,6 +680,7 @@ struct ChrCustomizationElementEntry
|
||||
int32 ChrCustomizationCondModelID;
|
||||
int32 ChrCustomizationDisplayInfoID;
|
||||
int32 ChrCustItemGeoModifyID;
|
||||
int32 ChrCustomizationVoiceID;
|
||||
};
|
||||
|
||||
struct ChrCustomizationOptionEntry
|
||||
@@ -700,9 +703,11 @@ struct ChrCustomizationOptionEntry
|
||||
struct ChrCustomizationReqEntry
|
||||
{
|
||||
uint32 ID;
|
||||
LocalizedString ReqSource;
|
||||
int32 Flags;
|
||||
int32 ClassMask;
|
||||
int32 AchievementID;
|
||||
int32 QuestID;
|
||||
int32 OverrideArchive; // -1: allow any, otherwise must match OverrideArchive cvar
|
||||
int32 ItemModifiedAppearanceID;
|
||||
|
||||
@@ -742,6 +747,8 @@ struct ChrRaceXChrModelEntry
|
||||
uint32 ID;
|
||||
int32 ChrRacesID;
|
||||
int32 ChrModelID;
|
||||
int32 Sex;
|
||||
int32 AllowedTransmogSlots;
|
||||
};
|
||||
|
||||
struct ChrRacesEntry
|
||||
@@ -792,6 +799,7 @@ struct ChrRacesEntry
|
||||
float AlteredFormCustomizeRotationFallback;
|
||||
std::array<float, 3> Unknown910_1;
|
||||
std::array<float, 3> Unknown910_2;
|
||||
int32 Unknown1000;
|
||||
int8 BaseLanguage;
|
||||
int8 CreatureType;
|
||||
int8 MaleModelFallbackSex;
|
||||
@@ -833,7 +841,7 @@ struct CinematicCameraEntry
|
||||
uint32 SoundID; // Sound ID (voiceover for cinematic)
|
||||
float OriginFacing; // Orientation in map used for basis for M2 co
|
||||
uint32 FileDataID; // Model
|
||||
int32 Unknown915;
|
||||
uint32 ConversationID;
|
||||
};
|
||||
|
||||
struct CinematicSequencesEntry
|
||||
@@ -941,7 +949,7 @@ struct CreatureDisplayInfoEntry
|
||||
int8 Gender;
|
||||
int32 DissolveOutEffectID;
|
||||
int8 CreatureModelMinLod;
|
||||
std::array<int32, 3> TextureVariationFileDataID;
|
||||
std::array<int32, 4> TextureVariationFileDataID;
|
||||
};
|
||||
|
||||
struct CreatureDisplayInfoExtraEntry
|
||||
@@ -1273,6 +1281,8 @@ struct CurrencyTypesEntry
|
||||
int32 XpQuestDifficulty;
|
||||
int32 AwardConditionID;
|
||||
int32 MaxQtyWorldStateID;
|
||||
uint32 RechargingAmountPerCycle;
|
||||
uint32 RechargingCycleDurationMS;
|
||||
std::array<int32, 2> Flags;
|
||||
};
|
||||
|
||||
@@ -1285,9 +1295,9 @@ struct CurveEntry
|
||||
|
||||
struct CurvePointEntry
|
||||
{
|
||||
uint32 ID;
|
||||
DBCPosition2D Pos;
|
||||
DBCPosition2D PreSLSquishPos;
|
||||
uint32 ID;
|
||||
uint16 CurveID;
|
||||
uint8 OrderIndex;
|
||||
};
|
||||
@@ -1346,7 +1356,6 @@ struct DungeonEncounterEntry
|
||||
int32 OrderIndex;
|
||||
int32 CompleteWorldStateID;
|
||||
int8 Bit;
|
||||
int32 CreatureDisplayID;
|
||||
int32 Flags;
|
||||
int32 SpellIconFileID;
|
||||
int32 Faction;
|
||||
@@ -1436,8 +1445,10 @@ struct FactionEntry
|
||||
uint16 ParentFactionID;
|
||||
uint8 Expansion;
|
||||
uint32 FriendshipRepID;
|
||||
uint8 Flags;
|
||||
int32 Flags;
|
||||
uint16 ParagonFactionID;
|
||||
int32 RenownFactionID;
|
||||
int32 RenownCurrencyID;
|
||||
std::array<int16, 4> ReputationClassMask;
|
||||
std::array<uint16, 4> ReputationFlags;
|
||||
std::array<int32, 4> ReputationBase;
|
||||
@@ -1452,7 +1463,7 @@ struct FactionEntry
|
||||
}
|
||||
};
|
||||
|
||||
#define MAX_FACTION_RELATIONS 4
|
||||
#define MAX_FACTION_RELATIONS 8
|
||||
|
||||
struct FactionTemplateEntry
|
||||
{
|
||||
@@ -1771,7 +1782,7 @@ struct GarrTalentTreeEntry
|
||||
uint16 UiTextureKitID;
|
||||
int32 GarrTalentTreeType;
|
||||
int32 PlayerConditionID;
|
||||
int8 FeatureTypeIndex;
|
||||
uint8 FeatureTypeIndex;
|
||||
int8 FeatureSubtypeIndex;
|
||||
int32 CurrencyID;
|
||||
};
|
||||
@@ -1813,6 +1824,26 @@ struct GlyphRequiredSpecEntry
|
||||
uint32 GlyphPropertiesID;
|
||||
};
|
||||
|
||||
struct GossipNPCOptionEntry
|
||||
{
|
||||
uint32 ID;
|
||||
int32 GossipNpcOption;
|
||||
int32 LFGDungeonsID;
|
||||
int32 TrainerID;
|
||||
int32 GarrFollowerTypeID;
|
||||
int32 CharShipmentID;
|
||||
int32 GarrTalentTreeID;
|
||||
int32 UiMapID;
|
||||
int32 UiItemInteractionID;
|
||||
int32 Unknown_1000_8;
|
||||
int32 Unknown_1000_9;
|
||||
int32 CovenantID;
|
||||
int32 GossipOptionID;
|
||||
int32 TraitTreeID;
|
||||
int32 ProfessionID;
|
||||
int32 Unknown_1002_14;
|
||||
};
|
||||
|
||||
struct GuildColorBackgroundEntry
|
||||
{
|
||||
uint32 ID;
|
||||
@@ -1917,6 +1948,7 @@ struct ItemEntry
|
||||
uint8 ItemGroupSoundsID;
|
||||
int32 ContentTuningID;
|
||||
int32 ModifiedCraftingReagentItemID;
|
||||
int32 CraftingQualityID;
|
||||
};
|
||||
|
||||
struct ItemAppearanceEntry
|
||||
@@ -1974,9 +2006,11 @@ struct ItemBonusEntry
|
||||
// int32 ItemBonusListGroupID;
|
||||
// int32 ItemBonusListID;
|
||||
// int32 ItemLevelSelectorID;
|
||||
// int32 OrderIndex;
|
||||
// int32 SequenceValue;
|
||||
// int32 ItemExtendedCostID;
|
||||
// int32 PlayerConditionID;
|
||||
// int32 Flags;
|
||||
// int32 ItemLogicalCostGroupID;
|
||||
//};
|
||||
|
||||
struct ItemBonusListLevelDeltaEntry
|
||||
@@ -2097,7 +2131,7 @@ struct ItemExtendedCostEntry
|
||||
int8 ArenaBracket; // arena slot restrictions (min slot value)
|
||||
uint8 Flags;
|
||||
uint8 MinFactionID;
|
||||
uint8 MinReputation;
|
||||
int32 MinReputation;
|
||||
uint8 RequiredAchievement; // required personal arena rating
|
||||
std::array<int32, MAX_ITEM_EXT_COST_ITEMS> ItemID; // required item id
|
||||
std::array<uint16, MAX_ITEM_EXT_COST_ITEMS> ItemCount; // required count of 1st item
|
||||
@@ -2187,7 +2221,7 @@ struct ItemSearchNameEntry
|
||||
uint8 OverallQualityID;
|
||||
int32 ExpansionID;
|
||||
uint16 MinFactionID;
|
||||
uint8 MinReputation;
|
||||
int32 MinReputation;
|
||||
int32 AllowableClass;
|
||||
int8 RequiredLevel;
|
||||
uint16 RequiredSkill;
|
||||
@@ -2240,6 +2274,7 @@ struct ItemSparseEntry
|
||||
std::array<int32, MAX_ITEM_PROTO_STATS> StatPercentEditor;
|
||||
int32 Stackable;
|
||||
int32 MaxCount;
|
||||
int32 MinReputation;
|
||||
uint32 RequiredAbility;
|
||||
uint32 SellPrice;
|
||||
uint32 BuyPrice;
|
||||
@@ -2279,7 +2314,6 @@ struct ItemSparseEntry
|
||||
uint8 DamageDamageType;
|
||||
std::array<int8, MAX_ITEM_PROTO_STATS> StatModifierBonusStat;
|
||||
uint8 ContainerSlots;
|
||||
uint8 MinReputation;
|
||||
uint8 RequiredPVPMedal;
|
||||
uint8 RequiredPVPRank;
|
||||
int8 RequiredLevel;
|
||||
@@ -2365,7 +2399,6 @@ struct JournalInstanceEntry
|
||||
int32 ButtonFileDataID;
|
||||
int32 ButtonSmallFileDataID;
|
||||
int32 LoreFileDataID;
|
||||
uint8 OrderIndex;
|
||||
int32 Flags;
|
||||
uint16 AreaID;
|
||||
};
|
||||
@@ -2525,6 +2558,7 @@ struct MapEntry
|
||||
int16 WindSettingsID;
|
||||
int32 ZmpFileDataID;
|
||||
int32 WdtFileDataID;
|
||||
int32 NavigationMaxDistance;
|
||||
std::array<int32, 3> Flags;
|
||||
|
||||
// Helpers
|
||||
@@ -2565,6 +2599,7 @@ struct MapEntry
|
||||
case 1642:
|
||||
case 1643:
|
||||
case 2222:
|
||||
case 2444:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -2574,7 +2609,7 @@ struct MapEntry
|
||||
bool IsDynamicDifficultyMap() const { return GetFlags().HasFlag(MapFlags::DynamicDifficulty); }
|
||||
bool IsFlexLocking() const { return GetFlags().HasFlag(MapFlags::FlexibleRaidLocking); }
|
||||
bool IsGarrison() const { return GetFlags().HasFlag(MapFlags::Garrison); }
|
||||
bool IsSplitByFaction() const { return ID == 609 || ID == 2175; }
|
||||
bool IsSplitByFaction() const { return ID == 609 || ID == 2175 || ID == 2570; }
|
||||
|
||||
EnumFlag<MapFlags> GetFlags() const { return static_cast<MapFlags>(Flags[0]); }
|
||||
EnumFlag<MapFlags2> GetFlags2() const { return static_cast<MapFlags2>(Flags[1]); }
|
||||
@@ -2680,6 +2715,7 @@ struct MountCapabilityEntry
|
||||
int32 ModSpellAuraID;
|
||||
int16 ReqMapID;
|
||||
int32 PlayerConditionID;
|
||||
int32 FlightCapabilityID;
|
||||
};
|
||||
|
||||
struct MountTypeXCapabilityEntry
|
||||
@@ -2835,6 +2871,7 @@ struct PlayerConditionEntry
|
||||
uint8 MaxPVPRank;
|
||||
int32 ContentTuningID;
|
||||
int32 CovenantID;
|
||||
uint32 TraitNodeEntryLogic;
|
||||
std::array<uint16, 4> SkillID;
|
||||
std::array<uint16, 4> MinSkill;
|
||||
std::array<uint16, 4> MaxSkill;
|
||||
@@ -2859,6 +2896,9 @@ struct PlayerConditionEntry
|
||||
std::array<uint32, 4> CurrencyCount;
|
||||
std::array<uint32, 6> QuestKillMonster;
|
||||
std::array<int32, 2> MovementFlags;
|
||||
std::array<int32, 4> TraitNodeEntryID;
|
||||
std::array<uint16, 4> TraitNodeEntryMinRank;
|
||||
std::array<uint16, 4> TraitNodeEntryMaxRank;
|
||||
};
|
||||
|
||||
struct PowerDisplayEntry
|
||||
@@ -2877,12 +2917,12 @@ struct PowerTypeEntry
|
||||
char const* CostGlobalStringTag;
|
||||
uint32 ID;
|
||||
int8 PowerTypeEnum;
|
||||
int8 MinPower;
|
||||
int16 MaxBasePower;
|
||||
int8 CenterPower;
|
||||
int8 DefaultPower;
|
||||
int8 DisplayModifier;
|
||||
int16 RegenInterruptTimeMS;
|
||||
int32 MinPower;
|
||||
int32 MaxBasePower;
|
||||
int32 CenterPower;
|
||||
int32 DefaultPower;
|
||||
int32 DisplayModifier;
|
||||
int32 RegenInterruptTimeMS;
|
||||
float RegenPeace;
|
||||
float RegenCombat;
|
||||
int16 Flags;
|
||||
@@ -2930,6 +2970,7 @@ struct PvpTalentEntry
|
||||
int32 ActionBarSpellID;
|
||||
int32 PvpTalentCategoryID;
|
||||
int32 LevelRequired;
|
||||
int32 PlayerConditionID;
|
||||
};
|
||||
|
||||
struct PvpTalentCategoryEntry
|
||||
@@ -2972,7 +3013,7 @@ struct QuestInfoEntry
|
||||
LocalizedString InfoName;
|
||||
int8 Type;
|
||||
int32 Modifiers;
|
||||
uint16 Profession;
|
||||
int32 Profession;
|
||||
};
|
||||
|
||||
struct QuestLineXQuestEntry
|
||||
@@ -3010,6 +3051,7 @@ struct QuestV2Entry
|
||||
{
|
||||
uint32 ID;
|
||||
uint16 UniqueBitFlag;
|
||||
int32 UiQuestDetailsTheme;
|
||||
};
|
||||
|
||||
struct QuestXPEntry
|
||||
@@ -3136,6 +3178,8 @@ struct SkillLineEntry
|
||||
int32 ParentTierIndex;
|
||||
uint16 Flags;
|
||||
int32 SpellBookSpellID;
|
||||
int32 ExpansionNameSharedStringID;
|
||||
int32 HordeExpansionNameSharedStringID;
|
||||
|
||||
EnumFlag<SkillLineFlags> GetFlags() const { return static_cast<SkillLineFlags>(Flags); }
|
||||
};
|
||||
@@ -3143,6 +3187,8 @@ struct SkillLineEntry
|
||||
struct SkillLineAbilityEntry
|
||||
{
|
||||
Trinity::RaceMask<int64> RaceMask;
|
||||
LocalizedString AbilityVerb;
|
||||
LocalizedString AbilityAllVerb;
|
||||
uint32 ID;
|
||||
int16 SkillLine;
|
||||
int32 Spell;
|
||||
@@ -3158,7 +3204,7 @@ struct SkillLineAbilityEntry
|
||||
int16 TradeSkillCategoryID;
|
||||
int16 SkillupSkillLineID;
|
||||
|
||||
EnumFlag<SkillLineAbilityFlags> GetFlags() const { return EnumFlag<SkillLineAbilityFlags>(static_cast<SkillLineAbilityFlags>(Flags)); }
|
||||
EnumFlag<SkillLineAbilityFlags> GetFlags() const { return static_cast<SkillLineAbilityFlags>(Flags); }
|
||||
};
|
||||
|
||||
struct SkillRaceClassInfoEntry
|
||||
@@ -3187,7 +3233,7 @@ struct SoundKitEntry
|
||||
uint32 ID;
|
||||
int32 SoundType;
|
||||
float VolumeFloat;
|
||||
uint16 Flags;
|
||||
int32 Flags;
|
||||
float MinDistance;
|
||||
float DistanceCutoff;
|
||||
uint8 EAXDef;
|
||||
@@ -3200,6 +3246,7 @@ struct SoundKitEntry
|
||||
float PitchAdjust;
|
||||
uint16 BusOverwriteID;
|
||||
uint8 MaxInstances;
|
||||
uint32 SoundMixGroupID;
|
||||
};
|
||||
|
||||
struct SpecializationSpellsEntry
|
||||
@@ -3235,15 +3282,19 @@ struct SpellAuraOptionsEntry
|
||||
struct SpellAuraRestrictionsEntry
|
||||
{
|
||||
uint32 ID;
|
||||
uint8 DifficultyID;
|
||||
uint8 CasterAuraState;
|
||||
uint8 TargetAuraState;
|
||||
uint8 ExcludeCasterAuraState;
|
||||
uint8 ExcludeTargetAuraState;
|
||||
int32 DifficultyID;
|
||||
int32 CasterAuraState;
|
||||
int32 TargetAuraState;
|
||||
int32 ExcludeCasterAuraState;
|
||||
int32 ExcludeTargetAuraState;
|
||||
int32 CasterAuraSpell;
|
||||
int32 TargetAuraSpell;
|
||||
int32 ExcludeCasterAuraSpell;
|
||||
int32 ExcludeTargetAuraSpell;
|
||||
int32 CasterAuraType;
|
||||
int32 TargetAuraType;
|
||||
int32 ExcludeCasterAuraType;
|
||||
int32 ExcludeTargetAuraType;
|
||||
uint32 SpellID;
|
||||
};
|
||||
|
||||
@@ -3260,7 +3311,7 @@ struct SpellCastingRequirementsEntry
|
||||
int32 SpellID;
|
||||
uint8 FacingCasterFlags;
|
||||
uint16 MinFactionID;
|
||||
int8 MinReputation;
|
||||
int32 MinReputation;
|
||||
uint16 RequiredAreasID;
|
||||
uint8 RequiredAuraVision;
|
||||
uint16 RequiresSpellFocus;
|
||||
@@ -3307,6 +3358,7 @@ struct SpellCooldownsEntry
|
||||
int32 CategoryRecoveryTime;
|
||||
int32 RecoveryTime;
|
||||
int32 StartRecoveryTime;
|
||||
int32 AuraSpellID;
|
||||
uint32 SpellID;
|
||||
};
|
||||
|
||||
@@ -3385,6 +3437,7 @@ struct SpellItemEnchantmentEntry
|
||||
uint32 ID;
|
||||
LocalizedString Name;
|
||||
LocalizedString HordeName;
|
||||
int32 Duration;
|
||||
std::array<uint32, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectArg;
|
||||
std::array<float, MAX_ITEM_ENCHANTMENT_EFFECTS> EffectScalingPoints;
|
||||
uint32 IconFileDataID;
|
||||
@@ -3484,6 +3537,7 @@ struct SpellPowerEntry
|
||||
int32 AltPowerBarID;
|
||||
float PowerCostPct;
|
||||
float PowerCostMaxPct;
|
||||
float OptionalCostPct;
|
||||
float PowerPctPerSecond;
|
||||
int8 PowerType;
|
||||
int32 RequiredAuraSpellID;
|
||||
@@ -3542,6 +3596,8 @@ struct SpellReagentsEntry
|
||||
int32 SpellID;
|
||||
std::array<int32, MAX_SPELL_REAGENTS> Reagent;
|
||||
std::array<int16, MAX_SPELL_REAGENTS> ReagentCount;
|
||||
std::array<int16, MAX_SPELL_REAGENTS> ReagentRecraftCount;
|
||||
std::array<uint8, MAX_SPELL_REAGENTS> ReagentSource;
|
||||
};
|
||||
|
||||
struct SpellReagentsCurrencyEntry
|
||||
@@ -3691,6 +3747,7 @@ struct SpellXSpellVisualEntry
|
||||
uint8 DifficultyID;
|
||||
uint32 SpellVisualID;
|
||||
float Probability;
|
||||
int32 Flags;
|
||||
int32 Priority;
|
||||
int32 SpellIconFileID;
|
||||
int32 ActiveIconFileID;
|
||||
@@ -3873,7 +3930,7 @@ struct UiMapEntry
|
||||
int32 AlternateUiMapGroup;
|
||||
int32 ContentTuningID;
|
||||
|
||||
EnumFlag<UiMapFlag> GetFlags() const { return EnumFlag<UiMapFlag>(static_cast<UiMapFlag>(Flags)); }
|
||||
EnumFlag<UiMapFlag> GetFlags() const { return static_cast<UiMapFlag>(Flags); }
|
||||
};
|
||||
|
||||
struct UiMapAssignmentEntry
|
||||
@@ -3898,6 +3955,7 @@ struct UiMapLinkEntry
|
||||
int32 ParentUiMapID;
|
||||
int32 OrderIndex;
|
||||
int32 ChildUiMapID;
|
||||
int32 PlayerConditionID;
|
||||
int32 OverrideHighlightFileDataID;
|
||||
int32 OverrideHighlightAtlasID;
|
||||
int32 Flags;
|
||||
|
||||
@@ -191,24 +191,25 @@ enum AzeriteTierUnlockSetFlags
|
||||
AZERITE_TIER_UNLOCK_SET_FLAG_DEFAULT = 0x1
|
||||
};
|
||||
|
||||
enum class BattlePetSpeciesFlags : uint16
|
||||
enum class BattlePetSpeciesFlags : int32
|
||||
{
|
||||
NoRename = 0x0001,
|
||||
WellKnown = 0x0002,
|
||||
NotAccountWide = 0x0004,
|
||||
Capturable = 0x0008,
|
||||
NotTradable = 0x0010,
|
||||
HideFromJournal = 0x0020,
|
||||
LegacyAccountUnique = 0x0040,
|
||||
CantBattle = 0x0080,
|
||||
HordeOnly = 0x0100,
|
||||
AllianceOnly = 0x0200,
|
||||
Boss = 0x0400,
|
||||
RandomDisplay = 0x0800,
|
||||
NoLicenseRequired = 0x1000,
|
||||
AddsAllowedWithBoss = 0x2000,
|
||||
HideUntilLearned = 0x4000,
|
||||
MatchPlayerHighPetLevel = 0x8000
|
||||
NoRename = 0x00001,
|
||||
WellKnown = 0x00002,
|
||||
NotAccountWide = 0x00004,
|
||||
Capturable = 0x00008,
|
||||
NotTradable = 0x00010,
|
||||
HideFromJournal = 0x00020,
|
||||
LegacyAccountUnique = 0x00040,
|
||||
CantBattle = 0x00080,
|
||||
HordeOnly = 0x00100,
|
||||
AllianceOnly = 0x00200,
|
||||
Boss = 0x00400,
|
||||
RandomDisplay = 0x00800,
|
||||
NoLicenseRequired = 0x01000,
|
||||
AddsAllowedWithBoss = 0x02000,
|
||||
HideUntilLearned = 0x04000,
|
||||
MatchPlayerHighPetLevel = 0x08000,
|
||||
NoWildPetAddsAllowed = 0x10000,
|
||||
};
|
||||
|
||||
DEFINE_ENUM_FLAG(BattlePetSpeciesFlags);
|
||||
@@ -607,6 +608,14 @@ enum class CriteriaType : uint8
|
||||
SpentTalentPoint = 231, /*NYI*/ // (Player) spent talent point
|
||||
|
||||
MythicPlusDisplaySeasonEnded = 234, /*NYI*/ // {DisplaySeason}
|
||||
|
||||
WinRatedSoloShuffleRound = 239, /*NYI*/
|
||||
ParticipateInRatedSoloShuffleRound = 240, /*NYI*/
|
||||
|
||||
ReputationAmountGained = 243, /*NYI*/ // Gain reputation amount with {FactionID}; accumulate, not highest
|
||||
|
||||
FulfillAnyCraftingOrder = 245, /*NYI*/
|
||||
FulfillCraftingOrderType = 246, /*NYI*/ // {CraftingOrderType}
|
||||
Count
|
||||
};
|
||||
|
||||
@@ -940,6 +949,20 @@ enum class ItemContext : uint8
|
||||
Raid_Heroic_Extended = 84,
|
||||
Raid_Mythic_Extended = 85,
|
||||
Character_Template_9_1 = 86,
|
||||
Challenge_Mode_4 = 87,
|
||||
Pvp_Ranked_9 = 88,
|
||||
Raid_Normal_Extended_2 = 89,
|
||||
Raid_Finder_Extended_2 = 90,
|
||||
Raid_Heroic_Extended_2 = 91,
|
||||
Raid_Mythic_Extended_2 = 92,
|
||||
Raid_Normal_Extended_3 = 93,
|
||||
Raid_Finder_Extended_3 = 94,
|
||||
Raid_Heroic_Extended_3 = 95,
|
||||
Raid_Mythic_Extended_3 = 96,
|
||||
Template_Character_1 = 97,
|
||||
Template_Character_2 = 98,
|
||||
Template_Character_3 = 99,
|
||||
Template_Character_4 = 100,
|
||||
|
||||
Max
|
||||
};
|
||||
@@ -1427,7 +1450,23 @@ enum class ModifierTreeType : int32
|
||||
|
||||
PlayerMythicPlusRatingInDisplaySeasonEqualOrGreaterThan = 329, /*NYI*/ // Player has Mythic+ Rating of at least "{#DungeonScore}" in {DisplaySeason}
|
||||
|
||||
MythicPlusRatingIsInTop01Percent = 334, // top 0.1% rating
|
||||
PlayerMythicPlusLadderRatingInDisplaySeasonEqualOrGreaterThan = 333, /*NYI*/ // Player has Mythic+ Ladder Rating of at least "{#DungeonScore}" in {DisplaySeason}
|
||||
MythicPlusRatingIsInTop01Percent = 334, /*NYI*/ // top 0.1% rating
|
||||
PlayerAuraWithLabelStackCountEqualOrGreaterThan = 335, // Player has at least {#Stacks} stacks of aura "{Label}"
|
||||
PlayerAuraWithLabelStackCountEqual = 336, // Target has exactly {#Stacks} stacks of aura with label "{Label}"
|
||||
PlayerAuraWithLabelStackCountEqualOrLessThan = 337, // Player has at most {#Stacks} stacks of aura "{Label}"
|
||||
PlayerIsInCrossFactionGroup = 338, // Player is in a cross faction group
|
||||
|
||||
PlayerHasTraitNodeEntryInActiveConfig = 340, // Player has {TraitNodeEntry} node in currently active config
|
||||
PlayerHasTraitNodeEntryInActiveConfigRankGreaterOrEqualThan = 341, // Player has at least {#Rank} for {TraitNodeEntry} node in currently active config
|
||||
PlayerHasPurchasedCombatTraitRanks = 342, /*NYI*/ // Player has purchased at least {#Count} talent points in active combat config
|
||||
PlayerHasPurchasedTraitRanksInTraitTree = 343, /*NYI*/ // Player has purchased at least {#Count} ranks in {#TraitTree}
|
||||
PlayerDaysSinceLogout = 344,
|
||||
|
||||
CraftingOrderSkillLineAbility = 347, /*NYI*/
|
||||
CraftingOrderProfession = 348, /*NYI*/ // ProfessionEnum
|
||||
|
||||
PlayerCanUseItem = 351, // Player can use item {#Item}
|
||||
};
|
||||
|
||||
enum class ModifierTreeOperator : int8
|
||||
@@ -1494,6 +1533,75 @@ enum class PlayerConditionLfgStatus : uint8
|
||||
GearDiff = 8
|
||||
};
|
||||
|
||||
enum class PlayerInteractionType : int32
|
||||
{
|
||||
None = 0,
|
||||
TradePartner = 1,
|
||||
Item = 2,
|
||||
Gossip = 3,
|
||||
QuestGiver = 4,
|
||||
Merchant = 5,
|
||||
TaxiNode = 6,
|
||||
Trainer = 7,
|
||||
Banker = 8,
|
||||
AlliedRaceDetailsGiver = 9,
|
||||
GuildBanker = 10,
|
||||
Registrar = 11,
|
||||
Vendor = 12,
|
||||
PetitionVendor = 13,
|
||||
TabardVendor = 14,
|
||||
TalentMaster = 15,
|
||||
SpecializationMaster = 16,
|
||||
MailInfo = 17,
|
||||
SpiritHealer = 18,
|
||||
AreaSpiritHealer = 19,
|
||||
Binder = 20,
|
||||
Auctioneer = 21,
|
||||
StableMaster = 22,
|
||||
BattleMaster = 23,
|
||||
Transmogrifier = 24,
|
||||
LFGDungeon = 25,
|
||||
VoidStorageBanker = 26,
|
||||
BlackMarketAuctioneer = 27,
|
||||
AdventureMap = 28,
|
||||
WorldMap = 29,
|
||||
GarrArchitect = 30,
|
||||
GarrTradeskill = 31,
|
||||
GarrMission = 32,
|
||||
ShipmentCrafter = 33,
|
||||
GarrRecruitment = 34,
|
||||
GarrTalent = 35,
|
||||
Trophy = 36,
|
||||
PlayerChoice = 37,
|
||||
ArtifactForge = 38,
|
||||
ObliterumForge = 39,
|
||||
ScrappingMachine = 40,
|
||||
ContributionCollector = 41,
|
||||
AzeriteRespec = 42,
|
||||
IslandQueue = 43,
|
||||
ItemInteraction = 44,
|
||||
ChromieTime = 45,
|
||||
CovenantPreview = 46,
|
||||
AnimaDiversion = 47,
|
||||
LegendaryCrafting = 48,
|
||||
WeeklyRewards = 49,
|
||||
Soulbind = 50,
|
||||
CovenantSanctum = 51,
|
||||
NewPlayerGuide = 52,
|
||||
ItemUpgrade = 53,
|
||||
AdventureJournal = 54,
|
||||
Renown = 55,
|
||||
AzeriteForge = 56,
|
||||
PerksProgramVendor = 57,
|
||||
ProfessionsCraftingOrder = 58,
|
||||
Professions = 59,
|
||||
ProfessionsCustomerOrder = 60,
|
||||
TraitSystem = 61,
|
||||
BarbersChoice = 62,
|
||||
JailersTowerBuffs = 63,
|
||||
MajorFactionRenown = 64
|
||||
};
|
||||
|
||||
enum PrestigeLevelInfoFlags : uint8
|
||||
{
|
||||
PRESTIGE_FLAG_DISABLED = 0x01 // Prestige levels with this flag won't be included to calculate max prestigelevel.
|
||||
@@ -1775,6 +1883,24 @@ enum TaxiPathNodeFlags
|
||||
TAXI_PATH_NODE_FLAG_STOP = 0x2
|
||||
};
|
||||
|
||||
enum class TraitCombatConfigFlags : int32
|
||||
{
|
||||
None = 0x0,
|
||||
ActiveForSpec = 0x1,
|
||||
StarterBuild = 0x2,
|
||||
SharedActionBars = 0x4
|
||||
};
|
||||
|
||||
DEFINE_ENUM_FLAG(TraitCombatConfigFlags);
|
||||
|
||||
enum class TraitConfigType : int32
|
||||
{
|
||||
Invalid = 0,
|
||||
Combat = 1,
|
||||
Profession = 2,
|
||||
Generic = 3
|
||||
};
|
||||
|
||||
enum class UiMapFlag : int32
|
||||
{
|
||||
None = 0,
|
||||
|
||||
@@ -54,6 +54,8 @@ struct GtBaseMPEntry
|
||||
float DeathKnight = 0.0f;
|
||||
float Monk = 0.0f;
|
||||
float DemonHunter = 0.0f;
|
||||
float Evoker = 0.0f;
|
||||
float Adventurer = 0.0f;
|
||||
};
|
||||
|
||||
struct GtBattlePetXPEntry
|
||||
@@ -135,6 +137,8 @@ struct GtSpellScalingEntry
|
||||
float DeathKnight = 0.0f;
|
||||
float Monk = 0.0f;
|
||||
float DemonHunter = 0.0f;
|
||||
float Evoker = 0.0f;
|
||||
float Adventurer = 0.0f;
|
||||
float Item = 0.0f;
|
||||
float Consumable = 0.0f;
|
||||
float Gem1 = 0.0f;
|
||||
@@ -143,6 +147,7 @@ struct GtSpellScalingEntry
|
||||
float Health = 0.0f;
|
||||
float DamageReplaceStat = 0.0f;
|
||||
float DamageSecondary = 0.0f;
|
||||
float ManaConsumable = 0.0f;
|
||||
};
|
||||
|
||||
struct GtStaminaMultByILvl
|
||||
@@ -227,6 +232,10 @@ inline float GetGameTableColumnForClass(T const* row, int32 class_)
|
||||
return row->Druid;
|
||||
case CLASS_DEMON_HUNTER:
|
||||
return row->DemonHunter;
|
||||
case CLASS_EVOKER:
|
||||
return row->Evoker;
|
||||
case CLASS_ADVENTURER:
|
||||
return row->Adventurer;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -262,6 +271,10 @@ inline float GetSpellScalingColumnForClass(GtSpellScalingEntry const* row, int32
|
||||
return row->Druid;
|
||||
case CLASS_DEMON_HUNTER:
|
||||
return row->DemonHunter;
|
||||
case CLASS_EVOKER:
|
||||
return row->Evoker;
|
||||
case CLASS_ADVENTURER:
|
||||
return row->Adventurer;
|
||||
case -1:
|
||||
case -7:
|
||||
return row->Item;
|
||||
@@ -279,6 +292,8 @@ inline float GetSpellScalingColumnForClass(GtSpellScalingEntry const* row, int32
|
||||
return row->DamageReplaceStat;
|
||||
case -9:
|
||||
return row->DamageSecondary;
|
||||
case -10:
|
||||
return row->ManaConsumable;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ void Corpse::SaveToDB()
|
||||
DeleteFromDB(trans);
|
||||
|
||||
std::ostringstream items;
|
||||
for (uint16 index = 0; index < EQUIPMENT_SLOT_END; ++index)
|
||||
for (size_t index = 0; index < m_corpseData->Items.size(); ++index)
|
||||
items << m_corpseData->Items[index] << ' ';
|
||||
|
||||
uint16 index = 0;
|
||||
@@ -194,8 +194,8 @@ bool Corpse::LoadCorpseFromDB(ObjectGuid::LowType guid, Field* fields)
|
||||
SetObjectScale(1.0f);
|
||||
SetDisplayId(fields[5].GetUInt32());
|
||||
std::vector<std::string_view> items = Trinity::Tokenize(fields[6].GetStringView(), ' ', false);
|
||||
if (items.size() == EQUIPMENT_SLOT_END)
|
||||
for (uint32 index = 0; index < EQUIPMENT_SLOT_END; ++index)
|
||||
if (items.size() == m_corpseData->Items.size())
|
||||
for (size_t index = 0; index < m_corpseData->Items.size(); ++index)
|
||||
SetItem(index, Trinity::StringTo<uint32>(items[index]).value_or(0));
|
||||
|
||||
SetRace(fields[7].GetUInt8());
|
||||
|
||||
@@ -38,53 +38,66 @@ GossipMenu::GossipMenu()
|
||||
_locale = DEFAULT_LOCALE;
|
||||
}
|
||||
|
||||
GossipMenu::~GossipMenu()
|
||||
{
|
||||
ClearMenu();
|
||||
}
|
||||
GossipMenu::~GossipMenu() = default;
|
||||
|
||||
uint32 GossipMenu::AddMenuItem(int32 menuItemId, GossipOptionNpc optionNpc, std::string const& message, uint32 sender, uint32 action, std::string const& boxMessage, uint32 boxMoney, bool coded /*= false*/)
|
||||
uint32 GossipMenu::AddMenuItem(int32 gossipOptionId, int32 orderIndex, GossipOptionNpc optionNpc, std::string optionText, uint32 language,
|
||||
GossipOptionFlags flags, Optional<int32> gossipNpcOptionId, bool boxCoded, uint32 boxMoney, std::string boxText, Optional<int32> spellId,
|
||||
Optional<int32> overrideIconId, uint32 sender, uint32 action)
|
||||
{
|
||||
ASSERT(_menuItems.size() <= GOSSIP_MAX_MENU_ITEMS);
|
||||
|
||||
// Find a free new id - script case
|
||||
if (menuItemId == -1)
|
||||
if (orderIndex == -1)
|
||||
{
|
||||
menuItemId = 0;
|
||||
orderIndex = 0;
|
||||
if (_menuId)
|
||||
{
|
||||
// set baseline menuItemId as higher than whatever exists in db
|
||||
// set baseline orderIndex as higher than whatever exists in db
|
||||
Trinity::IteratorPair bounds = sObjectMgr->GetGossipMenuItemsMapBounds(_menuId);
|
||||
auto itr = std::max_element(bounds.begin(), bounds.end(), [](GossipMenuItemsContainer::value_type const& a, GossipMenuItemsContainer::value_type const& b)
|
||||
{
|
||||
return a.second.OptionID < b.second.OptionID;
|
||||
return a.second.OrderIndex < b.second.OrderIndex;
|
||||
});
|
||||
if (itr != bounds.end())
|
||||
menuItemId = itr->second.OptionID + 1;
|
||||
orderIndex = itr->second.OrderIndex + 1;
|
||||
}
|
||||
|
||||
if (!_menuItems.empty())
|
||||
{
|
||||
for (GossipMenuItemContainer::const_iterator itr = _menuItems.begin(); itr != _menuItems.end(); ++itr)
|
||||
{
|
||||
if (int32(itr->first) > menuItemId)
|
||||
if (int32(itr->OrderIndex) > orderIndex)
|
||||
break;
|
||||
|
||||
menuItemId = itr->first + 1;
|
||||
orderIndex = itr->OrderIndex + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GossipMenuItem& menuItem = _menuItems[menuItemId];
|
||||
if (!gossipOptionId)
|
||||
gossipOptionId = -(int32(_menuId) * 100 + orderIndex);
|
||||
|
||||
menuItem.OptionNpc = optionNpc;
|
||||
menuItem.Message = message;
|
||||
menuItem.IsCoded = coded;
|
||||
menuItem.Sender = sender;
|
||||
menuItem.Action = action;
|
||||
menuItem.BoxMessage = boxMessage;
|
||||
menuItem.BoxMoney = boxMoney;
|
||||
return menuItemId;
|
||||
auto where = std::lower_bound(_menuItems.begin(), _menuItems.end(), orderIndex, [](GossipMenuItem const& item, int32 index)
|
||||
{
|
||||
return int32(item.OrderIndex) < index;
|
||||
});
|
||||
|
||||
GossipMenuItem& menuItem = *_menuItems.emplace(where);
|
||||
menuItem.GossipOptionID = gossipOptionId;
|
||||
menuItem.OrderIndex = orderIndex;
|
||||
menuItem.OptionNpc = optionNpc;
|
||||
menuItem.OptionText = std::move(optionText);
|
||||
menuItem.Language = language;
|
||||
menuItem.Flags = flags;
|
||||
menuItem.GossipNpcOptionID = gossipNpcOptionId;
|
||||
menuItem.BoxCoded = boxCoded;
|
||||
menuItem.BoxMoney = boxMoney;
|
||||
menuItem.BoxText = std::move(boxText);
|
||||
menuItem.SpellID = spellId;
|
||||
menuItem.OverrideIconID = overrideIconId;
|
||||
menuItem.Sender = sender;
|
||||
menuItem.Action = action;
|
||||
return orderIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,80 +116,117 @@ void GossipMenu::AddMenuItem(uint32 menuId, uint32 menuItemId, uint32 sender, ui
|
||||
/// Find the one with the given menu item id.
|
||||
auto itr = std::find_if(bounds.begin(), bounds.end(), [menuItemId](std::pair<uint32 const, GossipMenuItems> const& itemPair)
|
||||
{
|
||||
return itemPair.second.OptionID == menuItemId;
|
||||
return itemPair.second.OrderIndex == menuItemId;
|
||||
});
|
||||
|
||||
if (itr == bounds.end())
|
||||
return;
|
||||
|
||||
AddMenuItem(itr->second, sender, action);
|
||||
}
|
||||
|
||||
void GossipMenu::AddMenuItem(GossipMenuItems const& menuItem, uint32 sender, uint32 action)
|
||||
{
|
||||
/// Store texts for localization.
|
||||
std::string strOptionText, strBoxText;
|
||||
BroadcastTextEntry const* optionBroadcastText = sBroadcastTextStore.LookupEntry(itr->second.OptionBroadcastTextID);
|
||||
BroadcastTextEntry const* boxBroadcastText = sBroadcastTextStore.LookupEntry(itr->second.BoxBroadcastTextID);
|
||||
BroadcastTextEntry const* optionBroadcastText = sBroadcastTextStore.LookupEntry(menuItem.OptionBroadcastTextID);
|
||||
BroadcastTextEntry const* boxBroadcastText = sBroadcastTextStore.LookupEntry(menuItem.BoxBroadcastTextID);
|
||||
|
||||
/// OptionText
|
||||
if (optionBroadcastText)
|
||||
strOptionText = DB2Manager::GetBroadcastTextValue(optionBroadcastText, GetLocale());
|
||||
else
|
||||
strOptionText = itr->second.OptionText;
|
||||
{
|
||||
strOptionText = menuItem.OptionText;
|
||||
|
||||
/// Find localizations from database.
|
||||
if (GetLocale() != LOCALE_enUS)
|
||||
if (GossipMenuItemsLocale const* gossipMenuLocale = sObjectMgr->GetGossipMenuItemsLocale(menuItem.MenuID, menuItem.OrderIndex))
|
||||
ObjectMgr::GetLocaleString(gossipMenuLocale->OptionText, GetLocale(), strBoxText);
|
||||
}
|
||||
|
||||
/// BoxText
|
||||
if (boxBroadcastText)
|
||||
strBoxText = DB2Manager::GetBroadcastTextValue(boxBroadcastText, GetLocale());
|
||||
else
|
||||
strBoxText = itr->second.BoxText;
|
||||
|
||||
if (!boxBroadcastText)
|
||||
{
|
||||
strBoxText = menuItem.BoxText;
|
||||
|
||||
/// Find localizations from database.
|
||||
if (GossipMenuItemsLocale const* gossipMenuLocale = sObjectMgr->GetGossipMenuItemsLocale(menuId, menuItemId))
|
||||
ObjectMgr::GetLocaleString(gossipMenuLocale->BoxText, GetLocale(), strBoxText);
|
||||
if (GetLocale() != LOCALE_enUS)
|
||||
if (GossipMenuItemsLocale const* gossipMenuLocale = sObjectMgr->GetGossipMenuItemsLocale(menuItem.MenuID, menuItem.OrderIndex))
|
||||
ObjectMgr::GetLocaleString(gossipMenuLocale->BoxText, GetLocale(), strBoxText);
|
||||
}
|
||||
|
||||
/// Add menu item with existing method. Menu item id -1 is also used in ADD_GOSSIP_ITEM macro.
|
||||
AddMenuItem(itr->second.OptionID, itr->second.OptionNpc, strOptionText, sender, action, strBoxText, itr->second.BoxMoney, itr->second.BoxCoded);
|
||||
AddGossipMenuItemData(itr->second.OptionID, itr->second.ActionMenuID, itr->second.ActionPoiID);
|
||||
AddMenuItem(menuItem.GossipOptionID, menuItem.OrderIndex, menuItem.OptionNpc, std::move(strOptionText), menuItem.Language, menuItem.Flags,
|
||||
menuItem.GossipNpcOptionID, menuItem.BoxCoded, menuItem.BoxMoney, std::move(strBoxText), menuItem.SpellID, menuItem.OverrideIconID, sender, action);
|
||||
AddGossipMenuItemData(menuItem.OrderIndex, menuItem.ActionMenuID, menuItem.ActionPoiID);
|
||||
}
|
||||
|
||||
void GossipMenu::AddGossipMenuItemData(uint32 menuItemId, uint32 gossipActionMenuId, uint32 gossipActionPoi)
|
||||
{
|
||||
GossipMenuItemData& itemData = _menuItemData[menuItemId];
|
||||
GossipMenuItem& menuItem = _menuItems[menuItemId];
|
||||
|
||||
itemData.GossipActionMenuId = gossipActionMenuId;
|
||||
itemData.GossipActionPoi = gossipActionPoi;
|
||||
menuItem.ActionMenuID = gossipActionMenuId;
|
||||
menuItem.ActionPoiID = gossipActionPoi;
|
||||
}
|
||||
|
||||
uint32 GossipMenu::GetMenuItemSender(uint32 menuItemId) const
|
||||
GossipMenuItem const* GossipMenu::GetItem(int32 gossipOptionId) const
|
||||
{
|
||||
GossipMenuItemContainer::const_iterator itr = _menuItems.find(menuItemId);
|
||||
if (itr == _menuItems.end())
|
||||
return 0;
|
||||
auto itr = std::find_if(_menuItems.begin(), _menuItems.end(), [gossipOptionId](GossipMenuItem const& item)
|
||||
{
|
||||
return item.GossipOptionID == gossipOptionId;
|
||||
});
|
||||
|
||||
return itr->second.Sender;
|
||||
if (itr != _menuItems.end())
|
||||
return &*itr;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint32 GossipMenu::GetMenuItemAction(uint32 menuItemId) const
|
||||
GossipMenuItem const* GossipMenu::GetItemByIndex(uint32 orderIndex) const
|
||||
{
|
||||
GossipMenuItemContainer::const_iterator itr = _menuItems.find(menuItemId);
|
||||
if (itr == _menuItems.end())
|
||||
return 0;
|
||||
auto itr = std::find_if(_menuItems.begin(), _menuItems.end(), [orderIndex](GossipMenuItem const& item)
|
||||
{
|
||||
return item.OrderIndex == orderIndex;
|
||||
});
|
||||
|
||||
return itr->second.Action;
|
||||
if (itr != _menuItems.end())
|
||||
return &*itr;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool GossipMenu::IsMenuItemCoded(uint32 menuItemId) const
|
||||
uint32 GossipMenu::GetMenuItemSender(uint32 orderIndex) const
|
||||
{
|
||||
GossipMenuItemContainer::const_iterator itr = _menuItems.find(menuItemId);
|
||||
if (itr == _menuItems.end())
|
||||
return false;
|
||||
GossipMenuItem const* item = GetItemByIndex(orderIndex);
|
||||
if (item)
|
||||
return item->Sender;
|
||||
|
||||
return itr->second.IsCoded;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 GossipMenu::GetMenuItemAction(uint32 orderIndex) const
|
||||
{
|
||||
GossipMenuItem const* item = GetItemByIndex(orderIndex);
|
||||
if (item)
|
||||
return item->Action;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool GossipMenu::IsMenuItemCoded(uint32 orderIndex) const
|
||||
{
|
||||
GossipMenuItem const* item = GetItemByIndex(orderIndex);
|
||||
if (item)
|
||||
return item->BoxCoded;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void GossipMenu::ClearMenu()
|
||||
{
|
||||
_menuItems.clear();
|
||||
_menuItemData.clear();
|
||||
}
|
||||
|
||||
PlayerMenu::PlayerMenu(WorldSession* session) : _session(session)
|
||||
@@ -185,10 +235,7 @@ PlayerMenu::PlayerMenu(WorldSession* session) : _session(session)
|
||||
_gossipMenu.SetLocale(_session->GetSessionDbLocaleIndex());
|
||||
}
|
||||
|
||||
PlayerMenu::~PlayerMenu()
|
||||
{
|
||||
ClearMenus();
|
||||
}
|
||||
PlayerMenu::~PlayerMenu() = default;
|
||||
|
||||
void PlayerMenu::ClearMenus()
|
||||
{
|
||||
@@ -210,25 +257,26 @@ void PlayerMenu::SendGossipMenu(uint32 titleTextId, ObjectGuid objectGUID)
|
||||
if (NpcText const* text = sObjectMgr->GetNpcText(titleTextId))
|
||||
packet.TextID = Trinity::Containers::SelectRandomWeightedContainerElement(text->Data, [](NpcTextData const& data) { return data.Probability; })->BroadcastTextID;
|
||||
|
||||
packet.GossipOptions.resize(_gossipMenu.GetMenuItems().size());
|
||||
uint32 count = 0;
|
||||
for (GossipMenuItemContainer::const_iterator itr = _gossipMenu.GetMenuItems().begin(); itr != _gossipMenu.GetMenuItems().end(); ++itr)
|
||||
packet.GossipOptions.reserve(_gossipMenu.GetMenuItems().size());
|
||||
for (GossipMenuItem const& item : _gossipMenu.GetMenuItems())
|
||||
{
|
||||
WorldPackets::NPC::ClientGossipOptions& opt = packet.GossipOptions[count];
|
||||
GossipMenuItem const& item = itr->second;
|
||||
opt.ClientOption = itr->first;
|
||||
WorldPackets::NPC::ClientGossipOptions& opt = packet.GossipOptions.emplace_back();
|
||||
opt.GossipOptionID = item.GossipOptionID;
|
||||
opt.OptionNPC = item.OptionNpc;
|
||||
opt.OptionFlags = item.IsCoded; // makes pop up box password
|
||||
opt.OptionFlags = item.BoxCoded; // makes pop up box password
|
||||
opt.OptionCost = item.BoxMoney; // money required to open menu, 2.0.3
|
||||
opt.OptionLanguage = item.Language;
|
||||
opt.Text = item.Message; // text for gossip item
|
||||
opt.Confirm = item.BoxMessage; // accept text (related to money) pop up box, 2.0.3
|
||||
opt.Flags = item.Flags;
|
||||
opt.OrderIndex = item.OrderIndex;
|
||||
opt.Text = item.OptionText; // text for gossip item
|
||||
opt.Confirm = item.BoxText; // accept text (related to money) pop up box, 2.0.3
|
||||
opt.Status = GossipOptionStatus::Available;
|
||||
++count;
|
||||
opt.SpellID = item.SpellID;
|
||||
opt.OverrideIconID = item.OverrideIconID;
|
||||
}
|
||||
|
||||
packet.GossipText.resize(_questMenu.GetMenuItemCount());
|
||||
count = 0;
|
||||
uint32 count = 0;
|
||||
for (uint8 i = 0; i < _questMenu.GetMenuItemCount(); ++i)
|
||||
{
|
||||
QuestMenuItem const& item = _questMenu.GetItem(i);
|
||||
@@ -300,13 +348,10 @@ void PlayerMenu::SendPointOfInterest(uint32 id) const
|
||||
|
||||
QuestMenu::QuestMenu()
|
||||
{
|
||||
_questMenuItems.reserve(16); // can be set for max from most often sizes to speedup push_back and less memory use
|
||||
_questMenuItems.reserve(4); // can be set for max from most often sizes to speedup push_back and less memory use
|
||||
}
|
||||
|
||||
QuestMenu::~QuestMenu()
|
||||
{
|
||||
ClearMenu();
|
||||
}
|
||||
QuestMenu::~QuestMenu() = default;
|
||||
|
||||
void QuestMenu::AddMenuItem(uint32 QuestId, uint8 Icon)
|
||||
{
|
||||
@@ -408,6 +453,13 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGU
|
||||
packet.PortraitTurnInName = quest->GetPortraitTurnInName();
|
||||
|
||||
LocaleConstant localeConstant = _session->GetSessionDbLocaleIndex();
|
||||
std::transform(quest->GetConditionalQuestDescription().begin(), quest->GetConditionalQuestDescription().end(), std::back_inserter(packet.ConditionalDescriptionText), [localeConstant](QuestConditionalText const& text)
|
||||
{
|
||||
std::string_view content = text.Text[LOCALE_enUS];
|
||||
ObjectMgr::GetLocaleString(text.Text, localeConstant, content);
|
||||
return WorldPackets::Quest::ConditionalQuestText{ text.PlayerConditionId, text.QuestgiverCreatureId, content };
|
||||
});
|
||||
|
||||
if (localeConstant != LOCALE_enUS)
|
||||
{
|
||||
if (QuestTemplateLocale const* questTemplateLocale = sObjectMgr->GetQuestLocale(quest->GetQuestId()))
|
||||
@@ -435,6 +487,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGU
|
||||
packet.DisplayPopup = displayPopup;
|
||||
packet.QuestFlags[0] = quest->GetFlags() & (sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT) ? ~QUEST_FLAGS_AUTO_ACCEPT : ~0);
|
||||
packet.QuestFlags[1] = quest->GetFlagsEx();
|
||||
packet.QuestFlags[2] = quest->GetFlagsEx2();
|
||||
packet.SuggestedPartyMembers = quest->GetSuggestedPlayers();
|
||||
|
||||
// RewardSpell can teach multiple spells in trigger spell effects. But not all effects must be SPELL_EFFECT_LEARN_SPELL. See example spell 33950
|
||||
@@ -492,6 +545,13 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, ObjectGuid npcGUI
|
||||
packet.PortraitTurnInName = quest->GetPortraitTurnInName();
|
||||
|
||||
LocaleConstant locale = _session->GetSessionDbLocaleIndex();
|
||||
std::transform(quest->GetConditionalOfferRewardText().begin(), quest->GetConditionalOfferRewardText().end(), std::back_inserter(packet.ConditionalRewardText), [locale](QuestConditionalText const& text)
|
||||
{
|
||||
std::string_view content = text.Text[LOCALE_enUS];
|
||||
ObjectMgr::GetLocaleString(text.Text, locale, content);
|
||||
return WorldPackets::Quest::ConditionalQuestText{ text.PlayerConditionId, text.QuestgiverCreatureId, content };
|
||||
});
|
||||
|
||||
if (locale != LOCALE_enUS)
|
||||
{
|
||||
if (QuestTemplateLocale const* questTemplateLocale = sObjectMgr->GetQuestLocale(quest->GetQuestId()))
|
||||
@@ -514,7 +574,10 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, ObjectGuid npcGUI
|
||||
|
||||
// Is there a better way? what about game objects?
|
||||
if (Creature const* creature = ObjectAccessor::GetCreature(*_session->GetPlayer(), npcGUID))
|
||||
{
|
||||
packet.QuestGiverCreatureID = creature->GetEntry();
|
||||
offer.QuestGiverCreatureID = creature->GetCreatureTemplate()->Entry;
|
||||
}
|
||||
|
||||
offer.QuestID = quest->GetQuestId();
|
||||
offer.AutoLaunched = autoLaunched;
|
||||
@@ -525,6 +588,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, ObjectGuid npcGUI
|
||||
|
||||
offer.QuestFlags[0] = quest->GetFlags();
|
||||
offer.QuestFlags[1] = quest->GetFlagsEx();
|
||||
offer.QuestFlags[2] = quest->GetFlagsEx2();
|
||||
|
||||
packet.PortraitTurnIn = quest->GetQuestTurnInPortrait();
|
||||
packet.PortraitGiver = quest->GetQuestGiverPortrait();
|
||||
@@ -553,6 +617,13 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const* quest, ObjectGuid npcGU
|
||||
packet.CompletionText = quest->GetRequestItemsText();
|
||||
|
||||
LocaleConstant locale = _session->GetSessionDbLocaleIndex();
|
||||
std::transform(quest->GetConditionalRequestItemsText().begin(), quest->GetConditionalRequestItemsText().end(), std::back_inserter(packet.ConditionalCompletionText), [locale](QuestConditionalText const& text)
|
||||
{
|
||||
std::string_view content = text.Text[LOCALE_enUS];
|
||||
ObjectMgr::GetLocaleString(text.Text, locale, content);
|
||||
return WorldPackets::Quest::ConditionalQuestText{ text.PlayerConditionId, text.QuestgiverCreatureId, content };
|
||||
});
|
||||
|
||||
if (locale != LOCALE_enUS)
|
||||
{
|
||||
if (QuestTemplateLocale const* questTemplateLocale = sObjectMgr->GetQuestLocale(quest->GetQuestId()))
|
||||
@@ -583,6 +654,7 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const* quest, ObjectGuid npcGU
|
||||
|
||||
packet.QuestFlags[0] = quest->GetFlags();
|
||||
packet.QuestFlags[1] = quest->GetFlagsEx();
|
||||
packet.QuestFlags[2] = quest->GetFlagsEx2();
|
||||
packet.SuggestPartyMembers = quest->GetSuggestedPlayers();
|
||||
|
||||
// incomplete: FD
|
||||
|
||||
@@ -20,11 +20,12 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include <map>
|
||||
#include "Optional.h"
|
||||
|
||||
class Object;
|
||||
class Quest;
|
||||
class WorldSession;
|
||||
struct GossipMenuItems;
|
||||
enum class QuestGiverStatus : uint32;
|
||||
|
||||
#define GOSSIP_MAX_MENU_ITEMS 32
|
||||
@@ -34,24 +35,24 @@ enum class GossipOptionNpc : uint8
|
||||
{
|
||||
None = 0, // White chat bubble. Default
|
||||
Vendor = 1, // Brown bag
|
||||
TaxiNode = 2, // White wing
|
||||
Taxinode = 2, // White wing
|
||||
Trainer = 3, // Brown book
|
||||
SpiritHealer = 4, // Golden interaction wheel (with red center)
|
||||
Binder = 5, // Golden interaction wheel
|
||||
Banker = 6, // Brown bag (with gold coin in lower corner)
|
||||
PetitionVendor = 7, // White chat bubble (with "..." inside)
|
||||
TabardVendor = 8, // White tabard
|
||||
BattleMaster = 9, // Two crossed swords
|
||||
Battlemaster = 9, // Two crossed swords
|
||||
Auctioneer = 10, // Stack of gold coins
|
||||
TalentMaster = 11, // White chat bubble
|
||||
StableMaster = 12, // White chat bubble
|
||||
Stablemaster = 12, // White chat bubble
|
||||
PetSpecializationMaster = 13, /*DEPRECATED*/ // White chat bubble
|
||||
GuildBanker = 14, /*NYI*/ // White chat bubble
|
||||
SpellClick = 15, /*NYI*/ // White chat bubble
|
||||
GuildBanker = 14, // White chat bubble
|
||||
Spellclick = 15, // White chat bubble
|
||||
DisableXPGain = 16, // White chat bubble
|
||||
EnableXPGain = 17, // White chat bubble
|
||||
Mailbox = 18, // White chat bubble
|
||||
WorldPVPQueue = 19, /*NYI*/ // White chat bubble
|
||||
WorldPvPQueue = 19, /*NYI*/ // White chat bubble
|
||||
LFGDungeon = 20, /*NYI*/ // White chat bubble
|
||||
ArtifactRespec = 21, /*NYI*/ // White chat bubble
|
||||
CemeterySelect = 22, /*DEPRECATED*/ // White chat bubble
|
||||
@@ -59,25 +60,33 @@ enum class GossipOptionNpc : uint8
|
||||
GlyphMaster = 24, /*DEPRECATED*/ // White chat bubble
|
||||
QueueScenario = 25, /*NYI*/ // White chat bubble
|
||||
GarrisonArchitect = 26, /*NYI*/ // White chat bubble
|
||||
GarrisonMission = 27, /*NYI*/ // White chat bubble
|
||||
GarrisonMissionNpc = 27, /*NYI*/ // White chat bubble
|
||||
ShipmentCrafter = 28, /*NYI*/ // Brown document
|
||||
GarrisonTradeskill = 29, /*NYI*/ // White chat bubble
|
||||
GarrisonTradeskillNpc = 29, /*NYI*/ // White chat bubble
|
||||
GarrisonRecruitment = 30, /*NYI*/ // White chat bubble
|
||||
AdventureMap = 31, /*NYI*/ // White chat bubble
|
||||
GarrisonTalent = 32, // White chat bubble
|
||||
ContributionCollector = 33, /*NYI*/ // White chat bubble
|
||||
Transmogrify = 34, // Purple helm
|
||||
AzeriteRespec = 35, // White chat bubble
|
||||
IslandsMission = 36, /*NYI*/ // White chat bubble
|
||||
IslandsMissionNpc = 36, /*NYI*/ // White chat bubble
|
||||
UIItemInteraction = 37, /*NYI*/ // White chat bubble
|
||||
WorldMap = 38, /*NYI*/ // White chat bubble
|
||||
Soulbind = 39, /*NYI*/ // White chat bubble
|
||||
ChromieTime = 40, /*NYI*/ // White chat bubble
|
||||
CovenantPreview = 41, /*NYI*/ // White chat bubble
|
||||
ChromieTimeNpc = 40, /*NYI*/ // White chat bubble
|
||||
CovenantPreviewNpc = 41, /*NYI*/ // White chat bubble
|
||||
RuneforgeLegendaryCrafting = 42, /*NYI*/ // White chat bubble
|
||||
NewPlayerGuide = 43, /*NYI*/ // White chat bubble
|
||||
RuneforgeLegendaryUpgrade = 44, /*NYI*/ // White chat bubble
|
||||
CovenantRenown = 45, /*NYI*/ // White chat bubble
|
||||
CovenantRenownNpc = 45, /*NYI*/ // White chat bubble
|
||||
BlackMarketAuctionHouse = 46,
|
||||
PerksProgramVendor = 47,
|
||||
ProfessionsCraftingOrder = 48,
|
||||
ProfessionsOpen = 49,
|
||||
ProfessionsCustomerOrder = 50,
|
||||
TraitSystem = 51,
|
||||
BarbersChoice = 52,
|
||||
MajorFactionRenown = 53,
|
||||
|
||||
Count
|
||||
};
|
||||
@@ -96,29 +105,38 @@ enum class GossipOptionRewardType : uint8
|
||||
Currency = 1
|
||||
};
|
||||
|
||||
enum class GossipOptionFlags : int32
|
||||
{
|
||||
None = 0x0,
|
||||
QuestLabelPrepend = 0x1
|
||||
};
|
||||
|
||||
struct GossipMenuItem
|
||||
{
|
||||
GossipOptionNpc OptionNpc;
|
||||
bool IsCoded;
|
||||
std::string Message;
|
||||
uint32 Sender;
|
||||
uint32 Action;
|
||||
std::string BoxMessage;
|
||||
uint32 BoxMoney;
|
||||
uint32 Language;
|
||||
int32 GossipOptionID;
|
||||
uint32 OrderIndex;
|
||||
GossipOptionNpc OptionNpc;
|
||||
std::string OptionText;
|
||||
uint32 Language;
|
||||
GossipOptionFlags Flags;
|
||||
Optional<int32> GossipNpcOptionID;
|
||||
bool BoxCoded;
|
||||
uint32 BoxMoney;
|
||||
std::string BoxText;
|
||||
Optional<int32> SpellID;
|
||||
Optional<int32> OverrideIconID;
|
||||
|
||||
// action data
|
||||
uint32 ActionMenuID;
|
||||
uint32 ActionPoiID;
|
||||
|
||||
// additional scripting identifiers
|
||||
uint32 Sender;
|
||||
uint32 Action;
|
||||
};
|
||||
|
||||
// need an ordered container
|
||||
typedef std::map<uint32, GossipMenuItem> GossipMenuItemContainer;
|
||||
|
||||
struct GossipMenuItemData
|
||||
{
|
||||
uint32 GossipActionMenuId; // MenuId of the gossip triggered by this action
|
||||
uint32 GossipActionPoi;
|
||||
};
|
||||
|
||||
// need an ordered container
|
||||
typedef std::map<uint32, GossipMenuItemData> GossipMenuItemDataContainer;
|
||||
typedef std::vector<GossipMenuItem> GossipMenuItemContainer;
|
||||
|
||||
struct QuestMenuItem
|
||||
{
|
||||
@@ -132,10 +150,17 @@ class TC_GAME_API GossipMenu
|
||||
{
|
||||
public:
|
||||
GossipMenu();
|
||||
GossipMenu(GossipMenu const&) = delete;
|
||||
GossipMenu(GossipMenu&&) = delete;
|
||||
GossipMenu& operator=(GossipMenu const&) = delete;
|
||||
GossipMenu& operator=(GossipMenu&&) = delete;
|
||||
~GossipMenu();
|
||||
|
||||
uint32 AddMenuItem(int32 menuItemId, GossipOptionNpc optionNpc, std::string const& message, uint32 sender, uint32 action, std::string const& boxMessage, uint32 boxMoney, bool coded = false);
|
||||
uint32 AddMenuItem(int32 gossipOptionId, int32 orderIndex, GossipOptionNpc optionNpc, std::string optionText, uint32 language, GossipOptionFlags flags,
|
||||
Optional<int32> gossipNpcOptionId, bool boxCoded, uint32 boxMoney, std::string boxText, Optional<int32> spellId,
|
||||
Optional<int32> overrideIconId, uint32 sender, uint32 action);
|
||||
void AddMenuItem(uint32 menuId, uint32 menuItemId, uint32 sender, uint32 action);
|
||||
void AddMenuItem(GossipMenuItems const& menuItem, uint32 sender, uint32 action);
|
||||
|
||||
void SetMenuId(uint32 menu_id) { _menuId = menu_id; }
|
||||
uint32 GetMenuId() const { return _menuId; }
|
||||
@@ -154,27 +179,12 @@ class TC_GAME_API GossipMenu
|
||||
return _menuItems.empty();
|
||||
}
|
||||
|
||||
GossipMenuItem const* GetItem(uint32 id) const
|
||||
{
|
||||
GossipMenuItemContainer::const_iterator itr = _menuItems.find(id);
|
||||
if (itr != _menuItems.end())
|
||||
return &itr->second;
|
||||
GossipMenuItem const* GetItem(int32 gossipOptionId) const;
|
||||
GossipMenuItem const* GetItemByIndex(uint32 orderIndex) const;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GossipMenuItemData const* GetItemData(uint32 indexId) const
|
||||
{
|
||||
GossipMenuItemDataContainer::const_iterator itr = _menuItemData.find(indexId);
|
||||
if (itr != _menuItemData.end())
|
||||
return &itr->second;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint32 GetMenuItemSender(uint32 menuItemId) const;
|
||||
uint32 GetMenuItemAction(uint32 menuItemId) const;
|
||||
bool IsMenuItemCoded(uint32 menuItemId) const;
|
||||
uint32 GetMenuItemSender(uint32 orderIndex) const;
|
||||
uint32 GetMenuItemAction(uint32 orderIndex) const;
|
||||
bool IsMenuItemCoded(uint32 orderIndex) const;
|
||||
|
||||
void ClearMenu();
|
||||
|
||||
@@ -185,7 +195,6 @@ class TC_GAME_API GossipMenu
|
||||
|
||||
private:
|
||||
GossipMenuItemContainer _menuItems;
|
||||
GossipMenuItemDataContainer _menuItemData;
|
||||
uint32 _menuId;
|
||||
LocaleConstant _locale;
|
||||
};
|
||||
@@ -194,6 +203,10 @@ class TC_GAME_API QuestMenu
|
||||
{
|
||||
public:
|
||||
QuestMenu();
|
||||
QuestMenu(QuestMenu const&) = delete;
|
||||
QuestMenu(QuestMenu&&) = delete;
|
||||
QuestMenu& operator=(QuestMenu const&) = delete;
|
||||
QuestMenu& operator=(QuestMenu&&) = delete;
|
||||
~QuestMenu();
|
||||
|
||||
void AddMenuItem(uint32 QuestId, uint8 Icon);
|
||||
@@ -210,8 +223,6 @@ class TC_GAME_API QuestMenu
|
||||
class InteractionData
|
||||
{
|
||||
public:
|
||||
InteractionData() { Reset(); }
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SourceGuid.Clear();
|
||||
@@ -220,14 +231,18 @@ class InteractionData
|
||||
}
|
||||
|
||||
ObjectGuid SourceGuid;
|
||||
uint32 TrainerId;
|
||||
uint32 PlayerChoiceId;
|
||||
uint32 TrainerId = 0;
|
||||
uint32 PlayerChoiceId = 0;
|
||||
};
|
||||
|
||||
class TC_GAME_API PlayerMenu
|
||||
{
|
||||
public:
|
||||
explicit PlayerMenu(WorldSession* session);
|
||||
PlayerMenu(PlayerMenu const&) = delete;
|
||||
PlayerMenu(PlayerMenu&&) = delete;
|
||||
PlayerMenu& operator=(PlayerMenu const&) = delete;
|
||||
PlayerMenu& operator=(PlayerMenu&&) = delete;
|
||||
~PlayerMenu();
|
||||
|
||||
GossipMenu& GetGossipMenu() { return _gossipMenu; }
|
||||
|
||||
@@ -2927,8 +2927,9 @@ void GameObject::Use(Unit* user)
|
||||
if (!item)
|
||||
return;
|
||||
|
||||
WorldPackets::Azerite::OpenHeartForge openHeartForge;
|
||||
openHeartForge.ForgeGUID = GetGUID();
|
||||
WorldPackets::GameObject::GameObjectInteraction openHeartForge;
|
||||
openHeartForge.ObjectGUID = GetGUID();
|
||||
openHeartForge.InteractionType = PlayerInteractionType::AzeriteForge;
|
||||
player->SendDirectMessage(openHeartForge.Write());
|
||||
break;
|
||||
}
|
||||
@@ -2943,9 +2944,25 @@ void GameObject::Use(Unit* user)
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
WorldPackets::GameObject::GameObjectUILink gameObjectUILink;
|
||||
WorldPackets::GameObject::GameObjectInteraction gameObjectUILink;
|
||||
gameObjectUILink.ObjectGUID = GetGUID();
|
||||
gameObjectUILink.UILink = GetGOInfo()->UILink.UILinkType;
|
||||
switch (GetGOInfo()->UILink.UILinkType)
|
||||
{
|
||||
case 0:
|
||||
gameObjectUILink.InteractionType = PlayerInteractionType::AdventureJournal;
|
||||
break;
|
||||
case 1:
|
||||
gameObjectUILink.InteractionType = PlayerInteractionType::ObliterumForge;
|
||||
break;
|
||||
case 2:
|
||||
gameObjectUILink.InteractionType = PlayerInteractionType::ScrappingMachine;
|
||||
break;
|
||||
case 3:
|
||||
gameObjectUILink.InteractionType = PlayerInteractionType::ItemInteraction;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
player->SendDirectMessage(gameObjectUILink.Write());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ struct GameObjectTemplate
|
||||
int32 ContentTuningId;
|
||||
union
|
||||
{
|
||||
// 0 GAMEOBJECT_TYPE_DOOR
|
||||
// 0 GAMEOBJECT_TYPE_DOOR
|
||||
struct
|
||||
{
|
||||
uint32 startOpen; // 0 startOpen, enum { false, true, }; Default: false
|
||||
@@ -56,6 +56,7 @@ struct GameObjectTemplate
|
||||
uint32 InfiniteAOI; // 10 Infinite AOI, enum { false, true, }; Default: false
|
||||
uint32 NotLOSBlocking; // 11 Not LOS Blocking, enum { false, true, }; Default: false
|
||||
uint32 InteractRadiusOverride; // 12 Interact Radius Override (in hundredths), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Collisionupdatedelayafteropen; // 13 Collision update delay(ms) after open, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
} door;
|
||||
// 1 GAMEOBJECT_TYPE_BUTTON
|
||||
struct
|
||||
@@ -196,6 +197,13 @@ struct GameObjectTemplate
|
||||
uint32 floatOnWater; // 7 floatOnWater, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 8 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 InteractRadiusOverride; // 9 Interact Radius Override (in hundredths), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 gossipID; // 10 gossipID, References: Gossip, NoValue = 0
|
||||
uint32 spellFocusType2; // 11 spellFocusType 2, References: SpellFocusObject, NoValue = 0
|
||||
uint32 spellFocusType3; // 12 spellFocusType 3, References: SpellFocusObject, NoValue = 0
|
||||
uint32 spellFocusType4; // 13 spellFocusType 4, References: SpellFocusObject, NoValue = 0
|
||||
uint32 Profession; // 14 Profession, enum { First Aid, Blacksmithing, Leatherworking, Alchemy, Herbalism, Cooking, Mining, Tailoring, Engineering, Enchanting, Fishing, Skinning, Jewelcrafting, Inscription, Archaeology, }; Default: Blacksmithing
|
||||
uint32 Profession2; // 15 Profession 2, enum { First Aid, Blacksmithing, Leatherworking, Alchemy, Herbalism, Cooking, Mining, Tailoring, Engineering, Enchanting, Fishing, Skinning, Jewelcrafting, Inscription, Archaeology, }; Default: Blacksmithing
|
||||
uint32 Profession3; // 16 Profession 3, enum { First Aid, Blacksmithing, Leatherworking, Alchemy, Herbalism, Cooking, Mining, Tailoring, Engineering, Enchanting, Fishing, Skinning, Jewelcrafting, Inscription, Archaeology, }; Default: Blacksmithing
|
||||
} spellFocus;
|
||||
// 9 GAMEOBJECT_TYPE_TEXT
|
||||
struct
|
||||
@@ -483,7 +491,7 @@ struct GameObjectTemplate
|
||||
// 31 GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY
|
||||
struct
|
||||
{
|
||||
uint32 InstanceType; // 0 Instance Type, enum { Not Instanced, Party Dungeon, Raid Dungeon, PVP Battlefield, Arena Battlefield, Scenario, }; Default: Party Dungeon
|
||||
uint32 InstanceType; // 0 Instance Type, enum { Not Instanced, Party Dungeon, Raid Dungeon, PVP Battlefield, Arena Battlefield, Scenario, WoWLabs, }; Default: Party Dungeon
|
||||
uint32 DifficultyNormal; // 1 Difficulty Normal, References: animationdata, NoValue = 0
|
||||
uint32 DifficultyHeroic; // 2 Difficulty Heroic, References: animationdata, NoValue = 0
|
||||
uint32 DifficultyEpic; // 3 Difficulty Epic, References: animationdata, NoValue = 0
|
||||
@@ -503,6 +511,7 @@ struct GameObjectTemplate
|
||||
int32 HeightOffset; // 1 Height Offset (inches), int, Min value: -100, Max value: 100, Default value: 0
|
||||
uint32 SitAnimKit; // 2 Sit Anim Kit, References: AnimKit, NoValue = 0
|
||||
uint32 InteractRadiusOverride; // 3 Interact Radius Override (in hundredths), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 CustomizationScope; // 4 Customization Scope, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
} barberChair;
|
||||
// 33 GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
|
||||
struct
|
||||
@@ -794,6 +803,7 @@ struct GameObjectTemplate
|
||||
uint32 WhenAvailable; // 0 When Available, References: GameObjectDisplayInfo, NoValue = 0
|
||||
uint32 open; // 1 open, References: Lock_, NoValue = 0
|
||||
uint32 InteractRadiusOverride; // 2 Interact Radius Override (in hundredths), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 ExpansionLevel; // 3 Expansion Level, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
} weeklyRewardChest;
|
||||
// 60 GAMEOBJECT_TYPE_CLIENT_MODEL
|
||||
struct
|
||||
@@ -803,6 +813,11 @@ struct GameObjectTemplate
|
||||
uint32 InfiniteAOI; // 2 Infinite AOI, enum { false, true, }; Default: false
|
||||
uint32 TrueInfiniteAOI; // 3 True Infinite AOI (programmer only!), enum { false, true, }; Default: false
|
||||
} clientModel;
|
||||
// 61 GAMEOBJECT_TYPE_CRAFTING_TABLE
|
||||
struct
|
||||
{
|
||||
uint32 Profession; // 0 Profession, enum { First Aid, Blacksmithing, Leatherworking, Alchemy, Herbalism, Cooking, Mining, Tailoring, Engineering, Enchanting, Fishing, Skinning, Jewelcrafting, Inscription, Archaeology, }; Default: Blacksmithing
|
||||
} craftingTable;
|
||||
struct
|
||||
{
|
||||
uint32 data[MAX_GAMEOBJECT_DATA];
|
||||
|
||||
@@ -142,7 +142,7 @@ void AzeriteEmpoweredItem::ClearSelectedAzeritePowers()
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&AzeriteEmpoweredItem::m_azeriteEmpoweredItemData).ModifyValue(&UF::AzeriteEmpoweredItemData::Selections, i), 0);
|
||||
|
||||
_bonusData.Initialize(GetTemplate());
|
||||
for (int32 bonusListID : *m_itemData->BonusListIDs)
|
||||
for (int32 bonusListID : GetBonusListIDs())
|
||||
_bonusData.AddBonusList(bonusListID);
|
||||
}
|
||||
|
||||
|
||||
@@ -256,6 +256,8 @@ bool ItemCanGoIntoBag(ItemTemplate const* pProto, ItemTemplate const* pBagProto)
|
||||
if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_COOKING_SUPP))
|
||||
return false;
|
||||
return true;
|
||||
case ITEM_SUBCLASS_REAGENT_CONTAINER:
|
||||
return pProto->IsCraftingReagent();
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -610,7 +612,7 @@ void Item::SaveToDB(CharacterDatabaseTransaction trans)
|
||||
stmt->setUInt8(++index, uint8(m_itemData->Context));
|
||||
|
||||
std::ostringstream bonusListIDs;
|
||||
for (int32 bonusListID : *m_itemData->BonusListIDs)
|
||||
for (int32 bonusListID : GetBonusListIDs())
|
||||
bonusListIDs << bonusListID << ' ';
|
||||
stmt->setString(++index, bonusListIDs.str());
|
||||
|
||||
@@ -1240,7 +1242,8 @@ uint8 Item::GetBagSlot() const
|
||||
|
||||
bool Item::IsEquipped() const
|
||||
{
|
||||
return !IsInBag() && m_slot < EQUIPMENT_SLOT_END;
|
||||
return !IsInBag() && ((m_slot >= EQUIPMENT_SLOT_START && m_slot < EQUIPMENT_SLOT_END)
|
||||
|| (m_slot >= PROFESSION_SLOT_START && m_slot < PROFESSION_SLOT_END));
|
||||
}
|
||||
|
||||
bool Item::CanBeTraded(bool mail, bool trade) const
|
||||
@@ -2043,6 +2046,12 @@ int32 const ItemTransmogrificationSlots[MAX_INVTYPE] =
|
||||
EQUIPMENT_SLOT_MAINHAND, // INVTYPE_RANGEDRIGHT
|
||||
-1, // INVTYPE_QUIVER
|
||||
-1 // INVTYPE_RELIC
|
||||
-1, // INVTYPE_PROFESSION_TOOL
|
||||
-1, // INVTYPE_PROFESSION_GEAR
|
||||
-1, // INVTYPE_EQUIPABLE_SPELL_OFFENSIVE
|
||||
-1, // INVTYPE_EQUIPABLE_SPELL_UTILITY
|
||||
-1, // INVTYPE_EQUIPABLE_SPELL_DEFENSIVE
|
||||
-1 // INVTYPE_EQUIPABLE_SPELL_MOBILITY
|
||||
};
|
||||
|
||||
bool Item::CanTransmogrifyItemWithItem(Item const* item, ItemModifiedAppearanceEntry const* itemModifiedAppearance)
|
||||
@@ -2501,14 +2510,16 @@ uint16 Item::GetVisibleItemVisual(Player const* owner) const
|
||||
|
||||
void Item::AddBonuses(uint32 bonusListID)
|
||||
{
|
||||
if (std::find(m_itemData->BonusListIDs->begin(), m_itemData->BonusListIDs->end(), int32(bonusListID)) != m_itemData->BonusListIDs->end())
|
||||
if (std::find(GetBonusListIDs().begin(), GetBonusListIDs().end(), int32(bonusListID)) != GetBonusListIDs().end())
|
||||
return;
|
||||
|
||||
if (DB2Manager::ItemBonusList const* bonuses = sDB2Manager.GetItemBonusList(bonusListID))
|
||||
{
|
||||
std::vector<int32> bonusListIDs = m_itemData->BonusListIDs;
|
||||
bonusListIDs.push_back(bonusListID);
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::BonusListIDs), std::move(bonusListIDs));
|
||||
WorldPackets::Item::ItemBonusKey itemBonusKey;
|
||||
itemBonusKey.ItemID = GetEntry();
|
||||
itemBonusKey.BonusListIDs = GetBonusListIDs();
|
||||
itemBonusKey.BonusListIDs.push_back(bonusListID);
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::ItemBonusKey), std::move(itemBonusKey));
|
||||
for (ItemBonusEntry const* bonus : *bonuses)
|
||||
_bonusData.AddBonus(bonus->Type, bonus->Value);
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::ItemAppearanceModID), _bonusData.AppearanceModID);
|
||||
@@ -2517,9 +2528,12 @@ void Item::AddBonuses(uint32 bonusListID)
|
||||
|
||||
void Item::SetBonuses(std::vector<int32> bonusListIDs)
|
||||
{
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::BonusListIDs), std::move(bonusListIDs));
|
||||
WorldPackets::Item::ItemBonusKey itemBonusKey;
|
||||
itemBonusKey.ItemID = GetEntry();
|
||||
itemBonusKey.BonusListIDs = std::move(bonusListIDs);
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::ItemBonusKey), std::move(itemBonusKey));
|
||||
|
||||
for (int32 bonusListID : *m_itemData->BonusListIDs)
|
||||
for (int32 bonusListID : GetBonusListIDs())
|
||||
_bonusData.AddBonusList(bonusListID);
|
||||
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::ItemAppearanceModID), _bonusData.AppearanceModID);
|
||||
@@ -2527,7 +2541,9 @@ void Item::SetBonuses(std::vector<int32> bonusListIDs)
|
||||
|
||||
void Item::ClearBonuses()
|
||||
{
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::BonusListIDs), std::vector<int32>());
|
||||
WorldPackets::Item::ItemBonusKey itemBonusKey;
|
||||
itemBonusKey.ItemID = GetEntry();
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::ItemBonusKey), std::move(itemBonusKey));
|
||||
_bonusData.Initialize(GetTemplate());
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Item::m_itemData).ModifyValue(&UF::ItemData::ItemAppearanceModID), _bonusData.AppearanceModID);
|
||||
}
|
||||
|
||||
@@ -226,6 +226,7 @@ class TC_GAME_API Item : public Object
|
||||
void CheckArtifactRelicSlotUnlock(Player const* owner);
|
||||
|
||||
void AddBonuses(uint32 bonusListID);
|
||||
std::vector<int32> const& GetBonusListIDs() const { return m_itemData->ItemBonusKey->BonusListIDs; }
|
||||
void SetBonuses(std::vector<int32> bonusListIDs);
|
||||
void ClearBonuses();
|
||||
|
||||
|
||||
@@ -136,6 +136,11 @@ enum InventoryResult : uint8
|
||||
EQUIP_ERR_NOT_IN_NPE = 110,// Not available during the tutorial
|
||||
EQUIP_ERR_ITEM_COOLDOWN = 111,// Item is not ready yet.
|
||||
EQUIP_ERR_NOT_IN_RATED_BATTLEGROUND = 112,// You can't do that in a rated battleground.
|
||||
EQUIP_ERR_EQUIPABLESPELLS_SLOTS_FULL = 113,
|
||||
EQUIP_ERR_CANT_BE_RECRAFTED = 114,// You can't recraft that itemv
|
||||
EQUIP_ERR_REAGENTBAG_WRONG_SLOT = 115,// Reagent Bags can only be placed in the reagent bag slot.
|
||||
EQUIP_ERR_SLOT_ONLY_REAGENTBAG = 116,// Only Reagent Bags can be placed in the reagent bag slot.
|
||||
EQUIP_ERR_REAGENTBAG_ITEM_TYPE = 117,// Only Reagents can be placed in Reagent Bags.
|
||||
};
|
||||
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
|
||||
@@ -402,10 +402,16 @@ enum InventoryType : uint8
|
||||
INVTYPE_THROWN = 25,
|
||||
INVTYPE_RANGEDRIGHT = 26,
|
||||
INVTYPE_QUIVER = 27,
|
||||
INVTYPE_RELIC = 28
|
||||
INVTYPE_RELIC = 28,
|
||||
INVTYPE_PROFESSION_TOOL = 29,
|
||||
INVTYPE_PROFESSION_GEAR = 30,
|
||||
INVTYPE_EQUIPABLE_SPELL_OFFENSIVE = 31,
|
||||
INVTYPE_EQUIPABLE_SPELL_UTILITY = 32,
|
||||
INVTYPE_EQUIPABLE_SPELL_DEFENSIVE = 33,
|
||||
INVTYPE_EQUIPABLE_SPELL_MOBILITY = 34
|
||||
};
|
||||
|
||||
#define MAX_INVTYPE 29
|
||||
#define MAX_INVTYPE 35
|
||||
|
||||
enum ItemClass : uint8
|
||||
{
|
||||
@@ -427,10 +433,11 @@ enum ItemClass : uint8
|
||||
ITEM_CLASS_MISCELLANEOUS = 15,
|
||||
ITEM_CLASS_GLYPH = 16,
|
||||
ITEM_CLASS_BATTLE_PETS = 17,
|
||||
ITEM_CLASS_WOW_TOKEN = 18
|
||||
ITEM_CLASS_WOW_TOKEN = 18,
|
||||
ITEM_CLASS_PROFESSION = 19
|
||||
};
|
||||
|
||||
#define MAX_ITEM_CLASS 19
|
||||
#define MAX_ITEM_CLASS 20
|
||||
|
||||
enum ItemSubclassConsumable
|
||||
{
|
||||
@@ -460,10 +467,11 @@ enum ItemSubclassContainer
|
||||
ITEM_SUBCLASS_LEATHERWORKING_CONTAINER = 7,
|
||||
ITEM_SUBCLASS_INSCRIPTION_CONTAINER = 8,
|
||||
ITEM_SUBCLASS_TACKLE_CONTAINER = 9,
|
||||
ITEM_SUBCLASS_COOKING_CONTAINER = 10
|
||||
ITEM_SUBCLASS_COOKING_CONTAINER = 10,
|
||||
ITEM_SUBCLASS_REAGENT_CONTAINER = 11
|
||||
};
|
||||
|
||||
#define MAX_ITEM_SUBCLASS_CONTAINER 11
|
||||
#define MAX_ITEM_SUBCLASS_CONTAINER 12
|
||||
|
||||
enum ItemSubclassWeapon
|
||||
{
|
||||
@@ -535,10 +543,11 @@ enum ItemSubclassArmor
|
||||
enum ItemSubclassReagent
|
||||
{
|
||||
ITEM_SUBCLASS_REAGENT = 0,
|
||||
ITEM_SUBCLASS_KEYSTONE = 1
|
||||
ITEM_SUBCLASS_KEYSTONE = 1,
|
||||
ITEM_SUBCLASS_CONTEXT_TOKEN = 2
|
||||
};
|
||||
|
||||
#define MAX_ITEM_SUBCLASS_REAGENT 2
|
||||
#define MAX_ITEM_SUBCLASS_REAGENT 3
|
||||
|
||||
enum ItemSubclassProjectile
|
||||
{
|
||||
@@ -570,10 +579,12 @@ enum ItemSubclassTradeGoods
|
||||
ITEM_SUBCLASS_ENCHANTMENT = 14,
|
||||
ITEM_SUBCLASS_WEAPON_ENCHANTMENT = 15,
|
||||
ITEM_SUBCLASS_INSCRIPTION = 16,
|
||||
ITEM_SUBCLASS_EXPLOSIVES_DEVICES = 17
|
||||
ITEM_SUBCLASS_EXPLOSIVES_DEVICES = 17,
|
||||
ITEM_SUBCLASS_OPTIONAL_REAGENT = 18,
|
||||
ITEM_SUBCLASS_FINISHING_REAGENT = 19,
|
||||
};
|
||||
|
||||
#define MAX_ITEM_SUBCLASS_TRADE_GOODS 18
|
||||
#define MAX_ITEM_SUBCLASS_TRADE_GOODS 20
|
||||
|
||||
enum ItemSubclassItemEnhancement
|
||||
{
|
||||
@@ -590,10 +601,11 @@ enum ItemSubclassItemEnhancement
|
||||
ITEM_SUBCLASS_ITEM_ENHANCEMENT_FINGER = 10,
|
||||
ITEM_SUBCLASS_ITEM_ENHANCEMENT_WEAPON = 11,
|
||||
ITEM_SUBCLASS_ITEM_ENHANCEMENT_TWO_HANDED_WEAPON = 12,
|
||||
ITEM_SUBCLASS_ITEM_ENHANCEMENT_SHIELD_OFF_HAND = 13
|
||||
ITEM_SUBCLASS_ITEM_ENHANCEMENT_SHIELD_OFF_HAND = 13,
|
||||
ITEM_SUBCLASS_ITEM_ENHANCEMENT_MISC = 14
|
||||
};
|
||||
|
||||
#define MAX_ITEM_SUBCLASS_ITEM_ENHANCEMENT 14
|
||||
#define MAX_ITEM_SUBCLASS_ITEM_ENHANCEMENT 15
|
||||
|
||||
enum ItemSubclassRecipe
|
||||
{
|
||||
@@ -662,9 +674,10 @@ enum ItemSubclassJunk
|
||||
ITEM_SUBCLASS_MISCELLANEOUS_HOLIDAY = 3,
|
||||
ITEM_SUBCLASS_MISCELLANEOUS_OTHER = 4,
|
||||
ITEM_SUBCLASS_MISCELLANEOUS_MOUNT = 5,
|
||||
ITEM_SUBCLASS_MISCELLANEOUS_MOUNT_EQUIPMENT = 6
|
||||
};
|
||||
|
||||
#define MAX_ITEM_SUBCLASS_MISCELLANEOUS 6
|
||||
#define MAX_ITEM_SUBCLASS_MISCELLANEOUS 7
|
||||
|
||||
enum ItemSubclassGlyph
|
||||
{
|
||||
@@ -698,6 +711,26 @@ enum ItemSubclassWowToken
|
||||
|
||||
#define MAX_ITEM_SUBCLASS_WOW_TOKEN 1
|
||||
|
||||
enum ItemSubclassPorfession
|
||||
{
|
||||
ITEM_SUBCLASS_PROFESSION_BLACKSMITHING = 0,
|
||||
ITEM_SUBCLASS_PROFESSION_LEATHERWORKING = 1,
|
||||
ITEM_SUBCLASS_PROFESSION_ALCHEMY = 2,
|
||||
ITEM_SUBCLASS_PROFESSION_HERBALISM = 3,
|
||||
ITEM_SUBCLASS_PROFESSION_COOKING = 4,
|
||||
ITEM_SUBCLASS_PROFESSION_MINING = 5,
|
||||
ITEM_SUBCLASS_PROFESSION_TAILORING = 6,
|
||||
ITEM_SUBCLASS_PROFESSION_ENGINEERING = 7,
|
||||
ITEM_SUBCLASS_PROFESSION_ENCHANTING = 8,
|
||||
ITEM_SUBCLASS_PROFESSION_FISHING = 9,
|
||||
ITEM_SUBCLASS_PROFESSION_SKINNING = 10,
|
||||
ITEM_SUBCLASS_PROFESSION_JEWELCRAFTING = 11,
|
||||
ITEM_SUBCLASS_PROFESSION_INSCRIPTION = 12,
|
||||
ITEM_SUBCLASS_PROFESSION_ARCHAEOLOGY = 13
|
||||
};
|
||||
|
||||
#define MAX_ITEM_SUBCLASS_PROFESSION 14
|
||||
|
||||
const uint32 MaxItemSubclassValues[MAX_ITEM_CLASS] =
|
||||
{
|
||||
MAX_ITEM_SUBCLASS_CONSUMABLE,
|
||||
@@ -718,7 +751,8 @@ const uint32 MaxItemSubclassValues[MAX_ITEM_CLASS] =
|
||||
MAX_ITEM_SUBCLASS_MISCELLANEOUS,
|
||||
MAX_ITEM_SUBCLASS_GLYPH,
|
||||
MAX_ITEM_SUBCLASS_BATTLE_PET,
|
||||
MAX_ITEM_SUBCLASS_WOW_TOKEN
|
||||
MAX_ITEM_SUBCLASS_WOW_TOKEN,
|
||||
MAX_ITEM_SUBCLASS_PROFESSION
|
||||
};
|
||||
|
||||
#define MAX_ITEM_SUBCLASS_TOTAL 21
|
||||
|
||||
@@ -144,12 +144,17 @@ TC_API_EXPORT EnumText EnumUtils<InventoryResult>::ToString(InventoryResult valu
|
||||
case EQUIP_ERR_NOT_IN_NPE: return { "EQUIP_ERR_NOT_IN_NPE", "EQUIP_ERR_NOT_IN_NPE", "Not available during the tutorial" };
|
||||
case EQUIP_ERR_ITEM_COOLDOWN: return { "EQUIP_ERR_ITEM_COOLDOWN", "EQUIP_ERR_ITEM_COOLDOWN", "Item is not ready yet." };
|
||||
case EQUIP_ERR_NOT_IN_RATED_BATTLEGROUND: return { "EQUIP_ERR_NOT_IN_RATED_BATTLEGROUND", "EQUIP_ERR_NOT_IN_RATED_BATTLEGROUND", "You can't do that in a rated battleground." };
|
||||
case EQUIP_ERR_EQUIPABLESPELLS_SLOTS_FULL: return { "EQUIP_ERR_EQUIPABLESPELLS_SLOTS_FULL", "EQUIP_ERR_EQUIPABLESPELLS_SLOTS_FULL", "" };
|
||||
case EQUIP_ERR_CANT_BE_RECRAFTED: return { "EQUIP_ERR_CANT_BE_RECRAFTED", "EQUIP_ERR_CANT_BE_RECRAFTED", "You can't recraft that itemv" };
|
||||
case EQUIP_ERR_REAGENTBAG_WRONG_SLOT: return { "EQUIP_ERR_REAGENTBAG_WRONG_SLOT", "EQUIP_ERR_REAGENTBAG_WRONG_SLOT", "Reagent Bags can only be placed in the reagent bag slot." };
|
||||
case EQUIP_ERR_SLOT_ONLY_REAGENTBAG: return { "EQUIP_ERR_SLOT_ONLY_REAGENTBAG", "EQUIP_ERR_SLOT_ONLY_REAGENTBAG", "Only Reagent Bags can be placed in the reagent bag slot." };
|
||||
case EQUIP_ERR_REAGENTBAG_ITEM_TYPE: return { "EQUIP_ERR_REAGENTBAG_ITEM_TYPE", "EQUIP_ERR_REAGENTBAG_ITEM_TYPE", "Only Reagents can be placed in Reagent Bags." };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<InventoryResult>::Count() { return 113; }
|
||||
TC_API_EXPORT size_t EnumUtils<InventoryResult>::Count() { return 118; }
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT InventoryResult EnumUtils<InventoryResult>::FromIndex(size_t index)
|
||||
@@ -269,6 +274,11 @@ TC_API_EXPORT InventoryResult EnumUtils<InventoryResult>::FromIndex(size_t index
|
||||
case 110: return EQUIP_ERR_NOT_IN_NPE;
|
||||
case 111: return EQUIP_ERR_ITEM_COOLDOWN;
|
||||
case 112: return EQUIP_ERR_NOT_IN_RATED_BATTLEGROUND;
|
||||
case 113: return EQUIP_ERR_EQUIPABLESPELLS_SLOTS_FULL;
|
||||
case 114: return EQUIP_ERR_CANT_BE_RECRAFTED;
|
||||
case 115: return EQUIP_ERR_REAGENTBAG_WRONG_SLOT;
|
||||
case 116: return EQUIP_ERR_SLOT_ONLY_REAGENTBAG;
|
||||
case 117: return EQUIP_ERR_REAGENTBAG_ITEM_TYPE;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
@@ -391,6 +401,11 @@ TC_API_EXPORT size_t EnumUtils<InventoryResult>::ToIndex(InventoryResult value)
|
||||
case EQUIP_ERR_NOT_IN_NPE: return 110;
|
||||
case EQUIP_ERR_ITEM_COOLDOWN: return 111;
|
||||
case EQUIP_ERR_NOT_IN_RATED_BATTLEGROUND: return 112;
|
||||
case EQUIP_ERR_EQUIPABLESPELLS_SLOTS_FULL: return 113;
|
||||
case EQUIP_ERR_CANT_BE_RECRAFTED: return 114;
|
||||
case EQUIP_ERR_REAGENTBAG_WRONG_SLOT: return 115;
|
||||
case EQUIP_ERR_SLOT_ONLY_REAGENTBAG: return 116;
|
||||
case EQUIP_ERR_REAGENTBAG_ITEM_TYPE: return 117;
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,9 +60,9 @@ struct MovementInfo
|
||||
|
||||
struct Inertia
|
||||
{
|
||||
Inertia() : lifetime(0) { }
|
||||
Inertia() : id(0), lifetime(0) { }
|
||||
|
||||
ObjectGuid guid;
|
||||
int32 id;
|
||||
Position force;
|
||||
uint32 lifetime;
|
||||
};
|
||||
@@ -86,6 +86,15 @@ struct MovementInfo
|
||||
|
||||
float stepUpStartElevation;
|
||||
|
||||
// advflying
|
||||
struct AdvFlying
|
||||
{
|
||||
float forwardVelocity;
|
||||
float upVelocity;
|
||||
};
|
||||
|
||||
Optional<AdvFlying> advFlying;
|
||||
|
||||
MovementInfo() :
|
||||
flags(0), flags2(0), flags3(0), time(0), pitch(0.0f), stepUpStartElevation(0.0f)
|
||||
{
|
||||
|
||||
@@ -293,6 +293,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
|
||||
bool HasFall = HasFallDirection || unit->m_movementInfo.jump.fallTime != 0;
|
||||
bool HasSpline = unit->IsSplineEnabled();
|
||||
bool HasInertia = unit->m_movementInfo.inertia.has_value();
|
||||
bool HasAdvFlying = unit->m_movementInfo.advFlying.has_value();
|
||||
|
||||
*data << GetGUID(); // MoverGUID
|
||||
|
||||
@@ -321,17 +322,24 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
|
||||
data->WriteBit(false); // HeightChangeFailed
|
||||
data->WriteBit(false); // RemoteTimeValid
|
||||
data->WriteBit(HasInertia); // HasInertia
|
||||
data->WriteBit(HasAdvFlying); // HasAdvFlying
|
||||
|
||||
if (!unit->m_movementInfo.transport.guid.IsEmpty())
|
||||
*data << unit->m_movementInfo.transport;
|
||||
|
||||
if (HasInertia)
|
||||
{
|
||||
*data << unit->m_movementInfo.inertia->guid;
|
||||
*data << unit->m_movementInfo.inertia->id;
|
||||
*data << unit->m_movementInfo.inertia->force.PositionXYZStream();
|
||||
*data << uint32(unit->m_movementInfo.inertia->lifetime);
|
||||
}
|
||||
|
||||
if (HasAdvFlying)
|
||||
{
|
||||
*data << float(unit->m_movementInfo.advFlying->forwardVelocity);
|
||||
*data << float(unit->m_movementInfo.advFlying->upVelocity);
|
||||
}
|
||||
|
||||
if (HasFall)
|
||||
{
|
||||
*data << uint32(unit->m_movementInfo.jump.fallTime); // Time
|
||||
@@ -366,6 +374,24 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
|
||||
*data << float(1.0f); // MovementForcesModMagnitude
|
||||
}
|
||||
|
||||
*data << float(2.0f); // advFlyingAirFriction
|
||||
*data << float(65.0f); // advFlyingMaxVel
|
||||
*data << float(1.0f); // advFlyingLiftCoefficient
|
||||
*data << float(3.0f); // advFlyingDoubleJumpVelMod
|
||||
*data << float(10.0f); // advFlyingGlideStartMinHeight
|
||||
*data << float(100.0f); // advFlyingAddImpulseMaxSpeed
|
||||
*data << float(90.0f); // advFlyingMinBankingRate
|
||||
*data << float(140.0f); // advFlyingMaxBankingRate
|
||||
*data << float(180.0f); // advFlyingMinPitchingRateDown
|
||||
*data << float(360.0f); // advFlyingMaxPitchingRateDown
|
||||
*data << float(90.0f); // advFlyingMinPitchingRateUp
|
||||
*data << float(270.0f); // advFlyingMaxPitchingRateUp
|
||||
*data << float(30.0f); // advFlyingMinTurnVelocityThreshold
|
||||
*data << float(80.0f); // advFlyingMaxTurnVelocityThreshold
|
||||
*data << float(2.75f); // advFlyingSurfaceFriction
|
||||
*data << float(7.0f); // advFlyingOverMaxDeceleration
|
||||
*data << float(0.4f); // advFlyingLaunchSpeedCoefficient
|
||||
|
||||
data->WriteBit(HasSpline);
|
||||
data->FlushBits();
|
||||
|
||||
@@ -438,6 +464,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
|
||||
bool hasFaceMovementDir = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_FACE_MOVEMENT_DIR);
|
||||
bool hasFollowsTerrain = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_FOLLOWS_TERRAIN);
|
||||
bool hasUnk1 = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_UNK1);
|
||||
bool hasUnk2 = false;
|
||||
bool hasTargetRollPitchYaw = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_TARGET_ROLL_PITCH_YAW);
|
||||
bool hasScaleCurveID = createProperties && createProperties->ScaleCurveId != 0;
|
||||
bool hasMorphCurveID = createProperties && createProperties->MorphCurveId != 0;
|
||||
@@ -448,6 +475,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
|
||||
bool hasAreaTriggerPolygon = createProperties && shape.IsPolygon();
|
||||
bool hasAreaTriggerCylinder = shape.IsCylinder();
|
||||
bool hasDisk = shape.IsDisk();
|
||||
bool hasBoundedPlane = shape.IsBoudedPlane();
|
||||
bool hasAreaTriggerSpline = areaTrigger->HasSplines();
|
||||
bool hasOrbit = areaTrigger->HasOrbit();
|
||||
bool hasMovementScript = false;
|
||||
@@ -458,6 +486,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
|
||||
data->WriteBit(hasFaceMovementDir);
|
||||
data->WriteBit(hasFollowsTerrain);
|
||||
data->WriteBit(hasUnk1);
|
||||
data->WriteBit(hasUnk2);
|
||||
data->WriteBit(hasTargetRollPitchYaw);
|
||||
data->WriteBit(hasScaleCurveID);
|
||||
data->WriteBit(hasMorphCurveID);
|
||||
@@ -468,6 +497,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
|
||||
data->WriteBit(hasAreaTriggerPolygon);
|
||||
data->WriteBit(hasAreaTriggerCylinder);
|
||||
data->WriteBit(hasDisk);
|
||||
data->WriteBit(hasBoundedPlane);
|
||||
data->WriteBit(hasAreaTriggerSpline);
|
||||
data->WriteBit(hasOrbit);
|
||||
data->WriteBit(hasMovementScript);
|
||||
@@ -549,6 +579,14 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
|
||||
*data << float(shape.DiskDatas.LocationZOffsetTarget);
|
||||
}
|
||||
|
||||
if (hasBoundedPlane)
|
||||
{
|
||||
*data << float(shape.BoundedPlaneDatas.Extents[0]);
|
||||
*data << float(shape.BoundedPlaneDatas.Extents[1]);
|
||||
*data << float(shape.BoundedPlaneDatas.ExtentsTarget[0]);
|
||||
*data << float(shape.BoundedPlaneDatas.ExtentsTarget[1]);
|
||||
}
|
||||
|
||||
//if (hasMovementScript)
|
||||
// *data << *areaTrigger->GetMovementScript(); // AreaTriggerMovementScriptInfo
|
||||
|
||||
@@ -2300,10 +2338,10 @@ int32 WorldObject::ModSpellDuration(SpellInfo const* spellInfo, WorldObject cons
|
||||
|
||||
if (!positive)
|
||||
{
|
||||
int32 mechanicMask = spellInfo->GetSpellMechanicMaskByEffectMask(effectMask);
|
||||
uint64 mechanicMask = spellInfo->GetSpellMechanicMaskByEffectMask(effectMask);
|
||||
auto mechanicCheck = [mechanicMask](AuraEffect const* aurEff) -> bool
|
||||
{
|
||||
if (mechanicMask & (1 << aurEff->GetMiscValue()))
|
||||
if (mechanicMask & (UI64LIT(1) << aurEff->GetMiscValue()))
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,7 @@
|
||||
#define UpdateFields_h__
|
||||
|
||||
#include "EnumFlag.h"
|
||||
#include "ItemPacketsCommon.h"
|
||||
#include "MythicPlusPacketsCommon.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "Position.h"
|
||||
@@ -115,25 +116,25 @@ struct SocketedGem : public IsUpdateFieldStructureTag, public HasChangesMask<20>
|
||||
|
||||
struct ItemData : public IsUpdateFieldStructureTag, public HasChangesMask<41>
|
||||
{
|
||||
UpdateField<std::vector<int32>, 0, 1> BonusListIDs;
|
||||
DynamicUpdateField<UF::ArtifactPower, 0, 2> ArtifactPowers;
|
||||
DynamicUpdateField<UF::SocketedGem, 0, 3> Gems;
|
||||
UpdateField<ObjectGuid, 0, 4> Owner;
|
||||
UpdateField<ObjectGuid, 0, 5> ContainedIn;
|
||||
UpdateField<ObjectGuid, 0, 6> Creator;
|
||||
UpdateField<ObjectGuid, 0, 7> GiftCreator;
|
||||
UpdateField<uint32, 0, 8> StackCount;
|
||||
UpdateField<uint32, 0, 9> Expiration;
|
||||
UpdateField<uint32, 0, 10> DynamicFlags;
|
||||
UpdateField<uint32, 0, 11> Durability;
|
||||
UpdateField<uint32, 0, 12> MaxDurability;
|
||||
UpdateField<uint32, 0, 13> CreatePlayedTime;
|
||||
UpdateField<int32, 0, 14> Context;
|
||||
UpdateField<int64, 0, 15> CreateTime;
|
||||
UpdateField<uint64, 0, 16> ArtifactXP;
|
||||
UpdateField<uint8, 0, 17> ItemAppearanceModID;
|
||||
UpdateField<UF::ItemModList, 0, 18> Modifiers;
|
||||
UpdateField<uint32, 0, 19> DynamicFlags2;
|
||||
DynamicUpdateField<UF::ArtifactPower, 0, 1> ArtifactPowers;
|
||||
DynamicUpdateField<UF::SocketedGem, 0, 2> Gems;
|
||||
UpdateField<ObjectGuid, 0, 3> Owner;
|
||||
UpdateField<ObjectGuid, 0, 4> ContainedIn;
|
||||
UpdateField<ObjectGuid, 0, 5> Creator;
|
||||
UpdateField<ObjectGuid, 0, 6> GiftCreator;
|
||||
UpdateField<uint32, 0, 7> StackCount;
|
||||
UpdateField<uint32, 0, 8> Expiration;
|
||||
UpdateField<uint32, 0, 9> DynamicFlags;
|
||||
UpdateField<uint32, 0, 10> Durability;
|
||||
UpdateField<uint32, 0, 11> MaxDurability;
|
||||
UpdateField<uint32, 0, 12> CreatePlayedTime;
|
||||
UpdateField<int32, 0, 13> Context;
|
||||
UpdateField<int64, 0, 14> CreateTime;
|
||||
UpdateField<uint64, 0, 15> ArtifactXP;
|
||||
UpdateField<uint8, 0, 16> ItemAppearanceModID;
|
||||
UpdateField<UF::ItemModList, 0, 17> Modifiers;
|
||||
UpdateField<uint32, 0, 18> DynamicFlags2;
|
||||
UpdateField<WorldPackets::Item::ItemBonusKey, 0, 19> ItemBonusKey;
|
||||
UpdateField<uint16, 0, 20> DEBUGItemLevel;
|
||||
UpdateFieldArray<int32, 5, 21, 22> SpellCharges;
|
||||
UpdateFieldArray<UF::ItemEnchantment, 13, 27, 28> Enchantment;
|
||||
@@ -254,7 +255,7 @@ struct PassiveSpellHistory : public IsUpdateFieldStructureTag
|
||||
bool operator!=(PassiveSpellHistory const& right) const { return !(*this == right); }
|
||||
};
|
||||
|
||||
struct UnitData : public IsUpdateFieldStructureTag, public HasChangesMask<194>
|
||||
struct UnitData : public IsUpdateFieldStructureTag, public HasChangesMask<196>
|
||||
{
|
||||
UpdateField<std::vector<uint32>, 0, 1> StateWorldEffectIDs;
|
||||
DynamicUpdateField<UF::PassiveSpellHistory, 0, 2> PassiveSpells;
|
||||
@@ -279,119 +280,121 @@ struct UnitData : public IsUpdateFieldStructureTag, public HasChangesMask<194>
|
||||
UpdateField<ObjectGuid, 0, 20> BattlePetCompanionGUID;
|
||||
UpdateField<uint64, 0, 21> BattlePetDBID;
|
||||
UpdateField<UF::UnitChannel, 0, 22> ChannelData;
|
||||
UpdateField<uint32, 0, 23> SummonedByHomeRealm;
|
||||
UpdateField<uint8, 0, 24> Race;
|
||||
UpdateField<uint8, 0, 25> ClassId;
|
||||
UpdateField<uint8, 0, 26> PlayerClassId;
|
||||
UpdateField<uint8, 0, 27> Sex;
|
||||
UpdateField<uint8, 0, 28> DisplayPower;
|
||||
UpdateField<uint32, 0, 29> OverrideDisplayPowerID;
|
||||
UpdateField<int64, 0, 30> Health;
|
||||
UpdateField<int64, 0, 31> MaxHealth;
|
||||
UpdateField<int32, 32, 33> Level;
|
||||
UpdateField<int32, 32, 34> EffectiveLevel;
|
||||
UpdateField<int32, 32, 35> ContentTuningID;
|
||||
UpdateField<int32, 32, 36> ScalingLevelMin;
|
||||
UpdateField<int32, 32, 37> ScalingLevelMax;
|
||||
UpdateField<int32, 32, 38> ScalingLevelDelta;
|
||||
UpdateField<int32, 32, 39> ScalingFactionGroup;
|
||||
UpdateField<int32, 32, 40> ScalingHealthItemLevelCurveID;
|
||||
UpdateField<int32, 32, 41> ScalingDamageItemLevelCurveID;
|
||||
UpdateField<int32, 32, 42> FactionTemplate;
|
||||
UpdateField<int8, 0, 23> SpellEmpowerStage;
|
||||
UpdateField<uint32, 0, 24> SummonedByHomeRealm;
|
||||
UpdateField<uint8, 0, 25> Race;
|
||||
UpdateField<uint8, 0, 26> ClassId;
|
||||
UpdateField<uint8, 0, 27> PlayerClassId;
|
||||
UpdateField<uint8, 0, 28> Sex;
|
||||
UpdateField<uint8, 0, 29> DisplayPower;
|
||||
UpdateField<uint32, 0, 30> OverrideDisplayPowerID;
|
||||
UpdateField<int64, 0, 31> Health;
|
||||
UpdateField<int64, 32, 33> MaxHealth;
|
||||
UpdateField<int32, 32, 34> Level;
|
||||
UpdateField<int32, 32, 35> EffectiveLevel;
|
||||
UpdateField<int32, 32, 36> ContentTuningID;
|
||||
UpdateField<int32, 32, 37> ScalingLevelMin;
|
||||
UpdateField<int32, 32, 38> ScalingLevelMax;
|
||||
UpdateField<int32, 32, 39> ScalingLevelDelta;
|
||||
UpdateField<int32, 32, 40> ScalingFactionGroup;
|
||||
UpdateField<int32, 32, 41> ScalingHealthItemLevelCurveID;
|
||||
UpdateField<int32, 32, 42> ScalingDamageItemLevelCurveID;
|
||||
UpdateField<int32, 32, 43> FactionTemplate;
|
||||
struct FactionTemplateTag : ViewerDependentValueTag<int32> {};
|
||||
UpdateField<uint32, 32, 43> Flags;
|
||||
UpdateField<uint32, 32, 44> Flags;
|
||||
struct FlagsTag : ViewerDependentValueTag<uint32> {};
|
||||
UpdateField<uint32, 32, 44> Flags2;
|
||||
UpdateField<uint32, 32, 45> Flags3;
|
||||
UpdateField<uint32, 32, 45> Flags2;
|
||||
UpdateField<uint32, 32, 46> Flags3;
|
||||
struct Flags3Tag : ViewerDependentValueTag<uint32> {};
|
||||
UpdateField<uint32, 32, 46> AuraState;
|
||||
UpdateField<uint32, 32, 47> AuraState;
|
||||
struct AuraStateTag : ViewerDependentValueTag<uint32> {};
|
||||
UpdateField<uint32, 32, 47> RangedAttackRoundBaseTime;
|
||||
UpdateField<float, 32, 48> BoundingRadius;
|
||||
UpdateField<float, 32, 49> CombatReach;
|
||||
UpdateField<float, 32, 50> DisplayScale;
|
||||
UpdateField<int32, 32, 51> CreatureFamily;
|
||||
UpdateField<int32, 32, 52> CreatureType;
|
||||
UpdateField<int32, 32, 53> NativeDisplayID;
|
||||
UpdateField<float, 32, 54> NativeXDisplayScale;
|
||||
UpdateField<int32, 32, 55> MountDisplayID;
|
||||
UpdateField<int32, 32, 56> CosmeticMountDisplayID;
|
||||
UpdateField<float, 32, 57> MinDamage;
|
||||
UpdateField<float, 32, 58> MaxDamage;
|
||||
UpdateField<float, 32, 59> MinOffHandDamage;
|
||||
UpdateField<float, 32, 60> MaxOffHandDamage;
|
||||
UpdateField<uint8, 32, 61> StandState;
|
||||
UpdateField<uint8, 32, 62> PetTalentPoints;
|
||||
UpdateField<uint8, 32, 63> VisFlags;
|
||||
UpdateField<uint8, 64, 65> AnimTier;
|
||||
UpdateField<uint32, 64, 66> PetNumber;
|
||||
UpdateField<uint32, 64, 67> PetNameTimestamp;
|
||||
UpdateField<uint32, 64, 68> PetExperience;
|
||||
UpdateField<uint32, 64, 69> PetNextLevelExperience;
|
||||
UpdateField<float, 64, 70> ModCastingSpeed;
|
||||
UpdateField<float, 64, 71> ModCastingSpeedNeg;
|
||||
UpdateField<float, 64, 72> ModSpellHaste;
|
||||
UpdateField<float, 64, 73> ModHaste;
|
||||
UpdateField<float, 64, 74> ModRangedHaste;
|
||||
UpdateField<float, 64, 75> ModHasteRegen;
|
||||
UpdateField<float, 64, 76> ModTimeRate;
|
||||
UpdateField<int32, 64, 77> CreatedBySpell;
|
||||
UpdateField<int32, 64, 78> EmoteState;
|
||||
UpdateField<int32, 64, 79> BaseMana;
|
||||
UpdateField<int32, 64, 80> BaseHealth;
|
||||
UpdateField<uint8, 64, 81> SheatheState;
|
||||
UpdateField<uint8, 64, 82> PvpFlags;
|
||||
UpdateField<uint32, 32, 48> RangedAttackRoundBaseTime;
|
||||
UpdateField<float, 32, 49> BoundingRadius;
|
||||
UpdateField<float, 32, 50> CombatReach;
|
||||
UpdateField<float, 32, 51> DisplayScale;
|
||||
UpdateField<int32, 32, 52> CreatureFamily;
|
||||
UpdateField<int32, 32, 53> CreatureType;
|
||||
UpdateField<int32, 32, 54> NativeDisplayID;
|
||||
UpdateField<float, 32, 55> NativeXDisplayScale;
|
||||
UpdateField<int32, 32, 56> MountDisplayID;
|
||||
UpdateField<int32, 32, 57> CosmeticMountDisplayID;
|
||||
UpdateField<float, 32, 58> MinDamage;
|
||||
UpdateField<float, 32, 59> MaxDamage;
|
||||
UpdateField<float, 32, 60> MinOffHandDamage;
|
||||
UpdateField<float, 32, 61> MaxOffHandDamage;
|
||||
UpdateField<uint8, 32, 62> StandState;
|
||||
UpdateField<uint8, 32, 63> PetTalentPoints;
|
||||
UpdateField<uint8, 64, 65> VisFlags;
|
||||
UpdateField<uint8, 64, 66> AnimTier;
|
||||
UpdateField<uint32, 64, 67> PetNumber;
|
||||
UpdateField<uint32, 64, 68> PetNameTimestamp;
|
||||
UpdateField<uint32, 64, 69> PetExperience;
|
||||
UpdateField<uint32, 64, 70> PetNextLevelExperience;
|
||||
UpdateField<float, 64, 71> ModCastingSpeed;
|
||||
UpdateField<float, 64, 72> ModCastingSpeedNeg;
|
||||
UpdateField<float, 64, 73> ModSpellHaste;
|
||||
UpdateField<float, 64, 74> ModHaste;
|
||||
UpdateField<float, 64, 75> ModRangedHaste;
|
||||
UpdateField<float, 64, 76> ModHasteRegen;
|
||||
UpdateField<float, 64, 77> ModTimeRate;
|
||||
UpdateField<int32, 64, 78> CreatedBySpell;
|
||||
UpdateField<int32, 64, 79> EmoteState;
|
||||
UpdateField<int32, 64, 80> BaseMana;
|
||||
UpdateField<int32, 64, 81> BaseHealth;
|
||||
UpdateField<uint8, 64, 82> SheatheState;
|
||||
UpdateField<uint8, 64, 83> PvpFlags;
|
||||
struct PvpFlagsTag : ViewerDependentValueTag<uint8> {};
|
||||
UpdateField<uint8, 64, 83> PetFlags;
|
||||
UpdateField<uint8, 64, 84> ShapeshiftForm;
|
||||
UpdateField<int32, 64, 85> AttackPower;
|
||||
UpdateField<int32, 64, 86> AttackPowerModPos;
|
||||
UpdateField<int32, 64, 87> AttackPowerModNeg;
|
||||
UpdateField<float, 64, 88> AttackPowerMultiplier;
|
||||
UpdateField<int32, 64, 89> RangedAttackPower;
|
||||
UpdateField<int32, 64, 90> RangedAttackPowerModPos;
|
||||
UpdateField<int32, 64, 91> RangedAttackPowerModNeg;
|
||||
UpdateField<float, 64, 92> RangedAttackPowerMultiplier;
|
||||
UpdateField<int32, 64, 93> MainHandWeaponAttackPower;
|
||||
UpdateField<int32, 64, 94> OffHandWeaponAttackPower;
|
||||
UpdateField<int32, 64, 95> RangedWeaponAttackPower;
|
||||
UpdateField<int32, 96, 97> SetAttackSpeedAura;
|
||||
UpdateField<float, 96, 98> Lifesteal;
|
||||
UpdateField<float, 96, 99> MinRangedDamage;
|
||||
UpdateField<float, 96, 100> MaxRangedDamage;
|
||||
UpdateField<float, 96, 101> ManaCostMultiplier;
|
||||
UpdateField<float, 96, 102> MaxHealthModifier;
|
||||
UpdateField<float, 96, 103> HoverHeight;
|
||||
UpdateField<int32, 96, 104> MinItemLevelCutoff;
|
||||
UpdateField<int32, 96, 105> MinItemLevel;
|
||||
UpdateField<int32, 96, 106> MaxItemLevel;
|
||||
UpdateField<int32, 96, 107> AzeriteItemLevel;
|
||||
UpdateField<int32, 96, 108> WildBattlePetLevel;
|
||||
UpdateField<int32, 96, 109> BattlePetCompanionExperience;
|
||||
UpdateField<uint32, 96, 110> BattlePetCompanionNameTimestamp;
|
||||
UpdateField<int32, 96, 111> InteractSpellID;
|
||||
UpdateField<int32, 96, 112> ScaleDuration;
|
||||
UpdateField<int32, 96, 113> LooksLikeMountID;
|
||||
UpdateField<int32, 96, 114> LooksLikeCreatureID;
|
||||
UpdateField<int32, 96, 115> LookAtControllerID;
|
||||
UpdateField<int32, 96, 116> TaxiNodesID;
|
||||
UpdateField<ObjectGuid, 96, 117> GuildGUID;
|
||||
UpdateField<uint32, 96, 118> SilencedSchoolMask;
|
||||
UpdateField<ObjectGuid, 96, 119> NameplateAttachToGUID; // When set, nameplate of this unit will instead appear on that object
|
||||
UpdateFieldArray<uint32, 2, 120, 121> NpcFlags;
|
||||
UpdateField<uint8, 64, 84> PetFlags;
|
||||
UpdateField<uint8, 64, 85> ShapeshiftForm;
|
||||
UpdateField<int32, 64, 86> AttackPower;
|
||||
UpdateField<int32, 64, 87> AttackPowerModPos;
|
||||
UpdateField<int32, 64, 88> AttackPowerModNeg;
|
||||
UpdateField<float, 64, 89> AttackPowerMultiplier;
|
||||
UpdateField<int32, 64, 90> RangedAttackPower;
|
||||
UpdateField<int32, 64, 91> RangedAttackPowerModPos;
|
||||
UpdateField<int32, 64, 92> RangedAttackPowerModNeg;
|
||||
UpdateField<float, 64, 93> RangedAttackPowerMultiplier;
|
||||
UpdateField<int32, 64, 94> MainHandWeaponAttackPower;
|
||||
UpdateField<int32, 64, 95> OffHandWeaponAttackPower;
|
||||
UpdateField<int32, 96, 97> RangedWeaponAttackPower;
|
||||
UpdateField<int32, 96, 98> SetAttackSpeedAura;
|
||||
UpdateField<float, 96, 99> Lifesteal;
|
||||
UpdateField<float, 96, 100> MinRangedDamage;
|
||||
UpdateField<float, 96, 101> MaxRangedDamage;
|
||||
UpdateField<float, 96, 102> ManaCostMultiplier;
|
||||
UpdateField<float, 96, 103> MaxHealthModifier;
|
||||
UpdateField<float, 96, 104> HoverHeight;
|
||||
UpdateField<int32, 96, 105> MinItemLevelCutoff;
|
||||
UpdateField<int32, 96, 106> MinItemLevel;
|
||||
UpdateField<int32, 96, 107> MaxItemLevel;
|
||||
UpdateField<int32, 96, 108> AzeriteItemLevel;
|
||||
UpdateField<int32, 96, 109> WildBattlePetLevel;
|
||||
UpdateField<int32, 96, 110> BattlePetCompanionExperience;
|
||||
UpdateField<uint32, 96, 111> BattlePetCompanionNameTimestamp;
|
||||
UpdateField<int32, 96, 112> InteractSpellID;
|
||||
UpdateField<int32, 96, 113> ScaleDuration;
|
||||
UpdateField<int32, 96, 114> LooksLikeMountID;
|
||||
UpdateField<int32, 96, 115> LooksLikeCreatureID;
|
||||
UpdateField<int32, 96, 116> LookAtControllerID;
|
||||
UpdateField<int32, 96, 117> TaxiNodesID;
|
||||
UpdateField<ObjectGuid, 96, 118> GuildGUID;
|
||||
UpdateField<int32, 96, 119> FlightCapabilityID;
|
||||
UpdateField<uint32, 96, 120> SilencedSchoolMask;
|
||||
UpdateField<ObjectGuid, 96, 121> NameplateAttachToGUID; // When set, nameplate of this unit will instead appear on that object
|
||||
UpdateFieldArray<uint32, 2, 122, 123> NpcFlags;
|
||||
struct NpcFlagsTag : ViewerDependentValueTag<uint32> {};
|
||||
UpdateFieldArray<int32, 7, 123, 124> Power;
|
||||
UpdateFieldArray<int32, 7, 123, 131> MaxPower;
|
||||
UpdateFieldArray<float, 7, 123, 138> PowerRegenFlatModifier;
|
||||
UpdateFieldArray<float, 7, 123, 145> PowerRegenInterruptedFlatModifier;
|
||||
UpdateFieldArray<UF::VisibleItem, 3, 152, 153> VirtualItems;
|
||||
UpdateFieldArray<uint32, 2, 156, 157> AttackRoundBaseTime;
|
||||
UpdateFieldArray<int32, 4, 159, 160> Stats;
|
||||
UpdateFieldArray<int32, 4, 159, 164> StatPosBuff;
|
||||
UpdateFieldArray<int32, 4, 159, 168> StatNegBuff;
|
||||
UpdateFieldArray<int32, 7, 172, 173> Resistances;
|
||||
UpdateFieldArray<int32, 7, 172, 180> BonusResistanceMods;
|
||||
UpdateFieldArray<int32, 7, 172, 187> ManaCostModifier;
|
||||
UpdateFieldArray<int32, 7, 125, 126> Power;
|
||||
UpdateFieldArray<int32, 7, 125, 133> MaxPower;
|
||||
UpdateFieldArray<float, 7, 125, 140> PowerRegenFlatModifier;
|
||||
UpdateFieldArray<float, 7, 125, 147> PowerRegenInterruptedFlatModifier;
|
||||
UpdateFieldArray<UF::VisibleItem, 3, 154, 155> VirtualItems;
|
||||
UpdateFieldArray<uint32, 2, 158, 159> AttackRoundBaseTime;
|
||||
UpdateFieldArray<int32, 4, 161, 162> Stats;
|
||||
UpdateFieldArray<int32, 4, 161, 166> StatPosBuff;
|
||||
UpdateFieldArray<int32, 4, 161, 170> StatNegBuff;
|
||||
UpdateFieldArray<int32, 7, 174, 175> Resistances;
|
||||
UpdateFieldArray<int32, 7, 174, 182> BonusResistanceMods;
|
||||
UpdateFieldArray<int32, 7, 174, 189> ManaCostModifier;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, Unit const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, Unit const* owner, Player const* receiver) const;
|
||||
@@ -453,44 +456,46 @@ struct CTROptions : public IsUpdateFieldStructureTag
|
||||
bool operator!=(CTROptions const& right) const { return !(*this == right); }
|
||||
};
|
||||
|
||||
struct PlayerData : public IsUpdateFieldStructureTag, public HasChangesMask<188>
|
||||
struct PlayerData : public IsUpdateFieldStructureTag, public HasChangesMask<190>
|
||||
{
|
||||
UpdateField<bool, 0, 1> HasQuestSession;
|
||||
UpdateField<bool, 0, 2> HasLevelLink;
|
||||
DynamicUpdateField<UF::ChrCustomizationChoice, 0, 3> Customizations;
|
||||
DynamicUpdateField<UF::QuestLog, 0, 4> QuestSessionQuestLog;
|
||||
DynamicUpdateField<UF::ArenaCooldown, 0, 5> ArenaCooldowns;
|
||||
UpdateField<ObjectGuid, 0, 6> DuelArbiter;
|
||||
UpdateField<ObjectGuid, 0, 7> WowAccount;
|
||||
UpdateField<ObjectGuid, 0, 8> LootTargetGUID;
|
||||
UpdateField<uint32, 0, 9> PlayerFlags;
|
||||
UpdateField<uint32, 0, 10> PlayerFlagsEx;
|
||||
UpdateField<uint32, 0, 11> GuildRankID;
|
||||
UpdateField<uint32, 0, 12> GuildDeleteDate;
|
||||
UpdateField<int32, 0, 13> GuildLevel;
|
||||
UpdateField<uint8, 0, 14> PartyType;
|
||||
UpdateField<uint8, 0, 15> NativeSex;
|
||||
UpdateField<uint8, 0, 16> Inebriation;
|
||||
UpdateField<uint8, 0, 17> PvpTitle;
|
||||
UpdateField<uint8, 0, 18> ArenaFaction;
|
||||
UpdateField<uint32, 0, 19> DuelTeam;
|
||||
UpdateField<int32, 0, 20> GuildTimeStamp;
|
||||
UpdateField<int32, 0, 21> PlayerTitle;
|
||||
UpdateField<int32, 0, 22> FakeInebriation;
|
||||
UpdateField<uint32, 0, 23> VirtualPlayerRealm;
|
||||
UpdateField<uint32, 0, 24> CurrentSpecID;
|
||||
UpdateField<int32, 0, 25> TaxiMountAnimKitID;
|
||||
UpdateField<uint8, 0, 26> CurrentBattlePetBreedQuality;
|
||||
UpdateField<int32, 0, 27> HonorLevel;
|
||||
UpdateField<int32, 0, 28> Field_B0;
|
||||
UpdateField<int32, 0, 29> Field_B4;
|
||||
UpdateField<UF::CTROptions, 0, 30> CtrOptions;
|
||||
UpdateField<int32, 0, 31> CovenantID;
|
||||
UpdateField<int32, 32, 33> SoulbindID;
|
||||
UpdateField<WorldPackets::MythicPlus::DungeonScoreSummary, 32, 34> DungeonScore;
|
||||
UpdateFieldArray<UF::QuestLog, 125, 35, 36> QuestLog;
|
||||
UpdateFieldArray<UF::VisibleItem, 19, 161, 162> VisibleItems;
|
||||
UpdateFieldArray<float, 6, 181, 182> AvgItemLevel;
|
||||
DynamicUpdateField<int32, 0, 6> VisualItemReplacements;
|
||||
UpdateField<ObjectGuid, 0, 7> DuelArbiter;
|
||||
UpdateField<ObjectGuid, 0, 8> WowAccount;
|
||||
UpdateField<ObjectGuid, 0, 9> LootTargetGUID;
|
||||
UpdateField<uint32, 0, 10> PlayerFlags;
|
||||
UpdateField<uint32, 0, 11> PlayerFlagsEx;
|
||||
UpdateField<uint32, 0, 12> GuildRankID;
|
||||
UpdateField<uint32, 0, 13> GuildDeleteDate;
|
||||
UpdateField<int32, 0, 14> GuildLevel;
|
||||
UpdateField<uint8, 0, 15> PartyType;
|
||||
UpdateField<uint8, 0, 16> NativeSex;
|
||||
UpdateField<uint8, 0, 17> Inebriation;
|
||||
UpdateField<uint8, 0, 18> PvpTitle;
|
||||
UpdateField<uint8, 0, 19> ArenaFaction;
|
||||
UpdateField<uint32, 0, 20> DuelTeam;
|
||||
UpdateField<int32, 0, 21> GuildTimeStamp;
|
||||
UpdateField<int32, 0, 22> PlayerTitle;
|
||||
UpdateField<int32, 0, 23> FakeInebriation;
|
||||
UpdateField<uint32, 0, 24> VirtualPlayerRealm;
|
||||
UpdateField<uint32, 0, 25> CurrentSpecID;
|
||||
UpdateField<int32, 0, 26> TaxiMountAnimKitID;
|
||||
UpdateField<uint8, 0, 27> CurrentBattlePetBreedQuality;
|
||||
UpdateField<int32, 0, 28> HonorLevel;
|
||||
UpdateField<int64, 0, 29> LogoutTime;
|
||||
UpdateField<int32, 0, 30> Field_B0;
|
||||
UpdateField<int32, 0, 31> Field_B4;
|
||||
UpdateField<UF::CTROptions, 32, 33> CtrOptions;
|
||||
UpdateField<int32, 32, 34> CovenantID;
|
||||
UpdateField<int32, 32, 35> SoulbindID;
|
||||
UpdateField<WorldPackets::MythicPlus::DungeonScoreSummary, 32, 36> DungeonScore;
|
||||
UpdateFieldArray<UF::QuestLog, 125, 37, 38> QuestLog;
|
||||
UpdateFieldArray<UF::VisibleItem, 19, 163, 164> VisibleItems;
|
||||
UpdateFieldArray<float, 6, 183, 184> AvgItemLevel;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, Player const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, Player const* owner, Player const* receiver) const;
|
||||
@@ -526,20 +531,26 @@ struct RestInfo : public IsUpdateFieldStructureTag, public HasChangesMask<3>
|
||||
void ClearChangesMask();
|
||||
};
|
||||
|
||||
struct PVPInfo : public IsUpdateFieldStructureTag, public HasChangesMask<13>
|
||||
struct PVPInfo : public IsUpdateFieldStructureTag, public HasChangesMask<19>
|
||||
{
|
||||
UpdateField<bool, 0, 1> Disqualified;
|
||||
UpdateField<uint32, 0, 2> WeeklyPlayed;
|
||||
UpdateField<uint32, 0, 3> WeeklyWon;
|
||||
UpdateField<uint32, 0, 4> SeasonPlayed;
|
||||
UpdateField<uint32, 0, 5> SeasonWon;
|
||||
UpdateField<uint32, 0, 6> Rating;
|
||||
UpdateField<uint32, 0, 7> WeeklyBestRating;
|
||||
UpdateField<uint32, 0, 8> SeasonBestRating;
|
||||
UpdateField<uint32, 0, 9> PvpTierID;
|
||||
UpdateField<uint32, 0, 10> WeeklyBestWinPvpTierID;
|
||||
UpdateField<uint32, 0, 11> Field_28;
|
||||
UpdateField<uint32, 0, 12> Field_2C;
|
||||
UpdateField<int8, 0, 2> Bracket;
|
||||
UpdateField<int32, 0, 3> PvpRatingID;
|
||||
UpdateField<uint32, 0, 4> WeeklyPlayed;
|
||||
UpdateField<uint32, 0, 5> WeeklyWon;
|
||||
UpdateField<uint32, 0, 6> SeasonPlayed;
|
||||
UpdateField<uint32, 0, 7> SeasonWon;
|
||||
UpdateField<uint32, 0, 8> Rating;
|
||||
UpdateField<uint32, 0, 9> WeeklyBestRating;
|
||||
UpdateField<uint32, 0, 10> SeasonBestRating;
|
||||
UpdateField<uint32, 0, 11> PvpTierID;
|
||||
UpdateField<uint32, 0, 12> WeeklyBestWinPvpTierID;
|
||||
UpdateField<uint32, 0, 13> Field_28;
|
||||
UpdateField<uint32, 0, 14> Field_2C;
|
||||
UpdateField<uint32, 0, 15> WeeklyRoundsPlayed;
|
||||
UpdateField<uint32, 0, 16> WeeklyRoundsWon;
|
||||
UpdateField<uint32, 0, 17> SeasonRoundsPlayed;
|
||||
UpdateField<uint32, 0, 18> SeasonRoundsWon;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, Player const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, bool ignoreChangesMask, Player const* owner, Player const* receiver) const;
|
||||
@@ -656,133 +667,220 @@ struct ReplayedQuest : public IsUpdateFieldStructureTag, public HasChangesMask<3
|
||||
void ClearChangesMask();
|
||||
};
|
||||
|
||||
struct ActivePlayerData : public IsUpdateFieldStructureTag, public HasChangesMask<1554>
|
||||
struct TraitEntry : public IsUpdateFieldStructureTag
|
||||
{
|
||||
int32 TraitNodeID;
|
||||
int32 TraitNodeEntryID;
|
||||
int32 Rank;
|
||||
int32 GrantedRanks;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, Player const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, bool ignoreChangesMask, Player const* owner, Player const* receiver) const;
|
||||
bool operator==(TraitEntry const& right) const;
|
||||
bool operator!=(TraitEntry const& right) const { return !(*this == right); }
|
||||
};
|
||||
|
||||
struct TraitConfig : public IsUpdateFieldStructureTag, public HasChangesMask<12>
|
||||
{
|
||||
DynamicUpdateField<UF::TraitEntry, 0, 1> Entries;
|
||||
UpdateField<int32, 0, 2> ID;
|
||||
UpdateField<std::string, 0, 3> Name;
|
||||
UpdateField<int32, 4, 5> Type;
|
||||
UpdateField<int32, 4, 6> SkillLineID;
|
||||
UpdateField<int32, 4, 7> ChrSpecializationID;
|
||||
UpdateField<int32, 8, 9> CombatConfigFlags;
|
||||
UpdateField<int32, 8, 10> LocalIdentifier;
|
||||
UpdateField<int32, 8, 11> TraitSystemID;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, Player const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, bool ignoreChangesMask, Player const* owner, Player const* receiver) const;
|
||||
void ClearChangesMask();
|
||||
};
|
||||
|
||||
struct CraftingOrderItem : public IsUpdateFieldStructureTag, public HasChangesMask<7>
|
||||
{
|
||||
UpdateField<uint64, -1, 0> Field_0;
|
||||
UpdateField<ObjectGuid, -1, 1> ItemGUID;
|
||||
UpdateField<ObjectGuid, -1, 2> OwnerGUID;
|
||||
UpdateField<int32, -1, 3> ItemID;
|
||||
UpdateField<uint32, -1, 4> Quantity;
|
||||
UpdateField<int32, -1, 5> ReagentQuality;
|
||||
OptionalUpdateField<uint8, -1, 6> DataSlotIndex;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, Player const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, bool ignoreChangesMask, Player const* owner, Player const* receiver) const;
|
||||
void ClearChangesMask();
|
||||
};
|
||||
|
||||
struct CraftingOrderData : public IsUpdateFieldStructureTag, public HasChangesMask<24>
|
||||
{
|
||||
DynamicUpdateField<UF::CraftingOrderItem, 0, 1> Reagents;
|
||||
UpdateField<int32, 0, 2> Field_0;
|
||||
UpdateField<uint64, 0, 3> OrderID;
|
||||
UpdateField<int32, 0, 4> SkillLineAbilityID;
|
||||
UpdateField<uint8, 5, 6> OrderState;
|
||||
UpdateField<uint8, 5, 7> OrderType;
|
||||
UpdateField<uint8, 5, 8> MinQuality;
|
||||
UpdateField<int64, 5, 9> ExpirationTime;
|
||||
UpdateField<int64, 10, 11> ClaimEndTime;
|
||||
UpdateField<int64, 10, 12> TipAmount;
|
||||
UpdateField<int64, 10, 13> ConsortiumCut;
|
||||
UpdateField<uint32, 10, 14> Flags;
|
||||
UpdateField<ObjectGuid, 15, 16> CustomerGUID;
|
||||
UpdateField<ObjectGuid, 15, 17> CustomerAccountGUID;
|
||||
UpdateField<ObjectGuid, 15, 18> CrafterGUID;
|
||||
UpdateField<ObjectGuid, 15, 19> PersonalCrafterGUID;
|
||||
UpdateField<std::string, 20, 21> CustomerNotes;
|
||||
OptionalUpdateField<UF::CraftingOrderItem, 20, 22> OutputItem;
|
||||
OptionalUpdateField<WorldPackets::Item::ItemInstance, 20, 23> OutputItemData;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, Player const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, bool ignoreChangesMask, Player const* owner, Player const* receiver) const;
|
||||
void ClearChangesMask();
|
||||
};
|
||||
|
||||
struct CraftingOrder : public IsUpdateFieldStructureTag, public HasChangesMask<4>
|
||||
{
|
||||
DynamicUpdateField<WorldPackets::Item::ItemEnchantData, -1, 0> Enchantments;
|
||||
DynamicUpdateField<WorldPackets::Item::ItemGemData, -1, 1> Gems;
|
||||
UpdateField<UF::CraftingOrderData, -1, 2> Data;
|
||||
OptionalUpdateField<WorldPackets::Item::ItemInstance, -1, 3> RecraftItemInfo;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, Player const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, bool ignoreChangesMask, Player const* owner, Player const* receiver) const;
|
||||
void ClearChangesMask();
|
||||
};
|
||||
|
||||
struct ActivePlayerData : public IsUpdateFieldStructureTag, public HasChangesMask<1571>
|
||||
{
|
||||
UpdateField<bool, 0, 1> BackpackAutoSortDisabled;
|
||||
UpdateField<bool, 0, 2> BankAutoSortDisabled;
|
||||
UpdateField<bool, 0, 3> SortBagsRightToLeft;
|
||||
UpdateField<bool, 0, 4> InsertItemsLeftToRight;
|
||||
UpdateFieldArray<DynamicUpdateFieldBase<UF::Research>, 1, 27, 28> Research;
|
||||
UpdateFieldArray<DynamicUpdateFieldBase<UF::Research>, 1, 30, 31> Research;
|
||||
DynamicUpdateField<uint64, 0, 5> KnownTitles;
|
||||
DynamicUpdateField<uint16, 0, 6> ResearchSites;
|
||||
DynamicUpdateField<uint32, 0, 7> ResearchSiteProgress;
|
||||
DynamicUpdateField<int32, 0, 8> DailyQuestsCompleted;
|
||||
DynamicUpdateField<int32, 0, 9> AvailableQuestLineXQuestIDs;
|
||||
DynamicUpdateField<int32, 0, 10> Heirlooms;
|
||||
DynamicUpdateField<uint32, 0, 11> HeirloomFlags;
|
||||
DynamicUpdateField<int32, 0, 12> Toys;
|
||||
DynamicUpdateField<uint32, 0, 13> ToyFlags;
|
||||
DynamicUpdateField<uint32, 0, 14> Transmog;
|
||||
DynamicUpdateField<int32, 0, 15> ConditionalTransmog;
|
||||
DynamicUpdateField<int32, 0, 16> SelfResSpells;
|
||||
DynamicUpdateField<uint32, 0, 17> RuneforgePowers;
|
||||
DynamicUpdateField<uint32, 0, 18> TransmogIllusions;
|
||||
DynamicUpdateField<UF::SpellPctModByLabel, 0, 20> SpellPctModByLabel;
|
||||
DynamicUpdateField<UF::SpellFlatModByLabel, 0, 21> SpellFlatModByLabel;
|
||||
DynamicUpdateField<UF::MawPower, 0, 22> MawPowers;
|
||||
DynamicUpdateField<UF::MultiFloorExplore, 0, 23> MultiFloorExploration;
|
||||
DynamicUpdateField<UF::RecipeProgressionInfo, 0, 24> RecipeProgression;
|
||||
DynamicUpdateField<UF::ReplayedQuest, 0, 25> ReplayedQuests;
|
||||
DynamicUpdateField<int32, 0, 26> DisabledSpells;
|
||||
DynamicUpdateField<UF::CharacterRestriction, 0, 19> CharacterRestrictions;
|
||||
UpdateField<ObjectGuid, 0, 29> FarsightObject;
|
||||
UpdateField<ObjectGuid, 0, 30> SummonedBattlePetGUID;
|
||||
UpdateField<uint64, 0, 31> Coinage;
|
||||
UpdateField<int32, 0, 32> XP;
|
||||
UpdateField<int32, 0, 33> NextLevelXP;
|
||||
UpdateField<int32, 34, 35> TrialXP;
|
||||
UpdateField<UF::SkillInfo, 34, 36> Skill;
|
||||
UpdateField<int32, 34, 37> CharacterPoints;
|
||||
UpdateField<int32, 34, 38> MaxTalentTiers;
|
||||
UpdateField<uint32, 34, 39> TrackCreatureMask;
|
||||
UpdateField<float, 34, 40> MainhandExpertise;
|
||||
UpdateField<float, 34, 41> OffhandExpertise;
|
||||
UpdateField<float, 34, 42> RangedExpertise;
|
||||
UpdateField<float, 34, 43> CombatRatingExpertise;
|
||||
UpdateField<float, 34, 44> BlockPercentage;
|
||||
UpdateField<float, 34, 45> DodgePercentage;
|
||||
UpdateField<float, 34, 46> DodgePercentageFromAttribute;
|
||||
UpdateField<float, 34, 47> ParryPercentage;
|
||||
UpdateField<float, 34, 48> ParryPercentageFromAttribute;
|
||||
UpdateField<float, 34, 49> CritPercentage;
|
||||
UpdateField<float, 34, 50> RangedCritPercentage;
|
||||
UpdateField<float, 34, 51> OffhandCritPercentage;
|
||||
UpdateField<float, 34, 52> SpellCritPercentage;
|
||||
UpdateField<int32, 34, 53> ShieldBlock;
|
||||
UpdateField<float, 34, 54> ShieldBlockCritPercentage;
|
||||
UpdateField<float, 34, 55> Mastery;
|
||||
UpdateField<float, 34, 56> Speed;
|
||||
UpdateField<float, 34, 57> Avoidance;
|
||||
UpdateField<float, 34, 58> Sturdiness;
|
||||
UpdateField<int32, 34, 59> Versatility;
|
||||
UpdateField<float, 34, 60> VersatilityBonus;
|
||||
UpdateField<float, 34, 61> PvpPowerDamage;
|
||||
UpdateField<float, 34, 62> PvpPowerHealing;
|
||||
UpdateField<int32, 34, 63> ModHealingDonePos;
|
||||
UpdateField<float, 34, 64> ModHealingPercent;
|
||||
UpdateField<float, 34, 65> ModPeriodicHealingDonePercent;
|
||||
UpdateField<float, 66, 67> ModSpellPowerPercent;
|
||||
UpdateField<float, 66, 68> ModResiliencePercent;
|
||||
UpdateField<float, 66, 69> OverrideSpellPowerByAPPercent;
|
||||
UpdateField<float, 66, 70> OverrideAPBySpellPowerPercent;
|
||||
UpdateField<int32, 66, 71> ModTargetResistance;
|
||||
UpdateField<int32, 66, 72> ModTargetPhysicalResistance;
|
||||
UpdateField<uint32, 66, 73> LocalFlags;
|
||||
UpdateField<uint8, 66, 74> GrantableLevels;
|
||||
UpdateField<uint8, 66, 75> MultiActionBars;
|
||||
UpdateField<uint8, 66, 76> LifetimeMaxRank;
|
||||
UpdateField<uint8, 66, 77> NumRespecs;
|
||||
UpdateField<uint32, 66, 78> PvpMedals;
|
||||
UpdateField<uint16, 66, 79> TodayHonorableKills;
|
||||
UpdateField<uint16, 66, 80> YesterdayHonorableKills;
|
||||
UpdateField<uint32, 66, 81> LifetimeHonorableKills;
|
||||
UpdateField<int32, 66, 82> WatchedFactionIndex;
|
||||
UpdateField<int32, 66, 83> MaxLevel;
|
||||
UpdateField<int32, 66, 84> ScalingPlayerLevelDelta;
|
||||
UpdateField<int32, 66, 85> MaxCreatureScalingLevel;
|
||||
UpdateField<int32, 66, 86> PetSpellPower;
|
||||
UpdateField<float, 66, 87> UiHitModifier;
|
||||
UpdateField<float, 66, 88> UiSpellHitModifier;
|
||||
UpdateField<int32, 66, 89> HomeRealmTimeOffset;
|
||||
UpdateField<float, 66, 90> ModPetHaste;
|
||||
UpdateField<int8, 66, 91> JailersTowerLevelMax;
|
||||
UpdateField<int8, 66, 92> JailersTowerLevel;
|
||||
UpdateField<uint8, 66, 93> LocalRegenFlags;
|
||||
UpdateField<uint8, 66, 94> AuraVision;
|
||||
UpdateField<uint8, 66, 95> NumBackpackSlots;
|
||||
UpdateField<int32, 66, 96> OverrideSpellsID;
|
||||
UpdateField<uint16, 66, 97> LootSpecID;
|
||||
UpdateField<uint32, 98, 99> OverrideZonePVPType;
|
||||
UpdateField<ObjectGuid, 98, 100> BnetAccount;
|
||||
UpdateField<uint64, 98, 101> GuildClubMemberID;
|
||||
UpdateField<int32, 98, 102> Honor;
|
||||
UpdateField<int32, 98, 103> HonorNextLevel;
|
||||
UpdateField<uint8, 98, 104> NumBankSlots;
|
||||
UpdateField<UF::ActivePlayerUnk901, 98, 106> Field_1410;
|
||||
OptionalUpdateField<UF::QuestSession, 98, 105> QuestSession;
|
||||
UpdateField<int32, 98, 107> UiChromieTimeExpansionID;
|
||||
UpdateField<int32, 98, 108> TransportServerTime;
|
||||
UpdateField<uint32, 98, 109> WeeklyRewardsPeriodSinceOrigin; // week count since Cfg_RegionsEntry::ChallengeOrigin
|
||||
UpdateField<int16, 98, 110> DEBUGSoulbindConduitRank;
|
||||
UpdateField<WorldPackets::MythicPlus::DungeonScoreData, 98, 111> DungeonScore;
|
||||
UpdateFieldArray<ObjectGuid, 199, 112, 113> InvSlots;
|
||||
UpdateFieldArray<uint64, 240, 312, 313> ExploredZones;
|
||||
UpdateFieldArray<UF::RestInfo, 2, 553, 554> RestInfo;
|
||||
UpdateFieldArray<int32, 7, 556, 557> ModDamageDonePos;
|
||||
UpdateFieldArray<int32, 7, 556, 564> ModDamageDoneNeg;
|
||||
UpdateFieldArray<float, 7, 556, 571> ModDamageDonePercent;
|
||||
UpdateFieldArray<float, 7, 556, 578> ModHealingDonePercent;
|
||||
UpdateFieldArray<float, 3, 585, 586> WeaponDmgMultipliers;
|
||||
UpdateFieldArray<float, 3, 585, 589> WeaponAtkSpeedMultipliers;
|
||||
UpdateFieldArray<uint32, 12, 592, 593> BuybackPrice;
|
||||
UpdateFieldArray<int64, 12, 592, 605> BuybackTimestamp;
|
||||
UpdateFieldArray<int32, 32, 617, 618> CombatRatings;
|
||||
UpdateFieldArray<UF::PVPInfo, 6, 650, 651> PvpInfo;
|
||||
UpdateFieldArray<uint32, 4, 657, 658> NoReagentCostMask;
|
||||
UpdateFieldArray<int32, 2, 662, 663> ProfessionSkillLine;
|
||||
UpdateFieldArray<uint32, 4, 665, 666> BagSlotFlags;
|
||||
UpdateFieldArray<uint32, 7, 670, 671> BankBagSlotFlags;
|
||||
UpdateFieldArray<uint64, 875, 678, 679> QuestCompleted;
|
||||
DynamicUpdateField<uint16, 0, 7> ResearchSites;
|
||||
DynamicUpdateField<uint32, 0, 8> ResearchSiteProgress;
|
||||
DynamicUpdateField<int32, 0, 9> DailyQuestsCompleted;
|
||||
DynamicUpdateField<int32, 0, 10> AvailableQuestLineXQuestIDs;
|
||||
DynamicUpdateField<int32, 0, 11> Heirlooms;
|
||||
DynamicUpdateField<uint32, 0, 12> HeirloomFlags;
|
||||
DynamicUpdateField<int32, 0, 13> Toys;
|
||||
DynamicUpdateField<uint32, 0, 14> ToyFlags;
|
||||
DynamicUpdateField<uint32, 0, 15> Transmog;
|
||||
DynamicUpdateField<int32, 0, 16> ConditionalTransmog;
|
||||
DynamicUpdateField<int32, 0, 17> SelfResSpells;
|
||||
DynamicUpdateField<uint32, 0, 18> RuneforgePowers;
|
||||
DynamicUpdateField<uint32, 0, 19> TransmogIllusions;
|
||||
DynamicUpdateField<UF::SpellPctModByLabel, 0, 21> SpellPctModByLabel;
|
||||
DynamicUpdateField<UF::SpellFlatModByLabel, 0, 22> SpellFlatModByLabel;
|
||||
DynamicUpdateField<UF::MawPower, 0, 23> MawPowers;
|
||||
DynamicUpdateField<UF::MultiFloorExplore, 0, 24> MultiFloorExploration;
|
||||
DynamicUpdateField<UF::RecipeProgressionInfo, 0, 25> RecipeProgression;
|
||||
DynamicUpdateField<UF::ReplayedQuest, 0, 26> ReplayedQuests;
|
||||
DynamicUpdateField<int32, 0, 27> DisabledSpells;
|
||||
DynamicUpdateField<UF::PVPInfo, 0, 6> PvpInfo;
|
||||
DynamicUpdateField<UF::CharacterRestriction, 0, 20> CharacterRestrictions;
|
||||
DynamicUpdateField<UF::TraitConfig, 0, 28> TraitConfigs;
|
||||
DynamicUpdateField<UF::CraftingOrder, 0, 29> CraftingOrders;
|
||||
UpdateField<ObjectGuid, 0, 32> FarsightObject;
|
||||
UpdateField<ObjectGuid, 0, 33> SummonedBattlePetGUID;
|
||||
UpdateField<uint64, 34, 35> Coinage;
|
||||
UpdateField<int32, 34, 36> XP;
|
||||
UpdateField<int32, 34, 37> NextLevelXP;
|
||||
UpdateField<int32, 34, 38> TrialXP;
|
||||
UpdateField<UF::SkillInfo, 34, 39> Skill;
|
||||
UpdateField<int32, 34, 40> CharacterPoints;
|
||||
UpdateField<int32, 34, 41> MaxTalentTiers;
|
||||
UpdateField<uint32, 34, 42> TrackCreatureMask;
|
||||
UpdateField<float, 34, 43> MainhandExpertise;
|
||||
UpdateField<float, 34, 44> OffhandExpertise;
|
||||
UpdateField<float, 34, 45> RangedExpertise;
|
||||
UpdateField<float, 34, 46> CombatRatingExpertise;
|
||||
UpdateField<float, 34, 47> BlockPercentage;
|
||||
UpdateField<float, 34, 48> DodgePercentage;
|
||||
UpdateField<float, 34, 49> DodgePercentageFromAttribute;
|
||||
UpdateField<float, 34, 50> ParryPercentage;
|
||||
UpdateField<float, 34, 51> ParryPercentageFromAttribute;
|
||||
UpdateField<float, 34, 52> CritPercentage;
|
||||
UpdateField<float, 34, 53> RangedCritPercentage;
|
||||
UpdateField<float, 34, 54> OffhandCritPercentage;
|
||||
UpdateField<float, 34, 55> SpellCritPercentage;
|
||||
UpdateField<int32, 34, 56> ShieldBlock;
|
||||
UpdateField<float, 34, 57> ShieldBlockCritPercentage;
|
||||
UpdateField<float, 34, 58> Mastery;
|
||||
UpdateField<float, 34, 59> Speed;
|
||||
UpdateField<float, 34, 60> Avoidance;
|
||||
UpdateField<float, 34, 61> Sturdiness;
|
||||
UpdateField<int32, 34, 62> Versatility;
|
||||
UpdateField<float, 34, 63> VersatilityBonus;
|
||||
UpdateField<float, 34, 64> PvpPowerDamage;
|
||||
UpdateField<float, 34, 65> PvpPowerHealing;
|
||||
UpdateField<int32, 66, 67> ModHealingDonePos;
|
||||
UpdateField<float, 66, 68> ModHealingPercent;
|
||||
UpdateField<float, 66, 69> ModPeriodicHealingDonePercent;
|
||||
UpdateField<float, 66, 70> ModSpellPowerPercent;
|
||||
UpdateField<float, 66, 71> ModResiliencePercent;
|
||||
UpdateField<float, 66, 72> OverrideSpellPowerByAPPercent;
|
||||
UpdateField<float, 66, 73> OverrideAPBySpellPowerPercent;
|
||||
UpdateField<int32, 66, 74> ModTargetResistance;
|
||||
UpdateField<int32, 66, 75> ModTargetPhysicalResistance;
|
||||
UpdateField<uint32, 66, 76> LocalFlags;
|
||||
UpdateField<uint8, 66, 77> GrantableLevels;
|
||||
UpdateField<uint8, 66, 78> MultiActionBars;
|
||||
UpdateField<uint8, 66, 79> LifetimeMaxRank;
|
||||
UpdateField<uint8, 66, 80> NumRespecs;
|
||||
UpdateField<uint32, 66, 81> PvpMedals;
|
||||
UpdateField<uint16, 66, 82> TodayHonorableKills;
|
||||
UpdateField<uint16, 66, 83> YesterdayHonorableKills;
|
||||
UpdateField<uint32, 66, 84> LifetimeHonorableKills;
|
||||
UpdateField<int32, 66, 85> WatchedFactionIndex;
|
||||
UpdateField<int32, 66, 86> MaxLevel;
|
||||
UpdateField<int32, 66, 87> ScalingPlayerLevelDelta;
|
||||
UpdateField<int32, 66, 88> MaxCreatureScalingLevel;
|
||||
UpdateField<int32, 66, 89> PetSpellPower;
|
||||
UpdateField<float, 66, 90> UiHitModifier;
|
||||
UpdateField<float, 66, 91> UiSpellHitModifier;
|
||||
UpdateField<int32, 66, 92> HomeRealmTimeOffset;
|
||||
UpdateField<float, 66, 93> ModPetHaste;
|
||||
UpdateField<int8, 66, 94> JailersTowerLevelMax;
|
||||
UpdateField<int8, 66, 95> JailersTowerLevel;
|
||||
UpdateField<uint8, 66, 96> LocalRegenFlags;
|
||||
UpdateField<uint8, 66, 97> AuraVision;
|
||||
UpdateField<uint8, 98, 99> NumBackpackSlots;
|
||||
UpdateField<int32, 98, 100> OverrideSpellsID;
|
||||
UpdateField<uint16, 98, 101> LootSpecID;
|
||||
UpdateField<uint32, 98, 102> OverrideZonePVPType;
|
||||
UpdateField<ObjectGuid, 98, 103> BnetAccount;
|
||||
UpdateField<uint64, 98, 104> GuildClubMemberID;
|
||||
UpdateField<int32, 98, 105> Honor;
|
||||
UpdateField<int32, 98, 106> HonorNextLevel;
|
||||
UpdateField<uint8, 98, 107> NumBankSlots;
|
||||
UpdateField<UF::ActivePlayerUnk901, 98, 109> Field_1410;
|
||||
OptionalUpdateField<UF::QuestSession, 98, 108> QuestSession;
|
||||
UpdateField<int32, 98, 110> UiChromieTimeExpansionID;
|
||||
UpdateField<int32, 98, 111> TransportServerTime;
|
||||
UpdateField<uint32, 98, 112> WeeklyRewardsPeriodSinceOrigin; // week count since Cfg_RegionsEntry::ChallengeOrigin
|
||||
UpdateField<int16, 98, 113> DEBUGSoulbindConduitRank;
|
||||
UpdateField<WorldPackets::MythicPlus::DungeonScoreData, 98, 114> DungeonScore;
|
||||
UpdateField<uint32, 98, 115> ActiveCombatTraitConfigID;
|
||||
UpdateFieldArray<ObjectGuid, 218, 116, 117> InvSlots;
|
||||
UpdateFieldArray<uint64, 240, 335, 336> ExploredZones;
|
||||
UpdateFieldArray<UF::RestInfo, 2, 576, 577> RestInfo;
|
||||
UpdateFieldArray<int32, 7, 579, 580> ModDamageDonePos;
|
||||
UpdateFieldArray<int32, 7, 579, 587> ModDamageDoneNeg;
|
||||
UpdateFieldArray<float, 7, 579, 594> ModDamageDonePercent;
|
||||
UpdateFieldArray<float, 7, 579, 601> ModHealingDonePercent;
|
||||
UpdateFieldArray<float, 3, 608, 609> WeaponDmgMultipliers;
|
||||
UpdateFieldArray<float, 3, 608, 612> WeaponAtkSpeedMultipliers;
|
||||
UpdateFieldArray<uint32, 12, 615, 616> BuybackPrice;
|
||||
UpdateFieldArray<int64, 12, 615, 628> BuybackTimestamp;
|
||||
UpdateFieldArray<int32, 32, 640, 641> CombatRatings;
|
||||
UpdateFieldArray<uint32, 4, 673, 674> NoReagentCostMask;
|
||||
UpdateFieldArray<int32, 2, 678, 679> ProfessionSkillLine;
|
||||
UpdateFieldArray<uint32, 5, 681, 682> BagSlotFlags;
|
||||
UpdateFieldArray<uint32, 7, 687, 688> BankBagSlotFlags;
|
||||
UpdateFieldArray<uint64, 875, 695, 696> QuestCompleted;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, Player const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, Player const* owner, Player const* receiver) const;
|
||||
@@ -790,30 +888,34 @@ struct ActivePlayerData : public IsUpdateFieldStructureTag, public HasChangesMas
|
||||
void ClearChangesMask();
|
||||
};
|
||||
|
||||
struct GameObjectData : public IsUpdateFieldStructureTag, public HasChangesMask<21>
|
||||
struct GameObjectData : public IsUpdateFieldStructureTag, public HasChangesMask<25>
|
||||
{
|
||||
UpdateField<std::vector<uint32>, 0, 1> StateWorldEffectIDs;
|
||||
DynamicUpdateField<int32, 0, 2> EnableDoodadSets;
|
||||
UpdateField<int32, 0, 3> DisplayID;
|
||||
UpdateField<uint32, 0, 4> SpellVisualID;
|
||||
UpdateField<uint32, 0, 5> StateSpellVisualID;
|
||||
UpdateField<uint32, 0, 6> SpawnTrackingStateAnimID;
|
||||
UpdateField<uint32, 0, 7> SpawnTrackingStateAnimKitID;
|
||||
UpdateField<uint32, 0, 8> StateWorldEffectsQuestObjectiveID;
|
||||
UpdateField<ObjectGuid, 0, 9> CreatedBy;
|
||||
UpdateField<ObjectGuid, 0, 10> GuildGUID;
|
||||
UpdateField<uint32, 0, 11> Flags;
|
||||
DynamicUpdateField<int32, 0, 3> WorldEffects;
|
||||
UpdateField<int32, 0, 4> DisplayID;
|
||||
UpdateField<uint32, 0, 5> SpellVisualID;
|
||||
UpdateField<uint32, 0, 6> StateSpellVisualID;
|
||||
UpdateField<uint32, 0, 7> SpawnTrackingStateAnimID;
|
||||
UpdateField<uint32, 0, 8> SpawnTrackingStateAnimKitID;
|
||||
UpdateField<uint32, 0, 9> StateWorldEffectsQuestObjectiveID;
|
||||
UpdateField<ObjectGuid, 0, 10> CreatedBy;
|
||||
UpdateField<ObjectGuid, 0, 11> GuildGUID;
|
||||
UpdateField<uint32, 0, 12> Flags;
|
||||
struct FlagsTag : ViewerDependentValueTag<uint32> {};
|
||||
UpdateField<QuaternionData, 0, 12> ParentRotation;
|
||||
UpdateField<int32, 0, 13> FactionTemplate;
|
||||
UpdateField<int8, 0, 14> State;
|
||||
UpdateField<QuaternionData, 0, 13> ParentRotation;
|
||||
UpdateField<int32, 0, 14> FactionTemplate;
|
||||
UpdateField<int8, 0, 15> State;
|
||||
struct StateTag : ViewerDependentValueTag<int8> {};
|
||||
UpdateField<int8, 0, 15> TypeID;
|
||||
UpdateField<uint8, 0, 16> PercentHealth;
|
||||
UpdateField<uint32, 0, 17> ArtKit;
|
||||
UpdateField<uint32, 0, 18> CustomParam;
|
||||
UpdateField<int32, 0, 19> Level;
|
||||
UpdateField<uint32, 0, 20> AnimGroupInstance;
|
||||
UpdateField<int8, 0, 16> TypeID;
|
||||
UpdateField<uint8, 0, 17> PercentHealth;
|
||||
UpdateField<uint32, 0, 18> ArtKit;
|
||||
UpdateField<uint32, 0, 19> CustomParam;
|
||||
UpdateField<int32, 0, 20> Level;
|
||||
UpdateField<uint32, 0, 21> AnimGroupInstance;
|
||||
UpdateField<uint32, 0, 22> UiWidgetItemID;
|
||||
UpdateField<uint32, 0, 23> UiWidgetItemQuality;
|
||||
UpdateField<uint32, 0, 24> UiWidgetItemUnknown1000;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, GameObject const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, GameObject const* owner, Player const* receiver) const;
|
||||
@@ -882,25 +984,30 @@ struct VisualAnim : public IsUpdateFieldStructureTag, public HasChangesMask<5>
|
||||
void ClearChangesMask();
|
||||
};
|
||||
|
||||
struct AreaTriggerData : public IsUpdateFieldStructureTag, public HasChangesMask<18>
|
||||
struct AreaTriggerData : public IsUpdateFieldStructureTag, public HasChangesMask<23>
|
||||
{
|
||||
UpdateField<UF::ScaleCurve, 0, 1> OverrideScaleCurve;
|
||||
UpdateField<UF::ScaleCurve, 0, 2> ExtraScaleCurve;
|
||||
UpdateField<ObjectGuid, 0, 3> Caster;
|
||||
UpdateField<uint32, 0, 4> Duration;
|
||||
UpdateField<uint32, 0, 5> TimeToTarget;
|
||||
UpdateField<uint32, 0, 6> TimeToTargetScale;
|
||||
UpdateField<uint32, 0, 7> TimeToTargetExtraScale;
|
||||
UpdateField<int32, 0, 8> SpellID;
|
||||
UpdateField<int32, 0, 9> SpellForVisuals;
|
||||
UpdateField<UF::SpellCastVisual, 0, 10> SpellVisual;
|
||||
UpdateField<float, 0, 11> BoundsRadius2D;
|
||||
UpdateField<uint32, 0, 12> DecalPropertiesID;
|
||||
UpdateField<ObjectGuid, 0, 13> CreatingEffectGUID;
|
||||
UpdateField<uint32, 0, 14> Field_80;
|
||||
UpdateField<uint32, 0, 15> Field_84;
|
||||
UpdateField<ObjectGuid, 0, 16> Field_88;
|
||||
UpdateField<UF::VisualAnim, 0, 17> VisualAnim;
|
||||
UpdateField<UF::ScaleCurve, 0, 3> Field_C38;
|
||||
UpdateField<UF::ScaleCurve, 0, 4> Field_C54;
|
||||
UpdateField<UF::ScaleCurve, 0, 5> Field_C70;
|
||||
UpdateField<ObjectGuid, 0, 6> Caster;
|
||||
UpdateField<uint32, 0, 7> Duration;
|
||||
UpdateField<uint32, 0, 8> TimeToTarget;
|
||||
UpdateField<uint32, 0, 9> TimeToTargetScale;
|
||||
UpdateField<uint32, 0, 10> TimeToTargetExtraScale;
|
||||
UpdateField<uint32, 0, 11> Field_B0;
|
||||
UpdateField<int32, 0, 12> SpellID;
|
||||
UpdateField<int32, 0, 13> SpellForVisuals;
|
||||
UpdateField<UF::SpellCastVisual, 0, 14> SpellVisual;
|
||||
UpdateField<float, 0, 15> BoundsRadius2D;
|
||||
UpdateField<uint32, 0, 16> DecalPropertiesID;
|
||||
UpdateField<ObjectGuid, 0, 17> CreatingEffectGUID;
|
||||
UpdateField<uint32, 0, 18> Field_80;
|
||||
UpdateField<uint32, 0, 19> Field_84;
|
||||
UpdateField<ObjectGuid, 0, 20> Field_88;
|
||||
UpdateField<TaggedPosition<Position::XYZ>, 0, 21> Field_F8;
|
||||
UpdateField<UF::VisualAnim, 0, 22> VisualAnim;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, AreaTrigger const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, AreaTrigger const* owner, Player const* receiver) const;
|
||||
|
||||
@@ -322,9 +322,9 @@ void CollectionMgr::CheckHeirloomUpgrades(Item* item)
|
||||
return;
|
||||
}
|
||||
|
||||
auto const& bonusListIDs = item->m_itemData->BonusListIDs;
|
||||
std::vector<int32> const& bonusListIDs = item->GetBonusListIDs();
|
||||
|
||||
for (uint32 bonusId : *bonusListIDs)
|
||||
for (uint32 bonusId : bonusListIDs)
|
||||
{
|
||||
if (bonusId != itr->second.bonusId)
|
||||
{
|
||||
@@ -333,7 +333,7 @@ void CollectionMgr::CheckHeirloomUpgrades(Item* item)
|
||||
}
|
||||
}
|
||||
|
||||
if (std::find(bonusListIDs->begin(), bonusListIDs->end(), int32(itr->second.bonusId)) == bonusListIDs->end())
|
||||
if (std::find(bonusListIDs.begin(), bonusListIDs.end(), int32(itr->second.bonusId)) == bonusListIDs.end())
|
||||
item->AddBonuses(itr->second.bonusId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac
|
||||
|
||||
// original items
|
||||
for (PlayerCreateInfoItem initialItem : info->item)
|
||||
StoreNewItemInBestSlots(initialItem.item_id, initialItem.item_amount);
|
||||
StoreNewItemInBestSlots(initialItem.item_id, initialItem.item_amount, info->itemContext);
|
||||
|
||||
// bags and main-hand weapon must equipped at this moment
|
||||
// now second pass for not equipped (offhand weapon/shield if it attempt equipped before main-hand weapon)
|
||||
@@ -581,46 +581,45 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount)
|
||||
bool Player::StoreNewItemInBestSlots(uint32 itemId, uint32 amount, ItemContext context)
|
||||
{
|
||||
TC_LOG_DEBUG("entities.player.items", "Player::StoreNewItemInBestSlots: Player '%s' (%s) creates initial item (ItemID: %u, Count: %u)",
|
||||
GetName().c_str(), GetGUID().ToString().c_str(), titem_id, titem_amount);
|
||||
GetName().c_str(), GetGUID().ToString().c_str(), itemId, amount);
|
||||
|
||||
ItemContext itemContext = ItemContext::New_Character;
|
||||
std::vector<int32> bonusListIDs;
|
||||
std::set<uint32> contextBonuses = sDB2Manager.GetDefaultItemBonusTree(titem_id, itemContext);
|
||||
std::set<uint32> contextBonuses = sDB2Manager.GetDefaultItemBonusTree(itemId, context);
|
||||
bonusListIDs.insert(bonusListIDs.begin(), contextBonuses.begin(), contextBonuses.end());
|
||||
|
||||
// attempt equip by one
|
||||
while (titem_amount > 0)
|
||||
while (amount > 0)
|
||||
{
|
||||
uint16 eDest;
|
||||
InventoryResult msg = CanEquipNewItem(NULL_SLOT, eDest, titem_id, false);
|
||||
InventoryResult msg = CanEquipNewItem(NULL_SLOT, eDest, itemId, false);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
break;
|
||||
|
||||
Item* item = EquipNewItem(eDest, titem_id, itemContext, true);
|
||||
Item* item = EquipNewItem(eDest, itemId, context, true);
|
||||
item->SetBonuses(bonusListIDs);
|
||||
AutoUnequipOffhandIfNeed();
|
||||
--titem_amount;
|
||||
--amount;
|
||||
}
|
||||
|
||||
if (titem_amount == 0)
|
||||
if (amount == 0)
|
||||
return true; // equipped
|
||||
|
||||
// attempt store
|
||||
ItemPosCountVec sDest;
|
||||
// store in main bag to simplify second pass (special bags can be not equipped yet at this moment)
|
||||
InventoryResult msg = CanStoreNewItem(INVENTORY_SLOT_BAG_0, NULL_SLOT, sDest, titem_id, titem_amount);
|
||||
InventoryResult msg = CanStoreNewItem(INVENTORY_SLOT_BAG_0, NULL_SLOT, sDest, itemId, amount);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
StoreNewItem(sDest, titem_id, true, GenerateItemRandomBonusListId(titem_id), GuidSet(), itemContext, bonusListIDs);
|
||||
StoreNewItem(sDest, itemId, true, GenerateItemRandomBonusListId(itemId), GuidSet(), context, bonusListIDs);
|
||||
return true; // stored
|
||||
}
|
||||
|
||||
// item can't be added
|
||||
TC_LOG_ERROR("entities.player.items", "Player::StoreNewItemInBestSlots: Player '%s' (%s) can't equip or store initial item (ItemID: %u, Race: %u, Class: %u, InventoryResult: %u)",
|
||||
GetName().c_str(), GetGUID().ToString().c_str(), titem_id, GetRace(), GetClass(), msg);
|
||||
GetName().c_str(), GetGUID().ToString().c_str(), itemId, GetRace(), GetClass(), msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2292,7 +2291,6 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate)
|
||||
packet.Reason = victim ? LOG_XP_REASON_KILL : LOG_XP_REASON_NO_KILL;
|
||||
packet.Amount = xp;
|
||||
packet.GroupBonus = group_rate;
|
||||
packet.ReferAFriendBonusType = recruitAFriend ? 1 : 0;
|
||||
SendDirectMessage(packet.Write());
|
||||
|
||||
uint32 nextLvlXP = GetXPForNextLevel();
|
||||
@@ -3182,10 +3180,11 @@ void Player::LearnSpell(uint32 spell_id, bool dependent, int32 fromSkill /*= 0*/
|
||||
// prevent duplicated entires in spell book, also not send if not in world (loading)
|
||||
if (learning && IsInWorld())
|
||||
{
|
||||
WorldPackets::Spells::LearnedSpells packet;
|
||||
packet.SpellID.push_back(spell_id);
|
||||
packet.SuppressMessaging = suppressMessaging;
|
||||
SendDirectMessage(packet.Write());
|
||||
WorldPackets::Spells::LearnedSpells learnedSpells;
|
||||
WorldPackets::Spells::LearnedSpellInfo& learnedSpellInfo = learnedSpells.ClientLearnedSpellData.emplace_back();
|
||||
learnedSpellInfo.SpellID = spell_id;
|
||||
learnedSpells.SuppressMessaging = suppressMessaging;
|
||||
SendDirectMessage(learnedSpells.Write());
|
||||
}
|
||||
|
||||
// learn all disabled higher ranks and required spells (recursive)
|
||||
@@ -3519,7 +3518,7 @@ void Player::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c
|
||||
{
|
||||
if (target == this)
|
||||
{
|
||||
for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < BANK_SLOT_BAG_END; ++i)
|
||||
{
|
||||
if (m_items[i] == nullptr)
|
||||
continue;
|
||||
@@ -3527,23 +3526,7 @@ void Player::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c
|
||||
m_items[i]->BuildCreateUpdateBlockForPlayer(data, target);
|
||||
}
|
||||
|
||||
for (uint8 i = INVENTORY_SLOT_BAG_START; i < BANK_SLOT_BAG_END; ++i)
|
||||
{
|
||||
if (m_items[i] == nullptr)
|
||||
continue;
|
||||
|
||||
m_items[i]->BuildCreateUpdateBlockForPlayer(data, target);
|
||||
}
|
||||
|
||||
for (uint8 i = REAGENT_SLOT_START; i < REAGENT_SLOT_END; ++i)
|
||||
{
|
||||
if (m_items[i] == nullptr)
|
||||
continue;
|
||||
|
||||
m_items[i]->BuildCreateUpdateBlockForPlayer(data, target);
|
||||
}
|
||||
|
||||
for (uint8 i = CHILD_EQUIPMENT_SLOT_START; i < CHILD_EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint8 i = REAGENT_SLOT_START; i < CHILD_EQUIPMENT_SLOT_END; ++i)
|
||||
{
|
||||
if (m_items[i] == nullptr)
|
||||
continue;
|
||||
@@ -3684,7 +3667,7 @@ void Player::DestroyForPlayer(Player* target) const
|
||||
|
||||
if (target == this)
|
||||
{
|
||||
for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < BANK_SLOT_BAG_END; ++i)
|
||||
{
|
||||
if (m_items[i] == nullptr)
|
||||
continue;
|
||||
@@ -3692,23 +3675,7 @@ void Player::DestroyForPlayer(Player* target) const
|
||||
m_items[i]->DestroyForPlayer(target);
|
||||
}
|
||||
|
||||
for (uint8 i = INVENTORY_SLOT_BAG_START; i < BANK_SLOT_BAG_END; ++i)
|
||||
{
|
||||
if (m_items[i] == nullptr)
|
||||
continue;
|
||||
|
||||
m_items[i]->DestroyForPlayer(target);
|
||||
}
|
||||
|
||||
for (uint8 i = REAGENT_SLOT_START; i < REAGENT_SLOT_END; ++i)
|
||||
{
|
||||
if (m_items[i] == nullptr)
|
||||
continue;
|
||||
|
||||
m_items[i]->DestroyForPlayer(target);
|
||||
}
|
||||
|
||||
for (uint8 i = CHILD_EQUIPMENT_SLOT_START; i < CHILD_EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint8 i = REAGENT_SLOT_START; i < CHILD_EQUIPMENT_SLOT_END; ++i)
|
||||
{
|
||||
if (m_items[i] == nullptr)
|
||||
continue;
|
||||
@@ -4493,7 +4460,7 @@ Corpse* Player::CreateCorpse()
|
||||
corpse->SetDisplayId(GetNativeDisplayId());
|
||||
corpse->SetFactionTemplate(sChrRacesStore.AssertEntry(GetRace())->FactionID);
|
||||
|
||||
for (uint8 i = 0; i < EQUIPMENT_SLOT_END; i++)
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++)
|
||||
{
|
||||
if (m_items[i])
|
||||
{
|
||||
@@ -8211,8 +8178,9 @@ void Player::ApplyArtifactPowerRank(Item* artifact, ArtifactPowerRankEntry const
|
||||
{
|
||||
AddTemporarySpell(artifactPowerRank->SpellID);
|
||||
WorldPackets::Spells::LearnedSpells learnedSpells;
|
||||
WorldPackets::Spells::LearnedSpellInfo& learnedSpellInfo = learnedSpells.ClientLearnedSpellData.emplace_back();
|
||||
learnedSpellInfo.SpellID = artifactPowerRank->SpellID;
|
||||
learnedSpells.SuppressMessaging = true;
|
||||
learnedSpells.SpellID.push_back(artifactPowerRank->SpellID);
|
||||
SendDirectMessage(learnedSpells.Write());
|
||||
}
|
||||
else if (!apply)
|
||||
@@ -8898,8 +8866,11 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
|
||||
void Player::SetBindPoint(ObjectGuid guid) const
|
||||
{
|
||||
WorldPackets::Misc::BinderConfirm packet(guid);
|
||||
SendDirectMessage(packet.Write());
|
||||
WorldPackets::NPC::NPCInteractionOpenResult npcInteraction;
|
||||
npcInteraction.Npc = guid;
|
||||
npcInteraction.InteractionType = PlayerInteractionType::Binder;
|
||||
npcInteraction.Success = true;
|
||||
SendDirectMessage(npcInteraction.Write());
|
||||
}
|
||||
|
||||
void Player::SendRespecWipeConfirm(ObjectGuid const& guid, uint32 cost, SpecResetType respecType) const
|
||||
@@ -9064,10 +9035,16 @@ uint32 Player::GetFreeInventorySlotCount(EnumFlag<ItemSearchLocation> location /
|
||||
uint32 freeSlotCount = 0;
|
||||
|
||||
if (location.HasFlag(ItemSearchLocation::Equipment))
|
||||
{
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||
if (!GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
++freeSlotCount;
|
||||
|
||||
for (uint8 i = PROFESSION_SLOT_START; i < PROFESSION_SLOT_END; ++i)
|
||||
if (!GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
++freeSlotCount;
|
||||
}
|
||||
|
||||
if (location.HasFlag(ItemSearchLocation::Inventory))
|
||||
{
|
||||
uint8 inventoryEnd = INVENTORY_SLOT_ITEM_START + GetInventorySlotCount();
|
||||
@@ -9096,9 +9073,17 @@ uint32 Player::GetFreeInventorySlotCount(EnumFlag<ItemSearchLocation> location /
|
||||
}
|
||||
|
||||
if (location.HasFlag(ItemSearchLocation::ReagentBank))
|
||||
{
|
||||
for (uint8 i = REAGENT_BAG_SLOT_START; i < REAGENT_BAG_SLOT_END; ++i)
|
||||
if (Bag* bag = GetBagByPos(i))
|
||||
for (uint32 j = 0; j < GetBagSize(bag); ++j)
|
||||
if (!GetItemInBag(bag, j))
|
||||
++freeSlotCount;
|
||||
|
||||
for (uint8 i = REAGENT_SLOT_START; i < REAGENT_SLOT_END; ++i)
|
||||
if (!GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
++freeSlotCount;
|
||||
}
|
||||
|
||||
return freeSlotCount;
|
||||
}
|
||||
@@ -9233,7 +9218,8 @@ Item* Player::GetUseableItemByPos(uint8 bag, uint8 slot) const
|
||||
Bag* Player::GetBagByPos(uint8 bag) const
|
||||
{
|
||||
if ((bag >= INVENTORY_SLOT_BAG_START && bag < INVENTORY_SLOT_BAG_END)
|
||||
|| (bag >= BANK_SLOT_BAG_START && bag < BANK_SLOT_BAG_END))
|
||||
|| (bag >= BANK_SLOT_BAG_START && bag < BANK_SLOT_BAG_END)
|
||||
|| (bag >= REAGENT_BAG_SLOT_START && bag < REAGENT_BAG_SLOT_END))
|
||||
if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, bag))
|
||||
return item->ToBag();
|
||||
return nullptr;
|
||||
@@ -9355,8 +9341,12 @@ bool Player::IsEquipmentPos(uint8 bag, uint8 slot)
|
||||
{
|
||||
if (bag == INVENTORY_SLOT_BAG_0 && (slot < EQUIPMENT_SLOT_END))
|
||||
return true;
|
||||
if (bag == INVENTORY_SLOT_BAG_0 && (slot >= PROFESSION_SLOT_START && slot < PROFESSION_SLOT_END))
|
||||
return true;
|
||||
if (bag == INVENTORY_SLOT_BAG_0 && (slot >= INVENTORY_SLOT_BAG_START && slot < INVENTORY_SLOT_BAG_END))
|
||||
return true;
|
||||
if (bag == INVENTORY_SLOT_BAG_0 && (slot >= REAGENT_BAG_SLOT_START && slot < REAGENT_BAG_SLOT_END))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -9388,6 +9378,8 @@ bool Player::IsBagPos(uint16 pos)
|
||||
return true;
|
||||
if (bag == INVENTORY_SLOT_BAG_0 && (slot >= BANK_SLOT_BAG_START && slot < BANK_SLOT_BAG_END))
|
||||
return true;
|
||||
if (bag == INVENTORY_SLOT_BAG_0 && (slot >= REAGENT_BAG_SLOT_START && slot < REAGENT_BAG_SLOT_END))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -9412,10 +9404,18 @@ bool Player::IsValidPos(uint8 bag, uint8 slot, bool explicit_pos) const
|
||||
if (slot < EQUIPMENT_SLOT_END)
|
||||
return true;
|
||||
|
||||
// profession equipment
|
||||
if (slot >= PROFESSION_SLOT_START && slot < PROFESSION_SLOT_END)
|
||||
return true;
|
||||
|
||||
// bag equip slots
|
||||
if (slot >= INVENTORY_SLOT_BAG_START && slot < INVENTORY_SLOT_BAG_END)
|
||||
return true;
|
||||
|
||||
// reagent bag equip slots
|
||||
if (slot >= REAGENT_BAG_SLOT_START && slot < REAGENT_BAG_SLOT_END)
|
||||
return true;
|
||||
|
||||
// backpack slots
|
||||
if (slot >= INVENTORY_SLOT_ITEM_START && slot < INVENTORY_SLOT_ITEM_START + GetInventorySlotCount())
|
||||
return true;
|
||||
@@ -11663,7 +11663,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update)
|
||||
pItem->RemoveItemFlag2(ITEM_FIELD_FLAG2_EQUIPPED);
|
||||
|
||||
// remove item dependent auras and casts (only weapon and armor slots)
|
||||
if (slot < EQUIPMENT_SLOT_END)
|
||||
if (slot < PROFESSION_SLOT_END)
|
||||
{
|
||||
// update expertise
|
||||
if (slot == EQUIPMENT_SLOT_MAINHAND)
|
||||
@@ -13648,7 +13648,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId, bool showQues
|
||||
{
|
||||
switch (gossipMenuItem.OptionNpc)
|
||||
{
|
||||
case GossipOptionNpc::TaxiNode:
|
||||
case GossipOptionNpc::Taxinode:
|
||||
if (GetSession()->SendLearnNewTaxiNode(creature))
|
||||
return;
|
||||
break;
|
||||
@@ -13656,7 +13656,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId, bool showQues
|
||||
if (!isDead())
|
||||
canTalk = false;
|
||||
break;
|
||||
case GossipOptionNpc::BattleMaster:
|
||||
case GossipOptionNpc::Battlemaster:
|
||||
if (!creature->isCanInteractWithBattleMaster(this, false))
|
||||
canTalk = false;
|
||||
break;
|
||||
@@ -13666,7 +13666,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId, bool showQues
|
||||
if (!creature->CanResetTalents(this))
|
||||
canTalk = false;
|
||||
break;
|
||||
case GossipOptionNpc::StableMaster:
|
||||
case GossipOptionNpc::Stablemaster:
|
||||
case GossipOptionNpc::PetSpecializationMaster:
|
||||
if (GetClass() != CLASS_HUNTER)
|
||||
canTalk = false;
|
||||
@@ -13695,29 +13695,29 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId, bool showQues
|
||||
canTalk = false; // Deprecated
|
||||
break;
|
||||
case GossipOptionNpc::GuildBanker:
|
||||
case GossipOptionNpc::SpellClick:
|
||||
case GossipOptionNpc::WorldPVPQueue:
|
||||
case GossipOptionNpc::Spellclick:
|
||||
case GossipOptionNpc::WorldPvPQueue:
|
||||
case GossipOptionNpc::LFGDungeon:
|
||||
case GossipOptionNpc::ArtifactRespec:
|
||||
case GossipOptionNpc::QueueScenario:
|
||||
case GossipOptionNpc::GarrisonArchitect:
|
||||
case GossipOptionNpc::GarrisonMission:
|
||||
case GossipOptionNpc::GarrisonMissionNpc:
|
||||
case GossipOptionNpc::ShipmentCrafter:
|
||||
case GossipOptionNpc::GarrisonTradeskill:
|
||||
case GossipOptionNpc::GarrisonTradeskillNpc:
|
||||
case GossipOptionNpc::GarrisonRecruitment:
|
||||
case GossipOptionNpc::AdventureMap:
|
||||
case GossipOptionNpc::GarrisonTalent:
|
||||
case GossipOptionNpc::ContributionCollector:
|
||||
case GossipOptionNpc::IslandsMission:
|
||||
case GossipOptionNpc::IslandsMissionNpc:
|
||||
case GossipOptionNpc::UIItemInteraction:
|
||||
case GossipOptionNpc::WorldMap:
|
||||
case GossipOptionNpc::Soulbind:
|
||||
case GossipOptionNpc::ChromieTime:
|
||||
case GossipOptionNpc::CovenantPreview:
|
||||
case GossipOptionNpc::ChromieTimeNpc:
|
||||
case GossipOptionNpc::CovenantPreviewNpc:
|
||||
case GossipOptionNpc::RuneforgeLegendaryCrafting:
|
||||
case GossipOptionNpc::NewPlayerGuide:
|
||||
case GossipOptionNpc::RuneforgeLegendaryUpgrade:
|
||||
case GossipOptionNpc::CovenantRenown:
|
||||
case GossipOptionNpc::CovenantRenownNpc:
|
||||
break; // NYI
|
||||
default:
|
||||
TC_LOG_ERROR("sql.sql", "Creature entry %u has an unknown gossip option icon %u for menu %u.", creature->GetEntry(), AsUnderlyingType(gossipMenuItem.OptionNpc), gossipMenuItem.MenuID);
|
||||
@@ -13740,42 +13740,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId, bool showQues
|
||||
}
|
||||
|
||||
if (canTalk)
|
||||
{
|
||||
std::string strOptionText, strBoxText;
|
||||
BroadcastTextEntry const* optionBroadcastText = sBroadcastTextStore.LookupEntry(gossipMenuItem.OptionBroadcastTextID);
|
||||
BroadcastTextEntry const* boxBroadcastText = sBroadcastTextStore.LookupEntry(gossipMenuItem.BoxBroadcastTextID);
|
||||
LocaleConstant locale = GetSession()->GetSessionDbLocaleIndex();
|
||||
|
||||
if (optionBroadcastText)
|
||||
strOptionText = DB2Manager::GetBroadcastTextValue(optionBroadcastText, locale, GetGender());
|
||||
else
|
||||
strOptionText = gossipMenuItem.OptionText;
|
||||
|
||||
if (boxBroadcastText)
|
||||
strBoxText = DB2Manager::GetBroadcastTextValue(boxBroadcastText, locale, GetGender());
|
||||
else
|
||||
strBoxText = gossipMenuItem.BoxText;
|
||||
|
||||
if (locale != DEFAULT_LOCALE)
|
||||
{
|
||||
if (!optionBroadcastText)
|
||||
{
|
||||
/// Find localizations from database.
|
||||
if (GossipMenuItemsLocale const* gossipMenuLocale = sObjectMgr->GetGossipMenuItemsLocale(menuId, gossipMenuItem.OptionID))
|
||||
ObjectMgr::GetLocaleString(gossipMenuLocale->OptionText, locale, strOptionText);
|
||||
}
|
||||
|
||||
if (!boxBroadcastText)
|
||||
{
|
||||
/// Find localizations from database.
|
||||
if (GossipMenuItemsLocale const* gossipMenuLocale = sObjectMgr->GetGossipMenuItemsLocale(menuId, gossipMenuItem.OptionID))
|
||||
ObjectMgr::GetLocaleString(gossipMenuLocale->BoxText, locale, strBoxText);
|
||||
}
|
||||
}
|
||||
|
||||
menu->GetGossipMenu().AddMenuItem(gossipMenuItem.OptionID, gossipMenuItem.OptionNpc, strOptionText, 0, AsUnderlyingType(gossipMenuItem.OptionNpc), strBoxText, gossipMenuItem.BoxMoney, gossipMenuItem.BoxCoded);
|
||||
menu->GetGossipMenu().AddGossipMenuItemData(gossipMenuItem.OptionID, gossipMenuItem.ActionMenuID, gossipMenuItem.ActionPoiID);
|
||||
}
|
||||
menu->GetGossipMenu().AddMenuItem(gossipMenuItem, gossipMenuItem.MenuID, gossipMenuItem.OrderIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13804,7 +13769,7 @@ void Player::SendPreparedGossip(WorldObject* source)
|
||||
PlayerTalkClass->SendGossipMenu(textId, source->GetGUID());
|
||||
}
|
||||
|
||||
void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 menuId)
|
||||
void Player::OnGossipSelect(WorldObject* source, int32 gossipOptionId, uint32 menuId)
|
||||
{
|
||||
GossipMenu& gossipMenu = PlayerTalkClass->GetGossipMenu();
|
||||
|
||||
@@ -13812,7 +13777,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
|
||||
if (menuId != gossipMenu.GetMenuId())
|
||||
return;
|
||||
|
||||
GossipMenuItem const* item = gossipMenu.GetItem(gossipListId);
|
||||
GossipMenuItem const* item = gossipMenu.GetItem(gossipOptionId);
|
||||
if (!item)
|
||||
return;
|
||||
|
||||
@@ -13829,10 +13794,6 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
|
||||
}
|
||||
}
|
||||
|
||||
GossipMenuItemData const* menuItemData = gossipMenu.GetItemData(gossipListId);
|
||||
if (!menuItemData)
|
||||
return;
|
||||
|
||||
int64 cost = int64(item->BoxMoney);
|
||||
if (!HasEnoughMoney(cost))
|
||||
{
|
||||
@@ -13841,51 +13802,37 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
|
||||
return;
|
||||
}
|
||||
|
||||
if (item->ActionPoiID)
|
||||
PlayerTalkClass->SendPointOfInterest(item->ActionPoiID);
|
||||
|
||||
if (item->ActionMenuID)
|
||||
{
|
||||
PrepareGossipMenu(source, item->ActionMenuID);
|
||||
SendPreparedGossip(source);
|
||||
}
|
||||
|
||||
// types that have their dedicated open opcode dont send WorldPackets::NPC::GossipOptionNPCInteraction
|
||||
bool handled = true;
|
||||
switch (gossipOptionNpc)
|
||||
{
|
||||
case GossipOptionNpc::None:
|
||||
{
|
||||
if (menuItemData->GossipActionPoi)
|
||||
PlayerTalkClass->SendPointOfInterest(menuItemData->GossipActionPoi);
|
||||
|
||||
if (menuItemData->GossipActionMenuId)
|
||||
{
|
||||
PrepareGossipMenu(source, menuItemData->GossipActionMenuId);
|
||||
SendPreparedGossip(source);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case GossipOptionNpc::Vendor:
|
||||
GetSession()->SendListInventory(guid);
|
||||
break;
|
||||
case GossipOptionNpc::TaxiNode:
|
||||
case GossipOptionNpc::Taxinode:
|
||||
GetSession()->SendTaxiMenu(source->ToCreature());
|
||||
break;
|
||||
case GossipOptionNpc::Trainer:
|
||||
GetSession()->SendTrainerList(source->ToCreature(), sObjectMgr->GetCreatureTrainerForGossipOption(source->GetEntry(), menuId, gossipListId));
|
||||
GetSession()->SendTrainerList(source->ToCreature(), sObjectMgr->GetCreatureTrainerForGossipOption(source->GetEntry(), menuId, gossipOptionId));
|
||||
break;
|
||||
case GossipOptionNpc::SpiritHealer:
|
||||
if (isDead())
|
||||
source->ToCreature()->CastSpell(source->ToCreature(), 17251, CastSpellExtraArgs(TRIGGERED_FULL_MASK)
|
||||
.SetOriginalCaster(GetGUID()));
|
||||
break;
|
||||
case GossipOptionNpc::Binder:
|
||||
PlayerTalkClass->SendCloseGossip();
|
||||
SetBindPoint(guid);
|
||||
break;
|
||||
case GossipOptionNpc::Banker:
|
||||
GetSession()->SendShowBank(guid);
|
||||
source->CastSpell(source->ToCreature(), 17251, CastSpellExtraArgs(TRIGGERED_FULL_MASK).SetOriginalCaster(GetGUID()));
|
||||
handled = false;
|
||||
break;
|
||||
case GossipOptionNpc::PetitionVendor:
|
||||
PlayerTalkClass->SendCloseGossip();
|
||||
GetSession()->SendPetitionShowList(guid);
|
||||
break;
|
||||
case GossipOptionNpc::TabardVendor:
|
||||
PlayerTalkClass->SendCloseGossip();
|
||||
GetSession()->SendTabardVendorActivate(guid);
|
||||
break;
|
||||
case GossipOptionNpc::BattleMaster:
|
||||
case GossipOptionNpc::Battlemaster:
|
||||
{
|
||||
BattlegroundTypeId bgTypeId = sBattlegroundMgr->GetBattleMasterBG(source->GetEntry());
|
||||
|
||||
@@ -13906,13 +13853,23 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
|
||||
PlayerTalkClass->SendCloseGossip();
|
||||
SendRespecWipeConfirm(guid, sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : GetNextResetTalentsCost(), SPEC_RESET_TALENTS);
|
||||
break;
|
||||
case GossipOptionNpc::StableMaster:
|
||||
case GossipOptionNpc::Stablemaster:
|
||||
GetSession()->SendStablePet(guid);
|
||||
break;
|
||||
case GossipOptionNpc::PetSpecializationMaster:
|
||||
PlayerTalkClass->SendCloseGossip();
|
||||
SendRespecWipeConfirm(guid, sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : GetNextResetTalentsCost(), SPEC_RESET_PET_TALENTS);
|
||||
break;
|
||||
case GossipOptionNpc::GuildBanker:
|
||||
if (Guild* const guild = GetGuild())
|
||||
guild->SendBankList(GetSession(), 0, true);
|
||||
else
|
||||
Guild::SendCommandResult(GetSession(), GUILD_COMMAND_VIEW_TAB, ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
break;
|
||||
case GossipOptionNpc::Spellclick:
|
||||
if (Unit* sourceUnit = source->ToUnit())
|
||||
sourceUnit->HandleSpellClick(this);
|
||||
break;
|
||||
case GossipOptionNpc::DisableXPGain:
|
||||
PlayerTalkClass->SendCloseGossip();
|
||||
CastSpell(nullptr, SPELL_EXPERIENCE_ELIMINATED, true);
|
||||
@@ -13923,9 +13880,6 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
|
||||
RemoveAurasDueToSpell(SPELL_EXPERIENCE_ELIMINATED);
|
||||
RemovePlayerFlag(PLAYER_FLAGS_NO_XP_GAIN);
|
||||
break;
|
||||
case GossipOptionNpc::Mailbox:
|
||||
GetSession()->SendShowMailBox(guid);
|
||||
break;
|
||||
case GossipOptionNpc::SpecializationMaster:
|
||||
PlayerTalkClass->SendCloseGossip();
|
||||
SendRespecWipeConfirm(guid, 0, SPEC_RESET_SPECIALIZATION);
|
||||
@@ -13934,24 +13888,77 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
|
||||
PlayerTalkClass->SendCloseGossip();
|
||||
SendRespecWipeConfirm(guid, 0, SPEC_RESET_GLYPHS);
|
||||
break;
|
||||
case GossipOptionNpc::GarrisonTalent:
|
||||
{
|
||||
GossipMenuAddon const* addon = sObjectMgr->GetGossipMenuAddon(menuId);
|
||||
GossipMenuItemAddon const* itemAddon = sObjectMgr->GetGossipMenuItemAddon(menuId, gossipListId);
|
||||
SendGarrisonOpenTalentNpc(guid, itemAddon ? itemAddon->GarrTalentTreeID.value_or(0) : 0, addon ? addon->FriendshipFactionID : 0);
|
||||
case GossipOptionNpc::GarrisonTradeskillNpc: // NYI
|
||||
break;
|
||||
}
|
||||
case GossipOptionNpc::Transmogrify:
|
||||
GetSession()->SendOpenTransmogrifier(guid);
|
||||
case GossipOptionNpc::GarrisonRecruitment: // NYI
|
||||
break;
|
||||
case GossipOptionNpc::AzeriteRespec:
|
||||
PlayerTalkClass->SendCloseGossip();
|
||||
GetSession()->SendAzeriteRespecNPC(guid);
|
||||
case GossipOptionNpc::ChromieTimeNpc: // NYI
|
||||
break;
|
||||
case GossipOptionNpc::RuneforgeLegendaryCrafting: // NYI
|
||||
break;
|
||||
case GossipOptionNpc::RuneforgeLegendaryUpgrade: // NYI
|
||||
break;
|
||||
case GossipOptionNpc::ProfessionsCraftingOrder: // NYI
|
||||
break;
|
||||
case GossipOptionNpc::ProfessionsCustomerOrder: // NYI
|
||||
break;
|
||||
case GossipOptionNpc::BarbersChoice: // NYI - unknown if needs sending
|
||||
break;
|
||||
default:
|
||||
handled = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!handled)
|
||||
{
|
||||
if (item->GossipNpcOptionID)
|
||||
{
|
||||
GossipMenuAddon const* addon = sObjectMgr->GetGossipMenuAddon(menuId);
|
||||
|
||||
WorldPackets::NPC::GossipOptionNPCInteraction npcInteraction;
|
||||
npcInteraction.GossipGUID = source->GetGUID();
|
||||
npcInteraction.GossipNpcOptionID = *item->GossipNpcOptionID;
|
||||
if (addon && addon->FriendshipFactionID)
|
||||
npcInteraction.FriendshipFactionID = addon->FriendshipFactionID;
|
||||
|
||||
SendDirectMessage(npcInteraction.Write());
|
||||
}
|
||||
else
|
||||
{
|
||||
static constexpr std::array<PlayerInteractionType, AsUnderlyingType(GossipOptionNpc::Count)> GossipOptionNpcToInteractionType =
|
||||
{
|
||||
PlayerInteractionType::None, PlayerInteractionType::Vendor, PlayerInteractionType::TaxiNode,
|
||||
PlayerInteractionType::Trainer, PlayerInteractionType::SpiritHealer, PlayerInteractionType::Binder,
|
||||
PlayerInteractionType::Banker, PlayerInteractionType::PetitionVendor, PlayerInteractionType::TabardVendor,
|
||||
PlayerInteractionType::BattleMaster, PlayerInteractionType::Auctioneer, PlayerInteractionType::TalentMaster,
|
||||
PlayerInteractionType::StableMaster, PlayerInteractionType::None, PlayerInteractionType::GuildBanker,
|
||||
PlayerInteractionType::None, PlayerInteractionType::None, PlayerInteractionType::None,
|
||||
PlayerInteractionType::MailInfo, PlayerInteractionType::None, PlayerInteractionType::LFGDungeon,
|
||||
PlayerInteractionType::ArtifactForge, PlayerInteractionType::None, PlayerInteractionType::SpecializationMaster,
|
||||
PlayerInteractionType::None, PlayerInteractionType::None, PlayerInteractionType::GarrArchitect,
|
||||
PlayerInteractionType::GarrMission, PlayerInteractionType::ShipmentCrafter, PlayerInteractionType::GarrTradeskill,
|
||||
PlayerInteractionType::GarrRecruitment, PlayerInteractionType::AdventureMap, PlayerInteractionType::GarrTalent,
|
||||
PlayerInteractionType::ContributionCollector, PlayerInteractionType::Transmogrifier, PlayerInteractionType::AzeriteRespec,
|
||||
PlayerInteractionType::IslandQueue, PlayerInteractionType::ItemInteraction, PlayerInteractionType::WorldMap,
|
||||
PlayerInteractionType::Soulbind, PlayerInteractionType::ChromieTime, PlayerInteractionType::CovenantPreview,
|
||||
PlayerInteractionType::LegendaryCrafting, PlayerInteractionType::NewPlayerGuide, PlayerInteractionType::LegendaryCrafting,
|
||||
PlayerInteractionType::Renown, PlayerInteractionType::BlackMarketAuctioneer, PlayerInteractionType::PerksProgramVendor,
|
||||
PlayerInteractionType::ProfessionsCraftingOrder, PlayerInteractionType::Professions, PlayerInteractionType::ProfessionsCustomerOrder,
|
||||
PlayerInteractionType::TraitSystem, PlayerInteractionType::BarbersChoice, PlayerInteractionType::MajorFactionRenown
|
||||
};
|
||||
|
||||
PlayerInteractionType interactionType = GossipOptionNpcToInteractionType[AsUnderlyingType(gossipOptionNpc)];
|
||||
if (interactionType != PlayerInteractionType::None)
|
||||
{
|
||||
WorldPackets::NPC::NPCInteractionOpenResult npcInteraction;
|
||||
npcInteraction.Npc = source->GetGUID();
|
||||
npcInteraction.InteractionType = interactionType;
|
||||
npcInteraction.Success = true;
|
||||
SendDirectMessage(npcInteraction.Write());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ModifyMoney(-cost);
|
||||
}
|
||||
|
||||
@@ -16781,7 +16788,7 @@ void Player::_LoadEquipmentSets(PreparedQueryResult result)
|
||||
eqSet.Data.AssignedSpecIndex = fields[5].GetInt32();
|
||||
eqSet.State = EQUIPMENT_SET_UNCHANGED;
|
||||
|
||||
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint32 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||
if (ObjectGuid::LowType guid = fields[6 + i].GetUInt64())
|
||||
eqSet.Data.Pieces[i] = ObjectGuid::Create<HighGuid::Item>(guid);
|
||||
|
||||
@@ -16820,7 +16827,7 @@ void Player::_LoadTransmogOutfits(PreparedQueryResult result)
|
||||
eqSet.State = EQUIPMENT_SET_UNCHANGED;
|
||||
eqSet.Data.Pieces.fill(ObjectGuid::Empty);
|
||||
|
||||
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint32 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||
eqSet.Data.Appearances[i] = fields[5 + i].GetInt32();
|
||||
|
||||
for (std::size_t i = 0; i < eqSet.Data.Enchants.size(); ++i)
|
||||
@@ -17185,16 +17192,6 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder const& hol
|
||||
|
||||
InitDisplayIds();
|
||||
|
||||
// cleanup inventory related item value fields (it will be filled correctly in _LoadInventory)
|
||||
for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
|
||||
{
|
||||
SetInvSlot(slot, ObjectGuid::Empty);
|
||||
SetVisibleItemSlot(slot, nullptr);
|
||||
|
||||
delete m_items[slot];
|
||||
m_items[slot] = nullptr;
|
||||
}
|
||||
|
||||
TC_LOG_DEBUG("entities.player.loading", "Player::LoadFromDB: Load Basic value of player '%s' is: ", m_name.c_str());
|
||||
outDebugValues();
|
||||
|
||||
@@ -17489,6 +17486,8 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder const& hol
|
||||
time_t now = GameTime::GetGameTime();
|
||||
time_t logoutTime = time_t(fields.logout_time);
|
||||
|
||||
SetUpdateFieldValue(m_values.ModifyValue(&Player::m_playerData).ModifyValue(&UF::PlayerData::LogoutTime), logoutTime);
|
||||
|
||||
// since last logout (in seconds)
|
||||
uint32 time_diff = uint32(now - logoutTime); //uint64 is excessive for a time_diff in seconds.. uint32 allows for 136~ year difference.
|
||||
|
||||
@@ -19353,7 +19352,7 @@ void Player::SaveToDB(LoginDatabaseTransaction loginTransaction, CharacterDataba
|
||||
|
||||
ss.str("");
|
||||
// cache equipment...
|
||||
for (uint32 i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
|
||||
for (uint32 i = 0; i < REAGENT_BAG_SLOT_END; ++i)
|
||||
{
|
||||
if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
{
|
||||
@@ -19501,7 +19500,7 @@ void Player::SaveToDB(LoginDatabaseTransaction loginTransaction, CharacterDataba
|
||||
|
||||
ss.str("");
|
||||
// cache equipment...
|
||||
for (uint32 i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
|
||||
for (uint32 i = 0; i < REAGENT_BAG_SLOT_END; ++i)
|
||||
{
|
||||
if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
{
|
||||
@@ -22350,7 +22349,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iece->MinFactionID && uint32(GetReputationRank(iece->MinFactionID)) < iece->MinReputation)
|
||||
if (iece->MinFactionID && int32(GetReputationRank(iece->MinFactionID)) < iece->MinReputation)
|
||||
{
|
||||
SendBuyError(BUY_ERR_REPUTATION_REQUIRE, creature, item, 0);
|
||||
return false;
|
||||
@@ -25897,6 +25896,10 @@ TalentLearnResult Player::LearnPvpTalent(uint32 talentID, uint8 slot, int32* spe
|
||||
if (HasPvpTalent(talentID, GetActiveTalentGroup()))
|
||||
return TALENT_FAILED_UNKNOWN;
|
||||
|
||||
if (PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(talentInfo->PlayerConditionID))
|
||||
if (!ConditionMgr::IsPlayerMeetingCondition(this, playerCondition))
|
||||
return TALENT_FAILED_CANT_DO_THAT_RIGHT_NOW;
|
||||
|
||||
if (PvpTalentEntry const* talent = sPvpTalentStore.LookupEntry(GetPvpTalentMap(GetActiveTalentGroup())[slot]))
|
||||
{
|
||||
if (!HasPlayerFlag(PLAYER_FLAGS_RESTING) && !HasUnitFlag2(UNIT_FLAG2_ALLOW_CHANGING_TALENTS))
|
||||
@@ -26283,7 +26286,7 @@ void Player::_SaveEquipmentSets(CharacterDatabaseTransaction trans)
|
||||
stmt->setString(j++, eqSet.Data.SetIcon);
|
||||
stmt->setUInt32(j++, eqSet.Data.IgnoreMask);
|
||||
stmt->setInt32(j++, eqSet.Data.AssignedSpecIndex);
|
||||
for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||
stmt->setUInt64(j++, eqSet.Data.Pieces[i].GetCounter());
|
||||
stmt->setUInt64(j++, GetGUID().GetCounter());
|
||||
stmt->setUInt64(j++, eqSet.Data.Guid);
|
||||
@@ -26295,7 +26298,7 @@ void Player::_SaveEquipmentSets(CharacterDatabaseTransaction trans)
|
||||
stmt->setString(j++, eqSet.Data.SetName);
|
||||
stmt->setString(j++, eqSet.Data.SetIcon);
|
||||
stmt->setUInt32(j++, eqSet.Data.IgnoreMask);
|
||||
for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||
stmt->setInt32(j++, eqSet.Data.Appearances[i]);
|
||||
for (std::size_t i = 0; i < eqSet.Data.Enchants.size(); ++i)
|
||||
stmt->setInt32(j++, eqSet.Data.Enchants[i]);
|
||||
@@ -26320,7 +26323,7 @@ void Player::_SaveEquipmentSets(CharacterDatabaseTransaction trans)
|
||||
stmt->setString(j++, eqSet.Data.SetIcon);
|
||||
stmt->setUInt32(j++, eqSet.Data.IgnoreMask);
|
||||
stmt->setInt32(j++, eqSet.Data.AssignedSpecIndex);
|
||||
for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||
stmt->setUInt64(j++, eqSet.Data.Pieces[i].GetCounter());
|
||||
}
|
||||
else
|
||||
@@ -26332,7 +26335,7 @@ void Player::_SaveEquipmentSets(CharacterDatabaseTransaction trans)
|
||||
stmt->setString(j++, eqSet.Data.SetName);
|
||||
stmt->setString(j++, eqSet.Data.SetIcon);
|
||||
stmt->setUInt32(j++, eqSet.Data.IgnoreMask);
|
||||
for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||
stmt->setInt32(j++, eqSet.Data.Appearances[i]);
|
||||
for (std::size_t i = 0; i < eqSet.Data.Enchants.size(); ++i)
|
||||
stmt->setInt32(j++, eqSet.Data.Enchants[i]);
|
||||
@@ -27639,8 +27642,9 @@ void Player::ValidateMovementInfo(MovementInfo* mi)
|
||||
void Player::SendSupercededSpell(uint32 oldSpell, uint32 newSpell) const
|
||||
{
|
||||
WorldPackets::Spells::SupercededSpells supercededSpells;
|
||||
supercededSpells.SpellID.push_back(newSpell);
|
||||
supercededSpells.Superceded.push_back(oldSpell);
|
||||
WorldPackets::Spells::LearnedSpellInfo& learnedSpellInfo = supercededSpells.ClientLearnedSpellData.emplace_back();
|
||||
learnedSpellInfo.SpellID = newSpell;
|
||||
learnedSpellInfo.Superceded = oldSpell;
|
||||
SendDirectMessage(supercededSpells.Write());
|
||||
}
|
||||
|
||||
@@ -27934,7 +27938,7 @@ void Player::UpdateAverageItemLevelTotal()
|
||||
ForEachItem(ItemSearchLocation::Everywhere, [this, &bestItemLevels, &sum](Item* item)
|
||||
{
|
||||
ItemTemplate const* itemTemplate = item->GetTemplate();
|
||||
if (itemTemplate)
|
||||
if (itemTemplate && itemTemplate->GetInventoryType() < INVTYPE_PROFESSION_TOOL)
|
||||
{
|
||||
uint16 dest;
|
||||
if (item->IsEquipped())
|
||||
@@ -28133,12 +28137,3 @@ void Player::SendDisplayToast(uint32 entry, DisplayToastType type, bool isBonusR
|
||||
|
||||
SendDirectMessage(displayToast.Write());
|
||||
}
|
||||
|
||||
void Player::SendGarrisonOpenTalentNpc(ObjectGuid guid, int32 garrTalentTreeId, int32 friendshipFactionId)
|
||||
{
|
||||
WorldPackets::Garrison::GarrisonOpenTalentNpc openTalentNpc;
|
||||
openTalentNpc.NpcGUID = guid;
|
||||
openTalentNpc.GarrTalentTreeID = garrTalentTreeId;
|
||||
openTalentNpc.FriendshipFactionID = friendshipFactionId;
|
||||
SendDirectMessage(openTalentNpc.Write());
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ struct ActionButton
|
||||
}
|
||||
};
|
||||
|
||||
#define MAX_ACTION_BUTTONS 132
|
||||
#define MAX_ACTION_BUTTONS 180
|
||||
|
||||
typedef std::map<uint8, ActionButton> ActionButtonList;
|
||||
|
||||
@@ -637,7 +637,7 @@ enum PlayerSlots
|
||||
// first slot for item stored (in any way in player m_items data)
|
||||
PLAYER_SLOT_START = 0,
|
||||
// last+1 slot for item stored (in any way in player m_items data)
|
||||
PLAYER_SLOT_END = 199,
|
||||
PLAYER_SLOT_END = 218,
|
||||
PLAYER_SLOTS_COUNT = (PLAYER_SLOT_END - PLAYER_SLOT_START)
|
||||
};
|
||||
|
||||
@@ -671,50 +671,82 @@ enum EquipmentSlots : uint8 // 19 slots
|
||||
EQUIPMENT_SLOT_END = 19
|
||||
};
|
||||
|
||||
#define VISIBLE_ITEM_ENTRY_OFFSET 0
|
||||
#define VISIBLE_ITEM_ENCHANTMENT_OFFSET 1
|
||||
enum ProfessionSlots : uint8
|
||||
{
|
||||
PROFESSION_SLOT_PROFESSION1_TOOL = 19,
|
||||
PROFESSION_SLOT_PROFESSION1_GEAR1 = 20,
|
||||
PROFESSION_SLOT_PROFESSION1_GEAR2 = 21,
|
||||
PROFESSION_SLOT_PROFESSION2_TOOL = 22,
|
||||
PROFESSION_SLOT_PROFESSION2_GEAR1 = 23,
|
||||
PROFESSION_SLOT_PROFESSION2_GEAR2 = 24,
|
||||
PROFESSION_SLOT_COOKING_TOOL = 25,
|
||||
PROFESSION_SLOT_COOKING_GEAR1 = 26,
|
||||
PROFESSION_SLOT_FISHING_TOOL = 27,
|
||||
PROFESSION_SLOT_FISHING_GEAR1 = 28,
|
||||
PROFESSION_SLOT_FISHING_GEAR2 = 29,
|
||||
|
||||
PROFESSION_SLOT_END,
|
||||
PROFESSION_SLOT_START = PROFESSION_SLOT_PROFESSION1_TOOL
|
||||
};
|
||||
|
||||
enum InventorySlots : uint8 // 4 slots
|
||||
{
|
||||
INVENTORY_SLOT_BAG_START = 19,
|
||||
INVENTORY_SLOT_BAG_END = 23
|
||||
INVENTORY_SLOT_BAG_START = 30,
|
||||
INVENTORY_SLOT_BAG_END = 34
|
||||
};
|
||||
|
||||
enum ReagentBagSlots : uint8 // 1 slot
|
||||
{
|
||||
REAGENT_BAG_SLOT_START = 34,
|
||||
REAGENT_BAG_SLOT_END = 35
|
||||
};
|
||||
|
||||
enum InventoryPackSlots : uint8 // 28 slots
|
||||
{
|
||||
INVENTORY_SLOT_ITEM_START = 23,
|
||||
INVENTORY_SLOT_ITEM_END = 51
|
||||
INVENTORY_SLOT_ITEM_START = 35,
|
||||
INVENTORY_SLOT_ITEM_END = 63
|
||||
};
|
||||
|
||||
enum BankItemSlots // 28 slots
|
||||
{
|
||||
BANK_SLOT_ITEM_START = 51,
|
||||
BANK_SLOT_ITEM_END = 79
|
||||
BANK_SLOT_ITEM_START = 63,
|
||||
BANK_SLOT_ITEM_END = 91
|
||||
};
|
||||
|
||||
enum BankBagSlots // 7 slots
|
||||
{
|
||||
BANK_SLOT_BAG_START = 79,
|
||||
BANK_SLOT_BAG_END = 86
|
||||
BANK_SLOT_BAG_START = 91,
|
||||
BANK_SLOT_BAG_END = 98
|
||||
};
|
||||
|
||||
enum BuyBackSlots // 12 slots
|
||||
{
|
||||
// stored in m_buybackitems
|
||||
BUYBACK_SLOT_START = 86,
|
||||
BUYBACK_SLOT_END = 98
|
||||
BUYBACK_SLOT_START = 98,
|
||||
BUYBACK_SLOT_END = 110
|
||||
};
|
||||
|
||||
enum ReagentSlots // 98 slots
|
||||
{
|
||||
REAGENT_SLOT_START = 98,
|
||||
REAGENT_SLOT_END = 196,
|
||||
REAGENT_SLOT_START = 110,
|
||||
REAGENT_SLOT_END = 208,
|
||||
};
|
||||
|
||||
enum ChildEquipmentSlots
|
||||
{
|
||||
CHILD_EQUIPMENT_SLOT_START = 196,
|
||||
CHILD_EQUIPMENT_SLOT_END = 199,
|
||||
CHILD_EQUIPMENT_SLOT_START = 208,
|
||||
CHILD_EQUIPMENT_SLOT_END = 211,
|
||||
};
|
||||
|
||||
enum EquipableSpellSlots
|
||||
{
|
||||
EQUIPABLE_SPELL_OFFENSIVE_SLOT1 = 211,
|
||||
EQUIPABLE_SPELL_OFFENSIVE_SLOT2 = 212,
|
||||
EQUIPABLE_SPELL_OFFENSIVE_SLOT3 = 213,
|
||||
EQUIPABLE_SPELL_OFFENSIVE_SLOT4 = 214,
|
||||
EQUIPABLE_SPELL_UTILITY_SLOT1 = 215,
|
||||
EQUIPABLE_SPELL_DEFENSIVE_SLOT1 = 216,
|
||||
EQUIPABLE_SPELL_MOBILITY_SLOT1 = 217
|
||||
};
|
||||
|
||||
struct ItemPosCount
|
||||
@@ -1037,7 +1069,9 @@ enum TalentLearnResult
|
||||
TALENT_FAILED_AFFECTING_COMBAT = 5,
|
||||
TALENT_FAILED_CANT_REMOVE_TALENT = 6,
|
||||
TALENT_FAILED_CANT_DO_THAT_CHALLENGE_MODE_ACTIVE = 7,
|
||||
TALENT_FAILED_REST_AREA = 8
|
||||
TALENT_FAILED_REST_AREA = 8,
|
||||
TALENT_FAILED_UNSPENT_TALENT_POINTS = 9,
|
||||
TALENT_FAILED_IN_PVP_MATCH = 10
|
||||
};
|
||||
|
||||
struct TC_GAME_API SpecializationInfo
|
||||
@@ -1236,11 +1270,18 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
EnumFlag<ItemSearchLocation> flag = location;
|
||||
|
||||
if (flag.HasFlag(ItemSearchLocation::Equipment))
|
||||
{
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
if (callback(pItem) == ItemSearchCallbackResult::Stop)
|
||||
return false;
|
||||
|
||||
for (uint8 i = PROFESSION_SLOT_START; i < PROFESSION_SLOT_END; ++i)
|
||||
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
if (callback(pItem) == ItemSearchCallbackResult::Stop)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (flag.HasFlag(ItemSearchLocation::Inventory))
|
||||
{
|
||||
uint8 inventoryEnd = INVENTORY_SLOT_ITEM_START + GetInventorySlotCount();
|
||||
@@ -1278,10 +1319,19 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
}
|
||||
|
||||
if (flag.HasFlag(ItemSearchLocation::ReagentBank))
|
||||
{
|
||||
for (uint8 i = REAGENT_BAG_SLOT_START; i < REAGENT_BAG_SLOT_END; ++i)
|
||||
if (Bag* bag = GetBagByPos(i))
|
||||
for (uint32 j = 0; j < GetBagSize(bag); ++j)
|
||||
if (Item* pItem = GetItemInBag(bag, j))
|
||||
if (callback(pItem) == ItemSearchCallbackResult::Stop)
|
||||
return false;
|
||||
|
||||
for (uint8 i = REAGENT_SLOT_START; i < REAGENT_SLOT_END; ++i)
|
||||
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
if (callback(pItem) == ItemSearchCallbackResult::Stop)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1363,7 +1413,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
void AutoUnequipOffhandIfNeed(bool force = false);
|
||||
void EquipChildItem(uint8 parentBag, uint8 parentSlot, Item* parentItem);
|
||||
void AutoUnequipChildItem(Item* parentItem);
|
||||
bool StoreNewItemInBestSlots(uint32 item_id, uint32 item_count);
|
||||
bool StoreNewItemInBestSlots(uint32 itemId, uint32 amount, ItemContext context);
|
||||
void AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store, ItemContext context = ItemContext::NONE, bool broadcast = false, bool createdByPlayer = false);
|
||||
void AutoStoreLoot(uint32 loot_id, LootStore const& store, ItemContext context = ItemContext::NONE, bool broadcast = false, bool createdByPlayer = false) { AutoStoreLoot(NULL_BAG, NULL_SLOT, loot_id, store, context, broadcast, createdByPlayer); }
|
||||
void StoreLootItem(ObjectGuid lootWorldObjectGuid, uint8 lootSlot, Loot* loot, AELootResult* aeResult = nullptr);
|
||||
@@ -1481,7 +1531,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
|
||||
void PrepareGossipMenu(WorldObject* source, uint32 menuId, bool showQuests = false);
|
||||
void SendPreparedGossip(WorldObject* source);
|
||||
void OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 menuId);
|
||||
void OnGossipSelect(WorldObject* source, int32 gossipOptionId, uint32 menuId);
|
||||
|
||||
uint32 GetGossipTextId(uint32 menuId, WorldObject* source);
|
||||
uint32 GetGossipTextId(WorldObject* source);
|
||||
@@ -2770,8 +2820,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
bool CanEnableWarModeInArea() const;
|
||||
void UpdateWarModeAuras();
|
||||
|
||||
void SendGarrisonOpenTalentNpc(ObjectGuid guid, int32 garrTalentTreeId, int32 friendshipFactionId);
|
||||
|
||||
std::string GetDebugInfo() const override;
|
||||
|
||||
UF::UpdateField<UF::PlayerData, 0, TYPEID_PLAYER> m_playerData;
|
||||
|
||||
@@ -595,7 +595,9 @@ float const m_diminishing_k[MAX_CLASSES] =
|
||||
0.9830f, // Warlock
|
||||
0.9830f, // Monk
|
||||
0.9720f, // Druid
|
||||
0.9830f // Demon Hunter
|
||||
0.9830f, // Demon Hunter
|
||||
0.9880f, // Evoker
|
||||
1.0f, // Adventurer
|
||||
};
|
||||
|
||||
// helper function
|
||||
@@ -634,7 +636,9 @@ float const parry_cap[MAX_CLASSES] =
|
||||
0.0f, // Warlock
|
||||
90.6425f, // Monk
|
||||
0.0f, // Druid
|
||||
65.631440f // Demon Hunter
|
||||
65.631440f, // Demon Hunter
|
||||
0.0f, // Evoker
|
||||
0.0f, // Adventurer
|
||||
};
|
||||
|
||||
void Player::UpdateParryPercentage()
|
||||
@@ -673,7 +677,9 @@ float const dodge_cap[MAX_CLASSES] =
|
||||
150.375940f, // Warlock
|
||||
145.560408f, // Monk
|
||||
116.890707f, // Druid
|
||||
145.560408f // Demon Hunter
|
||||
145.560408f, // Demon Hunter
|
||||
145.560408f, // Evoker
|
||||
0.0f, // Adventurer
|
||||
};
|
||||
|
||||
void Player::UpdateDodgePercentage()
|
||||
|
||||
@@ -6645,6 +6645,11 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
|
||||
{
|
||||
return aurEff->GetCasterGUID() == caster->GetGUID() && aurEff->IsAffectingSpell(spellProto);
|
||||
});
|
||||
|
||||
TakenTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_DAMAGE_TAKEN_FROM_CASTER_BY_LABEL, [caster, spellProto](AuraEffect const* aurEff) -> bool
|
||||
{
|
||||
return aurEff->GetCasterGUID() == caster->GetGUID() && spellProto->HasLabel(aurEff->GetMiscValue());
|
||||
});
|
||||
}
|
||||
|
||||
if (damagetype == DOT)
|
||||
|
||||
@@ -188,6 +188,7 @@ enum UnitMods
|
||||
UNIT_MOD_ARCANE_CHARGES,
|
||||
UNIT_MOD_FURY,
|
||||
UNIT_MOD_PAIN,
|
||||
UNIT_MOD_ESSENCE,
|
||||
UNIT_MOD_ARMOR, // UNIT_MOD_ARMOR..UNIT_MOD_RESISTANCE_ARCANE must be in existed order, it's accessed by index values of SpellSchools enum.
|
||||
UNIT_MOD_RESISTANCE_HOLY,
|
||||
UNIT_MOD_RESISTANCE_FIRE,
|
||||
@@ -207,7 +208,7 @@ enum UnitMods
|
||||
UNIT_MOD_RESISTANCE_START = UNIT_MOD_ARMOR,
|
||||
UNIT_MOD_RESISTANCE_END = UNIT_MOD_RESISTANCE_ARCANE + 1,
|
||||
UNIT_MOD_POWER_START = UNIT_MOD_MANA,
|
||||
UNIT_MOD_POWER_END = UNIT_MOD_PAIN + 1
|
||||
UNIT_MOD_POWER_END = UNIT_MOD_ESSENCE + 1
|
||||
};
|
||||
|
||||
static_assert(UNIT_MOD_POWER_END - UNIT_MOD_POWER_START == MAX_POWERS, "UnitMods powers section does not match Powers enum!");
|
||||
|
||||
@@ -418,6 +418,8 @@ enum MovementFlags3 : uint32
|
||||
{
|
||||
MOVEMENTFLAG3_NONE = 0x00000000,
|
||||
MOVEMENTFLAG3_DISABLE_INERTIA = 0x00000001,
|
||||
MOVEMENTFLAG3_CAN_ADV_FLY = 0x00000002,
|
||||
MOVEMENTFLAG3_ADV_FLYING = 0x00000004,
|
||||
};
|
||||
|
||||
enum HitInfo
|
||||
|
||||
@@ -3036,6 +3036,12 @@ uint32 FillMaxDurability(uint32 itemClass, uint32 itemSubClass, uint32 inventory
|
||||
0.00f, // INVTYPE_RANGEDRIGHT
|
||||
0.00f, // INVTYPE_QUIVER
|
||||
0.00f, // INVTYPE_RELIC
|
||||
0.00f, // INVTYPE_PROFESSION_TOOL
|
||||
0.00f, // INVTYPE_PROFESSION_GEAR
|
||||
0.00f, // INVTYPE_EQUIPABLE_SPELL_OFFENSIVE
|
||||
0.00f, // INVTYPE_EQUIPABLE_SPELL_UTILITY
|
||||
0.00f, // INVTYPE_EQUIPABLE_SPELL_DEFENSIVE
|
||||
0.00f, // INVTYPE_EQUIPABLE_SPELL_MOBILITY
|
||||
};
|
||||
|
||||
static float const weaponMultipliers[MAX_ITEM_SUBCLASS_WEAPON] =
|
||||
@@ -3743,17 +3749,18 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
|
||||
|
||||
void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count)
|
||||
{
|
||||
if (!_playerInfo[race_][class_])
|
||||
std::unique_ptr<PlayerInfo>* playerInfo = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(race_), Classes(class_) });
|
||||
if (!playerInfo)
|
||||
return;
|
||||
|
||||
if (count > 0)
|
||||
_playerInfo[race_][class_]->item.emplace_back(itemId, count);
|
||||
playerInfo->get()->item.emplace_back(itemId, count);
|
||||
else
|
||||
{
|
||||
if (count < -1)
|
||||
TC_LOG_ERROR("sql.sql", "Invalid count %i specified on item %u be removed from original player create info (use -1)!", count, itemId);
|
||||
|
||||
PlayerCreateInfoItems& items = _playerInfo[race_][class_]->item;
|
||||
PlayerCreateInfoItems& items = playerInfo->get()->item;
|
||||
|
||||
auto erased = std::remove_if(items.begin(), items.end(), [itemId](PlayerCreateInfoItem const& item) { return item.item_id == itemId; });
|
||||
if (erased == items.end())
|
||||
@@ -3888,7 +3895,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
introSceneId, current_class, current_race);
|
||||
}
|
||||
|
||||
_playerInfo[current_race][current_class] = std::move(info);
|
||||
_playerInfo[{ Races(current_race), Classes(current_class) }] = std::move(info);
|
||||
|
||||
++count;
|
||||
}
|
||||
@@ -3920,8 +3927,10 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
if (!characterLoadout->RaceMask.HasRace(raceIndex))
|
||||
continue;
|
||||
|
||||
if (auto& playerInfo = _playerInfo[raceIndex][characterLoadout->ChrClassID])
|
||||
if (auto const& playerInfo = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(raceIndex), Classes(characterLoadout->ChrClassID) }))
|
||||
{
|
||||
playerInfo->get()->itemContext = ItemContext(characterLoadout->ItemContext);
|
||||
|
||||
for (ItemTemplate const* itemTemplate : *items)
|
||||
{
|
||||
// BuyCount by default
|
||||
@@ -3946,7 +3955,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
count = itemTemplate->GetMaxStackSize();
|
||||
}
|
||||
|
||||
playerInfo->item.emplace_back(itemTemplate->GetId(), count);
|
||||
playerInfo->get()->item.emplace_back(itemTemplate->GetId(), count);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4033,8 +4042,8 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
if (rcInfo->RaceMask.HasRace(raceIndex))
|
||||
for (uint32 classIndex = CLASS_WARRIOR; classIndex < MAX_CLASSES; ++classIndex)
|
||||
if (rcInfo->ClassMask == -1 || ((1 << (classIndex - 1)) & rcInfo->ClassMask))
|
||||
if (auto& info = _playerInfo[raceIndex][classIndex])
|
||||
info->skills.push_back(rcInfo);
|
||||
if (auto const& playerInfo = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(raceIndex), Classes(classIndex) }))
|
||||
playerInfo->get()->skills.push_back(rcInfo);
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded player create skills in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
@@ -4081,9 +4090,9 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
{
|
||||
if (classMask == 0 || ((1 << (classIndex - 1)) & classMask))
|
||||
{
|
||||
if (auto& info = _playerInfo[raceIndex][classIndex])
|
||||
if (auto const& playerInfo = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(raceIndex), Classes(classIndex) }))
|
||||
{
|
||||
info->customSpells.push_back(spellId);
|
||||
playerInfo->get()->customSpells.push_back(spellId);
|
||||
++count;
|
||||
}
|
||||
// We need something better here, the check is not accounting for spells used by multiple races/classes but not all of them.
|
||||
@@ -4148,9 +4157,9 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
{
|
||||
if (classMask == 0 || ((1 << (classIndex - 1)) & classMask))
|
||||
{
|
||||
if (auto& info = _playerInfo[raceIndex][classIndex])
|
||||
if (auto const& playerInfo = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(raceIndex), Classes(classIndex) }))
|
||||
{
|
||||
info->castSpells[playerCreateMode].push_back(spellId);
|
||||
playerInfo->get()->castSpells[playerCreateMode].push_back(spellId);
|
||||
++count;
|
||||
}
|
||||
}
|
||||
@@ -4197,8 +4206,8 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (auto& info = _playerInfo[current_race][current_class])
|
||||
info->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16()));
|
||||
if (auto const& playerInfo = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(current_race), Classes(current_class) }))
|
||||
playerInfo->get()->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16()));
|
||||
|
||||
++count;
|
||||
}
|
||||
@@ -4279,12 +4288,12 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
|
||||
for (std::size_t race = 0; race < raceStatModifiers.size(); ++race)
|
||||
{
|
||||
if (auto& info = _playerInfo[race][current_class])
|
||||
if (auto const& playerInfo = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(race), Classes(current_class) }))
|
||||
{
|
||||
if (!info->levelInfo)
|
||||
info->levelInfo = std::make_unique<PlayerLevelInfo[]>(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
|
||||
if (!playerInfo->get()->levelInfo)
|
||||
playerInfo->get()->levelInfo = std::make_unique<PlayerLevelInfo[]>(sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
|
||||
|
||||
PlayerLevelInfo& levelInfo = info->levelInfo[current_level - 1];
|
||||
PlayerLevelInfo& levelInfo = playerInfo->get()->levelInfo[current_level - 1];
|
||||
for (uint8 i = 0; i < MAX_STATS; ++i)
|
||||
levelInfo.stats[i] = fields[i + 2].GetUInt16() + raceStatModifiers[race].StatModifier[i];
|
||||
}
|
||||
@@ -4307,8 +4316,8 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
if (!sChrClassesStore.LookupEntry(class_))
|
||||
continue;
|
||||
|
||||
auto& info = _playerInfo[race][class_];
|
||||
if (!info)
|
||||
auto const& playerInfo = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(race), Classes(class_) });
|
||||
if (!playerInfo)
|
||||
continue;
|
||||
|
||||
// skip expansion races if not playing with expansion
|
||||
@@ -4330,7 +4339,7 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
continue;
|
||||
|
||||
// fatal error if no level 1 data
|
||||
if (!info->levelInfo || info->levelInfo[0].stats[0] == 0)
|
||||
if (!playerInfo->get()->levelInfo || playerInfo->get()->levelInfo[0].stats[0] == 0)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Race %i Class %i Level 1 does not have stats data!", race, class_);
|
||||
ABORT();
|
||||
@@ -4339,10 +4348,10 @@ void ObjectMgr::LoadPlayerInfo()
|
||||
// fill level gaps
|
||||
for (uint8 level = 1; level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
|
||||
{
|
||||
if (info->levelInfo[level].stats[0] == 0)
|
||||
if (playerInfo->get()->levelInfo[level].stats[0] == 0)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level + 1, level);
|
||||
info->levelInfo[level] = info->levelInfo[level - 1];
|
||||
playerInfo->get()->levelInfo[level] = playerInfo->get()->levelInfo[level - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4431,12 +4440,12 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
|
||||
if (level < 1 || race >= MAX_RACES || class_ >= MAX_CLASSES)
|
||||
return;
|
||||
|
||||
auto const& pInfo = _playerInfo[race][class_];
|
||||
auto const& pInfo = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(race), Classes(class_) });
|
||||
if (!pInfo)
|
||||
return;
|
||||
|
||||
if (level <= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
*info = pInfo->levelInfo[level - 1];
|
||||
*info = pInfo->get()->levelInfo[level - 1];
|
||||
else
|
||||
BuildPlayerLevelInfo(race, class_, level, info);
|
||||
}
|
||||
@@ -4444,7 +4453,7 @@ void ObjectMgr::GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, Play
|
||||
void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, PlayerLevelInfo* info) const
|
||||
{
|
||||
// base data (last known level)
|
||||
*info = _playerInfo[race][_class]->levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) - 1];
|
||||
*info = ASSERT_NOTNULL(Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(race), Classes(_class) }))->get()->levelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) - 1];
|
||||
|
||||
// if conversion from uint32 to uint8 causes unexpected behaviour, change lvl to uint32
|
||||
for (uint8 lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) - 1; lvl < level; ++lvl)
|
||||
@@ -4614,7 +4623,19 @@ void ObjectMgr::LoadQuests()
|
||||
{ "QuestId, RewardMailSenderEntry", "quest_mail_sender", "", "mail sender entries", &Quest::LoadQuestMailSender },
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8 9
|
||||
{ "QuestID, ID, Type, StorageIndex, ObjectID, Amount, Flags, Flags2, ProgressBarWeight, Description", "quest_objectives", "ORDER BY `Order` ASC, StorageIndex ASC", "quest objectives", &Quest::LoadQuestObjective }
|
||||
{ "QuestID, ID, Type, StorageIndex, ObjectID, Amount, Flags, Flags2, ProgressBarWeight, Description", "quest_objectives", "ORDER BY `Order` ASC, StorageIndex ASC", "quest objectives", &Quest::LoadQuestObjective },
|
||||
|
||||
// 0 1 2 3 4
|
||||
{ "QuestId, PlayerConditionId, QuestgiverCreatureId, Text, locale", "quest_description_conditional", "ORDER BY OrderIndex", "conditional details", &Quest::LoadConditionalConditionalQuestDescription },
|
||||
|
||||
// 0 1 2 3 4
|
||||
{ "QuestId, PlayerConditionId, QuestgiverCreatureId, Text, locale", "quest_request_items_conditional", "ORDER BY OrderIndex", "conditional request items", &Quest::LoadConditionalConditionalRequestItemsText },
|
||||
|
||||
// 0 1 2 3 4
|
||||
{ "QuestId, PlayerConditionId, QuestgiverCreatureId, Text, locale", "quest_offer_reward_conditional", "ORDER BY OrderIndex", "conditional reward", &Quest::LoadConditionalConditionalOfferRewardText },
|
||||
|
||||
// 0 1 2 3 4
|
||||
{ "QuestId, PlayerConditionId, QuestgiverCreatureId, Text, locale", "quest_completion_log_conditional", "ORDER BY OrderIndex", "conditional completion log", &Quest::LoadConditionalConditionalQuestCompletionLog }
|
||||
};
|
||||
|
||||
for (QuestLoaderHelper const& loader : QuestLoaderHelpers)
|
||||
@@ -9462,7 +9483,7 @@ void ObjectMgr::LoadCreatureTrainers()
|
||||
Trinity::IteratorPair<GossipMenuItemsContainer::const_iterator> gossipMenuItems = GetGossipMenuItemsMapBounds(gossipMenuId);
|
||||
auto gossipOptionItr = std::find_if(gossipMenuItems.begin(), gossipMenuItems.end(), [gossipOptionId](std::pair<uint32 const, GossipMenuItems> const& entry)
|
||||
{
|
||||
return entry.second.OptionID == gossipOptionId;
|
||||
return entry.second.OrderIndex == gossipOptionId;
|
||||
});
|
||||
if (gossipOptionItr == gossipMenuItems.end())
|
||||
{
|
||||
@@ -9627,8 +9648,10 @@ void ObjectMgr::LoadGossipMenuItems()
|
||||
_gossipMenuItemsStore.clear();
|
||||
|
||||
QueryResult result = WorldDatabase.Query(
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11
|
||||
"SELECT MenuID, OptionID, OptionNpc, OptionText, OptionBroadcastTextID, Language, ActionMenuID, ActionPoiID, BoxCoded, BoxMoney, BoxText, BoxBroadcastTextID "
|
||||
// 0 1 2 3 4 5 6 7 8 9 10
|
||||
"SELECT MenuID, GossipOptionID, OptionID, OptionNpc, OptionText, OptionBroadcastTextID, Language, Flags, ActionMenuID, ActionPoiID, GossipNpcOptionID, "
|
||||
//11 12 13 14 15 16
|
||||
"BoxCoded, BoxMoney, BoxText, BoxBroadcastTextID, SpellID, OverrideIconID "
|
||||
"FROM gossip_menu_option ORDER BY MenuID, OptionID");
|
||||
|
||||
if (!result)
|
||||
@@ -9637,6 +9660,10 @@ void ObjectMgr::LoadGossipMenuItems()
|
||||
return;
|
||||
}
|
||||
|
||||
std::unordered_map<int32, int32> optionToNpcOption;
|
||||
for (GossipNPCOptionEntry const* npcOption : sGossipNPCOptionStore)
|
||||
optionToNpcOption[npcOption->GossipOptionID] = npcOption->ID;
|
||||
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
@@ -9644,21 +9671,31 @@ void ObjectMgr::LoadGossipMenuItems()
|
||||
GossipMenuItems gMenuItem;
|
||||
|
||||
gMenuItem.MenuID = fields[0].GetUInt32();
|
||||
gMenuItem.OptionID = fields[1].GetUInt32();
|
||||
gMenuItem.OptionNpc = GossipOptionNpc(fields[2].GetUInt8());
|
||||
gMenuItem.OptionText = fields[3].GetString();
|
||||
gMenuItem.OptionBroadcastTextID = fields[4].GetUInt32();
|
||||
gMenuItem.Language = fields[5].GetUInt32();
|
||||
gMenuItem.ActionMenuID = fields[6].GetUInt32();
|
||||
gMenuItem.ActionPoiID = fields[7].GetUInt32();
|
||||
gMenuItem.BoxCoded = fields[8].GetBool();
|
||||
gMenuItem.BoxMoney = fields[9].GetUInt32();
|
||||
gMenuItem.BoxText = fields[10].GetString();
|
||||
gMenuItem.BoxBroadcastTextID = fields[11].GetUInt32();
|
||||
gMenuItem.GossipOptionID = fields[1].GetInt32();
|
||||
gMenuItem.OrderIndex = fields[2].GetUInt32();
|
||||
gMenuItem.OptionNpc = GossipOptionNpc(fields[3].GetUInt8());
|
||||
gMenuItem.OptionText = fields[4].GetString();
|
||||
gMenuItem.OptionBroadcastTextID = fields[5].GetUInt32();
|
||||
gMenuItem.Language = fields[6].GetUInt32();
|
||||
gMenuItem.Flags = GossipOptionFlags(fields[7].GetInt32());
|
||||
gMenuItem.ActionMenuID = fields[8].GetUInt32();
|
||||
gMenuItem.ActionPoiID = fields[9].GetUInt32();
|
||||
if (!fields[10].IsNull())
|
||||
gMenuItem.GossipNpcOptionID = fields[10].GetInt32();
|
||||
|
||||
gMenuItem.BoxCoded = fields[11].GetBool();
|
||||
gMenuItem.BoxMoney = fields[12].GetUInt32();
|
||||
gMenuItem.BoxText = fields[13].GetString();
|
||||
gMenuItem.BoxBroadcastTextID = fields[14].GetUInt32();
|
||||
if (!fields[15].IsNull())
|
||||
gMenuItem.SpellID = fields[15].GetInt32();
|
||||
|
||||
if (!fields[16].IsNull())
|
||||
gMenuItem.OverrideIconID = fields[16].GetInt32();
|
||||
|
||||
if (gMenuItem.OptionNpc >= GossipOptionNpc::Count)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u has unknown NPC option id %u. Replacing with GossipOptionNpc::None", gMenuItem.MenuID, gMenuItem.OptionID, AsUnderlyingType(gMenuItem.OptionNpc));
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u has unknown NPC option id %u. Replacing with GossipOptionNpc::None", gMenuItem.MenuID, gMenuItem.OrderIndex, AsUnderlyingType(gMenuItem.OptionNpc));
|
||||
gMenuItem.OptionNpc = GossipOptionNpc::None;
|
||||
}
|
||||
|
||||
@@ -9666,20 +9703,20 @@ void ObjectMgr::LoadGossipMenuItems()
|
||||
{
|
||||
if (!sBroadcastTextStore.LookupEntry(gMenuItem.OptionBroadcastTextID))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u has non-existing or incompatible OptionBroadcastTextID %u, ignoring.", gMenuItem.MenuID, gMenuItem.OptionID, gMenuItem.OptionBroadcastTextID);
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u has non-existing or incompatible OptionBroadcastTextID %u, ignoring.", gMenuItem.MenuID, gMenuItem.OrderIndex, gMenuItem.OptionBroadcastTextID);
|
||||
gMenuItem.OptionBroadcastTextID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (gMenuItem.Language && !sLanguagesStore.LookupEntry(gMenuItem.Language))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u use non-existing Language %u, ignoring", gMenuItem.MenuID, gMenuItem.OptionID, gMenuItem.Language);
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u use non-existing Language %u, ignoring", gMenuItem.MenuID, gMenuItem.OrderIndex, gMenuItem.Language);
|
||||
gMenuItem.Language = 0;
|
||||
}
|
||||
|
||||
if (gMenuItem.ActionMenuID && gMenuItem.OptionNpc != GossipOptionNpc::None)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u can not use ActionMenuID for GossipOptionNpc different from GossipOptionNpc::None, ignoring", gMenuItem.MenuID, gMenuItem.OptionID);
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u can not use ActionMenuID for GossipOptionNpc different from GossipOptionNpc::None, ignoring", gMenuItem.MenuID, gMenuItem.OrderIndex);
|
||||
gMenuItem.ActionMenuID = 0;
|
||||
}
|
||||
|
||||
@@ -9687,25 +9724,47 @@ void ObjectMgr::LoadGossipMenuItems()
|
||||
{
|
||||
if (gMenuItem.OptionNpc != GossipOptionNpc::None)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u can not use ActionPoiID for GossipOptionNpc different from GossipOptionNpc::None, ignoring", gMenuItem.MenuID, gMenuItem.OptionID);
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u can not use ActionPoiID for GossipOptionNpc different from GossipOptionNpc::None, ignoring", gMenuItem.MenuID, gMenuItem.OrderIndex);
|
||||
gMenuItem.ActionPoiID = 0;
|
||||
}
|
||||
else if (!GetPointOfInterest(gMenuItem.ActionPoiID))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u use non-existing ActionPoiID %u, ignoring", gMenuItem.MenuID, gMenuItem.OptionID, gMenuItem.ActionPoiID);
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u use non-existing ActionPoiID %u, ignoring", gMenuItem.MenuID, gMenuItem.OrderIndex, gMenuItem.ActionPoiID);
|
||||
gMenuItem.ActionPoiID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (gMenuItem.GossipNpcOptionID)
|
||||
{
|
||||
if (!sGossipNPCOptionStore.LookupEntry(*gMenuItem.GossipNpcOptionID))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u use non-existing GossipNPCOption %u, ignoring",
|
||||
gMenuItem.MenuID, gMenuItem.OrderIndex, *gMenuItem.GossipNpcOptionID);
|
||||
gMenuItem.GossipNpcOptionID.reset();
|
||||
}
|
||||
}
|
||||
else if (int32 const* npcOptionId = Trinity::Containers::MapGetValuePtr(optionToNpcOption, gMenuItem.GossipOptionID))
|
||||
gMenuItem.GossipNpcOptionID = *npcOptionId;
|
||||
|
||||
if (gMenuItem.BoxBroadcastTextID)
|
||||
{
|
||||
if (!sBroadcastTextStore.LookupEntry(gMenuItem.BoxBroadcastTextID))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u has non-existing or incompatible BoxBroadcastTextID %u, ignoring.", gMenuItem.MenuID, gMenuItem.OptionID, gMenuItem.BoxBroadcastTextID);
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u has non-existing or incompatible BoxBroadcastTextID %u, ignoring.", gMenuItem.MenuID, gMenuItem.OrderIndex, gMenuItem.BoxBroadcastTextID);
|
||||
gMenuItem.BoxBroadcastTextID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (gMenuItem.SpellID)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(*gMenuItem.SpellID, DIFFICULTY_NONE))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gossip_menu_option` for menu %u, id %u use non-existing Spell %u, ignoring",
|
||||
gMenuItem.MenuID, gMenuItem.OrderIndex, *gMenuItem.SpellID);
|
||||
gMenuItem.SpellID.reset();
|
||||
}
|
||||
}
|
||||
|
||||
_gossipMenuItemsStore.insert(GossipMenuItemsContainer::value_type(gMenuItem.MenuID, gMenuItem));
|
||||
} while (result->NextRow());
|
||||
|
||||
@@ -9755,44 +9814,6 @@ void ObjectMgr::LoadGossipMenuAddon()
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u gossip_menu_addon IDs in %u ms", uint32(_gossipMenuAddonStore.size()), GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadGossipMenuItemAddon()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
_gossipMenuItemAddonStore.clear();
|
||||
|
||||
// 0 1 2
|
||||
QueryResult result = WorldDatabase.Query("SELECT MenuID, OptionId, GarrTalentTreeID FROM gossip_menu_option_addon");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 gossip_menu_option_addon IDs. DB table `gossip_menu_option_addon` is empty!");
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 menuId = fields[0].GetUInt32();
|
||||
uint32 optionId = fields[1].GetUInt32();
|
||||
GossipMenuItemAddon& addon = _gossipMenuItemAddonStore[{ menuId, optionId }];
|
||||
if (!fields[2].IsNull())
|
||||
{
|
||||
addon.GarrTalentTreeID = fields[2].GetInt32();
|
||||
|
||||
if (!sGarrTalentTreeStore.LookupEntry(*addon.GarrTalentTreeID))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table gossip_menu_option_addon: MenuID %u OptionID %u is using non-existing GarrTalentTree %d",
|
||||
menuId, optionId, *addon.GarrTalentTreeID);
|
||||
addon.GarrTalentTreeID.reset();
|
||||
}
|
||||
}
|
||||
} while (result->NextRow());
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u gossip_menu_option_addon IDs in %u ms", uint32(_gossipMenuItemAddonStore.size()), GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
Trainer::Trainer const* ObjectMgr::GetTrainer(uint32 trainerId) const
|
||||
{
|
||||
return Trinity::Containers::MapGetValuePtr(_trainers, trainerId);
|
||||
@@ -10594,10 +10615,10 @@ PlayerInfo const* ObjectMgr::GetPlayerInfo(uint32 race, uint32 class_) const
|
||||
return nullptr;
|
||||
if (class_ >= MAX_CLASSES)
|
||||
return nullptr;
|
||||
auto const& info = _playerInfo[race][class_];
|
||||
auto const& info = Trinity::Containers::MapGetValuePtr(_playerInfo, { Races(race), Classes(class_) });
|
||||
if (!info)
|
||||
return nullptr;
|
||||
return info.get();
|
||||
return info->get();
|
||||
}
|
||||
|
||||
void ObjectMgr::LoadRaceAndClassExpansionRequirements()
|
||||
@@ -10659,6 +10680,8 @@ void ObjectMgr::LoadRaceAndClassExpansionRequirements()
|
||||
if (result)
|
||||
{
|
||||
std::map<uint8, std::map<uint8, std::pair<uint8, uint8>>> temp;
|
||||
std::array<uint8, MAX_CLASSES> minRequirementForClass = { };
|
||||
minRequirementForClass.fill(MAX_ACCOUNT_EXPANSIONS);
|
||||
uint32 count = 0;
|
||||
do
|
||||
{
|
||||
@@ -10700,6 +10723,7 @@ void ObjectMgr::LoadRaceAndClassExpansionRequirements()
|
||||
}
|
||||
|
||||
temp[raceID][classID] = { activeExpansionLevel, accountExpansionLevel };
|
||||
minRequirementForClass[classID] = std::min(minRequirementForClass[classID], activeExpansionLevel);
|
||||
|
||||
++count;
|
||||
}
|
||||
@@ -10707,19 +10731,18 @@ void ObjectMgr::LoadRaceAndClassExpansionRequirements()
|
||||
|
||||
for (auto&& race : temp)
|
||||
{
|
||||
_classExpansionRequirementStore.emplace_back();
|
||||
RaceClassAvailability& raceClassAvailability = _classExpansionRequirementStore.emplace_back();
|
||||
|
||||
RaceClassAvailability& raceClassAvailability = _classExpansionRequirementStore.back();
|
||||
raceClassAvailability.RaceID = race.first;
|
||||
|
||||
for (auto&& class_ : race.second)
|
||||
{
|
||||
raceClassAvailability.Classes.emplace_back();
|
||||
ClassAvailability& classAvailability = raceClassAvailability.Classes.emplace_back();
|
||||
|
||||
ClassAvailability& classAvailability = raceClassAvailability.Classes.back();
|
||||
classAvailability.ClassID = class_.first;
|
||||
classAvailability.ActiveExpansionLevel = class_.second.first;
|
||||
classAvailability.AccountExpansionLevel = class_.second.second;
|
||||
classAvailability.MinActiveExpansionLevel = minRequirementForClass[class_.first];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10804,6 +10827,16 @@ ClassAvailability const* ObjectMgr::GetClassExpansionRequirement(uint8 raceId, u
|
||||
return &(*classItr);
|
||||
}
|
||||
|
||||
ClassAvailability const* ObjectMgr::GetClassExpansionRequirementFallback(uint8 classId) const
|
||||
{
|
||||
for (RaceClassAvailability const& raceClassAvailability : _classExpansionRequirementStore)
|
||||
for (ClassAvailability const& classAvailability : raceClassAvailability.Classes)
|
||||
if (classAvailability.ClassID == classId)
|
||||
return &classAvailability;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PlayerChoice const* ObjectMgr::GetPlayerChoice(int32 choiceId) const
|
||||
{
|
||||
return Trinity::Containers::MapGetValuePtr(_playerChoices, choiceId);
|
||||
|
||||
@@ -44,6 +44,7 @@ class Item;
|
||||
class Unit;
|
||||
class Vehicle;
|
||||
class Map;
|
||||
enum class GossipOptionFlags : int32;
|
||||
enum class GossipOptionNpc : uint8;
|
||||
struct AccessRequirement;
|
||||
struct DeclinedName;
|
||||
@@ -662,6 +663,7 @@ struct PlayerInfo
|
||||
CreatePosition createPosition;
|
||||
Optional<CreatePosition> createPositionNPE;
|
||||
|
||||
ItemContext itemContext;
|
||||
PlayerCreateInfoItems item;
|
||||
PlayerCreateInfoSpells customSpells;
|
||||
PlayerCreateInfoSpells castSpells[size_t(PlayerCreateMode::Max)];
|
||||
@@ -743,25 +745,25 @@ struct PointOfInterest
|
||||
struct GossipMenuItems
|
||||
{
|
||||
uint32 MenuID;
|
||||
uint32 OptionID;
|
||||
int32 GossipOptionID;
|
||||
uint32 OrderIndex;
|
||||
GossipOptionNpc OptionNpc;
|
||||
std::string OptionText;
|
||||
uint32 OptionBroadcastTextID;
|
||||
uint32 Language;
|
||||
GossipOptionFlags Flags;
|
||||
uint32 ActionMenuID;
|
||||
uint32 ActionPoiID;
|
||||
Optional<int32> GossipNpcOptionID;
|
||||
bool BoxCoded;
|
||||
uint32 BoxMoney;
|
||||
std::string BoxText;
|
||||
uint32 BoxBroadcastTextID;
|
||||
Optional<int32> SpellID;
|
||||
Optional<int32> OverrideIconID;
|
||||
ConditionContainer Conditions;
|
||||
};
|
||||
|
||||
struct GossipMenuItemAddon
|
||||
{
|
||||
Optional<int32> GarrTalentTreeID;
|
||||
};
|
||||
|
||||
struct GossipMenus
|
||||
{
|
||||
uint32 MenuID;
|
||||
@@ -779,7 +781,6 @@ typedef std::pair<GossipMenusContainer::const_iterator, GossipMenusContainer::co
|
||||
typedef std::pair<GossipMenusContainer::iterator, GossipMenusContainer::iterator> GossipMenusMapBoundsNonConst;
|
||||
typedef std::multimap<uint32, GossipMenuItems> GossipMenuItemsContainer;
|
||||
typedef std::unordered_map<uint32, GossipMenuAddon> GossipMenuAddonContainer;
|
||||
typedef std::unordered_map<std::pair<uint32, uint32>, GossipMenuItemAddon> GossipMenuItemAddonContainer;
|
||||
|
||||
struct QuestPOIBlobPoint
|
||||
{
|
||||
@@ -1043,6 +1044,7 @@ struct ClassAvailability
|
||||
uint8 ClassID = 0;
|
||||
uint8 ActiveExpansionLevel = 0;
|
||||
uint8 AccountExpansionLevel = 0;
|
||||
uint8 MinActiveExpansionLevel = 0;
|
||||
};
|
||||
|
||||
struct RaceClassAvailability
|
||||
@@ -1401,7 +1403,6 @@ class TC_GAME_API ObjectMgr
|
||||
void LoadGossipMenu();
|
||||
void LoadGossipMenuItems();
|
||||
void LoadGossipMenuAddon();
|
||||
void LoadGossipMenuItemAddon();
|
||||
|
||||
void LoadVendors();
|
||||
void LoadTrainers();
|
||||
@@ -1704,13 +1705,6 @@ class TC_GAME_API ObjectMgr
|
||||
return &itr->second;
|
||||
return nullptr;
|
||||
}
|
||||
GossipMenuItemAddon const* GetGossipMenuItemAddon(uint32 menuId, uint32 optionId) const
|
||||
{
|
||||
auto itr = _gossipMenuItemAddonStore.find({ menuId, optionId });
|
||||
if (itr != _gossipMenuItemAddonStore.end())
|
||||
return &itr->second;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// for wintergrasp only
|
||||
GraveyardContainer GraveyardStore;
|
||||
@@ -1781,6 +1775,7 @@ class TC_GAME_API ObjectMgr
|
||||
|
||||
std::vector<RaceClassAvailability> const& GetClassExpansionRequirements() const { return _classExpansionRequirementStore; }
|
||||
ClassAvailability const* GetClassExpansionRequirement(uint8 raceId, uint8 classId) const;
|
||||
ClassAvailability const* GetClassExpansionRequirementFallback(uint8 classId) const;
|
||||
|
||||
SceneTemplate const* GetSceneTemplate(uint32 sceneId) const
|
||||
{
|
||||
@@ -1845,7 +1840,6 @@ class TC_GAME_API ObjectMgr
|
||||
GossipMenusContainer _gossipMenusStore;
|
||||
GossipMenuItemsContainer _gossipMenuItemsStore;
|
||||
GossipMenuAddonContainer _gossipMenuAddonStore;
|
||||
GossipMenuItemAddonContainer _gossipMenuItemAddonStore;
|
||||
PointOfInterestContainer _pointsOfInterestStore;
|
||||
|
||||
QuestPOIContainer _questPOIStore;
|
||||
@@ -1913,7 +1907,7 @@ class TC_GAME_API ObjectMgr
|
||||
|
||||
void BuildPlayerLevelInfo(uint8 race, uint8 class_, uint8 level, PlayerLevelInfo* plinfo) const;
|
||||
|
||||
std::unique_ptr<PlayerInfo> _playerInfo[MAX_RACES][MAX_CLASSES];
|
||||
std::unordered_map<std::pair<Races, Classes>, std::unique_ptr<PlayerInfo>> _playerInfo;
|
||||
|
||||
typedef std::vector<uint32> PlayerXPperLevel; // [level]
|
||||
PlayerXPperLevel _playerXPperLevel;
|
||||
|
||||
@@ -100,6 +100,7 @@ enum GroupFlags
|
||||
GROUP_FLAG_ONE_PERSON_PARTY = 0x020, // Script_IsOnePersonParty()
|
||||
GROUP_FLAG_EVERYONE_ASSISTANT = 0x040, // Script_IsEveryoneAssistant()
|
||||
GROUP_FLAG_GUILD_GROUP = 0x100,
|
||||
GROUP_FLAG_CROSS_FACTION = 0x200,
|
||||
|
||||
GROUP_MASK_BGRAID = GROUP_FLAG_FAKE_RAID | GROUP_FLAG_RAID,
|
||||
};
|
||||
|
||||
@@ -93,6 +93,7 @@ void WorldSession::SendSetTimeZoneInformation()
|
||||
WorldPackets::System::SetTimeZoneInformation packet;
|
||||
packet.ServerTimeTZ = "Europe/Paris";
|
||||
packet.GameTimeTZ = "Europe/Paris";
|
||||
packet.ServerRegionalTZ = "Europe/Paris";
|
||||
|
||||
SendPacket(packet.Write());
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "AzeriteItem.h"
|
||||
#include "AzeritePackets.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "NPCPackets.h"
|
||||
#include "Player.h"
|
||||
#include "SpellHistory.h"
|
||||
|
||||
@@ -236,5 +237,9 @@ void WorldSession::HandleAzeriteEmpoweredItemSelectPower(WorldPackets::Azerite::
|
||||
|
||||
void WorldSession::SendAzeriteRespecNPC(ObjectGuid npc)
|
||||
{
|
||||
SendPacket(WorldPackets::Azerite::AzeriteRespecNPC(npc).Write());
|
||||
WorldPackets::NPC::NPCInteractionOpenResult npcInteraction;
|
||||
npcInteraction.Npc = npc;
|
||||
npcInteraction.InteractionType = PlayerInteractionType::AzeriteRespec;
|
||||
npcInteraction.Success = true;
|
||||
SendPacket(npcInteraction.Write());
|
||||
}
|
||||
|
||||
@@ -197,13 +197,13 @@ void WorldSession::HandleReagentBankDepositOpcode(WorldPackets::Bank::ReagentBan
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
if (msg != EQUIP_ERR_REAGENT_BANK_FULL || !anyDeposited)
|
||||
_player->SendEquipError(msg, item, NULL);
|
||||
_player->SendEquipError(msg, item, nullptr);
|
||||
break;
|
||||
}
|
||||
|
||||
if (dest.size() == 1 && dest[0].pos == item->GetPos())
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_CANT_SWAP, item, NULL);
|
||||
_player->SendEquipError(EQUIP_ERR_CANT_SWAP, item, nullptr);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -236,13 +236,13 @@ void WorldSession::HandleAutoBankReagentOpcode(WorldPackets::Bank::AutoBankReage
|
||||
InventoryResult msg = _player->CanBankItem(NULL_BAG, NULL_SLOT, dest, item, false, true, true);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
_player->SendEquipError(msg, item, NULL);
|
||||
_player->SendEquipError(msg, item, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (dest.size() == 1 && dest[0].pos == item->GetPos())
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_CANT_SWAP, item, NULL);
|
||||
_player->SendEquipError(EQUIP_ERR_CANT_SWAP, item, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ void WorldSession::HandleAutoStoreBankReagentOpcode(WorldPackets::Bank::AutoStor
|
||||
InventoryResult msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, pItem, false);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
_player->SendEquipError(msg, pItem, NULL);
|
||||
_player->SendEquipError(msg, pItem, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ void WorldSession::HandleAutoStoreBankReagentOpcode(WorldPackets::Bank::AutoStor
|
||||
InventoryResult msg = _player->CanBankItem(NULL_BAG, NULL_SLOT, dest, pItem, false, true, true);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
_player->SendEquipError(msg, pItem, NULL);
|
||||
_player->SendEquipError(msg, pItem, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -299,7 +299,9 @@ void WorldSession::HandleAutoStoreBankReagentOpcode(WorldPackets::Bank::AutoStor
|
||||
void WorldSession::SendShowBank(ObjectGuid guid)
|
||||
{
|
||||
m_currentBankerGUID = guid;
|
||||
WorldPackets::NPC::ShowBank packet;
|
||||
packet.Guid = guid;
|
||||
SendPacket(packet.Write());
|
||||
WorldPackets::NPC::NPCInteractionOpenResult npcInteraction;
|
||||
npcInteraction.Npc = guid;
|
||||
npcInteraction.InteractionType = PlayerInteractionType::Banker;
|
||||
npcInteraction.Success = true;
|
||||
SendPacket(npcInteraction.Write());
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "NPCPackets.h"
|
||||
#include "Player.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
void WorldSession::HandleBlackMarketOpen(WorldPackets::BlackMarket::BlackMarketOpen& blackMarketOpen)
|
||||
{
|
||||
@@ -42,10 +42,11 @@ void WorldSession::HandleBlackMarketOpen(WorldPackets::BlackMarket::BlackMarketO
|
||||
|
||||
void WorldSession::SendBlackMarketOpenResult(ObjectGuid guid, Creature* /*auctioneer*/)
|
||||
{
|
||||
WorldPackets::BlackMarket::BlackMarketOpenResult packet;
|
||||
packet.Guid = guid;
|
||||
packet.Enable = sBlackMarketMgr->IsEnabled();
|
||||
SendPacket(packet.Write());
|
||||
WorldPackets::NPC::NPCInteractionOpenResult npcInteraction;
|
||||
npcInteraction.Npc = guid;
|
||||
npcInteraction.InteractionType = PlayerInteractionType::BlackMarketAuctioneer;
|
||||
npcInteraction.Success = sBlackMarketMgr->IsEnabled();
|
||||
SendPacket(npcInteraction.Write());
|
||||
}
|
||||
|
||||
void WorldSession::HandleBlackMarketRequestItems(WorldPackets::BlackMarket::BlackMarketRequestItems& blackMarketRequestItems)
|
||||
|
||||
@@ -515,6 +515,15 @@ bool WorldSession::MeetsChrCustomizationReq(ChrCustomizationReqEntry const* req,
|
||||
if (req->ItemModifiedAppearanceID && !GetCollectionMgr()->HasItemAppearance(req->ItemModifiedAppearanceID).first)
|
||||
return false;
|
||||
|
||||
if (req->QuestID)
|
||||
{
|
||||
if (!_player)
|
||||
return false;
|
||||
|
||||
if (!_player->IsQuestRewarded(req->QuestID))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (checkRequiredDependentChoices)
|
||||
{
|
||||
if (std::unordered_map<uint32, std::vector<uint32>> const* requiredChoices = sDB2Manager.GetRequiredCustomizationChoices(req->ID))
|
||||
@@ -667,8 +676,29 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
//}
|
||||
|
||||
// prevent character creating Expansion class without Expansion account
|
||||
ClassAvailability const* classExpansionRequirement = sObjectMgr->GetClassExpansionRequirement(charCreate.CreateInfo->Race, charCreate.CreateInfo->Class);
|
||||
if (!classExpansionRequirement)
|
||||
if (ClassAvailability const* raceClassExpansionRequirement = sObjectMgr->GetClassExpansionRequirement(charCreate.CreateInfo->Race, charCreate.CreateInfo->Class))
|
||||
{
|
||||
if (raceClassExpansionRequirement->ActiveExpansionLevel > GetExpansion() || raceClassExpansionRequirement->AccountExpansionLevel > GetAccountExpansion())
|
||||
{
|
||||
TC_LOG_ERROR("entities.player.cheat", "Account:[%d] tried to create character with race/class %u/%u without required expansion (had %u/%u, required %u/%u)",
|
||||
GetAccountId(), uint32(charCreate.CreateInfo->Race), uint32(charCreate.CreateInfo->Class), GetExpansion(), GetAccountExpansion(),
|
||||
raceClassExpansionRequirement->ActiveExpansionLevel, raceClassExpansionRequirement->AccountExpansionLevel);
|
||||
SendCharCreate(CHAR_CREATE_EXPANSION_CLASS);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (ClassAvailability const* classExpansionRequirement = sObjectMgr->GetClassExpansionRequirementFallback(charCreate.CreateInfo->Class))
|
||||
{
|
||||
if (classExpansionRequirement->MinActiveExpansionLevel > GetExpansion() || classExpansionRequirement->AccountExpansionLevel > GetAccountExpansion())
|
||||
{
|
||||
TC_LOG_ERROR("entities.player.cheat", "Account:[%d] tried to create character with race/class %u/%u without required expansion (had %u/%u, required %u/%u)",
|
||||
GetAccountId(), uint32(charCreate.CreateInfo->Race), uint32(charCreate.CreateInfo->Class), GetExpansion(), GetAccountExpansion(),
|
||||
classExpansionRequirement->ActiveExpansionLevel, classExpansionRequirement->AccountExpansionLevel);
|
||||
SendCharCreate(CHAR_CREATE_EXPANSION_CLASS);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TC_LOG_ERROR("entities.player.cheat", "Expansion %u account:[%d] tried to Create character for race/class combination that is missing requirements in db (%u/%u)",
|
||||
GetAccountExpansion(), GetAccountId(), uint32(charCreate.CreateInfo->Race), uint32(charCreate.CreateInfo->Class));
|
||||
@@ -676,15 +706,6 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
return;
|
||||
}
|
||||
|
||||
if (classExpansionRequirement->ActiveExpansionLevel > GetExpansion() || classExpansionRequirement->AccountExpansionLevel > GetAccountExpansion())
|
||||
{
|
||||
TC_LOG_ERROR("entities.player.cheat", "Account:[%d] tried to create character with race/class %u/%u without required expansion (had %u/%u, required %u/%u)",
|
||||
GetAccountId(), uint32(charCreate.CreateInfo->Race), uint32(charCreate.CreateInfo->Class), GetExpansion(), GetAccountExpansion(),
|
||||
classExpansionRequirement->ActiveExpansionLevel, classExpansionRequirement->AccountExpansionLevel);
|
||||
SendCharCreate(CHAR_CREATE_EXPANSION_CLASS);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RACEMASK))
|
||||
{
|
||||
if (raceEntry->GetFlags().HasFlag(ChrRacesFlag::NPCOnly))
|
||||
@@ -792,9 +813,14 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
bool haveSameRace = false;
|
||||
uint32 demonHunterReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEMON_HUNTER);
|
||||
bool hasDemonHunterReqLevel = (demonHunterReqLevel == 0);
|
||||
uint32 evokerReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_EVOKER);
|
||||
bool hasEvokerReqLevel = (evokerReqLevel == 0);
|
||||
bool allowTwoSideAccounts = !sWorld->IsPvPRealm() || HasPermission(rbac::RBAC_PERM_TWO_SIDE_CHARACTER_CREATION);
|
||||
uint32 skipCinematics = sWorld->getIntConfig(CONFIG_SKIP_CINEMATICS);
|
||||
bool checkDemonHunterReqs = createInfo->Class == CLASS_DEMON_HUNTER && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_DEMON_HUNTER);
|
||||
bool checkClassLevelReqs = (createInfo->Class == CLASS_DEMON_HUNTER || createInfo->Class == CLASS_EVOKER)
|
||||
&& !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_DEMON_HUNTER);
|
||||
int32 evokerLimit = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_EVOKERS_PER_REALM);
|
||||
bool hasEvokerLimit = evokerLimit != 0;
|
||||
|
||||
if (result)
|
||||
{
|
||||
@@ -802,8 +828,9 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
|
||||
Field* field = result->Fetch();
|
||||
uint8 accRace = field[1].GetUInt8();
|
||||
uint8 accClass = field[2].GetUInt8();
|
||||
|
||||
if (checkDemonHunterReqs)
|
||||
if (checkClassLevelReqs)
|
||||
{
|
||||
if (!hasDemonHunterReqLevel)
|
||||
{
|
||||
@@ -811,8 +838,17 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
if (accLevel >= demonHunterReqLevel)
|
||||
hasDemonHunterReqLevel = true;
|
||||
}
|
||||
if (!hasEvokerReqLevel)
|
||||
{
|
||||
uint8 accLevel = field[0].GetUInt8();
|
||||
if (accLevel >= evokerReqLevel)
|
||||
hasEvokerReqLevel = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (accClass == CLASS_EVOKER)
|
||||
--evokerLimit;
|
||||
|
||||
// need to check team only for first character
|
||||
/// @todo what to if account already has characters of both races?
|
||||
if (!allowTwoSideAccounts)
|
||||
@@ -830,18 +866,19 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
|
||||
// search same race for cinematic or same class if need
|
||||
/// @todo check if cinematic already shown? (already logged in?; cinematic field)
|
||||
while ((skipCinematics == 1 && !haveSameRace) || createInfo->Class == CLASS_DEMON_HUNTER)
|
||||
while ((skipCinematics == 1 && !haveSameRace) || createInfo->Class == CLASS_DEMON_HUNTER || createInfo->Class == CLASS_EVOKER)
|
||||
{
|
||||
if (!result->NextRow())
|
||||
break;
|
||||
|
||||
field = result->Fetch();
|
||||
accRace = field[1].GetUInt8();
|
||||
accClass = field[2].GetUInt8();
|
||||
|
||||
if (!haveSameRace)
|
||||
haveSameRace = createInfo->Race == accRace;
|
||||
|
||||
if (checkDemonHunterReqs)
|
||||
if (checkClassLevelReqs)
|
||||
{
|
||||
if (!hasDemonHunterReqLevel)
|
||||
{
|
||||
@@ -849,13 +886,36 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
if (accLevel >= demonHunterReqLevel)
|
||||
hasDemonHunterReqLevel = true;
|
||||
}
|
||||
if (!hasEvokerReqLevel)
|
||||
{
|
||||
uint8 accLevel = field[0].GetUInt8();
|
||||
if (accLevel >= evokerReqLevel)
|
||||
hasEvokerReqLevel = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (accClass == CLASS_EVOKER)
|
||||
--evokerLimit;
|
||||
}
|
||||
}
|
||||
|
||||
if (checkDemonHunterReqs && !hasDemonHunterReqLevel)
|
||||
if (checkClassLevelReqs)
|
||||
{
|
||||
SendCharCreate(CHAR_CREATE_NEW_PLAYER);
|
||||
if (!hasDemonHunterReqLevel)
|
||||
{
|
||||
SendCharCreate(CHAR_CREATE_NEW_PLAYER);
|
||||
return;
|
||||
}
|
||||
if (!hasEvokerReqLevel)
|
||||
{
|
||||
SendCharCreate(CHAR_CREATE_DRACTHYR_LEVEL_REQUIREMENT);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (createInfo->Class == CLASS_EVOKER && hasEvokerLimit && evokerLimit < 1)
|
||||
{
|
||||
SendCharCreate(CHAR_CREATE_DRACTHYR_DUPLICATE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -922,7 +982,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_CREATE_INFO);
|
||||
stmt->setUInt32(0, GetAccountId());
|
||||
stmt->setUInt32(1, (skipCinematics == 1 || createInfo->Class == CLASS_DEMON_HUNTER) ? 1200 : 1); // 200 (max chars per realm) + 1000 (max deleted chars per realm)
|
||||
stmt->setUInt32(1, (skipCinematics == 1 || createInfo->Class == CLASS_DEMON_HUNTER || createInfo->Class == CLASS_EVOKER) ? 1200 : 1); // 200 (max chars per realm) + 1000 (max deleted chars per realm)
|
||||
queryCallback.WithPreparedCallback(std::move(finalizeCharacterCreation)).SetNextQuery(CharacterDatabase.AsyncQuery(stmt));
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ void WorldSession::HandleChatMessage(ChatMsg type, Language lang, std::string ms
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.size() > 255)
|
||||
if (msg.size() > 511)
|
||||
return;
|
||||
|
||||
if (msg.empty())
|
||||
@@ -564,7 +564,7 @@ void WorldSession::HandleChatMessageAFKOpcode(WorldPackets::Chat::ChatMessageAFK
|
||||
if (sender->IsInCombat())
|
||||
return;
|
||||
|
||||
if (chatMessageAFK.Text.length() > 255)
|
||||
if (chatMessageAFK.Text.length() > 511)
|
||||
return;
|
||||
|
||||
// do message validity checks
|
||||
@@ -610,7 +610,7 @@ void WorldSession::HandleChatMessageDNDOpcode(WorldPackets::Chat::ChatMessageDND
|
||||
if (sender->IsInCombat())
|
||||
return;
|
||||
|
||||
if (chatMessageDND.Text.length() > 255)
|
||||
if (chatMessageDND.Text.length() > 511)
|
||||
return;
|
||||
|
||||
// do message validity checks
|
||||
|
||||
@@ -955,8 +955,8 @@ void WorldSession::HandleSocketGems(WorldPackets::Item::SocketGems& socketGems)
|
||||
gems[i] = gem;
|
||||
gemData[i].ItemId = gem->GetEntry();
|
||||
gemData[i].Context = gem->m_itemData->Context;
|
||||
for (std::size_t b = 0; b < gem->m_itemData->BonusListIDs->size() && b < 16; ++b)
|
||||
gemData[i].BonusListIDs[b] = (*gem->m_itemData->BonusListIDs)[b];
|
||||
for (std::size_t b = 0; b < gem->GetBonusListIDs().size() && b < 16; ++b)
|
||||
gemData[i].BonusListIDs[b] = gem->GetBonusListIDs()[b];
|
||||
|
||||
gemProperties[i] = sGemPropertiesStore.LookupEntry(gem->GetTemplate()->GetGemProperties());
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "Item.h"
|
||||
#include "ItemPackets.h"
|
||||
#include "Log.h"
|
||||
#include "MailPackets.h"
|
||||
#include "Map.h"
|
||||
#include "NPCPackets.h"
|
||||
#include "ObjectMgr.h"
|
||||
@@ -39,7 +38,6 @@
|
||||
#include "ReputationMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Trainer.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
enum class StableResult : uint8
|
||||
@@ -71,16 +69,20 @@ void WorldSession::HandleTabardVendorActivateOpcode(WorldPackets::NPC::Hello& pa
|
||||
|
||||
void WorldSession::SendTabardVendorActivate(ObjectGuid guid)
|
||||
{
|
||||
WorldPackets::NPC::PlayerTabardVendorActivate packet;
|
||||
packet.Vendor = guid;
|
||||
SendPacket(packet.Write());
|
||||
WorldPackets::NPC::NPCInteractionOpenResult npcInteraction;
|
||||
npcInteraction.Npc = guid;
|
||||
npcInteraction.InteractionType = PlayerInteractionType::TabardVendor;
|
||||
npcInteraction.Success = true;
|
||||
SendPacket(npcInteraction.Write());
|
||||
}
|
||||
|
||||
void WorldSession::SendShowMailBox(ObjectGuid guid)
|
||||
{
|
||||
WorldPackets::Mail::ShowMailbox packet;
|
||||
packet.PostmasterGUID = guid;
|
||||
SendPacket(packet.Write());
|
||||
WorldPackets::NPC::NPCInteractionOpenResult npcInteraction;
|
||||
npcInteraction.Npc = guid;
|
||||
npcInteraction.InteractionType = PlayerInteractionType::MailInfo;
|
||||
npcInteraction.Success = true;
|
||||
SendPacket(npcInteraction.Write());
|
||||
}
|
||||
|
||||
void WorldSession::HandleTrainerListOpcode(WorldPackets::NPC::Hello& packet)
|
||||
@@ -188,7 +190,8 @@ void WorldSession::HandleGossipHelloOpcode(WorldPackets::NPC::Hello& packet)
|
||||
|
||||
void WorldSession::HandleGossipSelectOptionOpcode(WorldPackets::NPC::GossipSelectOption& packet)
|
||||
{
|
||||
if (!_player->PlayerTalkClass->GetGossipMenu().GetItem(packet.GossipIndex))
|
||||
GossipMenuItem const* gossipMenuItem = _player->PlayerTalkClass->GetGossipMenu().GetItem(packet.GossipOptionID);
|
||||
if (!gossipMenuItem)
|
||||
return;
|
||||
|
||||
// Prevent cheating on C++ scripted menus
|
||||
@@ -242,26 +245,26 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPackets::NPC::GossipSelec
|
||||
{
|
||||
if (unit)
|
||||
{
|
||||
if (!unit->AI()->OnGossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode.c_str()))
|
||||
_player->OnGossipSelect(unit, packet.GossipIndex, packet.GossipID);
|
||||
if (!unit->AI()->OnGossipSelectCode(_player, packet.GossipID, gossipMenuItem->OrderIndex, packet.PromotionCode.c_str()))
|
||||
_player->OnGossipSelect(unit, packet.GossipOptionID, packet.GossipID);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!go->AI()->OnGossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode.c_str()))
|
||||
_player->OnGossipSelect(go, packet.GossipIndex, packet.GossipID);
|
||||
if (!go->AI()->OnGossipSelectCode(_player, packet.GossipID, gossipMenuItem->OrderIndex, packet.PromotionCode.c_str()))
|
||||
_player->OnGossipSelect(go, packet.GossipOptionID, packet.GossipID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (unit)
|
||||
{
|
||||
if (!unit->AI()->OnGossipSelect(_player, packet.GossipID, packet.GossipIndex))
|
||||
_player->OnGossipSelect(unit, packet.GossipIndex, packet.GossipID);
|
||||
if (!unit->AI()->OnGossipSelect(_player, packet.GossipID, gossipMenuItem->OrderIndex))
|
||||
_player->OnGossipSelect(unit, packet.GossipOptionID, packet.GossipID);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!go->AI()->OnGossipSelect(_player, packet.GossipID, packet.GossipIndex))
|
||||
_player->OnGossipSelect(go, packet.GossipIndex, packet.GossipID);
|
||||
if (!go->AI()->OnGossipSelect(_player, packet.GossipID, gossipMenuItem->OrderIndex))
|
||||
_player->OnGossipSelect(go, packet.GossipOptionID, packet.GossipID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "DB2Stores.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "NPCPackets.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "TransmogrificationPackets.h"
|
||||
@@ -331,5 +332,9 @@ void WorldSession::HandleTransmogrifyItems(WorldPackets::Transmogrification::Tra
|
||||
|
||||
void WorldSession::SendOpenTransmogrifier(ObjectGuid const& guid)
|
||||
{
|
||||
SendPacket(WorldPackets::Transmogrification::TransmogrifyNPC(guid).Write());
|
||||
WorldPackets::NPC::NPCInteractionOpenResult npcInteraction;
|
||||
npcInteraction.Npc = guid;
|
||||
npcInteraction.InteractionType = PlayerInteractionType::Transmogrifier;
|
||||
npcInteraction.Success = true;
|
||||
SendPacket(npcInteraction.Write());
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ void WorldSession::HandleVoidStorageTransfer(WorldPackets::VoidStorage::VoidStor
|
||||
|
||||
VoidStorageItem itemVS(sObjectMgr->GenerateVoidStorageItemId(), item->GetEntry(), item->GetCreator(),
|
||||
item->GetItemRandomBonusListId(), item->GetModifier(ITEM_MODIFIER_TIMEWALKER_LEVEL), item->GetModifier(ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL),
|
||||
item->GetContext(), item->m_itemData->BonusListIDs);
|
||||
item->GetContext(), item->GetBonusListIDs());
|
||||
|
||||
WorldPackets::VoidStorage::VoidItem voidItem;
|
||||
voidItem.Guid = ObjectGuid::Create<HighGuid::Item>(itemVS.ItemId);
|
||||
|
||||
@@ -159,6 +159,17 @@ enum LootSlotType
|
||||
LOOT_SLOT_TYPE_OWNER = 4 // ignore binding confirmation and etc, for single player looting
|
||||
};
|
||||
|
||||
enum class LootRollIneligibilityReason : uint32
|
||||
{
|
||||
None = 0,
|
||||
UnusableByClass = 1, // Your class may not roll need on this item.
|
||||
MaxUniqueItemCount = 2, // You already have the maximum amount of this item.
|
||||
CannotBeDisenchanted = 3, // This item may not be disenchanted.
|
||||
EnchantingSkillTooLow = 4, // You do not have an Enchanter of skill %d in your group.
|
||||
NeedDisabled = 5, // Need rolls are disabled for this item.
|
||||
OwnBetterItem = 6 // You already have a powerful version of this item.
|
||||
};
|
||||
|
||||
struct TC_GAME_API LootItem
|
||||
{
|
||||
uint32 itemid;
|
||||
|
||||
@@ -63,7 +63,7 @@ class StoredLootContainer
|
||||
void RemoveMoney();
|
||||
void RemoveItem(uint32 itemId, uint32 count, uint32 itemIndex);
|
||||
|
||||
uint32 GetContainer() const { return _containerId; }
|
||||
uint64 GetContainer() const { return _containerId; }
|
||||
uint32 GetMoney() const { return _money; }
|
||||
StoredLootItemContainer const& GetLootItems() const { return _lootItems; }
|
||||
|
||||
|
||||
@@ -531,15 +531,9 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
|
||||
InitializeLeg(leg, &transport->Events, pathPoints, pauses, events, goInfo, totalTime);
|
||||
|
||||
if (transport->MapIds.size() > 1)
|
||||
{
|
||||
for (uint32 mapId : transport->MapIds)
|
||||
ASSERT(!sMapStore.LookupEntry(mapId)->Instanceable());
|
||||
|
||||
transport->InInstance = false;
|
||||
}
|
||||
else
|
||||
transport->InInstance = sMapStore.LookupEntry(*transport->MapIds.begin())->Instanceable();
|
||||
|
||||
transport->TotalPathTime = totalTime;
|
||||
}
|
||||
|
||||
@@ -578,6 +572,12 @@ Transport* TransportMgr::CreateTransport(uint32 entry, Map* map, ObjectGuid::Low
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (tInfo->MapIds.find(map->GetId()) == tInfo->MapIds.end())
|
||||
{
|
||||
TC_LOG_ERROR("entities.transport", "Transport %u attempted creation on map it has no path for %u!", entry, map->GetId());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Optional<Position> startingPosition = tInfo->ComputePosition(0, nullptr, nullptr);
|
||||
if (!startingPosition)
|
||||
{
|
||||
@@ -589,7 +589,6 @@ Transport* TransportMgr::CreateTransport(uint32 entry, Map* map, ObjectGuid::Low
|
||||
Transport* trans = new Transport();
|
||||
|
||||
// ...at first waypoint
|
||||
uint32 mapId = tInfo->PathLegs.front().MapId;
|
||||
float x = startingPosition->GetPositionX();
|
||||
float y = startingPosition->GetPositionY();
|
||||
float z = startingPosition->GetPositionZ();
|
||||
@@ -605,16 +604,6 @@ Transport* TransportMgr::CreateTransport(uint32 entry, Map* map, ObjectGuid::Low
|
||||
|
||||
PhasingHandler::InitDbPhaseShift(trans->GetPhaseShift(), phaseUseFlags, phaseId, phaseGroupId);
|
||||
|
||||
if (MapEntry const* mapEntry = sMapStore.LookupEntry(mapId))
|
||||
{
|
||||
if (mapEntry->Instanceable() != tInfo->InInstance)
|
||||
{
|
||||
TC_LOG_ERROR("entities.transport", "Transport %u (name: %s) attempted creation in instance map (id: %u) but it is not an instanced transport!", entry, trans->GetName().c_str(), mapId);
|
||||
delete trans;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// use preset map for instances (need to know which instance)
|
||||
trans->SetMap(map);
|
||||
if (InstanceMap* instanceMap = map->ToInstanceMap())
|
||||
|
||||
@@ -103,7 +103,6 @@ struct TransportTemplate
|
||||
double CalculateDistanceMoved(double timePassedInSegment, double segmentDuration, bool isFirstSegment, bool isLastSegment) const;
|
||||
|
||||
std::set<uint32> MapIds;
|
||||
bool InInstance = false;
|
||||
};
|
||||
|
||||
struct TC_GAME_API TransportAnimation
|
||||
|
||||
@@ -61,18 +61,27 @@ enum Races
|
||||
RACE_DARK_IRON_DWARF = 34, // TITLE Dark Iron Dwarf DESCRIPTION Dark Iron Dwarf (RaceMask bit 11)
|
||||
RACE_VULPERA = 35, // TITLE Vulpera DESCRIPTION Vulpera (RaceMask bit 12)
|
||||
RACE_MAGHAR_ORC = 36, // TITLE Mag'har Orc DESCRIPTION Mag'har Orc (RaceMask bit 13)
|
||||
RACE_MECHAGNOME = 37 // TITLE Mechagnome DESCRIPTION Mechagnome (RaceMask bit 14)
|
||||
RACE_MECHAGNOME = 37, // TITLE Mechagnome DESCRIPTION Mechagnome (RaceMask bit 14)
|
||||
RACE_DRACTHYR_ALLIANCE = 52, // TITLE Dracthyr DESCRIPTION Dracthyr (Alliance) (RaceMask bit 16)
|
||||
RACE_DRACTHYR_HORDE = 70, // TITLE Dracthyr DESCRIPTION Dracthyr (Horde) (RaceMask bit 15)
|
||||
//RACE_COMPANION_DRAKE = 71,
|
||||
//RACE_COMPANION_PROTO_DRAGON = 72,
|
||||
//RACE_COMPANION_SERPENT = 73,
|
||||
//RACE_COMPANION_WYVERN = 74,
|
||||
//RACE_DRACTHYR_VISAGE_ALLIANCE = 75,
|
||||
//RACE_DRACTHYR_VISAGE_HORDE= 76,
|
||||
//RACE_COMPANION_PTERRODAX = 77
|
||||
};
|
||||
|
||||
// max+1 for player race
|
||||
#define MAX_RACES 38
|
||||
#define MAX_RACES 78
|
||||
|
||||
namespace Trinity
|
||||
{
|
||||
template<typename T>
|
||||
struct RaceMask
|
||||
{
|
||||
static_assert(std::is_integral<T>::value, "RaceMask<T> must be integral");
|
||||
static_assert(std::is_integral_v<T>, "RaceMask<T> must be integral");
|
||||
|
||||
T RawValue;
|
||||
|
||||
@@ -81,16 +90,54 @@ struct RaceMask
|
||||
return (RawValue & GetMaskForRace(raceId)) != 0;
|
||||
}
|
||||
|
||||
static constexpr int32 GetRaceBit(uint8 raceId)
|
||||
{
|
||||
switch (raceId)
|
||||
{
|
||||
case RACE_HUMAN:
|
||||
case RACE_ORC:
|
||||
case RACE_DWARF:
|
||||
case RACE_NIGHTELF:
|
||||
case RACE_UNDEAD_PLAYER:
|
||||
case RACE_TAUREN:
|
||||
case RACE_GNOME:
|
||||
case RACE_TROLL:
|
||||
case RACE_GOBLIN:
|
||||
case RACE_BLOODELF:
|
||||
case RACE_DRAENEI:
|
||||
case RACE_WORGEN:
|
||||
case RACE_PANDAREN_NEUTRAL:
|
||||
case RACE_PANDAREN_ALLIANCE:
|
||||
case RACE_PANDAREN_HORDE:
|
||||
case RACE_NIGHTBORNE:
|
||||
case RACE_HIGHMOUNTAIN_TAUREN:
|
||||
case RACE_VOID_ELF:
|
||||
case RACE_LIGHTFORGED_DRAENEI:
|
||||
case RACE_ZANDALARI_TROLL:
|
||||
case RACE_KUL_TIRAN:
|
||||
return raceId - 1;
|
||||
case RACE_DARK_IRON_DWARF:
|
||||
return 11;
|
||||
case RACE_VULPERA:
|
||||
return 12;
|
||||
case RACE_MAGHAR_ORC:
|
||||
return 13;
|
||||
case RACE_MECHAGNOME:
|
||||
return 14;
|
||||
case RACE_DRACTHYR_ALLIANCE:
|
||||
return 16;
|
||||
case RACE_DRACTHYR_HORDE:
|
||||
return 15;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static constexpr T GetMaskForRace(uint8 raceId)
|
||||
{
|
||||
constexpr int32 raceBits[MAX_RACES] =
|
||||
{
|
||||
0, 0, 1, 2, 3, 4, 5, 6, 7, 8,
|
||||
9, 10, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, 21, -1, 23, 24, 25, 26, 27, 28,
|
||||
29, 30, 31, -1, 11, 12, 13, 14
|
||||
};
|
||||
return raceId < MAX_RACES && raceBits[raceId] >= 0 && raceBits[raceId] < 64 ? (T(1) << raceBits[raceId]) : T(0);
|
||||
int32 raceBit = GetRaceBit(raceId);
|
||||
return raceBit >= 0 && uint32(raceBit) < sizeof(T) * 8 ? (T(1) << raceBit) : T(0);
|
||||
}
|
||||
|
||||
constexpr bool IsEmpty() const { return RawValue == T(0); }
|
||||
@@ -127,7 +174,9 @@ constexpr Trinity::RaceMask<uint64> RACEMASK_ALL_PLAYABLE = { std::integral_cons
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_DARK_IRON_DWARF) |
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_VULPERA) |
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_MAGHAR_ORC) |
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_MECHAGNOME)>::value };
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_MECHAGNOME) |
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_DRACTHYR_ALLIANCE) |
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_DRACTHYR_HORDE)>::value };
|
||||
|
||||
constexpr Trinity::RaceMask<uint64> RACEMASK_NEUTRAL = { std::integral_constant<uint64, Trinity::RaceMask<uint64>::GetMaskForRace(RACE_PANDAREN_NEUTRAL)>::value };
|
||||
|
||||
@@ -143,7 +192,8 @@ constexpr Trinity::RaceMask<uint64> RACEMASK_ALLIANCE = { std::integral_constant
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_LIGHTFORGED_DRAENEI) |
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_KUL_TIRAN) |
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_DARK_IRON_DWARF) |
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_MECHAGNOME)>::value };
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_MECHAGNOME) |
|
||||
Trinity::RaceMask<uint64>::GetMaskForRace(RACE_DRACTHYR_ALLIANCE)>::value };
|
||||
|
||||
constexpr Trinity::RaceMask<uint64> RACEMASK_HORDE = { std::integral_constant<uint64, (RACEMASK_ALL_PLAYABLE & ~(RACEMASK_NEUTRAL | RACEMASK_ALLIANCE)).RawValue>::value };
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -56,12 +56,14 @@ TC_API_EXPORT EnumText EnumUtils<Races>::ToString(Races value)
|
||||
case RACE_VULPERA: return { "RACE_VULPERA", "Vulpera", "Vulpera (RaceMask bit 12)" };
|
||||
case RACE_MAGHAR_ORC: return { "RACE_MAGHAR_ORC", "Mag'har Orc", "Mag'har Orc (RaceMask bit 13)" };
|
||||
case RACE_MECHAGNOME: return { "RACE_MECHAGNOME", "Mechagnome", "Mechagnome (RaceMask bit 14)" };
|
||||
case RACE_DRACTHYR_ALLIANCE: return { "RACE_DRACTHYR_ALLIANCE", "Dracthyr", "Dracthyr (Alliance) (RaceMask bit 16)" };
|
||||
case RACE_DRACTHYR_HORDE: return { "RACE_DRACTHYR_HORDE", "Dracthyr", "Dracthyr (Horde) (RaceMask bit 15)" };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<Races>::Count() { return 25; }
|
||||
TC_API_EXPORT size_t EnumUtils<Races>::Count() { return 27; }
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT Races EnumUtils<Races>::FromIndex(size_t index)
|
||||
@@ -93,6 +95,8 @@ TC_API_EXPORT Races EnumUtils<Races>::FromIndex(size_t index)
|
||||
case 22: return RACE_VULPERA;
|
||||
case 23: return RACE_MAGHAR_ORC;
|
||||
case 24: return RACE_MECHAGNOME;
|
||||
case 25: return RACE_DRACTHYR_ALLIANCE;
|
||||
case 26: return RACE_DRACTHYR_HORDE;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
@@ -127,6 +131,8 @@ TC_API_EXPORT size_t EnumUtils<Races>::ToIndex(Races value)
|
||||
case RACE_VULPERA: return 22;
|
||||
case RACE_MAGHAR_ORC: return 23;
|
||||
case RACE_MECHAGNOME: return 24;
|
||||
case RACE_DRACTHYR_ALLIANCE: return 25;
|
||||
case RACE_DRACTHYR_HORDE: return 26;
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,12 +43,14 @@ TC_API_EXPORT EnumText EnumUtils<Classes>::ToString(Classes value)
|
||||
case CLASS_MONK: return { "CLASS_MONK", "Monk", "" };
|
||||
case CLASS_DRUID: return { "CLASS_DRUID", "Druid", "" };
|
||||
case CLASS_DEMON_HUNTER: return { "CLASS_DEMON_HUNTER", "Demon Hunter", "" };
|
||||
case CLASS_EVOKER: return { "CLASS_EVOKER", "Evoker", "" };
|
||||
case CLASS_ADVENTURER: return { "CLASS_ADVENTURER", "Adventurer", "" };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<Classes>::Count() { return 12; }
|
||||
TC_API_EXPORT size_t EnumUtils<Classes>::Count() { return 14; }
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT Classes EnumUtils<Classes>::FromIndex(size_t index)
|
||||
@@ -67,6 +69,8 @@ TC_API_EXPORT Classes EnumUtils<Classes>::FromIndex(size_t index)
|
||||
case 9: return CLASS_MONK;
|
||||
case 10: return CLASS_DRUID;
|
||||
case 11: return CLASS_DEMON_HUNTER;
|
||||
case 12: return CLASS_EVOKER;
|
||||
case 13: return CLASS_ADVENTURER;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
@@ -88,6 +92,8 @@ TC_API_EXPORT size_t EnumUtils<Classes>::ToIndex(Classes value)
|
||||
case CLASS_MONK: return 9;
|
||||
case CLASS_DRUID: return 10;
|
||||
case CLASS_DEMON_HUNTER: return 11;
|
||||
case CLASS_EVOKER: return 12;
|
||||
case CLASS_ADVENTURER: return 13;
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
@@ -120,12 +126,13 @@ TC_API_EXPORT EnumText EnumUtils<Powers>::ToString(Powers value)
|
||||
case POWER_ARCANE_CHARGES: return { "POWER_ARCANE_CHARGES", "Arcane Charges", "" };
|
||||
case POWER_FURY: return { "POWER_FURY", "Fury", "" };
|
||||
case POWER_PAIN: return { "POWER_PAIN", "Pain", "" };
|
||||
case POWER_ESSENCE: return { "POWER_ESSENCE", "Essence", "" };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<Powers>::Count() { return 20; }
|
||||
TC_API_EXPORT size_t EnumUtils<Powers>::Count() { return 21; }
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT Powers EnumUtils<Powers>::FromIndex(size_t index)
|
||||
@@ -152,6 +159,7 @@ TC_API_EXPORT Powers EnumUtils<Powers>::FromIndex(size_t index)
|
||||
case 17: return POWER_ARCANE_CHARGES;
|
||||
case 18: return POWER_FURY;
|
||||
case 19: return POWER_PAIN;
|
||||
case 20: return POWER_ESSENCE;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
@@ -181,6 +189,7 @@ TC_API_EXPORT size_t EnumUtils<Powers>::ToIndex(Powers value)
|
||||
case POWER_ARCANE_CHARGES: return 17;
|
||||
case POWER_FURY: return 18;
|
||||
case POWER_PAIN: return 19;
|
||||
case POWER_ESSENCE: return 20;
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
@@ -2198,8 +2207,8 @@ TC_API_EXPORT EnumText EnumUtils<SpellCastResult>::ToString(SpellCastResult valu
|
||||
case SPELL_FAILED_BAD_TARGETS: return { "SPELL_FAILED_BAD_TARGETS", "SPELL_FAILED_BAD_TARGETS", "" };
|
||||
case SPELL_FAILED_PVP_TARGET_WHILE_UNFLAGGED: return { "SPELL_FAILED_PVP_TARGET_WHILE_UNFLAGGED", "SPELL_FAILED_PVP_TARGET_WHILE_UNFLAGGED", "" };
|
||||
case SPELL_FAILED_CANT_BE_CHARMED: return { "SPELL_FAILED_CANT_BE_CHARMED", "SPELL_FAILED_CANT_BE_CHARMED", "" };
|
||||
case SPELL_FAILED_CANT_BE_DISENCHANTED: return { "SPELL_FAILED_CANT_BE_DISENCHANTED", "SPELL_FAILED_CANT_BE_DISENCHANTED", "" };
|
||||
case SPELL_FAILED_CANT_BE_DISENCHANTED_SKILL: return { "SPELL_FAILED_CANT_BE_DISENCHANTED_SKILL", "SPELL_FAILED_CANT_BE_DISENCHANTED_SKILL", "" };
|
||||
case SPELL_FAILED_CANT_BE_SALVAGED: return { "SPELL_FAILED_CANT_BE_SALVAGED", "SPELL_FAILED_CANT_BE_SALVAGED", "" };
|
||||
case SPELL_FAILED_CANT_BE_SALVAGED_SKILL: return { "SPELL_FAILED_CANT_BE_SALVAGED_SKILL", "SPELL_FAILED_CANT_BE_SALVAGED_SKILL", "" };
|
||||
case SPELL_FAILED_CANT_BE_ENCHANTED: return { "SPELL_FAILED_CANT_BE_ENCHANTED", "SPELL_FAILED_CANT_BE_ENCHANTED", "" };
|
||||
case SPELL_FAILED_CANT_BE_MILLED: return { "SPELL_FAILED_CANT_BE_MILLED", "SPELL_FAILED_CANT_BE_MILLED", "" };
|
||||
case SPELL_FAILED_CANT_BE_PROSPECTED: return { "SPELL_FAILED_CANT_BE_PROSPECTED", "SPELL_FAILED_CANT_BE_PROSPECTED", "" };
|
||||
@@ -2492,19 +2501,22 @@ TC_API_EXPORT EnumText EnumUtils<SpellCastResult>::ToString(SpellCastResult valu
|
||||
case SPELL_FAILED_INELIGIBLE_WEAPON_APPEARANCE: return { "SPELL_FAILED_INELIGIBLE_WEAPON_APPEARANCE", "SPELL_FAILED_INELIGIBLE_WEAPON_APPEARANCE", "" };
|
||||
case SPELL_FAILED_PLAYER_CONDITION: return { "SPELL_FAILED_PLAYER_CONDITION", "SPELL_FAILED_PLAYER_CONDITION", "" };
|
||||
case SPELL_FAILED_NOT_WHILE_CHROMIE_TIMED: return { "SPELL_FAILED_NOT_WHILE_CHROMIE_TIMED", "SPELL_FAILED_NOT_WHILE_CHROMIE_TIMED", "" };
|
||||
case SPELL_FAILED_OPTIONAL_REAGENTS: return { "SPELL_FAILED_OPTIONAL_REAGENTS", "SPELL_FAILED_OPTIONAL_REAGENTS", "" };
|
||||
case SPELL_FAILED_CRAFTING_REAGENTS: return { "SPELL_FAILED_CRAFTING_REAGENTS", "SPELL_FAILED_CRAFTING_REAGENTS", "" };
|
||||
case SPELL_FAILED_SPECTATOR_OR_COMMENTATOR: return { "SPELL_FAILED_SPECTATOR_OR_COMMENTATOR", "SPELL_FAILED_SPECTATOR_OR_COMMENTATOR", "" };
|
||||
case SPELL_FAILED_SOULBIND_CONDUIT_LEARN_FAILED_INVALID_COVENANT: return { "SPELL_FAILED_SOULBIND_CONDUIT_LEARN_FAILED_INVALID_COVENANT", "SPELL_FAILED_SOULBIND_CONDUIT_LEARN_FAILED_INVALID_COVENANT", "" };
|
||||
case SPELL_FAILED_SHADOWLANDS_RIDING_REQUIREMENT: return { "SPELL_FAILED_SHADOWLANDS_RIDING_REQUIREMENT", "SPELL_FAILED_SHADOWLANDS_RIDING_REQUIREMENT", "" };
|
||||
case SPELL_FAILED_NOT_IN_MAGE_TOWER: return { "SPELL_FAILED_NOT_IN_MAGE_TOWER", "SPELL_FAILED_NOT_IN_MAGE_TOWER", "" };
|
||||
case SPELL_FAILED_GARRISON_FOLLOWER_AT_MIN_LEVEL: return { "SPELL_FAILED_GARRISON_FOLLOWER_AT_MIN_LEVEL", "SPELL_FAILED_GARRISON_FOLLOWER_AT_MIN_LEVEL", "" };
|
||||
case SPELL_FAILED_CANT_BE_RECRAFTED: return { "SPELL_FAILED_CANT_BE_RECRAFTED", "SPELL_FAILED_CANT_BE_RECRAFTED", "" };
|
||||
case SPELL_FAILED_PASSIVE_REPLACED: return { "SPELL_FAILED_PASSIVE_REPLACED", "SPELL_FAILED_PASSIVE_REPLACED", "" };
|
||||
case SPELL_FAILED_CANT_FLY_HERE: return { "SPELL_FAILED_CANT_FLY_HERE", "SPELL_FAILED_CANT_FLY_HERE", "" };
|
||||
case SPELL_FAILED_UNKNOWN: return { "SPELL_FAILED_UNKNOWN", "SPELL_FAILED_UNKNOWN", "" };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<SpellCastResult>::Count() { return 317; }
|
||||
TC_API_EXPORT size_t EnumUtils<SpellCastResult>::Count() { return 320; }
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT SpellCastResult EnumUtils<SpellCastResult>::FromIndex(size_t index)
|
||||
@@ -2527,8 +2539,8 @@ TC_API_EXPORT SpellCastResult EnumUtils<SpellCastResult>::FromIndex(size_t index
|
||||
case 13: return SPELL_FAILED_BAD_TARGETS;
|
||||
case 14: return SPELL_FAILED_PVP_TARGET_WHILE_UNFLAGGED;
|
||||
case 15: return SPELL_FAILED_CANT_BE_CHARMED;
|
||||
case 16: return SPELL_FAILED_CANT_BE_DISENCHANTED;
|
||||
case 17: return SPELL_FAILED_CANT_BE_DISENCHANTED_SKILL;
|
||||
case 16: return SPELL_FAILED_CANT_BE_SALVAGED;
|
||||
case 17: return SPELL_FAILED_CANT_BE_SALVAGED_SKILL;
|
||||
case 18: return SPELL_FAILED_CANT_BE_ENCHANTED;
|
||||
case 19: return SPELL_FAILED_CANT_BE_MILLED;
|
||||
case 20: return SPELL_FAILED_CANT_BE_PROSPECTED;
|
||||
@@ -2821,13 +2833,16 @@ TC_API_EXPORT SpellCastResult EnumUtils<SpellCastResult>::FromIndex(size_t index
|
||||
case 307: return SPELL_FAILED_INELIGIBLE_WEAPON_APPEARANCE;
|
||||
case 308: return SPELL_FAILED_PLAYER_CONDITION;
|
||||
case 309: return SPELL_FAILED_NOT_WHILE_CHROMIE_TIMED;
|
||||
case 310: return SPELL_FAILED_OPTIONAL_REAGENTS;
|
||||
case 310: return SPELL_FAILED_CRAFTING_REAGENTS;
|
||||
case 311: return SPELL_FAILED_SPECTATOR_OR_COMMENTATOR;
|
||||
case 312: return SPELL_FAILED_SOULBIND_CONDUIT_LEARN_FAILED_INVALID_COVENANT;
|
||||
case 313: return SPELL_FAILED_SHADOWLANDS_RIDING_REQUIREMENT;
|
||||
case 314: return SPELL_FAILED_NOT_IN_MAGE_TOWER;
|
||||
case 315: return SPELL_FAILED_GARRISON_FOLLOWER_AT_MIN_LEVEL;
|
||||
case 316: return SPELL_FAILED_UNKNOWN;
|
||||
case 316: return SPELL_FAILED_CANT_BE_RECRAFTED;
|
||||
case 317: return SPELL_FAILED_PASSIVE_REPLACED;
|
||||
case 318: return SPELL_FAILED_CANT_FLY_HERE;
|
||||
case 319: return SPELL_FAILED_UNKNOWN;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
@@ -2853,8 +2868,8 @@ TC_API_EXPORT size_t EnumUtils<SpellCastResult>::ToIndex(SpellCastResult value)
|
||||
case SPELL_FAILED_BAD_TARGETS: return 13;
|
||||
case SPELL_FAILED_PVP_TARGET_WHILE_UNFLAGGED: return 14;
|
||||
case SPELL_FAILED_CANT_BE_CHARMED: return 15;
|
||||
case SPELL_FAILED_CANT_BE_DISENCHANTED: return 16;
|
||||
case SPELL_FAILED_CANT_BE_DISENCHANTED_SKILL: return 17;
|
||||
case SPELL_FAILED_CANT_BE_SALVAGED: return 16;
|
||||
case SPELL_FAILED_CANT_BE_SALVAGED_SKILL: return 17;
|
||||
case SPELL_FAILED_CANT_BE_ENCHANTED: return 18;
|
||||
case SPELL_FAILED_CANT_BE_MILLED: return 19;
|
||||
case SPELL_FAILED_CANT_BE_PROSPECTED: return 20;
|
||||
@@ -3147,13 +3162,16 @@ TC_API_EXPORT size_t EnumUtils<SpellCastResult>::ToIndex(SpellCastResult value)
|
||||
case SPELL_FAILED_INELIGIBLE_WEAPON_APPEARANCE: return 307;
|
||||
case SPELL_FAILED_PLAYER_CONDITION: return 308;
|
||||
case SPELL_FAILED_NOT_WHILE_CHROMIE_TIMED: return 309;
|
||||
case SPELL_FAILED_OPTIONAL_REAGENTS: return 310;
|
||||
case SPELL_FAILED_CRAFTING_REAGENTS: return 310;
|
||||
case SPELL_FAILED_SPECTATOR_OR_COMMENTATOR: return 311;
|
||||
case SPELL_FAILED_SOULBIND_CONDUIT_LEARN_FAILED_INVALID_COVENANT: return 312;
|
||||
case SPELL_FAILED_SHADOWLANDS_RIDING_REQUIREMENT: return 313;
|
||||
case SPELL_FAILED_NOT_IN_MAGE_TOWER: return 314;
|
||||
case SPELL_FAILED_GARRISON_FOLLOWER_AT_MIN_LEVEL: return 315;
|
||||
case SPELL_FAILED_UNKNOWN: return 316;
|
||||
case SPELL_FAILED_CANT_BE_RECRAFTED: return 316;
|
||||
case SPELL_FAILED_PASSIVE_REPLACED: return 317;
|
||||
case SPELL_FAILED_CANT_FLY_HERE: return 318;
|
||||
case SPELL_FAILED_UNKNOWN: return 319;
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
@@ -3912,12 +3930,18 @@ TC_API_EXPORT EnumText EnumUtils<Emote>::ToString(Emote value)
|
||||
case EMOTE_ONESHOT_FLYCUSTOMSPELL01: return { "EMOTE_ONESHOT_FLYCUSTOMSPELL01", "EMOTE_ONESHOT_FLYCUSTOMSPELL01", "" };
|
||||
case EMOTE_ONESHOT_SPELLEFFECT_DECAY: return { "EMOTE_ONESHOT_SPELLEFFECT_DECAY", "EMOTE_ONESHOT_SPELLEFFECT_DECAY", "" };
|
||||
case EMOTE_STATE_CREATURE_SPECIAL: return { "EMOTE_STATE_CREATURE_SPECIAL", "EMOTE_STATE_CREATURE_SPECIAL", "" };
|
||||
case EMOTE_ONESHOT_WAREACT01: return { "EMOTE_ONESHOT_WAREACT01", "EMOTE_ONESHOT_WAREACT01", "" };
|
||||
case EMOTE_ONESHOT_FLYCUSTOMSPELL04: return { "EMOTE_ONESHOT_FLYCUSTOMSPELL04", "EMOTE_ONESHOT_FLYCUSTOMSPELL04", "" };
|
||||
case EMOTE_ONESHOT_TALK_SUBDUED: return { "EMOTE_ONESHOT_TALK_SUBDUED", "EMOTE_ONESHOT_TALK_SUBDUED", "" };
|
||||
case EMOTE_STATE_EMOTETALK: return { "EMOTE_STATE_EMOTETALK", "EMOTE_STATE_EMOTETALK", "" };
|
||||
case EMOTE_STATE_WAINTERACTION: return { "EMOTE_STATE_WAINTERACTION", "EMOTE_STATE_WAINTERACTION", "" };
|
||||
case EMOTE_ONESHOT_TAKE_OFF_START: return { "EMOTE_ONESHOT_TAKE_OFF_START", "EMOTE_ONESHOT_TAKE_OFF_START", "" };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<Emote>::Count() { return 404; }
|
||||
TC_API_EXPORT size_t EnumUtils<Emote>::Count() { return 410; }
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT Emote EnumUtils<Emote>::FromIndex(size_t index)
|
||||
@@ -4328,6 +4352,12 @@ TC_API_EXPORT Emote EnumUtils<Emote>::FromIndex(size_t index)
|
||||
case 401: return EMOTE_ONESHOT_FLYCUSTOMSPELL01;
|
||||
case 402: return EMOTE_ONESHOT_SPELLEFFECT_DECAY;
|
||||
case 403: return EMOTE_STATE_CREATURE_SPECIAL;
|
||||
case 404: return EMOTE_ONESHOT_WAREACT01;
|
||||
case 405: return EMOTE_ONESHOT_FLYCUSTOMSPELL04;
|
||||
case 406: return EMOTE_ONESHOT_TALK_SUBDUED;
|
||||
case 407: return EMOTE_STATE_EMOTETALK;
|
||||
case 408: return EMOTE_STATE_WAINTERACTION;
|
||||
case 409: return EMOTE_ONESHOT_TAKE_OFF_START;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
@@ -4741,6 +4771,12 @@ TC_API_EXPORT size_t EnumUtils<Emote>::ToIndex(Emote value)
|
||||
case EMOTE_ONESHOT_FLYCUSTOMSPELL01: return 401;
|
||||
case EMOTE_ONESHOT_SPELLEFFECT_DECAY: return 402;
|
||||
case EMOTE_STATE_CREATURE_SPECIAL: return 403;
|
||||
case EMOTE_ONESHOT_WAREACT01: return 404;
|
||||
case EMOTE_ONESHOT_FLYCUSTOMSPELL04: return 405;
|
||||
case EMOTE_ONESHOT_TALK_SUBDUED: return 406;
|
||||
case EMOTE_STATE_EMOTETALK: return 407;
|
||||
case EMOTE_STATE_WAINTERACTION: return 408;
|
||||
case EMOTE_ONESHOT_TAKE_OFF_START: return 409;
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
@@ -5068,12 +5104,13 @@ TC_API_EXPORT EnumText EnumUtils<SpellFamilyNames>::ToString(SpellFamilyNames va
|
||||
case SPELLFAMILY_UNK91: return { "SPELLFAMILY_UNK91", "SPELLFAMILY_UNK91", "" };
|
||||
case SPELLFAMILY_UNK100: return { "SPELLFAMILY_UNK100", "SPELLFAMILY_UNK100", "" };
|
||||
case SPELLFAMILY_DEMON_HUNTER: return { "SPELLFAMILY_DEMON_HUNTER", "SPELLFAMILY_DEMON_HUNTER", "" };
|
||||
case SPELLFAMILY_EVOKER: return { "SPELLFAMILY_EVOKER", "SPELLFAMILY_EVOKER", "" };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<SpellFamilyNames>::Count() { return 24; }
|
||||
TC_API_EXPORT size_t EnumUtils<SpellFamilyNames>::Count() { return 25; }
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT SpellFamilyNames EnumUtils<SpellFamilyNames>::FromIndex(size_t index)
|
||||
@@ -5104,6 +5141,7 @@ TC_API_EXPORT SpellFamilyNames EnumUtils<SpellFamilyNames>::FromIndex(size_t ind
|
||||
case 21: return SPELLFAMILY_UNK91;
|
||||
case 22: return SPELLFAMILY_UNK100;
|
||||
case 23: return SPELLFAMILY_DEMON_HUNTER;
|
||||
case 24: return SPELLFAMILY_EVOKER;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
@@ -5137,6 +5175,7 @@ TC_API_EXPORT size_t EnumUtils<SpellFamilyNames>::ToIndex(SpellFamilyNames value
|
||||
case SPELLFAMILY_UNK91: return 21;
|
||||
case SPELLFAMILY_UNK100: return 22;
|
||||
case SPELLFAMILY_DEMON_HUNTER: return 23;
|
||||
case SPELLFAMILY_EVOKER: return 24;
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,6 +275,86 @@ void Quest::LoadQuestObjectiveVisualEffect(Field* fields)
|
||||
}
|
||||
}
|
||||
|
||||
void Quest::LoadConditionalConditionalQuestDescription(Field* fields)
|
||||
{
|
||||
LocaleConstant locale = GetLocaleByName(fields[4].GetStringView());
|
||||
if (locale >= TOTAL_LOCALES)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `quest_description_conditional` has invalid locale %s set for quest %u. Skipped.", fields[4].GetCString(), fields[0].GetUInt32());
|
||||
return;
|
||||
}
|
||||
|
||||
auto itr = std::find_if(_conditionalQuestDescription.begin(), _conditionalQuestDescription.end(), [fields](QuestConditionalText const& text)
|
||||
{
|
||||
return text.PlayerConditionId == fields[1].GetInt32() && text.QuestgiverCreatureId == fields[2].GetInt32();
|
||||
});
|
||||
|
||||
QuestConditionalText& text = itr != _conditionalQuestDescription.end() ? *itr : _conditionalQuestDescription.emplace_back();
|
||||
text.PlayerConditionId = fields[1].GetInt32();
|
||||
text.QuestgiverCreatureId = fields[2].GetInt32();
|
||||
ObjectMgr::AddLocaleString(fields[3].GetString(), locale, text.Text);
|
||||
}
|
||||
|
||||
void Quest::LoadConditionalConditionalRequestItemsText(Field* fields)
|
||||
{
|
||||
LocaleConstant locale = GetLocaleByName(fields[4].GetStringView());
|
||||
if (locale >= TOTAL_LOCALES)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `quest_request_items_conditional` has invalid locale %s set for quest %u. Skipped.", fields[4].GetCString(), fields[0].GetUInt32());
|
||||
return;
|
||||
}
|
||||
|
||||
auto itr = std::find_if(_conditionalRequestItemsText.begin(), _conditionalRequestItemsText.end(), [fields](QuestConditionalText const& text)
|
||||
{
|
||||
return text.PlayerConditionId == fields[1].GetInt32() && text.QuestgiverCreatureId == fields[2].GetInt32();
|
||||
});
|
||||
|
||||
QuestConditionalText& text = itr != _conditionalRequestItemsText.end() ? *itr : _conditionalRequestItemsText.emplace_back();
|
||||
text.PlayerConditionId = fields[1].GetInt32();
|
||||
text.QuestgiverCreatureId = fields[2].GetInt32();
|
||||
ObjectMgr::AddLocaleString(fields[3].GetString(), locale, text.Text);
|
||||
}
|
||||
|
||||
void Quest::LoadConditionalConditionalOfferRewardText(Field* fields)
|
||||
{
|
||||
LocaleConstant locale = GetLocaleByName(fields[4].GetStringView());
|
||||
if (locale >= TOTAL_LOCALES)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `quest_offer_reward_conditional` has invalid locale %s set for quest %u. Skipped.", fields[4].GetCString(), fields[0].GetUInt32());
|
||||
return;
|
||||
}
|
||||
|
||||
auto itr = std::find_if(_conditionalOfferRewardText.begin(), _conditionalOfferRewardText.end(), [fields](QuestConditionalText const& text)
|
||||
{
|
||||
return text.PlayerConditionId == fields[1].GetInt32() && text.QuestgiverCreatureId == fields[2].GetInt32();
|
||||
});
|
||||
|
||||
QuestConditionalText& text = itr != _conditionalOfferRewardText.end() ? *itr : _conditionalOfferRewardText.emplace_back();
|
||||
text.PlayerConditionId = fields[1].GetInt32();
|
||||
text.QuestgiverCreatureId = fields[2].GetInt32();
|
||||
ObjectMgr::AddLocaleString(fields[3].GetString(), locale, text.Text);
|
||||
}
|
||||
|
||||
void Quest::LoadConditionalConditionalQuestCompletionLog(Field* fields)
|
||||
{
|
||||
LocaleConstant locale = GetLocaleByName(fields[4].GetStringView());
|
||||
if (locale >= TOTAL_LOCALES)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `quest_completion_log_conditional` has invalid locale %s set for quest %u. Skipped.", fields[4].GetCString(), fields[0].GetUInt32());
|
||||
return;
|
||||
}
|
||||
|
||||
auto itr = std::find_if(_conditionalQuestCompletionLog.begin(), _conditionalQuestCompletionLog.end(), [fields](QuestConditionalText const& text)
|
||||
{
|
||||
return text.PlayerConditionId == fields[1].GetInt32() && text.QuestgiverCreatureId == fields[2].GetInt32();
|
||||
});
|
||||
|
||||
QuestConditionalText& text = itr != _conditionalQuestCompletionLog.end() ? *itr : _conditionalQuestCompletionLog.emplace_back();
|
||||
text.PlayerConditionId = fields[1].GetInt32();
|
||||
text.QuestgiverCreatureId = fields[2].GetInt32();
|
||||
ObjectMgr::AddLocaleString(fields[3].GetString(), locale, text.Text);
|
||||
}
|
||||
|
||||
uint32 Quest::XPValue(Player const* player) const
|
||||
{
|
||||
if (player)
|
||||
@@ -496,6 +576,19 @@ WorldPacket Quest::BuildQueryData(LocaleConstant loc, Player* player) const
|
||||
response.Info.PortraitGiverName = GetPortraitGiverName();
|
||||
response.Info.PortraitTurnInText = GetPortraitTurnInText();
|
||||
response.Info.PortraitTurnInName = GetPortraitTurnInName();
|
||||
std::transform(GetConditionalQuestDescription().begin(), GetConditionalQuestDescription().end(), std::back_inserter(response.Info.ConditionalQuestDescription), [loc](QuestConditionalText const& text)
|
||||
{
|
||||
std::string_view content = text.Text[LOCALE_enUS];
|
||||
ObjectMgr::GetLocaleString(text.Text, loc, content);
|
||||
return WorldPackets::Quest::ConditionalQuestText { text.PlayerConditionId, text.QuestgiverCreatureId, content };
|
||||
});
|
||||
|
||||
std::transform(GetConditionalQuestCompletionLog().begin(), GetConditionalQuestCompletionLog().end(), std::back_inserter(response.Info.ConditionalQuestCompletionLog), [loc](QuestConditionalText const& text)
|
||||
{
|
||||
std::string_view content = text.Text[LOCALE_enUS];
|
||||
ObjectMgr::GetLocaleString(text.Text, loc, content);
|
||||
return WorldPackets::Quest::ConditionalQuestText { text.PlayerConditionId, text.QuestgiverCreatureId, content };
|
||||
});
|
||||
|
||||
if (loc != LOCALE_enUS)
|
||||
{
|
||||
@@ -594,6 +687,7 @@ WorldPacket Quest::BuildQueryData(LocaleConstant loc, Player* player) const
|
||||
response.Info.Expansion = GetExpansion();
|
||||
response.Info.ManagedWorldStateID = GetManagedWorldStateId();
|
||||
response.Info.QuestSessionBonus = 0; //GetQuestSessionBonus(); // this is only sent while quest session is active
|
||||
response.Info.QuestGiverCreatureID = 0; // only sent during npc interaction
|
||||
|
||||
for (QuestObjective const& questObjective : GetObjectives())
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace WorldPackets
|
||||
}
|
||||
}
|
||||
|
||||
#define MAX_QUEST_LOG_SIZE 25
|
||||
#define MAX_QUEST_LOG_SIZE 35
|
||||
|
||||
#define QUEST_ITEM_DROP_COUNT 4
|
||||
#define QUEST_REWARD_CHOICES_COUNT 6
|
||||
@@ -472,6 +472,13 @@ struct QuestRewardDisplaySpell
|
||||
uint32 PlayerConditionId;
|
||||
};
|
||||
|
||||
struct QuestConditionalText
|
||||
{
|
||||
int32 PlayerConditionId = 0;
|
||||
int32 QuestgiverCreatureId = 0;
|
||||
std::vector<std::string> Text;
|
||||
};
|
||||
|
||||
// This Quest class provides a convenient way to access a few pretotaled (cached) quest details,
|
||||
// all base quest information, and any utility functions such as generating the amount of
|
||||
// xp to give
|
||||
@@ -492,6 +499,10 @@ class TC_GAME_API Quest
|
||||
void LoadQuestMailSender(Field* fields);
|
||||
void LoadQuestObjective(Field* fields);
|
||||
void LoadQuestObjectiveVisualEffect(Field* fields);
|
||||
void LoadConditionalConditionalQuestDescription(Field* fields);
|
||||
void LoadConditionalConditionalRequestItemsText(Field* fields);
|
||||
void LoadConditionalConditionalOfferRewardText(Field* fields);
|
||||
void LoadConditionalConditionalQuestCompletionLog(Field* fields);
|
||||
|
||||
uint32 XPValue(Player const* player) const;
|
||||
uint32 MoneyValue(Player const* player) const;
|
||||
@@ -549,10 +560,14 @@ class TC_GAME_API Quest
|
||||
std::string const& GetLogTitle() const { return _logTitle; }
|
||||
std::string const& GetLogDescription() const { return _logDescription; }
|
||||
std::string const& GetQuestDescription() const { return _questDescription; }
|
||||
std::vector<QuestConditionalText> const& GetConditionalQuestDescription() const { return _conditionalQuestDescription; }
|
||||
std::string const& GetAreaDescription() const { return _areaDescription; }
|
||||
std::string const& GetOfferRewardText() const { return _offerRewardText; }
|
||||
std::vector<QuestConditionalText> const& GetConditionalOfferRewardText() const { return _conditionalOfferRewardText; }
|
||||
std::string const& GetRequestItemsText() const { return _requestItemsText; }
|
||||
std::vector<QuestConditionalText> const& GetConditionalRequestItemsText() const { return _conditionalRequestItemsText; }
|
||||
std::string const& GetQuestCompletionLog() const { return _questCompletionLog; }
|
||||
std::vector<QuestConditionalText> const& GetConditionalQuestCompletionLog() const { return _conditionalQuestCompletionLog; }
|
||||
std::string const& GetPortraitGiverText() const { return _portraitGiverText; }
|
||||
std::string const& GetPortraitGiverName() const { return _portraitGiverName; }
|
||||
std::string const& GetPortraitTurnInText() const { return _portraitTurnInText; }
|
||||
@@ -714,6 +729,12 @@ class TC_GAME_API Quest
|
||||
std::string _portraitTurnInName;
|
||||
std::string _questCompletionLog;
|
||||
|
||||
// quest_description_conditional
|
||||
std::vector<QuestConditionalText> _conditionalQuestDescription;
|
||||
|
||||
// quest_completion_log_conditional
|
||||
std::vector<QuestConditionalText> _conditionalQuestCompletionLog;
|
||||
|
||||
// quest_request_items table
|
||||
uint32 _emoteOnComplete = 0;
|
||||
uint32 _emoteOnIncomplete = 0;
|
||||
@@ -721,9 +742,15 @@ class TC_GAME_API Quest
|
||||
uint32 _emoteOnIncompleteDelay = 0;
|
||||
std::string _requestItemsText;
|
||||
|
||||
// quest_request_items_conditional
|
||||
std::vector<QuestConditionalText> _conditionalRequestItemsText;
|
||||
|
||||
// quest_offer_reward table
|
||||
std::string _offerRewardText;
|
||||
|
||||
// quest_offer_reward_conditional
|
||||
std::vector<QuestConditionalText> _conditionalOfferRewardText;
|
||||
|
||||
// quest_template_addon table (custom data)
|
||||
uint32 _maxLevel = 0;
|
||||
uint32 _allowableClasses = 0;
|
||||
|
||||
@@ -277,7 +277,6 @@ void ReputationMgr::SendForceReactions()
|
||||
void ReputationMgr::SendState(FactionState const* faction)
|
||||
{
|
||||
WorldPackets::Reputation::SetFactionStanding setFactionStanding;
|
||||
setFactionStanding.ReferAFriendBonus = 0.0f;
|
||||
setFactionStanding.BonusFromAchievementSystem = 0.0f;
|
||||
|
||||
if (faction)
|
||||
|
||||
@@ -80,8 +80,8 @@ ByteBuffer& operator<<(ByteBuffer& data, AuctionBucketKey const& itemKey)
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, AuctionListFilterSubClass& filterSubClass)
|
||||
{
|
||||
data >> filterSubClass.ItemSubclass;
|
||||
data >> filterSubClass.InvTypeMask;
|
||||
data >> filterSubClass.ItemSubclass;
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -595,7 +595,7 @@ WorldPacket const* AuctionHelloResponse::Write()
|
||||
|
||||
WorldPacket const* AuctionListBiddedItemsResult::Write()
|
||||
{
|
||||
_worldPacket << int32(Items.size());
|
||||
_worldPacket << uint32(Items.size());
|
||||
_worldPacket << uint32(DesiredDelay);
|
||||
_worldPacket.WriteBit(HasMoreResults);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace WorldPackets
|
||||
struct AuctionListFilterSubClass
|
||||
{
|
||||
int32 ItemSubclass = 0;
|
||||
uint32 InvTypeMask = 0;
|
||||
uint64 InvTypeMask = 0;
|
||||
};
|
||||
|
||||
struct AuctionListFilterClass
|
||||
|
||||
@@ -138,6 +138,7 @@ WorldPacket const* WorldPackets::Auth::AuthResponse::Write()
|
||||
_worldPacket << uint8(classAvailability.ClassID);
|
||||
_worldPacket << uint8(classAvailability.ActiveExpansionLevel);
|
||||
_worldPacket << uint8(classAvailability.AccountExpansionLevel);
|
||||
_worldPacket << uint8(classAvailability.MinActiveExpansionLevel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +167,7 @@ WorldPacket const* WorldPackets::Auth::AuthResponse::Write()
|
||||
_worldPacket << uint16(*SuccessInfo->NumPlayersAlliance);
|
||||
|
||||
if (SuccessInfo->ExpansionTrialExpiration)
|
||||
_worldPacket << int32(*SuccessInfo->ExpansionTrialExpiration);
|
||||
_worldPacket << *SuccessInfo->ExpansionTrialExpiration;
|
||||
|
||||
for (VirtualRealmInfo const& virtualRealm : SuccessInfo->VirtualRealms)
|
||||
_worldPacket << virtualRealm;
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace WorldPackets
|
||||
bool ForceCharacterTemplate = false; ///< forces the client to always use a character template when creating a new character. @see Templates. @todo implement
|
||||
Optional<uint16> NumPlayersHorde; ///< number of horde players in this realm. @todo implement
|
||||
Optional<uint16> NumPlayersAlliance; ///< number of alliance players in this realm. @todo implement
|
||||
Optional<int32> ExpansionTrialExpiration; ///< expansion trial expiration unix timestamp
|
||||
Optional<Timestamp<>> ExpansionTrialExpiration; ///< expansion trial expiration unix timestamp
|
||||
};
|
||||
|
||||
AuthResponse() : ServerPacket(SMSG_AUTH_RESPONSE, 132) { }
|
||||
|
||||
@@ -26,13 +26,6 @@ WorldPacket const* WorldPackets::Azerite::PlayerAzeriteItemGains::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Azerite::OpenHeartForge::Write()
|
||||
{
|
||||
_worldPacket << ForgeGUID;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Azerite::AzeriteEssenceUnlockMilestone::Read()
|
||||
{
|
||||
_worldPacket >> AzeriteItemMilestonePowerID;
|
||||
@@ -76,10 +69,3 @@ WorldPacket const* WorldPackets::Azerite::PlayerAzeriteItemEquippedStatusChanged
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Azerite::AzeriteRespecNPC::Write()
|
||||
{
|
||||
_worldPacket << NpcGUID;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -38,24 +38,6 @@ namespace WorldPackets
|
||||
uint64 XP = 0;
|
||||
};
|
||||
|
||||
class OpenHeartForge final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
OpenHeartForge() : ServerPacket(SMSG_OPEN_HEART_FORGE, 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid ForgeGUID;
|
||||
};
|
||||
|
||||
class CloseHeartForge final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
CloseHeartForge() : ServerPacket(SMSG_CLOSE_HEART_FORGE, 0) { }
|
||||
|
||||
WorldPacket const* Write() override { return &_worldPacket; }
|
||||
};
|
||||
|
||||
class AzeriteEssenceUnlockMilestone final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
@@ -122,16 +104,6 @@ namespace WorldPackets
|
||||
|
||||
bool IsHeartEquipped = false;
|
||||
};
|
||||
|
||||
class AzeriteRespecNPC final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
AzeriteRespecNPC(ObjectGuid npcGuid) : ServerPacket(SMSG_AZERITE_RESPEC_NPC, 16), NpcGUID(npcGuid) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid NpcGUID;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -323,12 +323,15 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Battleground::RatedPvpInf
|
||||
data << int32(bracketInfo.Unused2);
|
||||
data << int32(bracketInfo.WeeklyPlayed);
|
||||
data << int32(bracketInfo.WeeklyWon);
|
||||
data << int32(bracketInfo.RoundsSeasonPlayed);
|
||||
data << int32(bracketInfo.RoundsSeasonWon);
|
||||
data << int32(bracketInfo.RoundsWeeklyPlayed);
|
||||
data << int32(bracketInfo.RoundsWeeklyWon);
|
||||
data << int32(bracketInfo.BestWeeklyRating);
|
||||
data << int32(bracketInfo.LastWeeksBestRating);
|
||||
data << int32(bracketInfo.BestSeasonRating);
|
||||
data << int32(bracketInfo.PvpTierID);
|
||||
data << int32(bracketInfo.Unused3);
|
||||
data << int32(bracketInfo.WeeklyBestWinPvpTierID);
|
||||
data << int32(bracketInfo.Unused4);
|
||||
data << int32(bracketInfo.Rank);
|
||||
data.WriteBit(bracketInfo.Disqualified);
|
||||
|
||||
@@ -450,12 +450,15 @@ namespace WorldPackets
|
||||
int32 Unused2 = 0;
|
||||
int32 WeeklyPlayed = 0;
|
||||
int32 WeeklyWon = 0;
|
||||
int32 RoundsSeasonPlayed = 0;
|
||||
int32 RoundsSeasonWon = 0;
|
||||
int32 RoundsWeeklyPlayed = 0;
|
||||
int32 RoundsWeeklyWon = 0;
|
||||
int32 BestWeeklyRating = 0;
|
||||
int32 LastWeeksBestRating = 0;
|
||||
int32 BestSeasonRating = 0;
|
||||
int32 PvpTierID = 0;
|
||||
int32 Unused3 = 0;
|
||||
int32 WeeklyBestWinPvpTierID = 0;
|
||||
int32 Unused4 = 0;
|
||||
int32 Rank = 0;
|
||||
bool Disqualified = false;
|
||||
|
||||
@@ -22,15 +22,6 @@ void WorldPackets::BlackMarket::BlackMarketOpen::Read()
|
||||
_worldPacket >> Guid;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::BlackMarket::BlackMarketOpenResult::Write()
|
||||
{
|
||||
_worldPacket << Guid;
|
||||
_worldPacket.WriteBit(Enable);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::BlackMarket::BlackMarketRequestItems::Read()
|
||||
{
|
||||
_worldPacket >> Guid;
|
||||
|
||||
@@ -50,17 +50,6 @@ namespace WorldPackets
|
||||
ObjectGuid Guid;
|
||||
};
|
||||
|
||||
class BlackMarketOpenResult final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
BlackMarketOpenResult() : ServerPacket(SMSG_BLACK_MARKET_OPEN_RESULT, 15) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid Guid;
|
||||
bool Enable = true;
|
||||
};
|
||||
|
||||
class BlackMarketRequestItems final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -141,7 +141,7 @@ EnumCharactersResult::CharacterInfo::CharacterInfo(Field* fields)
|
||||
|
||||
LastLoginVersion = fields[22].GetUInt32();
|
||||
|
||||
for (uint8 slot = 0; slot < INVENTORY_SLOT_BAG_END; ++slot)
|
||||
for (uint8 slot = 0; slot < REAGENT_BAG_SLOT_END; ++slot)
|
||||
{
|
||||
uint32 visualBase = slot * 5;
|
||||
VisualItems[slot].InvType = Trinity::StringTo<uint8>(equipment[visualBase + 0]).value_or(0);
|
||||
@@ -193,9 +193,9 @@ ByteBuffer& operator<<(ByteBuffer& data, EnumCharactersResult::CharacterInfo con
|
||||
data << visualItem;
|
||||
|
||||
data << charInfo.LastPlayedTime;
|
||||
data << uint16(charInfo.SpecID);
|
||||
data << uint32(charInfo.Unknown703);
|
||||
data << uint32(charInfo.LastLoginVersion);
|
||||
data << int16(charInfo.SpecID);
|
||||
data << int32(charInfo.Unknown703);
|
||||
data << int32(charInfo.LastLoginVersion);
|
||||
data << uint32(charInfo.Flags4);
|
||||
data << uint32(charInfo.MailSenders.size());
|
||||
data << uint32(charInfo.MailSenderTypes.size());
|
||||
@@ -245,6 +245,14 @@ ByteBuffer& operator<<(ByteBuffer& data, EnumCharactersResult::UnlockedCondition
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, EnumCharactersResult::RaceLimitDisableInfo const& raceLimitDisableInfo)
|
||||
{
|
||||
data << int32(raceLimitDisableInfo.RaceID);
|
||||
data << int32(raceLimitDisableInfo.BlockReason);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPacket const* EnumCharactersResult::Write()
|
||||
{
|
||||
_worldPacket.reserve(9 + Characters.size() * sizeof(CharacterInfo) + RaceUnlockData.size() * sizeof(RaceUnlock));
|
||||
@@ -254,12 +262,14 @@ WorldPacket const* EnumCharactersResult::Write()
|
||||
_worldPacket.WriteBit(IsNewPlayerRestrictionSkipped);
|
||||
_worldPacket.WriteBit(IsNewPlayerRestricted);
|
||||
_worldPacket.WriteBit(IsNewPlayer);
|
||||
_worldPacket.WriteBit(IsTrialAccountRestricted);
|
||||
_worldPacket.WriteBit(DisabledClassesMask.has_value());
|
||||
_worldPacket.WriteBit(IsAlliedRacesCreationAllowed);
|
||||
_worldPacket << uint32(Characters.size());
|
||||
_worldPacket << int32(MaxCharacterLevel);
|
||||
_worldPacket << uint32(RaceUnlockData.size());
|
||||
_worldPacket << uint32(UnlockedConditionalAppearances.size());
|
||||
_worldPacket << uint32(RaceLimitDisables.size());
|
||||
|
||||
if (DisabledClassesMask)
|
||||
_worldPacket << uint32(*DisabledClassesMask);
|
||||
@@ -267,6 +277,9 @@ WorldPacket const* EnumCharactersResult::Write()
|
||||
for (UnlockedConditionalAppearance const& unlockedConditionalAppearance : UnlockedConditionalAppearances)
|
||||
_worldPacket << unlockedConditionalAppearance;
|
||||
|
||||
for (RaceLimitDisableInfo const& raceLimitDisableInfo : RaceLimitDisables)
|
||||
_worldPacket << raceLimitDisableInfo;
|
||||
|
||||
for (CharacterInfo const& charInfo : Characters)
|
||||
_worldPacket << charInfo;
|
||||
|
||||
@@ -377,6 +390,7 @@ void CharRaceOrFactionChange::Read()
|
||||
_worldPacket >> RaceOrFactionChangeInfo->Guid;
|
||||
_worldPacket >> RaceOrFactionChangeInfo->SexID;
|
||||
_worldPacket >> RaceOrFactionChangeInfo->RaceID;
|
||||
_worldPacket >> RaceOrFactionChangeInfo->InitialRaceID;
|
||||
RaceOrFactionChangeInfo->Customizations.resize(_worldPacket.read<uint32>());
|
||||
RaceOrFactionChangeInfo->Name = _worldPacket.ReadString(nameLength);
|
||||
for (ChrCustomizationChoice& customization : RaceOrFactionChangeInfo->Customizations)
|
||||
@@ -537,6 +551,7 @@ void AlterApperance::Read()
|
||||
{
|
||||
Customizations.resize(_worldPacket.read<uint32>());
|
||||
_worldPacket >> NewSex;
|
||||
_worldPacket >> CustomizedRace;
|
||||
for (ChrCustomizationChoice& customization : Customizations)
|
||||
_worldPacket >> customization;
|
||||
|
||||
@@ -556,7 +571,6 @@ WorldPacket const* LogXPGain::Write()
|
||||
_worldPacket << uint8(Reason);
|
||||
_worldPacket << int32(Amount);
|
||||
_worldPacket << float(GroupBonus);
|
||||
_worldPacket << uint8(ReferAFriendBonusType);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace WorldPackets
|
||||
struct CharRaceOrFactionChangeInfo
|
||||
{
|
||||
uint8 RaceID = RACE_NONE;
|
||||
uint8 InitialRaceID = RACE_NONE;
|
||||
uint8 SexID = GENDER_NONE;
|
||||
ObjectGuid Guid;
|
||||
bool FactionChange = false;
|
||||
@@ -159,7 +160,7 @@ namespace WorldPackets
|
||||
uint8 Subclass = 0;
|
||||
};
|
||||
|
||||
std::array<VisualItemInfo, 23> VisualItems = { };
|
||||
std::array<VisualItemInfo, 35> VisualItems = { };
|
||||
std::vector<std::string> MailSenders;
|
||||
std::vector<uint32> MailSenderTypes;
|
||||
};
|
||||
@@ -178,6 +179,18 @@ namespace WorldPackets
|
||||
int32 Unused = 0;
|
||||
};
|
||||
|
||||
struct RaceLimitDisableInfo
|
||||
{
|
||||
enum
|
||||
{
|
||||
Server,
|
||||
Level
|
||||
};
|
||||
|
||||
int32 RaceID = 0;
|
||||
int32 BlockReason = 0;
|
||||
};
|
||||
|
||||
EnumCharactersResult() : ServerPacket(SMSG_ENUM_CHARACTERS_RESULT) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
@@ -187,6 +200,7 @@ namespace WorldPackets
|
||||
bool IsNewPlayerRestrictionSkipped = false; ///< allows client to skip new player restrictions
|
||||
bool IsNewPlayerRestricted = false; ///< forbids using level boost and class trials
|
||||
bool IsNewPlayer = false; ///< forbids hero classes and allied races
|
||||
bool IsTrialAccountRestricted = false;
|
||||
bool IsAlliedRacesCreationAllowed = false;
|
||||
|
||||
int32 MaxCharacterLevel = 1;
|
||||
@@ -195,6 +209,7 @@ namespace WorldPackets
|
||||
std::vector<CharacterInfo> Characters; ///< all characters on the list
|
||||
std::vector<RaceUnlock> RaceUnlockData; ///<
|
||||
std::vector<UnlockedConditionalAppearance> UnlockedConditionalAppearances;
|
||||
std::vector<RaceLimitDisableInfo> RaceLimitDisables;
|
||||
};
|
||||
|
||||
class CheckCharacterNameAvailability final : public ClientPacket
|
||||
@@ -623,6 +638,7 @@ namespace WorldPackets
|
||||
|
||||
uint8 NewSex = 0;
|
||||
Array<ChrCustomizationChoice, 50> Customizations;
|
||||
int32 CustomizedRace = 0;
|
||||
};
|
||||
|
||||
class BarberShopResult final : public ServerPacket
|
||||
@@ -646,7 +662,7 @@ namespace WorldPackets
|
||||
class LogXPGain final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
LogXPGain() : ServerPacket(SMSG_LOG_XP_GAIN, 30) { }
|
||||
LogXPGain() : ServerPacket(SMSG_LOG_XP_GAIN, 16 + 4 + 1 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
@@ -654,8 +670,7 @@ namespace WorldPackets
|
||||
int32 Original = 0;
|
||||
uint8 Reason = 0;
|
||||
int32 Amount = 0;
|
||||
float GroupBonus = 0;
|
||||
uint8 ReferAFriendBonusType = 0; // 1 - 300% of normal XP; 2 - 150% of normal XP
|
||||
float GroupBonus = 0.0f;
|
||||
};
|
||||
|
||||
class TitleEarned final : public ServerPacket
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
void WorldPackets::Chat::ChatMessage::Read()
|
||||
{
|
||||
_worldPacket >> Language;
|
||||
uint32 len = _worldPacket.ReadBits(9);
|
||||
uint32 len = _worldPacket.ReadBits(11);
|
||||
Text = _worldPacket.ReadString(len);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ void WorldPackets::Chat::ChatMessageWhisper::Read()
|
||||
{
|
||||
_worldPacket >> Language;
|
||||
uint32 targetLen = _worldPacket.ReadBits(9);
|
||||
uint32 textLen = _worldPacket.ReadBits(9);
|
||||
uint32 textLen = _worldPacket.ReadBits(11);
|
||||
Target = _worldPacket.ReadString(targetLen);
|
||||
Text = _worldPacket.ReadString(textLen);
|
||||
}
|
||||
@@ -43,7 +43,7 @@ void WorldPackets::Chat::ChatMessageChannel::Read()
|
||||
_worldPacket >> Language;
|
||||
_worldPacket >> ChannelGUID;
|
||||
uint32 targetLen = _worldPacket.ReadBits(9);
|
||||
uint32 textLen = _worldPacket.ReadBits(9);
|
||||
uint32 textLen = _worldPacket.ReadBits(11);
|
||||
Target = _worldPacket.ReadString(targetLen);
|
||||
Text = _worldPacket.ReadString(textLen);
|
||||
}
|
||||
@@ -77,19 +77,19 @@ void WorldPackets::Chat::ChatAddonMessageTargeted::Read()
|
||||
|
||||
void WorldPackets::Chat::ChatMessageDND::Read()
|
||||
{
|
||||
uint32 len = _worldPacket.ReadBits(9);
|
||||
uint32 len = _worldPacket.ReadBits(11);
|
||||
Text = _worldPacket.ReadString(len);
|
||||
}
|
||||
|
||||
void WorldPackets::Chat::ChatMessageAFK::Read()
|
||||
{
|
||||
uint32 len = _worldPacket.ReadBits(9);
|
||||
uint32 len = _worldPacket.ReadBits(11);
|
||||
Text = _worldPacket.ReadString(len);
|
||||
}
|
||||
|
||||
void WorldPackets::Chat::ChatMessageEmote::Read()
|
||||
{
|
||||
uint32 len = _worldPacket.ReadBits(9);
|
||||
uint32 len = _worldPacket.ReadBits(11);
|
||||
Text = _worldPacket.ReadString(len);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* 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 2 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/>.
|
||||
*/
|
||||
|
||||
#include "CraftingPacketsCommon.h"
|
||||
|
||||
namespace WorldPackets::Crafting
|
||||
{
|
||||
ByteBuffer& operator<<(ByteBuffer& data, SpellReducedReagent const& spellReducedReagent)
|
||||
{
|
||||
data << int32(spellReducedReagent.ItemID);
|
||||
data << int32(spellReducedReagent.Quantity);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, CraftingData const& craftingData)
|
||||
{
|
||||
data << int32(craftingData.CraftingQualityID);
|
||||
data << int32(craftingData.field_4);
|
||||
data << int32(craftingData.field_8);
|
||||
data << int32(craftingData.Multicraft);
|
||||
data << int32(craftingData.field_10);
|
||||
data << int32(craftingData.field_14);
|
||||
data << int32(craftingData.CritBonusSkill);
|
||||
data << float(craftingData.field_1C);
|
||||
data << uint64(craftingData.field_20);
|
||||
data << uint32(craftingData.ResourcesReturned.size());
|
||||
data << uint32(craftingData.OperationID);
|
||||
data << craftingData.ItemGUID;
|
||||
data << int32(craftingData.Quantity);
|
||||
data << int32(craftingData.EnchantID);
|
||||
|
||||
for (SpellReducedReagent const& spellReducedReagent : craftingData.ResourcesReturned)
|
||||
data << spellReducedReagent;
|
||||
|
||||
data.WriteBit(craftingData.IsCrit);
|
||||
data.WriteBit(craftingData.field_29);
|
||||
data.WriteBit(craftingData.field_2A);
|
||||
data.WriteBit(craftingData.BonusCraft);
|
||||
data.FlushBits();
|
||||
|
||||
data << craftingData.OldItem;
|
||||
data << craftingData.NewItem;
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* 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 2 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/>.
|
||||
*/
|
||||
|
||||
#ifndef TRINITYCORE_CRAFTING_PACKETS_COMMON_H
|
||||
#define TRINITYCORE_CRAFTING_PACKETS_COMMON_H
|
||||
|
||||
#include "ItemPacketsCommon.h"
|
||||
#include "ObjectGuid.h"
|
||||
|
||||
namespace WorldPackets::Crafting
|
||||
{
|
||||
struct SpellReducedReagent
|
||||
{
|
||||
int32 ItemID = 0;
|
||||
int32 Quantity = 0;
|
||||
};
|
||||
|
||||
struct CraftingData
|
||||
{
|
||||
int32 CraftingQualityID = 0;
|
||||
int32 field_4 = 0;
|
||||
int32 field_8 = 0;
|
||||
int32 Multicraft = 0;
|
||||
int32 field_10 = 0;
|
||||
int32 field_14 = 0;
|
||||
int32 CritBonusSkill = 0;
|
||||
float field_1C = 0.0f;
|
||||
uint64 field_20 = 0;
|
||||
bool IsCrit = false;
|
||||
bool field_29 = false;
|
||||
bool field_2A = false;
|
||||
bool BonusCraft = false;
|
||||
std::vector<SpellReducedReagent> ResourcesReturned;
|
||||
uint32 OperationID = 0;
|
||||
ObjectGuid ItemGUID;
|
||||
int32 Quantity = 0;
|
||||
Item::ItemInstance OldItem;
|
||||
Item::ItemInstance NewItem;
|
||||
int32 EnchantID = 0;
|
||||
};
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, SpellReducedReagent const& spellReducedReagent);
|
||||
ByteBuffer& operator<<(ByteBuffer& data, CraftingData const& craftingData);
|
||||
}
|
||||
#endif // TRINITYCORE_CRAFTING_PACKETS_COMMON_H
|
||||
@@ -20,11 +20,13 @@
|
||||
void WorldPackets::GameObject::GameObjUse::Read()
|
||||
{
|
||||
_worldPacket >> Guid;
|
||||
IsSoftInteract = _worldPacket.ReadBit();
|
||||
}
|
||||
|
||||
void WorldPackets::GameObject::GameObjReportUse::Read()
|
||||
{
|
||||
_worldPacket >> Guid;
|
||||
IsSoftInteract = _worldPacket.ReadBit();
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::GameObject::GameObjectDespawn::Write()
|
||||
@@ -70,15 +72,6 @@ WorldPacket const* WorldPackets::GameObject::GameObjectCustomAnim::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::GameObject::GameObjectUILink::Write()
|
||||
{
|
||||
_worldPacket << ObjectGUID;
|
||||
_worldPacket << int32(UILink);
|
||||
_worldPacket << int32(UIItemInteractionID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::GameObject::GameObjectPlaySpellVisual::Write()
|
||||
{
|
||||
_worldPacket << ObjectGUID;
|
||||
@@ -95,3 +88,18 @@ WorldPacket const* WorldPackets::GameObject::GameObjectSetStateLocal::Write()
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::GameObject::GameObjectInteraction::Write()
|
||||
{
|
||||
_worldPacket << ObjectGUID;
|
||||
_worldPacket << int32(InteractionType);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::GameObject::GameObjectCloseInteraction::Write()
|
||||
{
|
||||
_worldPacket << int32(InteractionType);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "Packet.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
enum class PlayerInteractionType : int32;
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace GameObject
|
||||
@@ -33,6 +35,7 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
ObjectGuid Guid;
|
||||
bool IsSoftInteract = false;
|
||||
};
|
||||
|
||||
class GameObjReportUse final : public ClientPacket
|
||||
@@ -43,6 +46,7 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
ObjectGuid Guid;
|
||||
bool IsSoftInteract = false;
|
||||
};
|
||||
|
||||
class GameObjectDespawn final : public ServerPacket
|
||||
@@ -119,18 +123,6 @@ namespace WorldPackets
|
||||
bool PlayAsDespawn = false;
|
||||
};
|
||||
|
||||
class GameObjectUILink final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GameObjectUILink() : ServerPacket(SMSG_GAME_OBJECT_UI_LINK, 16 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid ObjectGUID;
|
||||
int32 UILink = 0;
|
||||
int32 UIItemInteractionID = 0;
|
||||
};
|
||||
|
||||
class GameObjectPlaySpellVisual final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
@@ -153,6 +145,27 @@ namespace WorldPackets
|
||||
ObjectGuid ObjectGUID;
|
||||
uint8 State = 0;
|
||||
};
|
||||
|
||||
class GameObjectInteraction final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GameObjectInteraction() : ServerPacket(SMSG_GAME_OBJECT_INTERACTION, 16 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid ObjectGUID;
|
||||
PlayerInteractionType InteractionType = {};
|
||||
};
|
||||
|
||||
class GameObjectCloseInteraction final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GameObjectCloseInteraction() : ServerPacket(SMSG_GAME_OBJECT_CLOSE_INTERACTION, 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
PlayerInteractionType InteractionType = {};
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif // GOPackets_h__
|
||||
|
||||
@@ -481,13 +481,4 @@ WorldPacket const* GarrisonBuildingActivated::Write()
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* GarrisonOpenTalentNpc::Write()
|
||||
{
|
||||
_worldPacket << NpcGUID;
|
||||
_worldPacket << int32(GarrTalentTreeID);
|
||||
_worldPacket << int32(FriendshipFactionID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,18 +437,6 @@ namespace WorldPackets
|
||||
|
||||
uint32 GarrPlotInstanceID = 0;
|
||||
};
|
||||
|
||||
class GarrisonOpenTalentNpc final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
GarrisonOpenTalentNpc() : ServerPacket(SMSG_GARRISON_OPEN_TALENT_NPC, 16 + 4 + 4) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid NpcGUID;
|
||||
int32 GarrTalentTreeID = 0;
|
||||
int32 FriendshipFactionID = 0; // Always 0 except on The Deaths of Chromie Scenario
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,12 +20,14 @@
|
||||
#include "Item.h"
|
||||
#include "Player.h"
|
||||
|
||||
void WorldPackets::Inspect::Inspect::Read()
|
||||
namespace WorldPackets::Inspect
|
||||
{
|
||||
void Inspect::Read()
|
||||
{
|
||||
_worldPacket >> Target;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::InspectEnchantData const& enchantData)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, InspectEnchantData const& enchantData)
|
||||
{
|
||||
data << uint32(enchantData.Id);
|
||||
data << uint8(enchantData.Index);
|
||||
@@ -33,7 +35,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::InspectEnchantDa
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::AzeriteEssenceData const& azeriteEssenceData)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, AzeriteEssenceData const& azeriteEssenceData)
|
||||
{
|
||||
data << uint32(azeriteEssenceData.Index);
|
||||
data << uint32(azeriteEssenceData.AzeriteEssenceID);
|
||||
@@ -44,7 +46,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::AzeriteEssenceDa
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::InspectItemData const& itemData)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, InspectItemData const& itemData)
|
||||
{
|
||||
data << itemData.CreatorGUID;
|
||||
data << uint8(itemData.Index);
|
||||
@@ -60,19 +62,19 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::InspectItemData
|
||||
data.WriteBits(itemData.Gems.size(), 2);
|
||||
data.FlushBits();
|
||||
|
||||
for (WorldPackets::Inspect::AzeriteEssenceData const& azeriteEssenceData : itemData.AzeriteEssences)
|
||||
for (AzeriteEssenceData const& azeriteEssenceData : itemData.AzeriteEssences)
|
||||
data << azeriteEssenceData;
|
||||
|
||||
for (WorldPackets::Inspect::InspectEnchantData const& enchantData : itemData.Enchants)
|
||||
for (InspectEnchantData const& enchantData : itemData.Enchants)
|
||||
data << enchantData;
|
||||
|
||||
for (WorldPackets::Item::ItemGemData const& gem : itemData.Gems)
|
||||
for (Item::ItemGemData const& gem : itemData.Gems)
|
||||
data << gem;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void WorldPackets::Inspect::PlayerModelDisplayInfo::Initialize(Player const* player)
|
||||
void PlayerModelDisplayInfo::Initialize(Player const* player)
|
||||
{
|
||||
GUID = player->GetGUID();
|
||||
SpecializationID = player->GetPrimarySpecialization();
|
||||
@@ -89,7 +91,7 @@ void WorldPackets::Inspect::PlayerModelDisplayInfo::Initialize(Player const* pla
|
||||
Items.emplace_back(item, i);
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::PlayerModelDisplayInfo const& displayInfo)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PlayerModelDisplayInfo const& displayInfo)
|
||||
{
|
||||
data << displayInfo.GUID;
|
||||
data << int32(displayInfo.SpecializationID);
|
||||
@@ -101,16 +103,16 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::PlayerModelDispl
|
||||
data << uint32(displayInfo.Customizations.size());
|
||||
data.WriteString(displayInfo.Name);
|
||||
|
||||
for (WorldPackets::Character::ChrCustomizationChoice const& customization : displayInfo.Customizations)
|
||||
for (Character::ChrCustomizationChoice const& customization : displayInfo.Customizations)
|
||||
data << customization;
|
||||
|
||||
for (WorldPackets::Inspect::InspectItemData const& item : displayInfo.Items)
|
||||
for (InspectItemData const& item : displayInfo.Items)
|
||||
data << item;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::InspectGuildData const& guildData)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, InspectGuildData const& guildData)
|
||||
{
|
||||
data << guildData.GuildGUID;
|
||||
data << int32(guildData.NumGuildMembers);
|
||||
@@ -119,9 +121,10 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::InspectGuildData
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::PVPBracketData const& bracket)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, PVPBracketData const& bracket)
|
||||
{
|
||||
data << uint8(bracket.Bracket);
|
||||
data << int32(bracket.Unused3);
|
||||
data << int32(bracket.Rating);
|
||||
data << int32(bracket.Rank);
|
||||
data << int32(bracket.WeeklyPlayed);
|
||||
@@ -134,13 +137,26 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Inspect::PVPBracketData c
|
||||
data << int32(bracket.WeeklyBestWinPvpTierID);
|
||||
data << int32(bracket.Unused1);
|
||||
data << int32(bracket.Unused2);
|
||||
data << int32(bracket.RoundsSeasonPlayed);
|
||||
data << int32(bracket.RoundsSeasonWon);
|
||||
data << int32(bracket.RoundsWeeklyPlayed);
|
||||
data << int32(bracket.RoundsWeeklyWon);
|
||||
data.WriteBit(bracket.Disqualified);
|
||||
data.FlushBits();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
WorldPackets::Inspect::InspectItemData::InspectItemData(::Item const* item, uint8 index)
|
||||
ByteBuffer& operator<<(ByteBuffer& data, TraitInspectInfo const& traits)
|
||||
{
|
||||
data << int32(traits.Level);
|
||||
data << int32(traits.ChrSpecializationID);
|
||||
data << traits.Config;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
InspectItemData::InspectItemData(::Item const* item, uint8 index)
|
||||
{
|
||||
CreatorGUID = item->GetCreator();
|
||||
|
||||
@@ -159,7 +175,7 @@ WorldPackets::Inspect::InspectItemData::InspectItemData(::Item const* item, uint
|
||||
{
|
||||
Gems.emplace_back();
|
||||
|
||||
WorldPackets::Item::ItemGemData& gem = Gems.back();
|
||||
Item::ItemGemData& gem = Gems.back();
|
||||
gem.Slot = i;
|
||||
gem.Item.Initialize(&gemData);
|
||||
}
|
||||
@@ -174,7 +190,7 @@ WorldPackets::Inspect::InspectItemData::InspectItemData(::Item const* item, uint
|
||||
{
|
||||
AzeriteEssences.emplace_back();
|
||||
|
||||
WorldPackets::Inspect::AzeriteEssenceData& essence = AzeriteEssences.back();
|
||||
AzeriteEssenceData& essence = AzeriteEssences.back();
|
||||
essence.Index = slot;
|
||||
essence.AzeriteEssenceID = essences->AzeriteEssenceID[slot];
|
||||
if (essence.AzeriteEssenceID)
|
||||
@@ -189,7 +205,7 @@ WorldPackets::Inspect::InspectItemData::InspectItemData(::Item const* item, uint
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Inspect::InspectResult::Write()
|
||||
WorldPacket const* InspectResult::Write()
|
||||
{
|
||||
_worldPacket << DisplayInfo;
|
||||
_worldPacket << uint32(Glyphs.size());
|
||||
@@ -221,10 +237,13 @@ WorldPacket const* WorldPackets::Inspect::InspectResult::Write()
|
||||
if (AzeriteLevel)
|
||||
_worldPacket << int32(*AzeriteLevel);
|
||||
|
||||
_worldPacket << TalentTraits;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void WorldPackets::Inspect::QueryInspectAchievements::Read()
|
||||
void QueryInspectAchievements::Read()
|
||||
{
|
||||
_worldPacket >> Guid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "ObjectGuid.h"
|
||||
#include "RaceMask.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "TraitPacketsCommon.h"
|
||||
|
||||
class Item;
|
||||
class Player;
|
||||
@@ -46,7 +47,7 @@ namespace WorldPackets
|
||||
{
|
||||
InspectEnchantData(uint32 id, uint8 index) : Id(id), Index(index) { }
|
||||
|
||||
uint32 Id = 0;
|
||||
uint32 Id = 0;
|
||||
uint8 Index = 0;
|
||||
};
|
||||
|
||||
@@ -95,20 +96,32 @@ namespace WorldPackets
|
||||
|
||||
struct PVPBracketData
|
||||
{
|
||||
int32 Rating = 0;
|
||||
int32 Rank = 0;
|
||||
int32 WeeklyPlayed = 0;
|
||||
int32 WeeklyWon = 0;
|
||||
int32 SeasonPlayed = 0;
|
||||
int32 SeasonWon = 0;
|
||||
int32 Rating = 0;
|
||||
int32 Rank = 0;
|
||||
int32 WeeklyPlayed = 0;
|
||||
int32 WeeklyWon = 0;
|
||||
int32 SeasonPlayed = 0;
|
||||
int32 SeasonWon = 0;
|
||||
int32 WeeklyBestRating = 0;
|
||||
int32 SeasonBestRating = 0;
|
||||
int32 PvpTierID = 0;
|
||||
int32 PvpTierID = 0;
|
||||
int32 WeeklyBestWinPvpTierID = 0;
|
||||
int32 Unused1 = 0;
|
||||
int32 Unused2 = 0;
|
||||
uint8 Bracket = 0;
|
||||
bool Disqualified = false;
|
||||
int32 Unused1 = 0;
|
||||
int32 Unused2 = 0;
|
||||
int32 Unused3 = 0;
|
||||
int32 RoundsSeasonPlayed = 0;
|
||||
int32 RoundsSeasonWon = 0;
|
||||
int32 RoundsWeeklyPlayed = 0;
|
||||
int32 RoundsWeeklyWon = 0;
|
||||
uint8 Bracket = 0;
|
||||
bool Disqualified = false;
|
||||
};
|
||||
|
||||
struct TraitInspectInfo
|
||||
{
|
||||
int32 Level = 0;
|
||||
int32 ChrSpecializationID = 0;
|
||||
Traits::TraitConfig Config;
|
||||
};
|
||||
|
||||
class InspectResult final : public ServerPacket
|
||||
@@ -126,7 +139,7 @@ namespace WorldPackets
|
||||
std::vector<uint16> Talents;
|
||||
std::array<uint16, MAX_PVP_TALENT_SLOTS> PvpTalents;
|
||||
Optional<InspectGuildData> GuildData;
|
||||
std::array<PVPBracketData, 6> Bracket;
|
||||
std::array<PVPBracketData, 7> Bracket;
|
||||
Optional<int32> AzeriteLevel;
|
||||
int32 ItemLevel = 0;
|
||||
uint32 LifetimeHK = 0;
|
||||
@@ -134,6 +147,7 @@ namespace WorldPackets
|
||||
uint16 TodayHK = 0;
|
||||
uint16 YesterdayHK = 0;
|
||||
uint8 LifetimeMaxRank = 0;
|
||||
TraitInspectInfo TalentTraits;
|
||||
};
|
||||
|
||||
class QueryInspectAchievements final : public ClientPacket
|
||||
|
||||
@@ -258,14 +258,27 @@ WorldPacket const* WorldPackets::Item::ItemPushResult::Write()
|
||||
_worldPacket << uint32(BattlePetBreedQuality);
|
||||
_worldPacket << int32(BattlePetLevel);
|
||||
_worldPacket << ItemGUID;
|
||||
_worldPacket << uint32(Toasts.size());
|
||||
for (UiEventToast const& uiEventToast : Toasts)
|
||||
_worldPacket << uiEventToast;
|
||||
|
||||
_worldPacket.WriteBit(Pushed);
|
||||
_worldPacket.WriteBit(Created);
|
||||
_worldPacket.WriteBits(DisplayText, 3);
|
||||
_worldPacket.WriteBit(IsBonusRoll);
|
||||
_worldPacket.WriteBit(IsEncounterLoot);
|
||||
_worldPacket.WriteBit(CraftingData.has_value());
|
||||
_worldPacket.WriteBit(FirstCraftOperationID.has_value());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket << Item;
|
||||
|
||||
if (FirstCraftOperationID)
|
||||
_worldPacket << uint32(*FirstCraftOperationID);
|
||||
|
||||
if (CraftingData)
|
||||
_worldPacket << *CraftingData;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define ItemPackets_h__
|
||||
|
||||
#include "Packet.h"
|
||||
#include "CraftingPacketsCommon.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "ItemDefines.h"
|
||||
#include "ItemPacketsCommon.h"
|
||||
@@ -345,12 +346,15 @@ namespace WorldPackets
|
||||
// only set if different than real ID (similar to CreatureTemplate.KillCredit)
|
||||
int32 Quantity = 0;
|
||||
int32 QuantityInInventory = 0;
|
||||
int32 DungeonEncounterID = 0;
|
||||
int32 DungeonEncounterID = 0;
|
||||
int32 BattlePetSpeciesID = 0;
|
||||
int32 BattlePetBreedID = 0;
|
||||
uint32 BattlePetBreedQuality = 0;
|
||||
int32 BattlePetLevel = 0;
|
||||
ObjectGuid ItemGUID;
|
||||
std::vector<UiEventToast> Toasts;
|
||||
Optional<Crafting::CraftingData> CraftingData;
|
||||
Optional<uint32> FirstCraftOperationID;
|
||||
bool Pushed = false;
|
||||
DisplayType DisplayText = DISPLAY_TYPE_HIDDEN;
|
||||
bool Created = false;
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
#include "Loot.h"
|
||||
#include "Player.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace Item
|
||||
namespace WorldPackets::Item
|
||||
{
|
||||
bool ItemBonuses::operator==(ItemBonuses const& r) const
|
||||
{
|
||||
@@ -51,7 +49,7 @@ bool ItemModList::operator==(ItemModList const& r) const
|
||||
void ItemInstance::Initialize(::Item const* item)
|
||||
{
|
||||
ItemID = item->GetEntry();
|
||||
std::vector<int32> const& bonusListIds = item->m_itemData->BonusListIDs;
|
||||
std::vector<int32> const& bonusListIds = item->GetBonusListIDs();
|
||||
if (!bonusListIds.empty())
|
||||
{
|
||||
ItemBonus.emplace();
|
||||
@@ -126,6 +124,20 @@ bool ItemInstance::operator==(ItemInstance const& r) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ItemBonusKey::operator==(ItemBonusKey const& right) const
|
||||
{
|
||||
if (ItemID != right.ItemID)
|
||||
return false;
|
||||
|
||||
if (BonusListIDs != right.BonusListIDs)
|
||||
return false;
|
||||
|
||||
if (Modifications != right.Modifications)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemBonuses const& itemBonusInstanceData)
|
||||
{
|
||||
data << uint8(itemBonusInstanceData.Context);
|
||||
@@ -224,6 +236,21 @@ ByteBuffer& operator>>(ByteBuffer& data, ItemInstance& itemInstance)
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemBonusKey const& itemBonusKey)
|
||||
{
|
||||
data << int32(itemBonusKey.ItemID);
|
||||
data << uint32(itemBonusKey.BonusListIDs.size());
|
||||
data << uint32(itemBonusKey.Modifications.size());
|
||||
|
||||
if (!itemBonusKey.BonusListIDs.empty())
|
||||
data.append(itemBonusKey.BonusListIDs.data(), itemBonusKey.BonusListIDs.size());
|
||||
|
||||
for (ItemMod const& modification : itemBonusKey.Modifications)
|
||||
data << modification;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemEnchantData const& itemEnchantData)
|
||||
{
|
||||
data << int32(itemEnchantData.ID);
|
||||
@@ -259,5 +286,12 @@ ByteBuffer& operator>>(ByteBuffer& data, InvUpdate& invUpdate)
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, UiEventToast const& uiEventToast)
|
||||
{
|
||||
data << int32(uiEventToast.UiEventToastID);
|
||||
data << int32(uiEventToast.Asset);
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +82,16 @@ namespace WorldPackets
|
||||
bool operator!=(ItemInstance const& r) const { return !(*this == r); }
|
||||
};
|
||||
|
||||
struct ItemBonusKey
|
||||
{
|
||||
int32 ItemID = 0;
|
||||
std::vector<int32> BonusListIDs;
|
||||
std::vector<ItemMod> Modifications;
|
||||
|
||||
bool operator==(ItemBonusKey const& right) const;
|
||||
bool operator!=(ItemBonusKey const& r) const { return !(*this == r); }
|
||||
};
|
||||
|
||||
struct ItemEnchantData
|
||||
{
|
||||
ItemEnchantData(int32 id, uint32 expiration, int32 charges, uint8 slot) : ID(id), Expiration(expiration), Charges(charges), Slot(slot) { }
|
||||
@@ -107,23 +117,27 @@ namespace WorldPackets
|
||||
|
||||
std::vector<InvItem> Items;
|
||||
};
|
||||
|
||||
struct UiEventToast
|
||||
{
|
||||
int32 UiEventToastID = 0;
|
||||
int32 Asset = 0;
|
||||
};
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemEnchantData const& itemEnchantData);
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemGemData const& itemGemInstanceData);
|
||||
ByteBuffer& operator>>(ByteBuffer& data, ItemGemData& itemGemInstanceData);
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemInstance const& itemInstance);
|
||||
ByteBuffer& operator>>(ByteBuffer& data, ItemInstance& itemInstance);
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemBonusKey const& itemBonusKey);
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, InvUpdate& invUpdate);
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, UiEventToast const& uiEventToast);
|
||||
}
|
||||
}
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace Item
|
||||
{
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemInstance const& itemInstance);
|
||||
ByteBuffer& operator>>(ByteBuffer& data, ItemInstance& itemInstance);
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemEnchantData const& itemEnchantData);
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ItemGemData const& itemGemInstanceData);
|
||||
ByteBuffer& operator>>(ByteBuffer& data, ItemGemData& itemGemInstanceData);
|
||||
|
||||
ByteBuffer& operator>>(ByteBuffer& data, InvUpdate& invUpdate);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // ItemPacketsCommon_h__
|
||||
|
||||
@@ -33,6 +33,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Loot::LootItemData const&
|
||||
void WorldPackets::Loot::LootUnit::Read()
|
||||
{
|
||||
_worldPacket >> Unit;
|
||||
IsSoftInteract = _worldPacket.ReadBit();
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Loot::LootResponse::Write()
|
||||
@@ -168,6 +169,7 @@ WorldPacket const* WorldPackets::Loot::StartLootRoll::Write()
|
||||
_worldPacket << int32(MapID);
|
||||
_worldPacket << RollTime;
|
||||
_worldPacket << uint8(ValidRolls);
|
||||
_worldPacket.append(LootRollIneligibleReason.data(), LootRollIneligibleReason.size());
|
||||
_worldPacket << uint8(Method);
|
||||
_worldPacket << Item;
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "ObjectGuid.h"
|
||||
#include "ItemPacketsCommon.h"
|
||||
|
||||
enum class LootRollIneligibilityReason : uint32;
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace Loot
|
||||
@@ -34,6 +36,7 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
ObjectGuid Unit;
|
||||
bool IsSoftInteract = false;
|
||||
};
|
||||
|
||||
struct LootItemData
|
||||
@@ -221,6 +224,7 @@ namespace WorldPackets
|
||||
Duration<Milliseconds, uint32> RollTime;
|
||||
uint8 Method = 0;
|
||||
uint8 ValidRolls = 0;
|
||||
std::array<LootRollIneligibilityReason, 4> LootRollIneligibleReason = { };
|
||||
LootItemData Item;
|
||||
};
|
||||
|
||||
|
||||
@@ -277,10 +277,3 @@ WorldPacket const* WorldPackets::Mail::NotifyReceivedMail::Write()
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Mail::ShowMailbox::Write()
|
||||
{
|
||||
_worldPacket << PostmasterGUID;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -235,16 +235,6 @@ namespace WorldPackets
|
||||
|
||||
float Delay = 0.0f;
|
||||
};
|
||||
|
||||
class ShowMailbox final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
ShowMailbox() : ServerPacket(SMSG_SHOW_MAILBOX, 16) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid PostmasterGUID;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,11 +53,13 @@ WorldPacket const* WorldPackets::Misc::SetCurrency::Write()
|
||||
_worldPacket.WriteBit(WeeklyQuantity.has_value());
|
||||
_worldPacket.WriteBit(TrackedQuantity.has_value());
|
||||
_worldPacket.WriteBit(MaxQuantity.has_value());
|
||||
_worldPacket.WriteBit(Unused901.has_value());
|
||||
_worldPacket.WriteBit(TotalEarned.has_value());
|
||||
_worldPacket.WriteBit(SuppressChatLog);
|
||||
_worldPacket.WriteBit(QuantityChange.has_value());
|
||||
_worldPacket.WriteBit(QuantityGainSource.has_value());
|
||||
_worldPacket.WriteBit(QuantityLostSource.has_value());
|
||||
_worldPacket.WriteBit(QuantityGainSource.has_value());
|
||||
_worldPacket.WriteBit(FirstCraftOperationID.has_value());
|
||||
_worldPacket.WriteBit(LastSpendTime.has_value());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (WeeklyQuantity)
|
||||
@@ -69,17 +71,23 @@ WorldPacket const* WorldPackets::Misc::SetCurrency::Write()
|
||||
if (MaxQuantity)
|
||||
_worldPacket << int32(*MaxQuantity);
|
||||
|
||||
if (Unused901)
|
||||
_worldPacket << int32(*Unused901);
|
||||
if (TotalEarned)
|
||||
_worldPacket << int32(*TotalEarned);
|
||||
|
||||
if (QuantityChange)
|
||||
_worldPacket << int32(*QuantityChange);
|
||||
|
||||
if (QuantityLostSource)
|
||||
_worldPacket << int32(*QuantityLostSource);
|
||||
|
||||
if (QuantityGainSource)
|
||||
_worldPacket << int32(*QuantityGainSource);
|
||||
|
||||
if (QuantityLostSource)
|
||||
_worldPacket << int32(*QuantityLostSource);
|
||||
if (FirstCraftOperationID)
|
||||
_worldPacket << uint32(*FirstCraftOperationID);
|
||||
|
||||
if (LastSpendTime)
|
||||
_worldPacket << *LastSpendTime;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -102,7 +110,8 @@ WorldPacket const* WorldPackets::Misc::SetupCurrency::Write()
|
||||
_worldPacket.WriteBit(data.MaxWeeklyQuantity.has_value());
|
||||
_worldPacket.WriteBit(data.TrackedQuantity.has_value());
|
||||
_worldPacket.WriteBit(data.MaxQuantity.has_value());
|
||||
_worldPacket.WriteBit(data.Unused901.has_value());
|
||||
_worldPacket.WriteBit(data.TotalEarned.has_value());
|
||||
_worldPacket.WriteBit(data.LastSpendTime.has_value());
|
||||
_worldPacket.WriteBits(data.Flags, 5);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -114,8 +123,10 @@ WorldPacket const* WorldPackets::Misc::SetupCurrency::Write()
|
||||
_worldPacket << uint32(*data.TrackedQuantity);
|
||||
if (data.MaxQuantity)
|
||||
_worldPacket << int32(*data.MaxQuantity);
|
||||
if (data.Unused901)
|
||||
_worldPacket << int32(*data.Unused901);
|
||||
if (data.TotalEarned)
|
||||
_worldPacket << int32(*data.TotalEarned);
|
||||
if (data.LastSpendTime)
|
||||
_worldPacket << *data.LastSpendTime;
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
@@ -321,13 +332,6 @@ WorldPacket const* WorldPackets::Misc::PlayerBound::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::BinderConfirm::Write()
|
||||
{
|
||||
_worldPacket << Unit;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::StartMirrorTimer::Write()
|
||||
{
|
||||
_worldPacket << int32(Timer);
|
||||
|
||||
@@ -63,17 +63,6 @@ namespace WorldPackets
|
||||
uint32 AreaID = 0;
|
||||
};
|
||||
|
||||
class BinderConfirm final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
BinderConfirm() : ServerPacket(SMSG_BINDER_CONFIRM, 16) { }
|
||||
BinderConfirm(ObjectGuid unit) : ServerPacket(SMSG_BINDER_CONFIRM, 16), Unit(unit) { }
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid Unit;
|
||||
};
|
||||
|
||||
class InvalidatePlayer final : public ServerPacket
|
||||
{
|
||||
public:
|
||||
@@ -116,13 +105,16 @@ namespace WorldPackets
|
||||
int32 Type = 0;
|
||||
int32 Quantity = 0;
|
||||
uint32 Flags = 0;
|
||||
std::vector<Item::UiEventToast> Toasts;
|
||||
Optional<int32> WeeklyQuantity;
|
||||
Optional<int32> TrackedQuantity;
|
||||
Optional<int32> MaxQuantity;
|
||||
Optional<int32> Unused901;
|
||||
Optional<int32> TotalEarned;
|
||||
Optional<int32> QuantityChange;
|
||||
Optional<int32> QuantityGainSource;
|
||||
Optional<int32> QuantityLostSource;
|
||||
Optional<uint32> FirstCraftOperationID;
|
||||
Optional<Timestamp<>> LastSpendTime;
|
||||
bool SuppressChatLog = false;
|
||||
};
|
||||
|
||||
@@ -147,7 +139,8 @@ namespace WorldPackets
|
||||
Optional<int32> MaxWeeklyQuantity; // Weekly Currency cap.
|
||||
Optional<int32> TrackedQuantity;
|
||||
Optional<int32> MaxQuantity;
|
||||
Optional<int32> Unused901;
|
||||
Optional<int32> TotalEarned;
|
||||
Optional<Timestamp<>> LastSpendTime;
|
||||
uint8 Flags = 0; // 0 = none,
|
||||
};
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ ByteBuffer& operator<<(ByteBuffer& data, MovementInfo const& movementInfo)
|
||||
bool hasFallData = hasFallDirection || movementInfo.jump.fallTime != 0;
|
||||
bool hasSpline = false; // todo 6.x send this infos
|
||||
bool hasInertia = movementInfo.inertia.has_value();
|
||||
bool hasAdvFlying = movementInfo.advFlying.has_value();
|
||||
|
||||
data << movementInfo.guid;
|
||||
data << uint32(movementInfo.flags);
|
||||
@@ -57,6 +58,7 @@ ByteBuffer& operator<<(ByteBuffer& data, MovementInfo const& movementInfo)
|
||||
data.WriteBit(false); // HeightChangeFailed
|
||||
data.WriteBit(false); // RemoteTimeValid
|
||||
data.WriteBit(hasInertia);
|
||||
data.WriteBit(hasAdvFlying);
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
@@ -65,11 +67,17 @@ ByteBuffer& operator<<(ByteBuffer& data, MovementInfo const& movementInfo)
|
||||
|
||||
if (hasInertia)
|
||||
{
|
||||
data << movementInfo.inertia->guid;
|
||||
data << uint32(movementInfo.inertia->id);
|
||||
data << movementInfo.inertia->force.PositionXYZStream();
|
||||
data << uint32(movementInfo.inertia->lifetime);
|
||||
}
|
||||
|
||||
if (hasAdvFlying)
|
||||
{
|
||||
data << float(movementInfo.advFlying->forwardVelocity);
|
||||
data << float(movementInfo.advFlying->upVelocity);
|
||||
}
|
||||
|
||||
if (hasFallData)
|
||||
{
|
||||
data << uint32(movementInfo.jump.fallTime);
|
||||
@@ -120,6 +128,7 @@ ByteBuffer& operator>>(ByteBuffer& data, MovementInfo& movementInfo)
|
||||
data.ReadBit(); // HeightChangeFailed
|
||||
data.ReadBit(); // RemoteTimeValid
|
||||
bool hasInertia = data.ReadBit();
|
||||
bool hasAdvFlying = data.ReadBit();
|
||||
|
||||
if (hasTransport)
|
||||
data >> movementInfo.transport;
|
||||
@@ -128,11 +137,19 @@ ByteBuffer& operator>>(ByteBuffer& data, MovementInfo& movementInfo)
|
||||
{
|
||||
movementInfo.inertia.emplace();
|
||||
|
||||
data >> movementInfo.inertia->guid;
|
||||
data >> movementInfo.inertia->id;
|
||||
data >> movementInfo.inertia->force.PositionXYZStream();
|
||||
data >> movementInfo.inertia->lifetime;
|
||||
}
|
||||
|
||||
if (hasAdvFlying)
|
||||
{
|
||||
movementInfo.advFlying.emplace();
|
||||
|
||||
data >> movementInfo.advFlying->forwardVelocity;
|
||||
data >> movementInfo.advFlying->upVelocity;
|
||||
}
|
||||
|
||||
if (hasFall)
|
||||
{
|
||||
data >> movementInfo.jump.fallTime;
|
||||
@@ -1008,12 +1025,13 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MoveSetCompound
|
||||
data << uint16(stateChange.MessageID);
|
||||
data << uint32(stateChange.SequenceIndex);
|
||||
data.WriteBit(stateChange.Speed.has_value());
|
||||
data.WriteBit(stateChange.SpeedRange.has_value());
|
||||
data.WriteBit(stateChange.KnockBack.has_value());
|
||||
data.WriteBit(stateChange.VehicleRecID.has_value());
|
||||
data.WriteBit(stateChange.CollisionHeight.has_value());
|
||||
data.WriteBit(stateChange.MovementForce_.has_value());
|
||||
data.WriteBit(stateChange.MovementForceGUID.has_value());
|
||||
data.WriteBit(stateChange.MovementInertiaGUID.has_value());
|
||||
data.WriteBit(stateChange.MovementInertiaID.has_value());
|
||||
data.WriteBit(stateChange.MovementInertiaLifetimeMs.has_value());
|
||||
data.FlushBits();
|
||||
|
||||
@@ -1023,6 +1041,12 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MoveSetCompound
|
||||
if (stateChange.Speed)
|
||||
data << float(*stateChange.Speed);
|
||||
|
||||
if (stateChange.SpeedRange)
|
||||
{
|
||||
data << float(stateChange.SpeedRange->Min);
|
||||
data << float(stateChange.SpeedRange->Max);
|
||||
}
|
||||
|
||||
if (stateChange.KnockBack)
|
||||
{
|
||||
data << float(stateChange.KnockBack->HorzSpeed);
|
||||
@@ -1043,8 +1067,8 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Movement::MoveSetCompound
|
||||
if (stateChange.MovementForceGUID)
|
||||
data << *stateChange.MovementForceGUID;
|
||||
|
||||
if (stateChange.MovementInertiaGUID)
|
||||
data << *stateChange.MovementInertiaGUID;
|
||||
if (stateChange.MovementInertiaID)
|
||||
data << int32(*stateChange.MovementInertiaID);
|
||||
|
||||
if (stateChange.MovementInertiaLifetimeMs)
|
||||
data << uint32(*stateChange.MovementInertiaLifetimeMs);
|
||||
|
||||
@@ -670,6 +670,12 @@ namespace WorldPackets
|
||||
float InitVertSpeed = 0.0f;
|
||||
};
|
||||
|
||||
struct SpeedRange
|
||||
{
|
||||
float Min = 0.0f;
|
||||
float Max = 0.0f;
|
||||
};
|
||||
|
||||
struct MoveStateChange
|
||||
{
|
||||
MoveStateChange(OpcodeServer messageId, uint32 sequenceIndex) : MessageID(messageId), SequenceIndex(sequenceIndex) { }
|
||||
@@ -677,12 +683,13 @@ namespace WorldPackets
|
||||
uint16 MessageID = 0;
|
||||
uint32 SequenceIndex = 0;
|
||||
Optional<float> Speed;
|
||||
Optional<SpeedRange> SpeedRange;
|
||||
Optional<KnockBackInfo> KnockBack;
|
||||
Optional<int32> VehicleRecID;
|
||||
Optional<CollisionHeightInfo> CollisionHeight;
|
||||
Optional<MovementForce> MovementForce_;
|
||||
Optional<ObjectGuid> MovementForceGUID;
|
||||
Optional<ObjectGuid> MovementInertiaGUID;
|
||||
Optional<int32> MovementInertiaID;
|
||||
Optional<uint32> MovementInertiaLifetimeMs;
|
||||
};
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ namespace WorldPackets
|
||||
int32 MapChallengeModeID = 0;
|
||||
std::vector<DungeonScoreBestRunForAffix> BestRuns;
|
||||
float OverAllScore = 0.0f;
|
||||
|
||||
};
|
||||
|
||||
struct DungeonScoreSeasonData
|
||||
|
||||
@@ -18,10 +18,56 @@
|
||||
#include "NPCPackets.h"
|
||||
#include "Util.h"
|
||||
|
||||
namespace WorldPackets
|
||||
namespace WorldPackets::NPC
|
||||
{
|
||||
namespace NPC
|
||||
ByteBuffer& operator<<(ByteBuffer& data, TreasureItem const& treasureItem)
|
||||
{
|
||||
data.WriteBits(AsUnderlyingType(treasureItem.Type), 1);
|
||||
data << int32(treasureItem.ID);
|
||||
data << int32(treasureItem.Quantity);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, TreasureLootList const& treasureLootList)
|
||||
{
|
||||
data << uint32(treasureLootList.Items.size());
|
||||
for (TreasureItem const& treasureItem : treasureLootList.Items)
|
||||
data << treasureItem;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ClientGossipOptions const& gossipOption)
|
||||
{
|
||||
data << int32(gossipOption.GossipOptionID);
|
||||
data << uint8(gossipOption.OptionNPC);
|
||||
data << int8(gossipOption.OptionFlags);
|
||||
data << int32(gossipOption.OptionCost);
|
||||
data << uint32(gossipOption.OptionLanguage);
|
||||
data << int32(gossipOption.Flags);
|
||||
data << int32(gossipOption.OrderIndex);
|
||||
data.WriteBits(gossipOption.Text.size(), 12);
|
||||
data.WriteBits(gossipOption.Confirm.size(), 12);
|
||||
data.WriteBits(AsUnderlyingType(gossipOption.Status), 2);
|
||||
data.WriteBit(gossipOption.SpellID.has_value());
|
||||
data.WriteBit(gossipOption.OverrideIconID.has_value());
|
||||
data.FlushBits();
|
||||
|
||||
data << gossipOption.Treasure;
|
||||
|
||||
data.WriteString(gossipOption.Text);
|
||||
data.WriteString(gossipOption.Confirm);
|
||||
|
||||
if (gossipOption.SpellID)
|
||||
data << int32(*gossipOption.SpellID);
|
||||
|
||||
if (*gossipOption.OverrideIconID)
|
||||
data << int32(*gossipOption.OverrideIconID);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, ClientGossipText const& gossipText)
|
||||
{
|
||||
data << int32(gossipText.QuestID);
|
||||
@@ -44,22 +90,14 @@ void Hello::Read()
|
||||
_worldPacket >> Unit;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, TreasureItem const& treasureItem)
|
||||
WorldPacket const* NPCInteractionOpenResult::Write()
|
||||
{
|
||||
data.WriteBits(AsUnderlyingType(treasureItem.Type), 1);
|
||||
data << int32(treasureItem.ID);
|
||||
data << int32(treasureItem.Quantity);
|
||||
_worldPacket << Npc;
|
||||
_worldPacket << int32(InteractionType);
|
||||
_worldPacket.WriteBit(Success);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, TreasureLootList const& treasureLootList)
|
||||
{
|
||||
data << uint32(treasureLootList.Items.size());
|
||||
for (TreasureItem const& treasureItem : treasureLootList.Items)
|
||||
data << treasureItem;
|
||||
|
||||
return data;
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* GossipMessage::Write()
|
||||
@@ -67,31 +105,20 @@ WorldPacket const* GossipMessage::Write()
|
||||
_worldPacket << GossipGUID;
|
||||
_worldPacket << int32(GossipID);
|
||||
_worldPacket << int32(FriendshipFactionID);
|
||||
_worldPacket << int32(TextID);
|
||||
_worldPacket << uint32(GossipOptions.size());
|
||||
_worldPacket << uint32(GossipText.size());
|
||||
_worldPacket.WriteBit(TextID.has_value());
|
||||
_worldPacket.WriteBit(TextID2.has_value());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
for (ClientGossipOptions const& options : GossipOptions)
|
||||
{
|
||||
_worldPacket << int32(options.ClientOption);
|
||||
_worldPacket << uint8(options.OptionNPC);
|
||||
_worldPacket << int8(options.OptionFlags);
|
||||
_worldPacket << int32(options.OptionCost);
|
||||
_worldPacket << uint32(options.OptionLanguage);
|
||||
_worldPacket.WriteBits(options.Text.size(), 12);
|
||||
_worldPacket.WriteBits(options.Confirm.size(), 12);
|
||||
_worldPacket.WriteBits(AsUnderlyingType(options.Status), 2);
|
||||
_worldPacket.WriteBit(options.SpellID.has_value());
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket << options;
|
||||
|
||||
_worldPacket << options.Treasure;
|
||||
if (TextID)
|
||||
_worldPacket << int32(*TextID);
|
||||
|
||||
_worldPacket.WriteString(options.Text);
|
||||
_worldPacket.WriteString(options.Confirm);
|
||||
|
||||
if (options.SpellID)
|
||||
_worldPacket << int32(*options.SpellID);
|
||||
}
|
||||
if (TextID2)
|
||||
_worldPacket << int32(*TextID2);
|
||||
|
||||
for (ClientGossipText const& text : GossipText)
|
||||
_worldPacket << text;
|
||||
@@ -101,20 +128,21 @@ WorldPacket const* GossipMessage::Write()
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& data, VendorItem const& item)
|
||||
{
|
||||
data << uint32(item.MuID);
|
||||
data << int32(item.Type);
|
||||
data << int32(item.Quantity);
|
||||
data << uint64(item.Price);
|
||||
data << uint32(item.MuID);
|
||||
data << int32(item.Durability);
|
||||
data << int32(item.StackCount);
|
||||
data << int32(item.Quantity);
|
||||
data << int32(item.ExtendedCostID);
|
||||
data << int32(item.PlayerConditionFailed);
|
||||
data << item.Item;
|
||||
data.WriteBits(item.Type, 3);
|
||||
data.WriteBit(item.Locked);
|
||||
data.WriteBit(item.DoNotFilterOnVendor);
|
||||
data.WriteBit(item.Refundable);
|
||||
data.FlushBits();
|
||||
|
||||
data << item.Item;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -154,23 +182,29 @@ WorldPacket const* TrainerList::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* ShowBank::Write()
|
||||
{
|
||||
_worldPacket << Guid;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void GossipSelectOption::Read()
|
||||
{
|
||||
_worldPacket >> GossipUnit;
|
||||
_worldPacket >> GossipID;
|
||||
_worldPacket >> GossipIndex;
|
||||
_worldPacket >> GossipOptionID;
|
||||
|
||||
uint32 length = _worldPacket.ReadBits(8);
|
||||
PromotionCode = _worldPacket.ReadString(length);
|
||||
}
|
||||
|
||||
WorldPacket const* GossipOptionNPCInteraction::Write()
|
||||
{
|
||||
_worldPacket << GossipGUID;
|
||||
_worldPacket << int32(GossipNpcOptionID);
|
||||
_worldPacket.WriteBit(FriendshipFactionID.has_value());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (FriendshipFactionID)
|
||||
_worldPacket << int32(*FriendshipFactionID);
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* GossipComplete::Write()
|
||||
{
|
||||
_worldPacket.WriteBit(SuppressSound);
|
||||
@@ -179,13 +213,6 @@ WorldPacket const* GossipComplete::Write()
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* PlayerTabardVendorActivate::Write()
|
||||
{
|
||||
_worldPacket << Vendor;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
WorldPacket const* GossipPOI::Write()
|
||||
{
|
||||
_worldPacket << int32(ID);
|
||||
@@ -206,13 +233,6 @@ void SpiritHealerActivate::Read()
|
||||
_worldPacket >> Healer;
|
||||
}
|
||||
|
||||
WorldPacket const* SpiritHealerConfirm::Write()
|
||||
{
|
||||
_worldPacket << Unit;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
void TrainerBuySpell::Read()
|
||||
{
|
||||
_worldPacket >> TrainerGUID;
|
||||
@@ -241,4 +261,3 @@ void SetPetSlot::Read()
|
||||
_worldPacket >> StableMaster;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user