aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/hotfixes/2015_09_07_00_hotfixes.sql109
-rw-r--r--src/server/database/Database/Implementation/HotfixDatabase.cpp21
-rw-r--r--src/server/database/Database/Implementation/HotfixDatabase.h10
-rw-r--r--src/server/game/Chat/ChatLink.cpp5
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp8
-rw-r--r--src/server/game/DataStores/DB2Stores.h4
-rw-r--r--src/server/game/DataStores/DB2Structure.h177
-rw-r--r--src/server/game/DataStores/DB2fmt.h4
-rw-r--r--src/server/game/DataStores/DBCStores.cpp537
-rw-r--r--src/server/game/DataStores/DBCStores.h294
-rw-r--r--src/server/game/DataStores/DBCStructure.h183
-rw-r--r--src/server/game/DataStores/DBCfmt.h102
-rw-r--r--src/server/game/Entities/Player/Player.cpp4
-rw-r--r--src/server/game/Entities/Unit/StatSystem.cpp2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp2
-rw-r--r--src/server/game/Guilds/Guild.h2
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp4
-rw-r--r--src/server/game/Spells/SpellEffects.cpp2
-rw-r--r--src/server/game/Spells/SpellMgr.cpp2
-rw-r--r--src/server/game/Spells/SpellMgr.h5
-rw-r--r--src/server/shared/DataStores/DB2StorageLoader.cpp20
-rw-r--r--src/server/shared/DataStores/DB2StorageLoader.h14
-rw-r--r--src/server/shared/DataStores/DBCFileLoader.h5
23 files changed, 839 insertions, 677 deletions
diff --git a/sql/updates/hotfixes/2015_09_07_00_hotfixes.sql b/sql/updates/hotfixes/2015_09_07_00_hotfixes.sql
new file mode 100644
index 00000000000..f9a5897e8b6
--- /dev/null
+++ b/sql/updates/hotfixes/2015_09_07_00_hotfixes.sql
@@ -0,0 +1,109 @@
+--
+-- Table structure for table `achievement`
+--
+
+DROP TABLE IF EXISTS `achievement`;
+CREATE TABLE `achievement` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Faction` int(11) NOT NULL DEFAULT '0',
+ `MapID` int(11) NOT NULL DEFAULT '0',
+ `Supercedes` int(10) unsigned NOT NULL DEFAULT '0',
+ `Title` text,
+ `Description` text,
+ `Category` int(10) unsigned NOT NULL DEFAULT '0',
+ `Points` int(10) unsigned NOT NULL DEFAULT '0',
+ `UIOrder` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `IconID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Reward` text,
+ `MinimumCriteria` int(10) unsigned NOT NULL DEFAULT '0',
+ `SharesCriteria` int(10) unsigned NOT NULL DEFAULT '0',
+ `CriteriaTree` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table `achievement_locale`
+--
+
+DROP TABLE IF EXISTS `achievement_locale`;
+CREATE TABLE `achievement_locale` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `locale` varchar(4) NOT NULL,
+ `Title_lang` text,
+ `Description_lang` text,
+ `Reward_lang` text,
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`,`locale`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table `criteria`
+--
+
+DROP TABLE IF EXISTS `criteria`;
+CREATE TABLE `criteria` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Type` int(10) unsigned NOT NULL DEFAULT '0',
+ `Asset` int(10) unsigned NOT NULL DEFAULT '0',
+ `StartEvent` int(10) unsigned NOT NULL DEFAULT '0',
+ `StartAsset` int(10) unsigned NOT NULL DEFAULT '0',
+ `StartTimer` int(10) unsigned NOT NULL DEFAULT '0',
+ `FailEvent` int(10) unsigned NOT NULL DEFAULT '0',
+ `FailAsset` int(10) unsigned NOT NULL DEFAULT '0',
+ `ModifierTreeId` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `EligibilityWorldStateID` int(10) unsigned NOT NULL DEFAULT '0',
+ `EligibilityWorldStateValue` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table `criteria_tree`
+--
+
+DROP TABLE IF EXISTS `criteria_tree`;
+CREATE TABLE `criteria_tree` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `CriteriaID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Amount` bigint(20) unsigned NOT NULL DEFAULT '0',
+ `Operator` int(10) unsigned NOT NULL DEFAULT '0',
+ `Parent` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `Description` text,
+ `OrderIndex` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table `criteria_tree_locale`
+--
+
+DROP TABLE IF EXISTS `criteria_tree_locale`;
+CREATE TABLE `criteria_tree_locale` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `locale` varchar(4) NOT NULL,
+ `Description_lang` text,
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`,`locale`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table `modifier_tree`
+--
+
+DROP TABLE IF EXISTS `modifier_tree`;
+CREATE TABLE `modifier_tree` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Type` int(10) unsigned NOT NULL DEFAULT '0',
+ `Asset1` int(10) unsigned NOT NULL DEFAULT '0',
+ `Asset2` int(10) unsigned NOT NULL DEFAULT '0',
+ `Operator` int(10) unsigned NOT NULL DEFAULT '0',
+ `Amount` int(10) unsigned NOT NULL DEFAULT '0',
+ `Parent` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp
index 927e7f623d8..f2eb88589e1 100644
--- a/src/server/database/Database/Implementation/HotfixDatabase.cpp
+++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp
@@ -27,6 +27,11 @@ void HotfixDatabaseConnection::DoPrepareStatements()
if (!m_reconnecting)
m_stmts.resize(MAX_HOTFIXDATABASE_STATEMENTS);
+ // Achievement.db2
+ PrepareStatement(HOTFIX_SEL_ACHIEVEMENT, "SELECT ID, Faction, MapID, Supercedes, Title, Description, Category, Points, UIOrder, Flags, IconID, "
+ "Reward, MinimumCriteria, SharesCriteria, CriteriaTree FROM achievement ORDER BY ID DESC", CONNECTION_SYNCH);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_ACHIEVEMENT, "SELECT ID, Title_lang, Description_lang, Reward_lang FROM achievement_locale WHERE locale = ?", CONNECTION_SYNCH);
+
// AreaGroup.db2
PrepareStatement(HOTFIX_SEL_AREA_GROUP, "SELECT ID FROM area_group ORDER BY ID DESC", CONNECTION_SYNCH);
@@ -71,6 +76,15 @@ void HotfixDatabaseConnection::DoPrepareStatements()
PrepareStatement(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name, Flags FROM creature_type ORDER BY ID DESC", CONNECTION_SYNCH);
PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name_lang FROM creature_type_locale WHERE locale = ?", CONNECTION_SYNCH);
+ // Criteria.db2
+ PrepareStatement(HOTFIX_SEL_CRITERIA, "SELECT ID, Type, Asset, StartEvent, StartAsset, StartTimer, FailEvent, FailAsset, ModifierTreeId, Flags, "
+ "EligibilityWorldStateID, EligibilityWorldStateValue FROM criteria ORDER BY ID DESC", CONNECTION_SYNCH);
+
+ // CriteriaTree.db2
+ PrepareStatement(HOTFIX_SEL_CRITERIA_TREE, "SELECT ID, CriteriaID, Operator, Parent, Flags, Description, OrderIndex FROM criteria_tree"
+ " ORDER BY ID DESC", CONNECTION_SYNCH);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_CRITERIA_TREE, "SELECT ID, Description_lang FROM criteria_tree_locale WHERE locale = ?", CONNECTION_SYNCH);
+
// CurrencyTypes.db2
PrepareStatement(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, CategoryID, Name, InventoryIcon1, InventoryIcon2, SpellWeight, SpellCategory, MaxQty, "
"MaxEarnablePerWeek, Flags, Quality, Description FROM currency_types ORDER BY ID DESC", CONNECTION_SYNCH);
@@ -275,6 +289,9 @@ void HotfixDatabaseConnection::DoPrepareStatements()
PrepareStatement(HOTFIX_SEL_MAIL_TEMPLATE, "SELECT ID, Body FROM mail_template ORDER BY ID DESC", CONNECTION_SYNCH);
PREPARE_LOCALE_STMT(HOTFIX_SEL_MAIL_TEMPLATE, "SELECT ID, Body_lang FROM mail_template_locale WHERE locale = ?", CONNECTION_SYNCH);
+ // ModifierTree.db2
+ PrepareStatement(HOTFIX_SEL_MODIFIER_TREE, "SELECT ID, Type, Asset1, Asset2, Operator, Amount, Parent FROM modifier_tree ORDER BY ID DESC", CONNECTION_SYNCH);
+
// Mount.db2
PrepareStatement(HOTFIX_SEL_MOUNT, "SELECT Id, SpellId, MountTypeId, DisplayId, Flags, Name, Description, SourceDescription, Source, "
"PlayerConditionId FROM mount ORDER BY Id DESC", CONNECTION_SYNCH);
@@ -284,7 +301,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
PrepareStatement(HOTFIX_SEL_MOUNT_CAPABILITY, "SELECT ID, Flags, RequiredRidingSkill, RequiredArea, RequiredAura, RequiredSpell, SpeedModSpell, "
"RequiredMap FROM mount_capability ORDER BY ID DESC", CONNECTION_SYNCH);
- // MountType.db2
+ // MountTypeXCapability.db2
PrepareStatement(HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY, "SELECT ID, MountTypeID, OrderIndex, MountCapabilityID FROM mount_type_x_capability ORDER BY ID DESC", CONNECTION_SYNCH);
// NameGen.db2
@@ -427,7 +444,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
PREPARE_LOCALE_STMT(HOTFIX_SEL_TOTEM_CATEGORY, "SELECT ID, Name_lang FROM totem_category_locale WHERE locale = ?", CONNECTION_SYNCH);
// Toy.db2
- PrepareStatement(HOTFIX_SEL_TOY, "SELECT ID, ItemID, Flags, Description, CategoryFilter FROM toy ORDER BY ID DESC", CONNECTION_SYNCH);
+ PrepareStatement(HOTFIX_SEL_TOY, "SELECT ID, ItemID, Flags, Description, CategoryFilter FROM toy ORDER BY ID DESC", CONNECTION_SYNCH);
PREPARE_LOCALE_STMT(HOTFIX_SEL_TOY, "SELECT ID, Description_lang FROM toy_locale WHERE locale = ?", CONNECTION_SYNCH);
// TransportAnimation.db2
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h
index c181ef9e9e6..cbff13a4fbf 100644
--- a/src/server/database/Database/Implementation/HotfixDatabase.h
+++ b/src/server/database/Database/Implementation/HotfixDatabase.h
@@ -29,6 +29,9 @@ enum HotfixDatabaseStatements
name for a suiting suffix.
*/
+ HOTFIX_SEL_ACHIEVEMENT,
+ HOTFIX_SEL_ACHIEVEMENT_LOCALE,
+
HOTFIX_SEL_AREA_GROUP,
HOTFIX_SEL_AREA_GROUP_MEMBER,
@@ -54,6 +57,11 @@ enum HotfixDatabaseStatements
HOTFIX_SEL_CREATURE_TYPE,
HOTFIX_SEL_CREATURE_TYPE_LOCALE,
+ HOTFIX_SEL_CRITERIA,
+
+ HOTFIX_SEL_CRITERIA_TREE,
+ HOTFIX_SEL_CRITERIA_TREE_LOCALE,
+
HOTFIX_SEL_CURRENCY_TYPES,
HOTFIX_SEL_CURRENCY_TYPES_LOCALE,
@@ -158,6 +166,8 @@ enum HotfixDatabaseStatements
HOTFIX_SEL_MAIL_TEMPLATE,
HOTFIX_SEL_MAIL_TEMPLATE_LOCALE,
+ HOTFIX_SEL_MODIFIER_TREE,
+
HOTFIX_SEL_MOUNT,
HOTFIX_SEL_MOUNT_LOCALE,
diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp
index 301b0076dd3..5c54e3146a1 100644
--- a/src/server/game/Chat/ChatLink.cpp
+++ b/src/server/game/Chat/ChatLink.cpp
@@ -411,8 +411,9 @@ bool AchievementChatLink::ValidateName(char* buffer, const char* context)
{
ChatLink::ValidateName(buffer, context);
- if (*_achievement->Title_lang && strcmp(_achievement->Title_lang, buffer) == 0)
- return true;
+ for (uint8 locale = LOCALE_enUS; locale < TOTAL_LOCALES; ++locale)
+ if (strcmp(_achievement->Title->Str[locale], buffer) == 0)
+ return true;
TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
return false;
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index cdc42dfadb6..0485715f287 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -24,6 +24,7 @@
#include "TransportMgr.h"
#include "World.h"
+DB2Storage<AchievementEntry> sAchievementStore("Achievement.db2", AchievementFormat, HOTFIX_SEL_ACHIEVEMENT);
DB2Storage<AreaGroupEntry> sAreaGroupStore("AreaGroup.db2", AreaGroupFormat, HOTFIX_SEL_AREA_GROUP);
DB2Storage<AreaGroupMemberEntry> sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberFormat, HOTFIX_SEL_AREA_GROUP_MEMBER);
DB2Storage<AuctionHouseEntry> sAuctionHouseStore("AuctionHouse.db2", AuctionHouseFormat, HOTFIX_SEL_AUCTION_HOUSE);
@@ -34,6 +35,8 @@ DB2Storage<ChrClassesXPowerTypesEntry> sChrClassesXPowerTypesStore("Chr
DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesFormat, HOTFIX_SEL_CINEMATIC_SEQUENCES);
DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoFormat, HOTFIX_SEL_CREATURE_DISPLAY_INFO);
DB2Storage<CreatureTypeEntry> sCreatureTypeStore("CreatureType.db2", CreatureTypeFormat, HOTFIX_SEL_CREATURE_TYPE);
+DB2Storage<CriteriaEntry> sCriteriaStore("Criteria.db2", CriteriaFormat, HOTFIX_SEL_CRITERIA);
+DB2Storage<CriteriaTreeEntry> sCriteriaTreeStore("CriteriaTree.db2", CriteriaTreeFormat, HOTFIX_SEL_CRITERIA_TREE);
DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesFormat, HOTFIX_SEL_CURRENCY_TYPES);
DB2Storage<CurvePointEntry> sCurvePointStore("CurvePoint.db2", CurvePointFormat, HOTFIX_SEL_CURVE_POINT);
DB2Storage<DestructibleModelDataEntry> sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataFormat, HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA);
@@ -78,6 +81,7 @@ DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore("ItemSpec
DB2Storage<ItemXBonusTreeEntry> sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeFormat, HOTFIX_SEL_ITEM_X_BONUS_TREE);
DB2Storage<KeyChainEntry> sKeyChainStore("KeyChain.db2", KeyChainFormat, HOTFIX_SEL_KEY_CHAIN);
DB2Storage<MailTemplateEntry> sMailTemplateStore("MailTemplate.db2", MailTemplateFormat, HOTFIX_SEL_MAIL_TEMPLATE);
+DB2Storage<ModifierTreeEntry> sModifierTreeStore("ModifierTree.db2", ModifierTreeFormat, HOTFIX_SEL_MODIFIER_TREE);
DB2Storage<MountCapabilityEntry> sMountCapabilityStore("MountCapability.db2", MountCapabilityFormat, HOTFIX_SEL_MOUNT_CAPABILITY);
DB2Storage<MountEntry> sMountStore("Mount.db2", MountFormat, HOTFIX_SEL_MOUNT);
DB2Storage<MountTypeXCapabilityEntry> sMountTypeXCapabilityStore("MountTypeXCapability.db2", MountTypeXCapabilityFormat, HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY);
@@ -189,6 +193,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
#define LOAD_DB2(store) LoadDB2(availableDb2Locales, bad_db2_files, _stores, &store, db2Path, defaultLocale)
+ LOAD_DB2(sAchievementStore);
LOAD_DB2(sAreaGroupMemberStore);
LOAD_DB2(sAreaGroupStore);
LOAD_DB2(sAuctionHouseStore);
@@ -199,6 +204,8 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
LOAD_DB2(sCinematicSequencesStore);
LOAD_DB2(sCreatureDisplayInfoStore);
LOAD_DB2(sCreatureTypeStore);
+ LOAD_DB2(sCriteriaStore);
+ LOAD_DB2(sCriteriaTreeStore);
LOAD_DB2(sCurrencyTypesStore);
LOAD_DB2(sCurvePointStore);
LOAD_DB2(sDestructibleModelDataStore);
@@ -243,6 +250,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
LOAD_DB2(sItemXBonusTreeStore);
LOAD_DB2(sKeyChainStore);
LOAD_DB2(sMailTemplateStore);
+ LOAD_DB2(sModifierTreeStore);
LOAD_DB2(sMountCapabilityStore);
LOAD_DB2(sMountStore);
LOAD_DB2(sMountTypeXCapabilityStore);
diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h
index 44d43a2981b..685d251f685 100644
--- a/src/server/game/DataStores/DB2Stores.h
+++ b/src/server/game/DataStores/DB2Stores.h
@@ -24,6 +24,7 @@
#include <boost/regex.hpp>
#include <array>
+extern DB2Storage<AchievementEntry> sAchievementStore;
extern DB2Storage<AuctionHouseEntry> sAuctionHouseStore;
extern DB2Storage<BarberShopStyleEntry> sBarberShopStyleStore;
extern DB2Storage<BroadcastTextEntry> sBroadcastTextStore;
@@ -31,6 +32,8 @@ extern DB2Storage<CharStartOutfitEntry> sCharStartOutfitStore;
extern DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore;
extern DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
extern DB2Storage<CreatureTypeEntry> sCreatureTypeStore;
+extern DB2Storage<CriteriaEntry> sCriteriaStore;
+extern DB2Storage<CriteriaTreeEntry> sCriteriaTreeStore;
extern DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore;
extern DB2Storage<DestructibleModelDataEntry> sDestructibleModelDataStore;
extern DB2Storage<DurabilityQualityEntry> sDurabilityQualityStore;
@@ -68,6 +71,7 @@ extern DB2Storage<ItemSparseEntry> sItemSparseStore;
extern DB2Storage<ItemSpecEntry> sItemSpecStore;
extern DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore;
extern DB2Storage<MailTemplateEntry> sMailTemplateStore;
+extern DB2Storage<ModifierTreeEntry> sModifierTreeStore;
extern DB2Storage<MountCapabilityEntry> sMountCapabilityStore;
extern DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore;
extern DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore;
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index d629a639cf7..289d895c024 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -25,6 +25,25 @@
#pragma pack(push, 1)
+struct AchievementEntry
+{
+ uint32 ID; // 0
+ int32 Faction; // 1 -1=all, 0=horde, 1=alliance
+ int32 MapID; // 2 -1=none
+ uint32 Supercedes; // 3 its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin)
+ LocalizedString* Title; // 4
+ LocalizedString* Description; // 5
+ uint32 Category; // 6
+ uint32 Points; // 7 reward points
+ uint32 UIOrder; // 8
+ uint32 Flags; // 9
+ uint32 IconID; // 10 icon (from SpellIcon.dbc)
+ LocalizedString* Reward; // 11
+ uint32 MinimumCriteria; // 12 - need this count of completed criterias (own or referenced achievement criterias)
+ uint32 SharesCriteria; // 13 - referenced achievement (counting of all completed criterias)
+ uint32 CriteriaTree; // 14
+};
+
struct AreaGroupEntry
{
uint32 ID; // 0
@@ -132,6 +151,152 @@ struct CreatureTypeEntry
uint32 Flags; // 2 no exp? critters, non-combat pets, gas cloud.
};
+struct CriteriaEntry
+{
+ uint32 ID; // 0
+ uint32 Type; // 1
+ union
+ {
+ uint32 ID;
+ // ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0
+ // ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20
+ uint32 CreatureID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND = 15
+ // ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP = 16
+ // ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32
+ // ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA = 33
+ uint32 MapID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7
+ // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40
+ // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS = 75
+ // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE = 112
+ uint32 SkillID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8
+ uint32 AchievementID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11
+ uint32 ZoneID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_CURRENCY = 12
+ uint32 CurrencyID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON = 18
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19
+ uint32 GroupSize;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM = 26
+ uint32 DamageType;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27
+ uint32 QuestID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28
+ // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2 = 69
+ // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL = 29
+ // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110
+ // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34
+ uint32 SpellID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE
+ uint32 ObjectiveId;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31
+ // ACHIEVEMENT_CRITERIA_TYPE_ENTER_AREA = 163
+ // ACHIEVEMENT_CRITERIA_TYPE_LEAVE_AREA = 164
+ uint32 AreaID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36
+ // ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41
+ // ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM = 42
+ // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM = 57
+ // ACHIEVEMENT_CRITERIA_TYPE_OWN_TOY = 185
+ uint32 ItemID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38
+ // ACHIEVEMENT_CRITERIA_TYPE_REACH_TEAM_RATING = 39
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING = 39
+ uint32 TeamType;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43
+ uint32 WorldMapOverlayID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION = 46
+ uint32 FactionID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49
+ uint32 ItemSlot;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT = 50
+ // ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51
+ uint32 RollValue;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52
+ uint32 ClassID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53
+ uint32 RaceID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54
+ uint32 EmoteID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68
+ // ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72
+ uint32 GameObjectID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_POWER = 96
+ uint32 PowerType;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_STAT = 97
+ uint32 StatType;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER = 98
+ uint32 SpellSchool;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109
+ uint32 LootType;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DUNGEON_ENCOUNTER = 165
+ uint32 DungeonEncounterID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_CONSTRUCT_GARRISON_BUILDING = 169
+ uint32 GarrBuildingID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_UPGRADE_GARRISON = 170
+ uint32 GarrisonLevel;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_GARRISON_MISSION = 174
+ uint32 GarrMissionID;
+
+ // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_GARRISON_SHIPMENT = 182
+ uint32 CharShipmentContainerID;
+ } Asset; // 2
+ uint32 StartEvent; // 3
+ uint32 StartAsset; // 4
+ uint32 StartTimer; // 5
+ uint32 FailEvent; // 6
+ uint32 FailAsset; // 7
+ uint32 ModifierTreeId; // 8
+ uint32 Flags; // 9
+ uint32 EligibilityWorldStateID; // 10
+ uint32 EligibilityWorldStateValue; // 11
+};
+
+struct CriteriaTreeEntry
+{
+ uint32 ID; // 0
+ uint32 CriteriaID; // 1
+ uint64 Amount; // 2
+ uint32 Operator; // 3
+ uint32 Parent; // 4
+ uint32 Flags; // 5
+ LocalizedString* Description; // 6
+ uint32 OrderIndex; // 7
+};
+
struct CurrencyTypesEntry
{
uint32 ID; // 0
@@ -686,6 +851,16 @@ struct MailTemplateEntry
LocalizedString* Body; // 1
};
+struct ModifierTreeEntry
+{
+ uint32 ID; // 0
+ uint32 Type; // 1
+ uint32 Asset[2]; // 2-3
+ uint32 Operator; // 4
+ uint32 Amount; // 5
+ uint32 Parent; // 6
+};
+
struct MountEntry
{
uint32 Id;
@@ -1152,7 +1327,7 @@ struct TaxiPathNodePtr
typedef Path<TaxiPathNodePtr, TaxiPathNodeEntry const> TaxiPathNodeList;
typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
-#define TaxiMaskSize 215
+#define TaxiMaskSize 217
typedef uint8 TaxiMask[TaxiMaskSize];
#endif
diff --git a/src/server/game/DataStores/DB2fmt.h b/src/server/game/DataStores/DB2fmt.h
index 6088ff82ec0..0ebf8d2063e 100644
--- a/src/server/game/DataStores/DB2fmt.h
+++ b/src/server/game/DataStores/DB2fmt.h
@@ -18,6 +18,7 @@
#ifndef TRINITY_DB2SFRM_H
#define TRINITY_DB2SFRM_H
+char const AchievementFormat[] = "niiissiiiiisiii";
char const AreaGroupFormat[] = "n";
char const AreaGroupMemberFormat[] = "nii";
char const AuctionHouseFormat[] = "niiis";
@@ -28,6 +29,8 @@ char const ChrClassesXPowerTypesFormat[] = "iii";
char const CinematicSequencesFormat[] = "niiiiiiiii";
char const CreatureDisplayInfoFormat[] = "niiiffissssiiiiiiiiiii";
char const CreatureTypeFormat[] = "nsi";
+char const CriteriaFormat[] = "niiiiiiiiiii";
+char const CriteriaTreeFormat[] = "niliiisi";
char const CurrencyTypesFormat[] = "nisssiiiiiis";
char const CurvePointFormat[] = "niiff";
char const DestructibleModelDataFormat[] = "niiiiiiiiiiiiiiiiiiiiiii";
@@ -72,6 +75,7 @@ char const ItemSpecOverrideFormat[] = "nii";
char const ItemXBonusTreeFormat[] = "nii";
char const KeyChainFormat[] = "nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
char const MailTemplateFormat[] = "ns";
+char const ModifierTreeFormat[] = "niiiiii";
char const MountCapabilityFormat[] = "niiiiiii";
char const MountFormat[] = "niiiisssii";
char const MountTypeXCapabilityFormat[] = "niii";
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index f576fc9d3b2..15174cc7f7a 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -26,8 +26,6 @@
#include <map>
-typedef std::map<uint16, uint32> AreaFlagByAreaID;
-typedef std::map<uint32, uint32> AreaFlagByMapID;
struct WMOAreaTableTripple
{
@@ -46,150 +44,141 @@ struct WMOAreaTableTripple
int32 adtId;
};
-typedef std::map<WMOAreaTableTripple, WMOAreaTableEntry const*> WMOAreaInfoByTripple;
+typedef std::map<uint16, uint32> AreaFlagByAreaID;
+typedef std::map<uint32, uint32> AreaFlagByMapID;
typedef std::multimap<uint32, CharSectionsEntry const*> CharSectionsMap;
+typedef std::map<uint32, std::vector<uint32>> FactionTeamMap;
+typedef std::map<WMOAreaTableTripple, WMOAreaTableEntry const*> WMOAreaInfoByTripple;
-DBCStorage <AreaTableEntry> sAreaStore(AreaTableEntryfmt);
-static AreaFlagByAreaID sAreaFlagByAreaID;
-static AreaFlagByMapID sAreaFlagByMapID; // for instances without generated *.map files
-
-static WMOAreaInfoByTripple sWMOAreaInfoByTripple;
-
-DBCStorage <AchievementEntry> sAchievementStore(Achievementfmt);
-DBCStorage <AnimKitEntry> sAnimKitStore(AnimKitfmt);
-DBCStorage <AreaTriggerEntry> sAreaTriggerStore(AreaTriggerEntryfmt);
-DBCStorage <ArmorLocationEntry> sArmorLocationStore(ArmorLocationfmt);
-DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt);
-DBCStorage <BannedAddOnsEntry> sBannedAddOnsStore(BannedAddOnsfmt);
-DBCStorage <BattlemasterListEntry> sBattlemasterListStore(BattlemasterListEntryfmt);
-DBCStorage <CharSectionsEntry> sCharSectionsStore(CharSectionsEntryfmt);
-CharSectionsMap sCharSectionMap;
-DBCStorage <CharTitlesEntry> sCharTitlesStore(CharTitlesEntryfmt);
-DBCStorage <ChatChannelsEntry> sChatChannelsStore(ChatChannelsEntryfmt);
-DBCStorage <ChrClassesEntry> sChrClassesStore(ChrClassesEntryfmt);
-DBCStorage <ChrRacesEntry> sChrRacesStore(ChrRacesEntryfmt);
-DBCStorage <ChrSpecializationEntry> sChrSpecializationStore(ChrSpecializationEntryfmt);
-ChrSpecializationByIndexArray sChrSpecializationByIndexStore;
-DBCStorage <CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore(CreatureDisplayInfoExtrafmt);
-DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt);
-DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore(CreatureModelDatafmt);
-DBCStorage <CriteriaEntry> sCriteriaStore(Criteriafmt);
-DBCStorage <CriteriaTreeEntry> sCriteriaTreeStore(CriteriaTreefmt);
-
-DBCStorage <DifficultyEntry> sDifficultyStore(DifficultyFmt);
-DBCStorage <DungeonEncounterEntry> sDungeonEncounterStore(DungeonEncounterfmt);
-DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore(DurabilityCostsfmt);
-
-DBCStorage <EmotesEntry> sEmotesStore(EmotesEntryfmt);
-DBCStorage <EmotesTextEntry> sEmotesTextStore(EmotesTextEntryfmt);
-
-typedef std::map<uint32, SimpleFactionsList> FactionTeamMap;
-static FactionTeamMap sFactionTeamMap;
-DBCStorage <FactionEntry> sFactionStore(FactionEntryfmt);
-DBCStorage <FactionTemplateEntry> sFactionTemplateStore(FactionTemplateEntryfmt);
-
-DBCStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt);
-DBCStorage <GemPropertiesEntry> sGemPropertiesStore(GemPropertiesEntryfmt);
-DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore(GlyphPropertiesfmt);
-
-GameTable <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore(GtBarberShopCostBasefmt);
-GameTable <GtCombatRatingsEntry> sGtCombatRatingsStore(GtCombatRatingsfmt);
-GameTable <GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt);
-GameTable <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore(GtChanceToMeleeCritfmt);
-GameTable <GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore(GtChanceToSpellCritBasefmt);
-GameTable <GtChanceToSpellCritEntry> sGtChanceToSpellCritStore(GtChanceToSpellCritfmt);
-GameTable <GtItemSocketCostPerLevelEntry> sGtItemSocketCostPerLevelStore(GtItemSocketCostPerLevelfmt);
-GameTable <GtNPCManaCostScalerEntry> sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt);
-GameTable <GtNpcTotalHpEntry> sGtNpcTotalHpStore(GtNpcTotalHpfmt);
-GameTable <GtNpcTotalHpExp1Entry> sGtNpcTotalHpExp1Store(GtNpcTotalHpExp1fmt);
-GameTable <GtNpcTotalHpExp2Entry> sGtNpcTotalHpExp2Store(GtNpcTotalHpExp2fmt);
-GameTable <GtNpcTotalHpExp3Entry> sGtNpcTotalHpExp3Store(GtNpcTotalHpExp3fmt);
-GameTable <GtNpcTotalHpExp4Entry> sGtNpcTotalHpExp4Store(GtNpcTotalHpExp4fmt);
-GameTable <GtNpcTotalHpExp5Entry> sGtNpcTotalHpExp5Store(GtNpcTotalHpExp5fmt);
-GameTable <GtOCTLevelExperienceEntry> sGtOCTLevelExperienceStore(GtOCTLevelExperiencefmt);
-GameTable <GtOCTRegenHPEntry> sGtOCTRegenHPStore(GtOCTRegenHPfmt);
-GameTable <gtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore(GtOCTHpPerStaminafmt);
-GameTable <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore(GtRegenMPPerSptfmt);
-GameTable <GtSpellScalingEntry> sGtSpellScalingStore(GtSpellScalingfmt);
-GameTable <GtOCTBaseHPByClassEntry> sGtOCTBaseHPByClassStore(GtOCTBaseHPByClassfmt);
-GameTable <GtOCTBaseMPByClassEntry> sGtOCTBaseMPByClassStore(GtOCTBaseMPByClassfmt);
-DBCStorage <GuildColorBackgroundEntry> sGuildColorBackgroundStore(GuildColorBackgroundfmt);
-DBCStorage <GuildColorBorderEntry> sGuildColorBorderStore(GuildColorBorderfmt);
-DBCStorage <GuildColorEmblemEntry> sGuildColorEmblemStore(GuildColorEmblemfmt);
-
-DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore(ItemArmorQualityfmt);
-DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore(ItemArmorShieldfmt);
-DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore(ItemArmorTotalfmt);
-DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore(ItemBagFamilyfmt);
-DBCStorage <ItemDamageEntry> sItemDamageAmmoStore(ItemDamagefmt);
-DBCStorage <ItemDamageEntry> sItemDamageOneHandStore(ItemDamagefmt);
-DBCStorage <ItemDamageEntry> sItemDamageOneHandCasterStore(ItemDamagefmt);
-DBCStorage <ItemDamageEntry> sItemDamageRangedStore(ItemDamagefmt);
-DBCStorage <ItemDamageEntry> sItemDamageThrownStore(ItemDamagefmt);
-DBCStorage <ItemDamageEntry> sItemDamageTwoHandStore(ItemDamagefmt);
-DBCStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore(ItemDamagefmt);
-DBCStorage <ItemDamageEntry> sItemDamageWandStore(ItemDamagefmt);
-DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt);
-DBCStorage <ItemSetSpellEntry> sItemSetSpellStore(ItemSetSpellEntryfmt);
-ItemSetSpellsStore sItemSetSpellsStore;
-
-DBCStorage <LFGDungeonEntry> sLFGDungeonStore(LFGDungeonEntryfmt);
-DBCStorage <LightEntry> sLightStore(LightEntryfmt);
-DBCStorage <LiquidTypeEntry> sLiquidTypeStore(LiquidTypefmt);
-DBCStorage <LockEntry> sLockStore(LockEntryfmt);
-
-DBCStorage <MapEntry> sMapStore(MapEntryfmt);
-
-// DBC used only for initialization sMapDifficultyMap at startup.
-DBCStorage <MapDifficultyEntry> sMapDifficultyStore(MapDifficultyEntryfmt); // only for loading
-MapDifficultyMap sMapDifficultyMap;
-
-DBCStorage <ModifierTreeEntry> sModifierTreeStore(ModifierTreefmt);
-DBCStorage <MovieEntry> sMovieStore(MovieEntryfmt);
-
-DBCStorage <PowerDisplayEntry> sPowerDisplayStore(PowerDisplayfmt);
-DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore(PvPDifficultyfmt);
-
-DBCStorage <QuestFactionRewEntry> sQuestFactionRewardStore(QuestFactionRewardfmt);
-DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore(RandomPropertiesPointsfmt);
-
-DBCStorage <SkillLineEntry> sSkillLineStore(SkillLinefmt);
-DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore(SkillLineAbilityfmt);
-DBCStorage <SkillRaceClassInfoEntry> sSkillRaceClassInfoStore(SkillRaceClassInfofmt);
-SkillRaceClassInfoMap SkillRaceClassInfoBySkill;
-
-DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore(SpellItemEnchantmentfmt);
-DBCStorage <SpellEntry> sSpellStore(SpellEntryfmt);
-DBCStorage <SpellEffectScalingEntry> sSpellEffectScalingStore(SpellEffectScalingfmt);
-
-SpellCategoryStore sSpellsByCategoryStore;
-PetFamilySpellsStore sPetFamilySpellsStore;
-SpellEffectScallingByEffectId sSpellEffectScallingByEffectId;
-
-DBCStorage <SpellScalingEntry> sSpellScalingStore(SpellScalingEntryfmt);
-DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore(SpellTargetRestrictionsEntryfmt);
-DBCStorage <SpellLevelsEntry> sSpellLevelsStore(SpellLevelsEntryfmt);
-DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore(SpellInterruptsEntryfmt);
-DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore(SpellEquippedItemsEntryfmt);
-DBCStorage <SpellCooldownsEntry> sSpellCooldownsStore(SpellCooldownsEntryfmt);
-DBCStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore(SpellAuraOptionsEntryfmt);
-DBCStorage <SpellCategoriesEntry> sSpellCategoriesStore(SpellCategoriesEntryfmt);
-DBCStorage <SpellCategoryEntry> sSpellCategoryStore(SpellCategoryfmt);
-DBCStorage <SpellEffectEntry> sSpellEffectStore(SpellEffectEntryfmt);
-DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore(SpellFocusObjectfmt);
-DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore(SpellShapeshiftEntryfmt);
-DBCStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore(SpellShapeshiftFormfmt);
-DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore(StableSlotPricesfmt);
-DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore(SummonPropertiesfmt);
-DBCStorage <TalentEntry> sTalentStore(TalentEntryfmt);
-TalentsByPosition sTalentByPos;
-
-DBCStorage <VehicleEntry> sVehicleStore(VehicleEntryfmt);
-DBCStorage <VehicleSeatEntry> sVehicleSeatStore(VehicleSeatEntryfmt);
-DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore(WMOAreaTableEntryfmt);
-DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore(WorldMapAreaEntryfmt);
-DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsEntryfmt);
-DBCStorage <PhaseEntry> sPhaseStore(PhaseEntryfmt);
+DBCStorage<AnimKitEntry> sAnimKitStore(AnimKitfmt);
+DBCStorage<AreaTableEntry> sAreaStore(AreaTablefmt);
+static AreaFlagByAreaID sAreaFlagByAreaID;
+static AreaFlagByMapID sAreaFlagByMapID; // for instances without generated *.map files
+DBCStorage<AreaTriggerEntry> sAreaTriggerStore(AreaTriggerfmt);
+DBCStorage<ArmorLocationEntry> sArmorLocationStore(ArmorLocationfmt);
+
+DBCStorage<BankBagSlotPricesEntry> sBankBagSlotPricesStore(BankBagSlotPricesfmt);
+DBCStorage<BannedAddOnsEntry> sBannedAddOnsStore(BannedAddOnsfmt);
+DBCStorage<BattlemasterListEntry> sBattlemasterListStore(BattlemasterListfmt);
+
+DBCStorage<CharSectionsEntry> sCharSectionsStore(CharSectionsfmt);
+CharSectionsMap sCharSectionMap;
+DBCStorage<CharTitlesEntry> sCharTitlesStore(CharTitlesfmt);
+DBCStorage<ChatChannelsEntry> sChatChannelsStore(ChatChannelsfmt);
+DBCStorage<ChrClassesEntry> sChrClassesStore(ChrClassesfmt);
+DBCStorage<ChrRacesEntry> sChrRacesStore(ChrRacesfmt);
+DBCStorage<ChrSpecializationEntry> sChrSpecializationStore(ChrSpecializationfmt);
+ChrSpecializationByIndexArray sChrSpecializationByIndexStore;
+DBCStorage<CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore(CreatureDisplayInfoExtrafmt);
+DBCStorage<CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt);
+DBCStorage<CreatureModelDataEntry> sCreatureModelDataStore(CreatureModelDatafmt);
+
+DBCStorage<DifficultyEntry> sDifficultyStore(DifficultyFmt);
+DBCStorage<DungeonEncounterEntry> sDungeonEncounterStore(DungeonEncounterfmt);
+DBCStorage<DurabilityCostsEntry> sDurabilityCostsStore(DurabilityCostsfmt);
+
+DBCStorage<EmotesEntry> sEmotesStore(Emotesfmt);
+DBCStorage<EmotesTextEntry> sEmotesTextStore(EmotesTextfmt);
+
+DBCStorage<FactionEntry> sFactionStore(Factionfmt);
+static FactionTeamMap sFactionTeamMap;
+DBCStorage<FactionTemplateEntry> sFactionTemplateStore(FactionTemplatefmt);
+
+DBCStorage<GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore(GameObjectDisplayInfofmt);
+DBCStorage<GemPropertiesEntry> sGemPropertiesStore(GemPropertiesfmt);
+DBCStorage<GlyphPropertiesEntry> sGlyphPropertiesStore(GlyphPropertiesfmt);
+DBCStorage<GuildColorBackgroundEntry> sGuildColorBackgroundStore(GuildColorBackgroundfmt);
+DBCStorage<GuildColorBorderEntry> sGuildColorBorderStore(GuildColorBorderfmt);
+DBCStorage<GuildColorEmblemEntry> sGuildColorEmblemStore(GuildColorEmblemfmt);
+DBCStorage<ItemArmorQualityEntry> sItemArmorQualityStore(ItemArmorQualityfmt);
+DBCStorage<ItemArmorShieldEntry> sItemArmorShieldStore(ItemArmorShieldfmt);
+DBCStorage<ItemArmorTotalEntry> sItemArmorTotalStore(ItemArmorTotalfmt);
+DBCStorage<ItemBagFamilyEntry> sItemBagFamilyStore(ItemBagFamilyfmt);
+DBCStorage<ItemDamageEntry> sItemDamageAmmoStore(ItemDamagefmt);
+DBCStorage<ItemDamageEntry> sItemDamageOneHandCasterStore(ItemDamagefmt);
+DBCStorage<ItemDamageEntry> sItemDamageOneHandStore(ItemDamagefmt);
+DBCStorage<ItemDamageEntry> sItemDamageRangedStore(ItemDamagefmt);
+DBCStorage<ItemDamageEntry> sItemDamageThrownStore(ItemDamagefmt);
+DBCStorage<ItemDamageEntry> sItemDamageTwoHandCasterStore(ItemDamagefmt);
+DBCStorage<ItemDamageEntry> sItemDamageTwoHandStore(ItemDamagefmt);
+DBCStorage<ItemDamageEntry> sItemDamageWandStore(ItemDamagefmt);
+DBCStorage<ItemSetEntry> sItemSetStore(ItemSetfmt);
+DBCStorage<ItemSetSpellEntry> sItemSetSpellStore(ItemSetSpellfmt);
+ItemSetSpellsStore sItemSetSpellsStore;
+
+DBCStorage<LFGDungeonEntry> sLFGDungeonStore(LFGDungeonfmt);
+DBCStorage<LightEntry> sLightStore(Lightfmt);
+DBCStorage<LiquidTypeEntry> sLiquidTypeStore(LiquidTypefmt);
+DBCStorage<LockEntry> sLockStore(Lockfmt);
+
+DBCStorage<MapEntry> sMapStore(Mapfmt);
+DBCStorage<MapDifficultyEntry> sMapDifficultyStore(MapDifficultyfmt); // only for loading
+MapDifficultyMap sMapDifficultyMap;
+DBCStorage<MovieEntry> sMovieStore(Moviefmt);
+
+DBCStorage<PhaseEntry> sPhaseStore(Phasefmt);
+DBCStorage<PowerDisplayEntry> sPowerDisplayStore(PowerDisplayfmt);
+DBCStorage<PvPDifficultyEntry> sPvpDifficultyStore(PvpDifficultyfmt);
+
+DBCStorage<QuestFactionRewEntry> sQuestFactionRewardStore(QuestFactionRewardfmt);
+
+DBCStorage<RandomPropertiesPointsEntry> sRandomPropertiesPointsStore(RandPropPointsfmt);
+
+DBCStorage<SkillLineAbilityEntry> sSkillLineAbilityStore(SkillLineAbilityfmt);
+DBCStorage<SkillLineEntry> sSkillLineStore(SkillLinefmt);
+DBCStorage<SkillRaceClassInfoEntry> sSkillRaceClassInfoStore(SkillRaceClassInfofmt);
+SkillRaceClassInfoMap SkillRaceClassInfoBySkill;
+DBCStorage<SpellAuraOptionsEntry> sSpellAuraOptionsStore(SpellAuraOptionsfmt);
+DBCStorage<SpellCategoriesEntry> sSpellCategoriesStore(SpellCategoriesfmt);
+SpellCategoryStore sSpellsByCategoryStore;
+DBCStorage<SpellCategoryEntry> sSpellCategoryStore(SpellCategoryfmt);
+DBCStorage<SpellCooldownsEntry> sSpellCooldownsStore(SpellCooldownsfmt);
+DBCStorage<SpellEffectEntry> sSpellEffectStore(SpellEffectfmt);
+DBCStorage<SpellEffectScalingEntry> sSpellEffectScalingStore(SpellEffectScalingfmt);
+SpellEffectScallingByEffectId sSpellEffectScallingByEffectId;
+DBCStorage<SpellEntry> sSpellStore(Spellfmt);
+DBCStorage<SpellEquippedItemsEntry> sSpellEquippedItemsStore(SpellEquippedItemsfmt);
+DBCStorage<SpellFocusObjectEntry> sSpellFocusObjectStore(SpellFocusObjectfmt);
+DBCStorage<SpellInterruptsEntry> sSpellInterruptsStore(SpellInterruptsfmt);
+DBCStorage<SpellItemEnchantmentEntry> sSpellItemEnchantmentStore(SpellItemEnchantmentfmt);
+DBCStorage<SpellLevelsEntry> sSpellLevelsStore(SpellLevelsfmt);
+DBCStorage<SpellScalingEntry> sSpellScalingStore(SpellScalingfmt);
+DBCStorage<SpellShapeshiftEntry> sSpellShapeshiftStore(SpellShapeshiftfmt);
+DBCStorage<SpellShapeshiftFormEntry> sSpellShapeshiftFormStore(SpellShapeshiftFormfmt);
+DBCStorage<SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore(SpellTargetRestrictionsfmt);
+DBCStorage<SummonPropertiesEntry> sSummonPropertiesStore(SummonPropertiesfmt);
+
+DBCStorage<TalentEntry> sTalentStore(Talentfmt);
+TalentsByPosition sTalentByPos;
+
+DBCStorage<VehicleEntry> sVehicleStore(Vehiclefmt);
+DBCStorage<VehicleSeatEntry> sVehicleSeatStore(VehicleSeatfmt);
+
+DBCStorage<WMOAreaTableEntry> sWMOAreaTableStore(WMOAreaTablefmt);
+static WMOAreaInfoByTripple sWMOAreaInfoByTripple;
+DBCStorage<WorldMapAreaEntry> sWorldMapAreaStore(WorldMapAreafmt);
+DBCStorage<WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsfmt);
+
+GameTable<GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore(GtBarberShopCostBasefmt);
+GameTable<GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt);
+GameTable<GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore(GtChanceToMeleeCritfmt);
+GameTable<GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore(GtChanceToSpellCritBasefmt);
+GameTable<GtChanceToSpellCritEntry> sGtChanceToSpellCritStore(GtChanceToSpellCritfmt);
+GameTable<GtCombatRatingsEntry> sGtCombatRatingsStore(GtCombatRatingsfmt);
+GameTable<GtItemSocketCostPerLevelEntry> sGtItemSocketCostPerLevelStore(GtItemSocketCostPerLevelfmt);
+GameTable<GtNPCManaCostScalerEntry> sGtNPCManaCostScalerStore(GtNPCManaCostScalerfmt);
+GameTable<GtNpcTotalHpEntry> sGtNpcTotalHpStore(GtNpcTotalHpfmt);
+GameTable<GtNpcTotalHpExp1Entry> sGtNpcTotalHpExp1Store(GtNpcTotalHpExp1fmt);
+GameTable<GtNpcTotalHpExp2Entry> sGtNpcTotalHpExp2Store(GtNpcTotalHpExp2fmt);
+GameTable<GtNpcTotalHpExp3Entry> sGtNpcTotalHpExp3Store(GtNpcTotalHpExp3fmt);
+GameTable<GtNpcTotalHpExp4Entry> sGtNpcTotalHpExp4Store(GtNpcTotalHpExp4fmt);
+GameTable<GtNpcTotalHpExp5Entry> sGtNpcTotalHpExp5Store(GtNpcTotalHpExp5fmt);
+GameTable<GtOCTBaseHPByClassEntry> sGtOCTBaseHPByClassStore(GtOCTBaseHPByClassfmt);
+GameTable<GtOCTBaseMPByClassEntry> sGtOCTBaseMPByClassStore(GtOCTBaseMPByClassfmt);
+GameTable<GtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore(GtOCTHpPerStaminafmt);
+GameTable<GtOCTLevelExperienceEntry> sGtOCTLevelExperienceStore(GtOCTLevelExperiencefmt);
+GameTable<GtRegenMPPerSptEntry> sGtRegenMPPerSptStore(GtRegenMPPerSptfmt);
+GameTable<GtSpellScalingEntry> sGtSpellScalingStore(GtSpellScalingfmt);
typedef std::list<std::string> StoreProblemList;
@@ -308,91 +297,87 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale)
#define LOAD_DBC(store, file) LoadDBC(availableDbcLocales, bad_dbc_files, store, dbcPath, file, defaultLocale)
- LOAD_DBC(sAchievementStore, "Achievement.dbc"/*, &CustomAchievementfmt, &CustomAchievementIndex*/);//20201
- LOAD_DBC(sAnimKitStore, "AnimKit.dbc");//20201
- LOAD_DBC(sAreaStore, "AreaTable.dbc");//20201
- LOAD_DBC(sAreaTriggerStore, "AreaTrigger.dbc");//20201
- LOAD_DBC(sArmorLocationStore, "ArmorLocation.dbc");//20201
- LOAD_DBC(sBankBagSlotPricesStore, "BankBagSlotPrices.dbc");//20201
- LOAD_DBC(sBannedAddOnsStore, "BannedAddOns.dbc");//20201
- LOAD_DBC(sBattlemasterListStore, "BattlemasterList.dbc");//20201
- LOAD_DBC(sCharSectionsStore, "CharSections.dbc");//20201
- LOAD_DBC(sCharTitlesStore, "CharTitles.dbc");//20201
- LOAD_DBC(sChatChannelsStore, "ChatChannels.dbc");//20201
- LOAD_DBC(sChrClassesStore, "ChrClasses.dbc");//20201
- LOAD_DBC(sChrRacesStore, "ChrRaces.dbc");//20201
- LOAD_DBC(sChrSpecializationStore, "ChrSpecialization.dbc");//20201
- LOAD_DBC(sCreatureDisplayInfoExtraStore, "CreatureDisplayInfoExtra.dbc");//20201
- LOAD_DBC(sCreatureFamilyStore, "CreatureFamily.dbc");//20201
- LOAD_DBC(sCreatureModelDataStore, "CreatureModelData.dbc");//20201
- LOAD_DBC(sCriteriaStore, "Criteria.dbc");//20201
- LOAD_DBC(sCriteriaTreeStore, "CriteriaTree.dbc");//20201
- LOAD_DBC(sDifficultyStore, "Difficulty.dbc");//20201
- LOAD_DBC(sDungeonEncounterStore, "DungeonEncounter.dbc");//20201
- LOAD_DBC(sDurabilityCostsStore, "DurabilityCosts.dbc");//20201
- LOAD_DBC(sEmotesStore, "Emotes.dbc");//20201
- LOAD_DBC(sEmotesTextStore, "EmotesText.dbc");//20201
- LOAD_DBC(sFactionStore, "Faction.dbc");//20201
- LOAD_DBC(sFactionTemplateStore, "FactionTemplate.dbc");//20201
- LOAD_DBC(sGameObjectDisplayInfoStore, "GameObjectDisplayInfo.dbc");//20201
- LOAD_DBC(sGemPropertiesStore, "GemProperties.dbc");//20201
- LOAD_DBC(sGlyphPropertiesStore, "GlyphProperties.dbc");//20201
- LOAD_DBC(sGuildColorBackgroundStore, "GuildColorBackground.dbc");//20201
- LOAD_DBC(sGuildColorBorderStore, "GuildColorBorder.dbc"); //20201
- LOAD_DBC(sGuildColorEmblemStore, "GuildColorEmblem.dbc");//20201
- LOAD_DBC(sItemArmorQualityStore, "ItemArmorQuality.dbc");//20201
- LOAD_DBC(sItemArmorShieldStore, "ItemArmorShield.dbc");//20201
- LOAD_DBC(sItemArmorTotalStore, "ItemArmorTotal.dbc");//20201
- LOAD_DBC(sItemBagFamilyStore, "ItemBagFamily.dbc");//20201
- LOAD_DBC(sItemDamageAmmoStore, "ItemDamageAmmo.dbc");//20201
- LOAD_DBC(sItemDamageOneHandCasterStore, "ItemDamageOneHandCaster.dbc");//20201
- LOAD_DBC(sItemDamageOneHandStore, "ItemDamageOneHand.dbc");//20201
- LOAD_DBC(sItemDamageRangedStore, "ItemDamageRanged.dbc");//20201
- LOAD_DBC(sItemDamageThrownStore, "ItemDamageThrown.dbc");//20201
- LOAD_DBC(sItemDamageTwoHandCasterStore, "ItemDamageTwoHandCaster.dbc");//20201
- LOAD_DBC(sItemDamageTwoHandStore, "ItemDamageTwoHand.dbc");//20201
- LOAD_DBC(sItemDamageWandStore, "ItemDamageWand.dbc");//20201
- LOAD_DBC(sItemSetSpellStore, "ItemSetSpell.dbc");//20201
- LOAD_DBC(sItemSetStore, "ItemSet.dbc");//20201
- LOAD_DBC(sLFGDungeonStore, "LfgDungeons.dbc");//20201
- LOAD_DBC(sLightStore, "Light.dbc"); //20201
- LOAD_DBC(sLiquidTypeStore, "LiquidType.dbc");//20201
- LOAD_DBC(sLockStore, "Lock.dbc");//20201
- LOAD_DBC(sMapDifficultyStore, "MapDifficulty.dbc");//20201
- LOAD_DBC(sMapStore, "Map.dbc");//20201
- LOAD_DBC(sModifierTreeStore, "ModifierTree.dbc");//20201
- LOAD_DBC(sMovieStore, "Movie.dbc");//20201
- LOAD_DBC(sPhaseStore, "Phase.dbc"); // 20201
- LOAD_DBC(sPowerDisplayStore, "PowerDisplay.dbc");//20201
- LOAD_DBC(sPvPDifficultyStore, "PvpDifficulty.dbc");//20201
- LOAD_DBC(sQuestFactionRewardStore, "QuestFactionReward.dbc");//20201
- LOAD_DBC(sRandomPropertiesPointsStore, "RandPropPoints.dbc");//20201
- LOAD_DBC(sSkillLineAbilityStore, "SkillLineAbility.dbc");//20201
- LOAD_DBC(sSkillLineStore, "SkillLine.dbc");//20201
- LOAD_DBC(sSkillRaceClassInfoStore, "SkillRaceClassInfo.dbc");//20201
- LOAD_DBC(sSpellAuraOptionsStore, "SpellAuraOptions.dbc");//20201
- LOAD_DBC(sSpellCategoriesStore, "SpellCategories.dbc");//20201
- LOAD_DBC(sSpellCategoryStore, "SpellCategory.dbc");//20201
- LOAD_DBC(sSpellCooldownsStore, "SpellCooldowns.dbc");//20201
- LOAD_DBC(sSpellEffectScalingStore, "SpellEffectScaling.dbc");//20201
- LOAD_DBC(sSpellEffectStore, "SpellEffect.dbc"/*, &CustomSpellEffectEntryfmt, &CustomSpellEffectEntryIndex*/);//20201
- LOAD_DBC(sSpellEquippedItemsStore, "SpellEquippedItems.dbc");//20201
- LOAD_DBC(sSpellFocusObjectStore, "SpellFocusObject.dbc");//20201
- LOAD_DBC(sSpellInterruptsStore, "SpellInterrupts.dbc");//20201
- LOAD_DBC(sSpellItemEnchantmentStore, "SpellItemEnchantment.dbc");//20201
- LOAD_DBC(sSpellLevelsStore, "SpellLevels.dbc");//20201
- LOAD_DBC(sSpellScalingStore, "SpellScaling.dbc");//20201
- LOAD_DBC(sSpellShapeshiftFormStore, "SpellShapeshiftForm.dbc");//20201
- LOAD_DBC(sSpellShapeshiftStore, "SpellShapeshift.dbc");//20201
- LOAD_DBC(sSpellStore, "Spell.dbc"/*, &CustomSpellEntryfmt, &CustomSpellEntryIndex*/);//20201
- LOAD_DBC(sSpellTargetRestrictionsStore, "SpellTargetRestrictions.dbc");//20201
- LOAD_DBC(sSummonPropertiesStore, "SummonProperties.dbc");//20201
- LOAD_DBC(sTalentStore, "Talent.dbc");//20201
- LOAD_DBC(sVehicleSeatStore, "VehicleSeat.dbc");//20201
- LOAD_DBC(sVehicleStore, "Vehicle.dbc");//20201
- LOAD_DBC(sWMOAreaTableStore, "WMOAreaTable.dbc");//20201
- LOAD_DBC(sWorldMapAreaStore, "WorldMapArea.dbc");//20201
- LOAD_DBC(sWorldSafeLocsStore, "WorldSafeLocs.dbc"); // 20201
+ LOAD_DBC(sAnimKitStore, "AnimKit.dbc");//20444
+ LOAD_DBC(sAreaStore, "AreaTable.dbc");//20444
+ LOAD_DBC(sAreaTriggerStore, "AreaTrigger.dbc");//20444
+ LOAD_DBC(sArmorLocationStore, "ArmorLocation.dbc");//20444
+ LOAD_DBC(sBankBagSlotPricesStore, "BankBagSlotPrices.dbc");//20444
+ LOAD_DBC(sBannedAddOnsStore, "BannedAddOns.dbc");//20444
+ LOAD_DBC(sBattlemasterListStore, "BattlemasterList.dbc");//20444
+ LOAD_DBC(sCharSectionsStore, "CharSections.dbc");//20444
+ LOAD_DBC(sCharTitlesStore, "CharTitles.dbc");//20444
+ LOAD_DBC(sChatChannelsStore, "ChatChannels.dbc");//20444
+ LOAD_DBC(sChrClassesStore, "ChrClasses.dbc");//20444
+ LOAD_DBC(sChrRacesStore, "ChrRaces.dbc");//20444
+ LOAD_DBC(sChrSpecializationStore, "ChrSpecialization.dbc");//20444
+ LOAD_DBC(sCreatureDisplayInfoExtraStore, "CreatureDisplayInfoExtra.dbc");//20444
+ LOAD_DBC(sCreatureFamilyStore, "CreatureFamily.dbc");//20444
+ LOAD_DBC(sCreatureModelDataStore, "CreatureModelData.dbc");//20444
+ LOAD_DBC(sDifficultyStore, "Difficulty.dbc");//20444
+ LOAD_DBC(sDungeonEncounterStore, "DungeonEncounter.dbc");//20444
+ LOAD_DBC(sDurabilityCostsStore, "DurabilityCosts.dbc");//20444
+ LOAD_DBC(sEmotesStore, "Emotes.dbc");//20444
+ LOAD_DBC(sEmotesTextStore, "EmotesText.dbc");//20444
+ LOAD_DBC(sFactionStore, "Faction.dbc");//20444
+ LOAD_DBC(sFactionTemplateStore, "FactionTemplate.dbc");//20444
+ LOAD_DBC(sGameObjectDisplayInfoStore, "GameObjectDisplayInfo.dbc");//20444
+ LOAD_DBC(sGemPropertiesStore, "GemProperties.dbc");//20444
+ LOAD_DBC(sGlyphPropertiesStore, "GlyphProperties.dbc");//20444
+ LOAD_DBC(sGuildColorBackgroundStore, "GuildColorBackground.dbc");//20444
+ LOAD_DBC(sGuildColorBorderStore, "GuildColorBorder.dbc"); //20444
+ LOAD_DBC(sGuildColorEmblemStore, "GuildColorEmblem.dbc");//20444
+ LOAD_DBC(sItemArmorQualityStore, "ItemArmorQuality.dbc");//20444
+ LOAD_DBC(sItemArmorShieldStore, "ItemArmorShield.dbc");//20444
+ LOAD_DBC(sItemArmorTotalStore, "ItemArmorTotal.dbc");//20444
+ LOAD_DBC(sItemBagFamilyStore, "ItemBagFamily.dbc");//20444
+ LOAD_DBC(sItemDamageAmmoStore, "ItemDamageAmmo.dbc");//20444
+ LOAD_DBC(sItemDamageOneHandCasterStore, "ItemDamageOneHandCaster.dbc");//20444
+ LOAD_DBC(sItemDamageOneHandStore, "ItemDamageOneHand.dbc");//20444
+ LOAD_DBC(sItemDamageRangedStore, "ItemDamageRanged.dbc");//20444
+ LOAD_DBC(sItemDamageThrownStore, "ItemDamageThrown.dbc");//20444
+ LOAD_DBC(sItemDamageTwoHandCasterStore, "ItemDamageTwoHandCaster.dbc");//20444
+ LOAD_DBC(sItemDamageTwoHandStore, "ItemDamageTwoHand.dbc");//20444
+ LOAD_DBC(sItemDamageWandStore, "ItemDamageWand.dbc");//20444
+ LOAD_DBC(sItemSetSpellStore, "ItemSetSpell.dbc");//20444
+ LOAD_DBC(sItemSetStore, "ItemSet.dbc");//20444
+ LOAD_DBC(sLFGDungeonStore, "LfgDungeons.dbc");//20444
+ LOAD_DBC(sLightStore, "Light.dbc"); //20444
+ LOAD_DBC(sLiquidTypeStore, "LiquidType.dbc");//20444
+ LOAD_DBC(sLockStore, "Lock.dbc");//20444
+ LOAD_DBC(sMapDifficultyStore, "MapDifficulty.dbc");//20444
+ LOAD_DBC(sMapStore, "Map.dbc");//20444
+ LOAD_DBC(sMovieStore, "Movie.dbc");//20444
+ LOAD_DBC(sPhaseStore, "Phase.dbc"); // 20444
+ LOAD_DBC(sPowerDisplayStore, "PowerDisplay.dbc");//20444
+ LOAD_DBC(sPvpDifficultyStore, "PvpDifficulty.dbc");//20444
+ LOAD_DBC(sQuestFactionRewardStore, "QuestFactionReward.dbc");//20444
+ LOAD_DBC(sRandomPropertiesPointsStore, "RandPropPoints.dbc");//20444
+ LOAD_DBC(sSkillLineAbilityStore, "SkillLineAbility.dbc");//20444
+ LOAD_DBC(sSkillLineStore, "SkillLine.dbc");//20444
+ LOAD_DBC(sSkillRaceClassInfoStore, "SkillRaceClassInfo.dbc");//20444
+ LOAD_DBC(sSpellAuraOptionsStore, "SpellAuraOptions.dbc");//20444
+ LOAD_DBC(sSpellCategoriesStore, "SpellCategories.dbc");//20444
+ LOAD_DBC(sSpellCategoryStore, "SpellCategory.dbc");//20444
+ LOAD_DBC(sSpellCooldownsStore, "SpellCooldowns.dbc");//20444
+ LOAD_DBC(sSpellEffectScalingStore, "SpellEffectScaling.dbc");//20444
+ LOAD_DBC(sSpellEffectStore, "SpellEffect.dbc"/*, &CustomSpellEffectfmt, &CustomSpellEffectEntryIndex*/);//20444
+ LOAD_DBC(sSpellEquippedItemsStore, "SpellEquippedItems.dbc");//20444
+ LOAD_DBC(sSpellFocusObjectStore, "SpellFocusObject.dbc");//20444
+ LOAD_DBC(sSpellInterruptsStore, "SpellInterrupts.dbc");//20444
+ LOAD_DBC(sSpellItemEnchantmentStore, "SpellItemEnchantment.dbc");//20444
+ LOAD_DBC(sSpellLevelsStore, "SpellLevels.dbc");//20444
+ LOAD_DBC(sSpellScalingStore, "SpellScaling.dbc");//20444
+ LOAD_DBC(sSpellShapeshiftFormStore, "SpellShapeshiftForm.dbc");//20444
+ LOAD_DBC(sSpellShapeshiftStore, "SpellShapeshift.dbc");//20444
+ LOAD_DBC(sSpellStore, "Spell.dbc"/*, &CustomSpellfmt, &CustomSpellEntryIndex*/);//20444
+ LOAD_DBC(sSpellTargetRestrictionsStore, "SpellTargetRestrictions.dbc");//20444
+ LOAD_DBC(sSummonPropertiesStore, "SummonProperties.dbc");//20444
+ LOAD_DBC(sTalentStore, "Talent.dbc");//20444
+ LOAD_DBC(sVehicleSeatStore, "VehicleSeat.dbc");//20444
+ LOAD_DBC(sVehicleStore, "Vehicle.dbc");//20444
+ LOAD_DBC(sWMOAreaTableStore, "WMOAreaTable.dbc");//20444
+ LOAD_DBC(sWorldMapAreaStore, "WorldMapArea.dbc");//20444
+ LOAD_DBC(sWorldSafeLocsStore, "WorldSafeLocs.dbc"); // 20444
#undef LOAD_DBC
@@ -425,7 +410,7 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale)
FactionEntry const* faction = sFactionStore.LookupEntry(i);
if (faction && faction->ParentFactionID)
{
- SimpleFactionsList &flist = sFactionTeamMap[faction->ParentFactionID];
+ std::vector<uint32> &flist = sFactionTeamMap[faction->ParentFactionID];
flist.push_back(i);
}
}
@@ -452,8 +437,8 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale)
sMapDifficultyMap[entry->MapID][entry->DifficultyID] = entry;
sMapDifficultyMap[0][0] = sMapDifficultyMap[1][0]; //map 0 is missing from MapDifficulty.dbc use this till its ported to sql
- for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
- if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
+ for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i)
+ if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i))
if (entry->BracketID > MAX_BATTLEGROUND_BRACKETS)
ASSERT(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
@@ -514,11 +499,11 @@ void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale)
}
// Check loaded DBC files proper version
- if (!sAreaStore.LookupEntry(6420) || // last area (areaflag) added in 6.2.0 (20216)
- !sCharTitlesStore.LookupEntry(457) || // last char title added in 6.2.0 (20216)
- !sGemPropertiesStore.LookupEntry(2544) || // last gem property added in 6.2.0 (20216)
- !sMapStore.LookupEntry(1497) || // last map added in 6.2.0 (20216)
- !sSpellStore.LookupEntry(191981) ) // last spell added in 6.2.0 (20216)
+ if (!sAreaStore.LookupEntry(6565) || // last area (areaflag) added in 6.2.2 (20444)
+ !sCharTitlesStore.LookupEntry(457) || // last char title added in 6.2.2 (20444)
+ !sGemPropertiesStore.LookupEntry(2544) || // last gem property added in 6.2.2 (20444)
+ !sMapStore.LookupEntry(1497) || // last map added in 6.2.2 (20444)
+ !sSpellStore.LookupEntry(197204) ) // last spell added in 6.2.2 (20444)
{
TC_LOG_ERROR("misc", "You have _outdated_ DBC files. Please extract correct versions from current using client.");
exit(1);
@@ -537,26 +522,26 @@ void LoadGameTables(const std::string& dataPath, uint32 defaultLocale)
#define LOAD_GT(tableName, store, file) LoadGameTable(bad_dbc_files, tableName, store, dbcPath, file)
- LOAD_GT("BarberShopCostBase", sGtBarberShopCostBaseStore, "gtBarberShopCostBase.dbc"); // 19342
- LOAD_GT("CombatRatings", sGtCombatRatingsStore, "gtCombatRatings.dbc"); // 19342
- LOAD_GT("ChanceToMeleeCritBase", sGtChanceToMeleeCritBaseStore, "gtChanceToMeleeCritBase.dbc"); // 19342
- LOAD_GT("ChanceToMeleeCrit", sGtChanceToMeleeCritStore, "gtChanceToMeleeCrit.dbc"); // 19342
- LOAD_GT("ChanceToSpellCritBase", sGtChanceToSpellCritBaseStore, "gtChanceToSpellCritBase.dbc"); // 19342
- LOAD_GT("ChanceToSpellCrit", sGtChanceToSpellCritStore, "gtChanceToSpellCrit.dbc"); // 19342
- LOAD_GT("ItemSocketCostPerLevel", sGtItemSocketCostPerLevelStore, "gtItemSocketCostPerLevel.dbc"); // 19342
- LOAD_GT("NPCManaCostScaler", sGtNPCManaCostScalerStore, "gtNPCManaCostScaler.dbc"); // 19342
- LOAD_GT("NpcTotalHp", sGtNpcTotalHpStore, "gtNpcTotalHp.dbc"); // 19445
- LOAD_GT("NpcTotalHpExp1", sGtNpcTotalHpExp1Store, "gtNpcTotalHpExp1.dbc"); // 19445
- LOAD_GT("NpcTotalHpExp2", sGtNpcTotalHpExp2Store, "gtNpcTotalHpExp2.dbc"); // 19445
- LOAD_GT("NpcTotalHpExp3", sGtNpcTotalHpExp3Store, "gtNpcTotalHpExp3.dbc"); // 19445
- LOAD_GT("NpcTotalHpExp4", sGtNpcTotalHpExp4Store, "gtNpcTotalHpExp4.dbc"); // 19445
- LOAD_GT("NpcTotalHpExp5", sGtNpcTotalHpExp5Store, "gtNpcTotalHpExp5.dbc"); // 19445
- LOAD_GT("OCTHPPerStamina", sGtOCTHpPerStaminaStore, "gtOCTHpPerStamina.dbc"); // 19342
- LOAD_GT("OCTLevelExperience", sGtOCTLevelExperienceStore, "gtOCTLevelExperience.dbc"); // 19342
- LOAD_GT("RegenMPPerSpt", sGtRegenMPPerSptStore, "gtRegenMPPerSpt.dbc"); // 19342
- LOAD_GT("SpellScaling", sGtSpellScalingStore, "gtSpellScaling.dbc"); // 19342
- LOAD_GT("OCTBaseHPByClass", sGtOCTBaseHPByClassStore, "gtOCTBaseHPByClass.dbc"); // 19342
- LOAD_GT("OCTBaseMPByClass", sGtOCTBaseMPByClassStore, "gtOCTBaseMPByClass.dbc"); // 19342
+ LOAD_GT("BarberShopCostBase", sGtBarberShopCostBaseStore, "gtBarberShopCostBase.dbc"); // 20444
+ LOAD_GT("CombatRatings", sGtCombatRatingsStore, "gtCombatRatings.dbc"); // 20444
+ LOAD_GT("ChanceToMeleeCritBase", sGtChanceToMeleeCritBaseStore, "gtChanceToMeleeCritBase.dbc"); // 20444
+ LOAD_GT("ChanceToMeleeCrit", sGtChanceToMeleeCritStore, "gtChanceToMeleeCrit.dbc"); // 20444
+ LOAD_GT("ChanceToSpellCritBase", sGtChanceToSpellCritBaseStore, "gtChanceToSpellCritBase.dbc"); // 20444
+ LOAD_GT("ChanceToSpellCrit", sGtChanceToSpellCritStore, "gtChanceToSpellCrit.dbc"); // 20444
+ LOAD_GT("ItemSocketCostPerLevel", sGtItemSocketCostPerLevelStore, "gtItemSocketCostPerLevel.dbc"); // 20444
+ LOAD_GT("NPCManaCostScaler", sGtNPCManaCostScalerStore, "gtNPCManaCostScaler.dbc"); // 20444
+ LOAD_GT("NpcTotalHp", sGtNpcTotalHpStore, "gtNpcTotalHp.dbc"); // 20444
+ LOAD_GT("NpcTotalHpExp1", sGtNpcTotalHpExp1Store, "gtNpcTotalHpExp1.dbc"); // 20444
+ LOAD_GT("NpcTotalHpExp2", sGtNpcTotalHpExp2Store, "gtNpcTotalHpExp2.dbc"); // 20444
+ LOAD_GT("NpcTotalHpExp3", sGtNpcTotalHpExp3Store, "gtNpcTotalHpExp3.dbc"); // 20444
+ LOAD_GT("NpcTotalHpExp4", sGtNpcTotalHpExp4Store, "gtNpcTotalHpExp4.dbc"); // 20444
+ LOAD_GT("NpcTotalHpExp5", sGtNpcTotalHpExp5Store, "gtNpcTotalHpExp5.dbc"); // 20444
+ LOAD_GT("OCTHPPerStamina", sGtOCTHpPerStaminaStore, "gtOCTHpPerStamina.dbc"); // 20444
+ LOAD_GT("OCTLevelExperience", sGtOCTLevelExperienceStore, "gtOCTLevelExperience.dbc"); // 20444
+ LOAD_GT("RegenMPPerSpt", sGtRegenMPPerSptStore, "gtRegenMPPerSpt.dbc"); // 20444
+ LOAD_GT("SpellScaling", sGtSpellScalingStore, "gtSpellScaling.dbc"); // 20444
+ LOAD_GT("OCTBaseHPByClass", sGtOCTBaseHPByClassStore, "gtOCTBaseHPByClass.dbc"); // 20444
+ LOAD_GT("OCTBaseMPByClass", sGtOCTBaseMPByClassStore, "gtOCTBaseMPByClass.dbc"); // 20444
#undef LOAD_GT
@@ -579,7 +564,7 @@ void LoadGameTables(const std::string& dataPath, uint32 defaultLocale)
TC_LOG_INFO("server.loading", ">> Initialized %d DBC GameTables data stores in %u ms", GameTableCount, GetMSTimeDiffToNow(oldMSTime));
}
-SimpleFactionsList const* GetFactionTeamList(uint32 faction)
+std::vector<uint32> const* GetFactionTeamList(uint32 faction)
{
FactionTeamMap::const_iterator itr = sFactionTeamMap.find(faction);
if (itr != sFactionTeamMap.end())
@@ -588,13 +573,15 @@ SimpleFactionsList const* GetFactionTeamList(uint32 faction)
return NULL;
}
-char const* GetPetName(uint32 petfamily, uint32 /*dbclang*/)
+char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 /*locale*/)
{
if (!petfamily)
- return NULL;
+ return nullptr;
+
CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(petfamily);
if (!pet_family)
- return NULL;
+ return nullptr;
+
return pet_family->Name_lang ? pet_family->Name_lang : NULL;
}
@@ -671,17 +658,17 @@ uint32 GetMaxLevelForExpansion(uint32 expansion)
{
switch (expansion)
{
- case CONTENT_1_60:
+ case EXPANSION_CLASSIC:
return 60;
- case CONTENT_61_70:
+ case EXPANSION_THE_BURNING_CRUSADE:
return 70;
- case CONTENT_71_80:
+ case EXPANSION_WRATH_OF_THE_LICH_KING:
return 80;
- case CONTENT_81_85:
+ case EXPANSION_CATACLYSM:
return 85;
- case CONTENT_86_90:
+ case EXPANSION_MISTS_OF_PANDARIA:
return 90;
- case CONTENT_91_100:
+ case EXPANSION_WARLORDS_OF_DRAENOR:
return 100;
default:
break;
@@ -725,9 +712,9 @@ bool IsTotemCategoryCompatibleWith(uint32 itemTotemCategoryId, uint32 requiredTo
return (itemEntry->CategoryMask & reqEntry->CategoryMask) == reqEntry->CategoryMask;
}
-void Zone2MapCoordinates(float& x, float& y, uint32 zone)
+void Zone2MapCoordinates(float& x, float& y, uint32 worldMapAreaId)
{
- WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(zone);
+ WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(worldMapAreaId);
// if not listed then map coordinates (instance)
if (!maEntry)
@@ -738,9 +725,9 @@ void Zone2MapCoordinates(float& x, float& y, uint32 zone)
y = y*((maEntry->LocRight-maEntry->LocLeft)/100)+maEntry->LocLeft; // client y coord from top to down
}
-void Map2ZoneCoordinates(float& x, float& y, uint32 zone)
+void Map2ZoneCoordinates(float& x, float& y, uint32 worldMapAreaId)
{
- WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(zone);
+ WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(worldMapAreaId);
// if not listed then map coordinates (instance)
if (!maEntry)
@@ -820,9 +807,9 @@ MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficult
PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level)
{
PvPDifficultyEntry const* maxEntry = NULL; // used for level > max listed level case
- for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
+ for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i)
{
- if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
+ if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i))
{
// skip unrelated and too-high brackets
if (entry->MapID != mapid || entry->MinLevel > level)
@@ -843,8 +830,8 @@ PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 lev
PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id)
{
- for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
- if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
+ for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i)
+ if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i))
if (entry->MapID == mapid && entry->GetBracketId() == id)
return entry;
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index b394bc9eb33..bb4151979f4 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -24,67 +24,78 @@
#include "DB2Structure.h"
#include "SharedDefines.h"
-typedef std::list<uint32> SimpleFactionsList;
-SimpleFactionsList const* GetFactionTeamList(uint32 faction);
-
-char const* GetPetName(uint32 petfamily, uint32 dbclang);
-
+// AreaTable
int32 GetAreaFlagByAreaID(uint32 area_id); // -1 if not found
AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id);
uint32 GetAreaFlagByMapId(uint32 mapid);
-char const* GetRaceName(uint8 race, uint8 locale);
+// CharSections
+CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color);
+
+// ChrClasses
char const* GetClassName(uint8 class_, uint8 locale);
-WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid);
+// ChrRaces
+char const* GetRaceName(uint8 race, uint8 locale);
-uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId);
+// ChrSpecialization
+typedef ChrSpecializationEntry const* ChrSpecializationByIndexArray[MAX_CLASSES][MAX_SPECIALIZATIONS];
-enum ContentLevels
-{
- CONTENT_1_60 = 0,
- CONTENT_61_70 = 1,
- CONTENT_71_80 = 2,
- CONTENT_81_85 = 3,
- CONTENT_86_90 = 4,
- CONTENT_91_100 = 5,
- MAX_CONTENT
-};
+// CreatureFamilty
+char const* GetCreatureFamilyPetName(uint32 petfamily, uint32 locale);
-uint32 GetMaxLevelForExpansion(uint32 expansion);
-uint32 GetExpansionForLevel(uint32 level);
+// Faction
+std::vector<uint32> const* GetFactionTeamList(uint32 faction);
-ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId);
+// ItemSetSpells
+typedef std::vector<ItemSetSpellEntry const*> ItemSetSpells;
+typedef std::unordered_map<uint32, ItemSetSpells> ItemSetSpellsStore;
-bool IsTotemCategoryCompatibleWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId);
+// LfgDungeons
+LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty);
-void Zone2MapCoordinates(float &x, float &y, uint32 zone);
-void Map2ZoneCoordinates(float &x, float &y, uint32 zone);
+// Light
+uint32 GetDefaultMapLight(uint32 mapId);
+
+// LiquidType
+uint32 GetLiquidFlags(uint32 liquidType);
+// MapDifficulty
typedef std::unordered_map<uint32, std::unordered_map<uint32, MapDifficultyEntry const*>> MapDifficultyMap;
MapDifficultyEntry const* GetDefaultMapDifficulty(uint32 mapId, Difficulty* difficulty = nullptr);
MapDifficultyEntry const* GetMapDifficultyData(uint32 mapId, Difficulty difficulty);
MapDifficultyEntry const* GetDownscaledMapDifficultyData(uint32 mapId, Difficulty &difficulty);
-uint32 GetLiquidFlags(uint32 liquidType);
-
+// PvpDifficulty
PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level);
PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id);
-CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color);
-
-LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty);
-
-uint32 GetDefaultMapLight(uint32 mapId);
-
+// SkillRaceClassInfo
typedef std::unordered_multimap<uint32, SkillRaceClassInfoEntry const*> SkillRaceClassInfoMap;
typedef std::pair<SkillRaceClassInfoMap::iterator, SkillRaceClassInfoMap::iterator> SkillRaceClassInfoBounds;
SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_);
-typedef ChrSpecializationEntry const* ChrSpecializationByIndexArray[MAX_CLASSES][MAX_SPECIALIZATIONS];
+// SpellEffectScaling
+typedef std::unordered_map<uint32, uint32> SpellEffectScallingByEffectId;
+
+// Talent
typedef std::vector<TalentEntry const*> TalentsByPosition[MAX_CLASSES][MAX_TALENT_TIERS][MAX_TALENT_COLUMNS];
-extern TalentsByPosition sTalentByPos;
+
+// TotemCategory
+bool IsTotemCategoryCompatibleWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId);
+
+// WMOAreaTable
+WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid);
+
+// WorldMapArea
+uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId);
+void Zone2MapCoordinates(float &x, float &y, uint32 worldMapAreaId);
+void Map2ZoneCoordinates(float &x, float &y, uint32 worldMapAreaId);
+
+
+uint32 GetMaxLevelForExpansion(uint32 expansion);
+uint32 GetExpansionForLevel(uint32 level);
template<class T>
class GameTable
@@ -114,117 +125,110 @@ private:
GameTablesEntry const* _gtEntry;
};
-extern DBCStorage <AchievementEntry> sAchievementStore;
-extern DBCStorage <AnimKitEntry> sAnimKitStore;
-extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions
-extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore;
-extern DBCStorage <ArmorLocationEntry> sArmorLocationStore;
-extern DBCStorage <BankBagSlotPricesEntry> sBankBagSlotPricesStore;
-extern DBCStorage <BannedAddOnsEntry> sBannedAddOnsStore;
-extern DBCStorage <BattlemasterListEntry> sBattlemasterListStore;
-extern DBCStorage <ChatChannelsEntry> sChatChannelsStore;
-extern DBCStorage <CharSectionsEntry> sCharSectionsStore;
-extern DBCStorage <CharTitlesEntry> sCharTitlesStore;
-extern DBCStorage <ChrClassesEntry> sChrClassesStore;
-extern DBCStorage <ChrRacesEntry> sChrRacesStore;
-extern DBCStorage <ChrSpecializationEntry> sChrSpecializationStore;
-extern ChrSpecializationByIndexArray sChrSpecializationByIndexStore;
-extern DBCStorage <CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore;
-extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
-extern DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore;
-extern DBCStorage <CriteriaEntry> sCriteriaStore;
-extern DBCStorage <CriteriaTreeEntry> sCriteriaTreeStore;
-extern DBCStorage <DifficultyEntry> sDifficultyStore;
-extern DBCStorage <DungeonEncounterEntry> sDungeonEncounterStore;
-extern DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore;
-extern DBCStorage <EmotesEntry> sEmotesStore;
-extern DBCStorage <EmotesTextEntry> sEmotesTextStore;
-extern DBCStorage <FactionEntry> sFactionStore;
-extern DBCStorage <FactionTemplateEntry> sFactionTemplateStore;
-extern DBCStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore;
-extern DBCStorage <GemPropertiesEntry> sGemPropertiesStore;
-extern DBCStorage <GlyphPropertiesEntry> sGlyphPropertiesStore;
-
-extern GameTable <GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore;
-extern GameTable <GtCombatRatingsEntry> sGtCombatRatingsStore;
-extern GameTable <GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore;
-extern GameTable <GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore;
-extern GameTable <GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore;
-extern GameTable <GtChanceToSpellCritEntry> sGtChanceToSpellCritStore;
-extern GameTable <GtItemSocketCostPerLevelEntry> sGtItemSocketCostPerLevelStore;
-extern GameTable <GtNPCManaCostScalerEntry> sGtNPCManaCostScalerStore;
-extern GameTable <GtNpcTotalHpEntry> sGtNpcTotalHpStore;
-extern GameTable <GtNpcTotalHpExp1Entry> sGtNpcTotalHpExp1Store;
-extern GameTable <GtNpcTotalHpExp2Entry> sGtNpcTotalHpExp2Store;
-extern GameTable <GtNpcTotalHpExp3Entry> sGtNpcTotalHpExp3Store;
-extern GameTable <GtNpcTotalHpExp4Entry> sGtNpcTotalHpExp4Store;
-extern GameTable <GtNpcTotalHpExp5Entry> sGtNpcTotalHpExp5Store;
-extern GameTable <GtOCTLevelExperienceEntry> sGtOCTLevelExperienceStore;
-extern GameTable <gtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore;
-extern GameTable <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
-extern GameTable <GtSpellScalingEntry> sGtSpellScalingStore;
-extern GameTable <GtOCTBaseHPByClassEntry> sGtOCTBaseHPByClassStore;
-extern GameTable <GtOCTBaseMPByClassEntry> sGtOCTBaseMPByClassStore;
-extern DBCStorage <GuildColorBackgroundEntry> sGuildColorBackgroundStore;
-extern DBCStorage <GuildColorBorderEntry> sGuildColorBorderStore;
-extern DBCStorage <GuildColorEmblemEntry> sGuildColorEmblemStore;
-extern DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore;
-extern DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore;
-extern DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore;
-extern DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore;
-extern DBCStorage <ItemDamageEntry> sItemDamageAmmoStore;
-extern DBCStorage <ItemDamageEntry> sItemDamageOneHandStore;
-extern DBCStorage <ItemDamageEntry> sItemDamageOneHandCasterStore;
-extern DBCStorage <ItemDamageEntry> sItemDamageRangedStore;
-extern DBCStorage <ItemDamageEntry> sItemDamageThrownStore;
-extern DBCStorage <ItemDamageEntry> sItemDamageTwoHandStore;
-extern DBCStorage <ItemDamageEntry> sItemDamageTwoHandCasterStore;
-extern DBCStorage <ItemDamageEntry> sItemDamageWandStore;
-extern DBCStorage <ItemSetEntry> sItemSetStore;
-extern DBCStorage <ItemSetSpellEntry> sItemSetSpellStore;
-extern ItemSetSpellsStore sItemSetSpellsStore;
-extern DBCStorage <LFGDungeonEntry> sLFGDungeonStore;
-extern DBCStorage <LiquidTypeEntry> sLiquidTypeStore;
-extern DBCStorage <LockEntry> sLockStore;
-extern DBCStorage <MapEntry> sMapStore;
-extern DBCStorage <MinorTalentEntry> sMinorTalentStore;
-extern DBCStorage <ModifierTreeEntry> sModifierTreeStore;
-extern DBCStorage <PhaseEntry> sPhaseStore;
-extern MapDifficultyMap sMapDifficultyMap;
-extern DBCStorage <MovieEntry> sMovieStore;
-extern DBCStorage <PowerDisplayEntry> sPowerDisplayStore;
-extern DBCStorage <QuestFactionRewEntry> sQuestFactionRewardStore;
-extern DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
-extern DBCStorage <SkillLineEntry> sSkillLineStore;
-extern DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore;
-extern DBCStorage <SkillRaceClassInfoEntry> sSkillRaceClassInfoStore;
-extern SpellEffectScallingByEffectId sSpellEffectScallingByEffectId;
-extern DBCStorage <SpellCategoryEntry> sSpellCategoryStore;
-extern DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore;
-extern DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore;
-extern SpellCategoryStore sSpellsByCategoryStore;
-extern PetFamilySpellsStore sPetFamilySpellsStore;
-extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
-extern DBCStorage <SpellShapeshiftFormEntry> sSpellShapeshiftFormStore;
-extern DBCStorage <SpellEntry> sSpellStore;
-extern DBCStorage <SpellEffectScalingEntry> sSpellEffectScalingStore;
-extern DBCStorage <SpellAuraOptionsEntry> sSpellAuraOptionsStore;
-extern DBCStorage <SpellCategoriesEntry> sSpellCategoriesStore;
-extern DBCStorage <SpellCooldownsEntry> sSpellCooldownsStore;
-extern DBCStorage <SpellEffectEntry> sSpellEffectStore;
-extern DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore;
-extern DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore;
-extern DBCStorage <SpellLevelsEntry> sSpellLevelsStore;
-extern DBCStorage <SpellScalingEntry> sSpellScalingStore;
-extern DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore;
-//extern DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore;
-extern DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore;
-extern DBCStorage <TalentEntry> sTalentStore;
-extern DBCStorage <VehicleEntry> sVehicleStore;
-extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
-extern DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore;
-//extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
-extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
+extern DBCStorage<AnimKitEntry> sAnimKitStore;
+extern DBCStorage<AreaTableEntry> sAreaStore;// recommend access using functions
+extern DBCStorage<AreaTriggerEntry> sAreaTriggerStore;
+extern DBCStorage<ArmorLocationEntry> sArmorLocationStore;
+extern DBCStorage<BankBagSlotPricesEntry> sBankBagSlotPricesStore;
+extern DBCStorage<BannedAddOnsEntry> sBannedAddOnsStore;
+extern DBCStorage<BattlemasterListEntry> sBattlemasterListStore;
+extern DBCStorage<CharSectionsEntry> sCharSectionsStore;
+extern DBCStorage<CharTitlesEntry> sCharTitlesStore;
+extern DBCStorage<ChatChannelsEntry> sChatChannelsStore;
+extern DBCStorage<ChrClassesEntry> sChrClassesStore;
+extern DBCStorage<ChrRacesEntry> sChrRacesStore;
+extern DBCStorage<ChrSpecializationEntry> sChrSpecializationStore;
+extern ChrSpecializationByIndexArray sChrSpecializationByIndexStore;
+extern DBCStorage<CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore;
+extern DBCStorage<CreatureFamilyEntry> sCreatureFamilyStore;
+extern DBCStorage<CreatureModelDataEntry> sCreatureModelDataStore;
+extern DBCStorage<DifficultyEntry> sDifficultyStore;
+extern DBCStorage<DungeonEncounterEntry> sDungeonEncounterStore;
+extern DBCStorage<DurabilityCostsEntry> sDurabilityCostsStore;
+extern DBCStorage<EmotesEntry> sEmotesStore;
+extern DBCStorage<EmotesTextEntry> sEmotesTextStore;
+extern DBCStorage<FactionEntry> sFactionStore;
+extern DBCStorage<FactionTemplateEntry> sFactionTemplateStore;
+extern DBCStorage<GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore;
+extern DBCStorage<GemPropertiesEntry> sGemPropertiesStore;
+extern DBCStorage<GlyphPropertiesEntry> sGlyphPropertiesStore;
+extern DBCStorage<GuildColorBackgroundEntry> sGuildColorBackgroundStore;
+extern DBCStorage<GuildColorBorderEntry> sGuildColorBorderStore;
+extern DBCStorage<GuildColorEmblemEntry> sGuildColorEmblemStore;
+extern DBCStorage<ItemArmorQualityEntry> sItemArmorQualityStore;
+extern DBCStorage<ItemArmorShieldEntry> sItemArmorShieldStore;
+extern DBCStorage<ItemArmorTotalEntry> sItemArmorTotalStore;
+extern DBCStorage<ItemBagFamilyEntry> sItemBagFamilyStore;
+extern DBCStorage<ItemDamageEntry> sItemDamageAmmoStore;
+extern DBCStorage<ItemDamageEntry> sItemDamageOneHandCasterStore;
+extern DBCStorage<ItemDamageEntry> sItemDamageOneHandStore;
+extern DBCStorage<ItemDamageEntry> sItemDamageRangedStore;
+extern DBCStorage<ItemDamageEntry> sItemDamageThrownStore;
+extern DBCStorage<ItemDamageEntry> sItemDamageTwoHandCasterStore;
+extern DBCStorage<ItemDamageEntry> sItemDamageTwoHandStore;
+extern DBCStorage<ItemDamageEntry> sItemDamageWandStore;
+extern DBCStorage<ItemSetEntry> sItemSetStore;
+extern DBCStorage<ItemSetSpellEntry> sItemSetSpellStore;
+extern ItemSetSpellsStore sItemSetSpellsStore;
+extern DBCStorage<LFGDungeonEntry> sLFGDungeonStore;
+extern DBCStorage<LiquidTypeEntry> sLiquidTypeStore;
+extern DBCStorage<LockEntry> sLockStore;
+extern DBCStorage<MapEntry> sMapStore;
+extern MapDifficultyMap sMapDifficultyMap;
+extern DBCStorage<MovieEntry> sMovieStore;
+extern DBCStorage<PhaseEntry> sPhaseStore;
+extern DBCStorage<PowerDisplayEntry> sPowerDisplayStore;
+extern DBCStorage<QuestFactionRewEntry> sQuestFactionRewardStore;
+extern DBCStorage<RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
+extern DBCStorage<SkillLineAbilityEntry> sSkillLineAbilityStore;
+extern DBCStorage<SkillLineEntry> sSkillLineStore;
+extern DBCStorage<SkillRaceClassInfoEntry> sSkillRaceClassInfoStore;
+extern DBCStorage<SpellAuraOptionsEntry> sSpellAuraOptionsStore;
+extern DBCStorage<SpellCategoriesEntry> sSpellCategoriesStore;
+extern SpellCategoryStore sSpellsByCategoryStore;
+extern DBCStorage<SpellCategoryEntry> sSpellCategoryStore;
+extern DBCStorage<SpellCooldownsEntry> sSpellCooldownsStore;
+extern DBCStorage<SpellEffectEntry> sSpellEffectStore;
+extern DBCStorage<SpellEffectScalingEntry> sSpellEffectScalingStore;
+extern SpellEffectScallingByEffectId sSpellEffectScallingByEffectId;
+extern DBCStorage<SpellEntry> sSpellStore;
+extern DBCStorage<SpellEquippedItemsEntry> sSpellEquippedItemsStore;
+extern DBCStorage<SpellFocusObjectEntry> sSpellFocusObjectStore;
+extern DBCStorage<SpellInterruptsEntry> sSpellInterruptsStore;
+extern DBCStorage<SpellItemEnchantmentEntry> sSpellItemEnchantmentStore;
+extern DBCStorage<SpellLevelsEntry> sSpellLevelsStore;
+extern DBCStorage<SpellScalingEntry> sSpellScalingStore;
+extern DBCStorage<SpellShapeshiftEntry> sSpellShapeshiftStore;
+extern DBCStorage<SpellShapeshiftFormEntry> sSpellShapeshiftFormStore;
+extern DBCStorage<SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore;
+extern DBCStorage<SummonPropertiesEntry> sSummonPropertiesStore;
+extern DBCStorage<TalentEntry> sTalentStore;
+extern TalentsByPosition sTalentByPos;
+extern DBCStorage<VehicleEntry> sVehicleStore;
+extern DBCStorage<VehicleSeatEntry> sVehicleSeatStore;
+extern DBCStorage<WMOAreaTableEntry> sWMOAreaTableStore;
+extern DBCStorage<WorldSafeLocsEntry> sWorldSafeLocsStore;
+
+extern GameTable<GtBarberShopCostBaseEntry> sGtBarberShopCostBaseStore;
+extern GameTable<GtChanceToMeleeCritBaseEntry> sGtChanceToMeleeCritBaseStore;
+extern GameTable<GtChanceToMeleeCritEntry> sGtChanceToMeleeCritStore;
+extern GameTable<GtChanceToSpellCritBaseEntry> sGtChanceToSpellCritBaseStore;
+extern GameTable<GtChanceToSpellCritEntry> sGtChanceToSpellCritStore;
+extern GameTable<GtCombatRatingsEntry> sGtCombatRatingsStore;
+extern GameTable<GtItemSocketCostPerLevelEntry> sGtItemSocketCostPerLevelStore;
+extern GameTable<GtNPCManaCostScalerEntry> sGtNPCManaCostScalerStore;
+extern GameTable<GtNpcTotalHpEntry> sGtNpcTotalHpStore;
+extern GameTable<GtNpcTotalHpExp1Entry> sGtNpcTotalHpExp1Store;
+extern GameTable<GtNpcTotalHpExp2Entry> sGtNpcTotalHpExp2Store;
+extern GameTable<GtNpcTotalHpExp3Entry> sGtNpcTotalHpExp3Store;
+extern GameTable<GtNpcTotalHpExp4Entry> sGtNpcTotalHpExp4Store;
+extern GameTable<GtNpcTotalHpExp5Entry> sGtNpcTotalHpExp5Store;
+extern GameTable<GtOCTBaseHPByClassEntry> sGtOCTBaseHPByClassStore;
+extern GameTable<GtOCTBaseMPByClassEntry> sGtOCTBaseMPByClassStore;
+extern GameTable<GtOCTLevelExperienceEntry> sGtOCTLevelExperienceStore;
+extern GameTable<GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
+extern GameTable<GtSpellScalingEntry> sGtSpellScalingStore;
+extern GameTable<GtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore;
void LoadDBCStores(const std::string& dataPath, uint32 defaultLocale);
void LoadGameTables(const std::string& dataPath, uint32 defaultLocale);
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 16311e8e037..6d192b247fb 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -31,25 +31,6 @@
// Structures using to access raw DBC data and required packing to portability
#pragma pack(push, 1)
-struct AchievementEntry
-{
- uint32 ID; // 0
- int32 Faction; // 1 -1=all, 0=horde, 1=alliance
- int32 MapID; // 2 -1=none
- //uint32 Supercedes; // 3 its Achievement parent (can`t start while parent uncomplete, use its Criteria if don`t have own, use its progress on begin)
- char* Title_lang; // 4
- //char* Description_lang; // 5
- uint32 Category; // 6
- uint32 Points; // 7 reward points
- //uint32 UIOrder; // 8
- uint32 Flags; // 9
- //uint32 IconID; // 10 icon (from SpellIcon.dbc)
- //char* Reward_lang; // 11
- uint32 MinimumCriteria; // 12 - need this count of completed criterias (own or referenced achievement criterias)
- uint32 SharesCriteria; // 13 - referenced achievement (counting of all completed criterias)
- uint32 CriteriaTree; // 14
-};
-
struct AnimKitEntry
{
uint32 ID; // 0
@@ -352,152 +333,6 @@ struct CreatureModelDataEntry
//float HoverHeight; // 33
};
-struct CriteriaEntry
-{
- uint32 ID; // 0
- uint32 Type; // 1
- union
- {
- uint32 ID;
- // ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0
- // ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE = 20
- uint32 CreatureID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1
- // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND = 15
- // ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP = 16
- // ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA = 32
- // ACHIEVEMENT_CRITERIA_TYPE_PLAY_ARENA = 33
- uint32 MapID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7
- // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL = 40
- // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS = 75
- // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE = 112
- uint32 SkillID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8
- uint32 AchievementID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11
- uint32 ZoneID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_CURRENCY = 12
- uint32 CurrencyID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON = 18
- // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID = 19
- uint32 GroupSize;
-
- // ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM = 26
- uint32 DamageType;
-
- // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST = 27
- uint32 QuestID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET = 28
- // ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2 = 69
- // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL = 29
- // ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL2 = 110
- // ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34
- uint32 SpellID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE
- uint32 ObjectiveId;
-
- // ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA = 31
- // ACHIEVEMENT_CRITERIA_TYPE_ENTER_AREA = 163
- // ACHIEVEMENT_CRITERIA_TYPE_LEAVE_AREA = 164
- uint32 AreaID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36
- // ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM = 41
- // ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM = 42
- // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM = 57
- // ACHIEVEMENT_CRITERIA_TYPE_OWN_TOY = 185
- uint32 ItemID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_TEAM_RATING = 38
- // ACHIEVEMENT_CRITERIA_TYPE_REACH_TEAM_RATING = 39
- // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING = 39
- uint32 TeamType;
-
- // ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA = 43
- uint32 WorldMapOverlayID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_GAIN_REPUTATION = 46
- uint32 FactionID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM = 49
- uint32 ItemSlot;
-
- // ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT = 50
- // ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51
- uint32 RollValue;
-
- // ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS = 52
- uint32 ClassID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_HK_RACE = 53
- uint32 RaceID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE = 54
- uint32 EmoteID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT = 68
- // ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT = 72
- uint32 GameObjectID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_POWER = 96
- uint32 PowerType;
-
- // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_STAT = 97
- uint32 StatType;
-
- // ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_SPELLPOWER = 98
- uint32 SpellSchool;
-
- // ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE = 109
- uint32 LootType;
-
- // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DUNGEON_ENCOUNTER = 165
- uint32 DungeonEncounterID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_CONSTRUCT_GARRISON_BUILDING = 169
- uint32 GarrBuildingID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_UPGRADE_GARRISON = 170
- uint32 GarrisonLevel;
-
- // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_GARRISON_MISSION = 174
- uint32 GarrMissionID;
-
- // ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_GARRISON_SHIPMENT = 182
- uint32 CharShipmentContainerID;
- } Asset; // 2
- uint32 StartEvent; // 3
- uint32 StartAsset; // 4
- uint32 StartTimer; // 5
- uint32 FailEvent; // 6
- uint32 FailAsset; // 7
- uint32 ModifierTreeId; // 8
- //uint32 Flags; // 9
- uint32 EligibilityWorldStateID; // 10
- uint32 EligibilityWorldStateValue; // 11
-};
-
-struct CriteriaTreeEntry
-{
- uint32 ID; // 0
- uint32 CriteriaID; // 1
- uint64 Amount; // 2
- uint32 Operator; // 3
- uint32 Parent; // 4
- //uint32 Flags; // 5
- //char* DescriptionLang; // 6
- //uint32 OrderIndex; // 7
-};
-
/* not used
struct CurrencyCategoryEntry
{
@@ -768,7 +603,7 @@ struct GtOCTRegenMPEntry
float ratio;
};
-struct gtOCTHpPerStaminaEntry
+struct GtOCTHpPerStaminaEntry
{
float ratio;
};
@@ -903,9 +738,6 @@ struct ItemSetSpellEntry
uint32 ChrSpecID; // 4
};
-typedef std::vector<ItemSetSpellEntry const*> ItemSetSpells;
-typedef std::unordered_map<uint32, ItemSetSpells> ItemSetSpellsStore;
-
struct LFGDungeonEntry
{
uint32 ID; // 0
@@ -1071,16 +903,6 @@ struct MinorTalentEntry
uint32 OrderIndex; // 3
};
-struct ModifierTreeEntry
-{
- uint32 ID; // 0
- uint32 Type; // 1
- uint32 Asset[2]; // 2-3
- uint32 Operator; // 4
- uint32 Amount; // 5
- uint32 Parent; // 6
-};
-
struct MovieEntry
{
uint32 ID; // 0 index
@@ -1273,9 +1095,6 @@ struct SpellCategoriesEntry
typedef std::set<uint32> SpellCategorySet;
typedef std::map<uint32, SpellCategorySet > SpellCategoryStore;
-typedef std::set<uint32> PetFamilySpellsSet;
-typedef std::map<uint32, PetFamilySpellsSet > PetFamilySpellsStore;
-typedef std::unordered_map<uint32, uint32> SpellEffectScallingByEffectId;
struct SpellCategoryEntry
{
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index 7ba4c3c293b..6b2163cabca 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -22,36 +22,31 @@
// x - skip<uint32>, X - skip<uint8>, s - char*, f - float, i - uint32, b - uint8, d - index (not included)
// n - index (included), l - uint64, p - field present in sql dbc, a - field absent in sql dbc
-char const Achievementfmt[] = "niixsxiixixxiii";
-const std::string CustomAchievementfmt = "pppaaaapapaapp";
-const std::string CustomAchievementIndex = "ID";
char const AnimKitfmt[] = "nxxx";
-char const AreaTableEntryfmt[] = "iiiniixxxxxxisiiiiixxxxxxxxxx";
-char const AreaTriggerEntryfmt[] = "nifffxxxfffffxxxx";
+char const AreaTablefmt[] = "iiiniixxxxxxisiiiiixxxxxxxxxx";
+char const AreaTriggerfmt[] = "nifffxxxfffffxxxx";
char const ArmorLocationfmt[] = "nfffff";
-char const BankBagSlotPricesEntryfmt[] = "ni";
+char const BankBagSlotPricesfmt[] = "ni";
char const BannedAddOnsfmt[] = "nxxxxxxxxxx";
-char const BattlemasterListEntryfmt[] = "niiiiiiiiiiiiiiiiixsiiiixxxxxxx";
-char const CharSectionsEntryfmt[] = "diiixxxiii";
-char const CharTitlesEntryfmt[] = "nxssix";
-char const ChatChannelsEntryfmt[] = "nixsx";
-char const ChrClassesEntryfmt[] = "nixsxxxixiiiiixxxxx";
-char const ChrRacesEntryfmt[] = "niixiixxxxxxiisxxxxxxxxxxxxxxxxxxxxxxxxx";
-char const ChrSpecializationEntryfmt[] = "nxiiiiiiiiixxxii";
+char const BattlemasterListfmt[] = "niiiiiiiiiiiiiiiiixsiiiixxxxxxx";
+char const CharSectionsfmt[] = "diiixxxiii";
+char const CharTitlesfmt[] = "nxssix";
+char const ChatChannelsfmt[] = "nixsx";
+char const ChrClassesfmt[] = "nixsxxxixiiiiixxxxx";
+char const ChrRacesfmt[] = "niixiixxxxxxiisxxxxxxxxxxxxxxxxxxxxxxxxx";
+char const ChrSpecializationfmt[] = "nxiiiiiiiiixxxii";
char const CreatureDisplayInfoExtrafmt[] = "dixxxxxxxxxxxxxxxxxxxx";
char const CreatureFamilyfmt[] = "nfifiiiiixsx";
char const CreatureModelDatafmt[] = "nixxxxxxxxxxxxxffxxxxxxxxxxxxxxxxx";
-char const Criteriafmt[] = "niiiiiiiixii";
-char const CriteriaTreefmt[] = "niliixxx";
char const DifficultyFmt[] = "niiiixiixxxxix";
char const DungeonEncounterfmt[] = "niiixsxxx";
char const DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii";
-char const EmotesEntryfmt[] = "nxxiiixx";
-char const EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx";
-char const FactionEntryfmt[] = "niiiiiiiiiiiiiiiiiiffixsxixx";
-char const FactionTemplateEntryfmt[] = "niiiiiiiiiiiii";
+char const Emotesfmt[] = "nxxiiixx";
+char const EmotesTextfmt[] = "nxixxxxxxxxxxxxxxxx";
+char const Factionfmt[] = "niiiiiiiiiiiiiiiiiiffixsxixx";
+char const FactionTemplatefmt[] = "niiiiiiiiiiiii";
char const GameObjectDisplayInfofmt[] = "nixxxxxxxxxxffffffxxx";
-char const GemPropertiesEntryfmt[] = "nixxii";
+char const GemPropertiesfmt[] = "nixxii";
char const GlyphPropertiesfmt[] = "niiix";
char const GtBarberShopCostBasefmt[] = "xf";
char const GtCombatRatingsfmt[] = "xf";
@@ -69,8 +64,6 @@ char const GtNpcTotalHpExp2fmt[] = "xf";
char const GtNpcTotalHpExp3fmt[] = "xf";
char const GtNpcTotalHpExp4fmt[] = "xf";
char const GtNpcTotalHpExp5fmt[] = "xf";
-char const GtOCTRegenHPfmt[] = "f";
-//char const GtOCTRegenMPfmt[] = "f";
char const GtRegenMPPerSptfmt[] = "xf";
char const GtSpellScalingfmt[] = "df";
char const GtOCTBaseHPByClassfmt[] = "df";
@@ -83,53 +76,50 @@ char const ItemArmorQualityfmt[] = "nfffffffi";
char const ItemArmorShieldfmt[] = "nifffffff";
char const ItemArmorTotalfmt[] = "niffff";
char const ItemDamagefmt[] = "nfffffffi";
-char const ItemSetEntryfmt[] = "nsiiiiiiiiiiiiiiiiiii";
-char const ItemSetSpellEntryfmt[] = "niiii";
-char const LFGDungeonEntryfmt[] = "nsiiixxiiiixxixixxxxxxxxxxxxxx";
-char const LightEntryfmt[] = "nifffxxxxxxxxxx";
+char const ItemSetfmt[] = "nsiiiiiiiiiiiiiiiiiii";
+char const ItemSetSpellfmt[] = "niiii";
+char const LFGDungeonfmt[] = "nsiiixxiiiixxixixxxxxxxxxxxxxx";
+char const Lightfmt[] = "nifffxxxxxxxxxx";
char const LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
-char const LockEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx";
-char const MapEntryfmt[] = "nxiixxsixxixiffxiiiiix";
-char const MapDifficultyEntryfmt[] = "diisiiii";
-char const MinorTalentEntryfmt[] = "niii";
-char const MovieEntryfmt[] = "nxxxx";
-char const ModifierTreefmt[] = "niiiiii";
-char const NumTalentsAtLevelfmt[] = "df";
-char const PhaseEntryfmt[] = "ni";
+char const Lockfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx";
+char const Mapfmt[] = "nxiixxsixxixiffxiiiiix";
+char const MapDifficultyfmt[] = "diisiiii";
+char const MinorTalentfmt[] = "niii";
+char const Moviefmt[] = "nxxxx";
+char const Phasefmt[] = "ni";
char const QuestFactionRewardfmt[] = "niiiiiiiiii";
char const PowerDisplayfmt[] = "nixXXX";
-char const PvPDifficultyfmt[] = "diiii";
-char const RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii";
+char const PvpDifficultyfmt[] = "diiii";
+char const RandPropPointsfmt[] = "niiiiiiiiiiiiiii";
char const SkillLinefmt[] = "nisxixixx";
char const SkillLineAbilityfmt[] = "niiiiiiiiiiii";
char const SkillRaceClassInfofmt[] = "diiiiiii";
-char const SpellCategoriesEntryfmt[] = "diiiiiiiii";
+char const SpellCategoriesfmt[] = "diiiiiiiii";
char const SpellCategoryfmt[] = "nixxii";
-char const SpellEffectEntryfmt[] = "iiifiiiffiiiiiifiifiiiiifiiiiif";
-const std::string CustomSpellEffectEntryfmt = "ppppppppppppppappppppppppp";
+char const SpellEffectfmt[] = "niifiiiffiiiiiifiifiiiiifiiiiif";
+const std::string CustomSpellEffectfmt = "ppppppppppppppappppppppppp";
const std::string CustomSpellEffectEntryIndex = "Id";
-char const SpellEntryfmt[] = "nsxxxiiiiiiiiiiiiiiiiiii";
-const std::string CustomSpellEntryfmt = "ppppppppppppppapaaaaaaaaapaaaaaapapppaapppaaapa";
+char const Spellfmt[] = "nsxxxiiiiiiiiiiiiiiiiiii";
+const std::string CustomSpellfmt = "ppppppppppppppapaaaaaaaaapaaaaaapapppaapppaaapa";
const std::string CustomSpellEntryIndex = "Id";
char const SpellEffectScalingfmt[] = "nfffi";
char const SpellFocusObjectfmt[] = "nx";
char const SpellItemEnchantmentfmt[] = "niiiiiiiiiixiiiiiiiiiiifff";
-char const SpellScalingEntryfmt[] = "niiiifiii";
-char const SpellTargetRestrictionsEntryfmt[] = "niiffiiii";
-char const SpellInterruptsEntryfmt[] = "diiiiiii";
-char const SpellEquippedItemsEntryfmt[] = "diiiii";
-char const SpellAuraOptionsEntryfmt[] = "niiiiiiii";
-char const SpellCooldownsEntryfmt[] = "diiiii";
-char const SpellLevelsEntryfmt[] = "diiiii";
-char const SpellShapeshiftEntryfmt[] = "niiiix";
+char const SpellScalingfmt[] = "niiiifiii";
+char const SpellTargetRestrictionsfmt[] = "niiffiiii";
+char const SpellInterruptsfmt[] = "diiiiiii";
+char const SpellEquippedItemsfmt[] = "diiiii";
+char const SpellAuraOptionsfmt[] = "niiiiiiii";
+char const SpellCooldownsfmt[] = "diiiii";
+char const SpellLevelsfmt[] = "diiiii";
+char const SpellShapeshiftfmt[] = "niiiix";
char const SpellShapeshiftFormfmt[] = "nxxiixiiiiiiiiiiiiixx";
-char const StableSlotPricesfmt[] = "ni";
char const SummonPropertiesfmt[] = "niiiii";
-char const TalentEntryfmt[] = "niiiiiiiiix";
-char const VehicleEntryfmt[] = "niiffffiiiiiiiifffffffffffffffxxxxfifiiii";
-char const VehicleSeatEntryfmt[] = "niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiffffffffffffiiiiiiiii";
-char const WMOAreaTableEntryfmt[] = "niiixxxxxiixxxx";
-char const WorldMapAreaEntryfmt[] = "xinxffffixxxxx";
-char const WorldSafeLocsEntryfmt[] = "niffffx";
+char const Talentfmt[] = "niiiiiiiiix";
+char const Vehiclefmt[] = "niiffffiiiiiiiifffffffffffffffxxxxfifiiii";
+char const VehicleSeatfmt[] = "niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiffffffffffffiiiiiiiii";
+char const WMOAreaTablefmt[] = "niiixxxxxiixxxx";
+char const WorldMapAreafmt[] = "xinxffffixxxxx";
+char const WorldSafeLocsfmt[] = "niffffx";
#endif
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index c6d446e61bb..151d7c00e67 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -21692,7 +21692,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin
if (crItem->maxcount != 0) // bought
{
- if (pProto->GetQuality() > ITEM_QUALITY_EPIC || (pProto->GetQuality() == ITEM_QUALITY_EPIC && pProto->GetBaseItemLevel() >= MinNewsItemLevel[sWorld->getIntConfig(CONFIG_EXPANSION)]))
+ if (pProto->GetQuality() > ITEM_QUALITY_EPIC || (pProto->GetQuality() == ITEM_QUALITY_EPIC && pProto->GetBaseItemLevel() >= MinNewsItemLevel))
if (Guild* guild = GetGuild())
guild->AddGuildNews(GUILD_NEWS_ITEM_PURCHASED, GetGUID(), 0, item);
return true;
@@ -24738,7 +24738,7 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot)
--loot->unlootedCount;
if (sObjectMgr->GetItemTemplate(item->itemid))
- if (newitem->GetQuality() > ITEM_QUALITY_EPIC || (newitem->GetQuality() == ITEM_QUALITY_EPIC && newitem->GetItemLevel(this) >= MinNewsItemLevel[sWorld->getIntConfig(CONFIG_EXPANSION)]))
+ if (newitem->GetQuality() > ITEM_QUALITY_EPIC || (newitem->GetQuality() == ITEM_QUALITY_EPIC && newitem->GetItemLevel(this) >= MinNewsItemLevel))
if (Guild* guild = GetGuild())
guild->AddGuildNews(GUILD_NEWS_ITEM_LOOTED, GetGUID(), 0, item->itemid);
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index 59053abe46d..f85860dfde3 100644
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -265,7 +265,7 @@ float Player::GetHealthBonusFromStamina()
{
// Taken from PaperDollFrame.lua - 6.0.3.19085
float ratio = 10.0f;
- if (gtOCTHpPerStaminaEntry const* hpBase = sGtOCTHpPerStaminaStore.EvaluateTable(getLevel() - 1, 0))
+ if (GtOCTHpPerStaminaEntry const* hpBase = sGtOCTHpPerStaminaStore.EvaluateTable(getLevel() - 1, 0))
ratio = hpBase->ratio;
float stamina = GetStat(STAT_STAMINA);
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 463158762c2..7f014e22efb 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -6790,7 +6790,7 @@ std::string ObjectMgr::GeneratePetName(uint32 entry)
if (!cinfo)
return std::string();
- char const* petname = GetPetName(cinfo->family, sWorld->GetDefaultDbcLocale());
+ char const* petname = GetCreatureFamilyPetName(cinfo->family, sWorld->GetDefaultDbcLocale());
if (petname)
return std::string(petname);
else
diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h
index 805e35f0eb3..8dc9a98365b 100644
--- a/src/server/game/Guilds/Guild.h
+++ b/src/server/game/Guilds/Guild.h
@@ -251,7 +251,7 @@ struct GuildReward
std::vector<uint32> AchievementsRequired;
};
-uint32 const MinNewsItemLevel[MAX_CONTENT] = { 61, 90, 200, 353 };
+uint32 const MinNewsItemLevel = 353;
// Guild Challenge
#define GUILD_CHALLENGES_TYPES 6
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 5fea62655b3..3aff27324a3 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -294,7 +294,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
{
float spillOverRepOut = float(standing);
// check for sub-factions that receive spillover
- SimpleFactionsList const* flist = GetFactionTeamList(factionEntry->ID);
+ std::vector<uint32> const* flist = GetFactionTeamList(factionEntry->ID);
// if has no sub-factions, check for factions with same parent
if (!flist && factionEntry->ParentFactionID && factionEntry->ParentFactionModOut != 0.0f)
{
@@ -316,7 +316,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
if (flist)
{
// Spillover to affiliated factions
- for (SimpleFactionsList::const_iterator itr = flist->begin(); itr != flist->end(); ++itr)
+ for (std::vector<uint32>::const_iterator itr = flist->begin(); itr != flist->end(); ++itr)
{
if (FactionEntry const* factionEntryCalc = sFactionStore.LookupEntry(*itr))
{
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 7dad460ddcc..d10f76b76d3 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -1508,7 +1508,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
// send info to the client
player->SendNewItem(pItem, num_to_add, true, bgType == 0);
- if (pItem->GetQuality() > ITEM_QUALITY_EPIC || (pItem->GetQuality() == ITEM_QUALITY_EPIC && pItem->GetItemLevel(player) >= MinNewsItemLevel[sWorld->getIntConfig(CONFIG_EXPANSION)]))
+ if (pItem->GetQuality() > ITEM_QUALITY_EPIC || (pItem->GetQuality() == ITEM_QUALITY_EPIC && pItem->GetItemLevel(player) >= MinNewsItemLevel))
if (Guild* guild = player->GetGuild())
guild->AddGuildNews(GUILD_NEWS_ITEM_CRAFTED, player->GetGUID(), 0, pProto->GetId());
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 5e04bb46c53..9d5237fa591 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -28,6 +28,8 @@
#include "BattlefieldMgr.h"
#include "Player.h"
+PetFamilySpellsStore sPetFamilySpellsStore;
+
bool IsPrimaryProfessionSkill(uint32 skill)
{
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill);
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h
index cf501df98c2..6264aafb021 100644
--- a/src/server/game/Spells/SpellMgr.h
+++ b/src/server/game/Spells/SpellMgr.h
@@ -547,6 +547,9 @@ typedef std::pair<SpellLearnSpellMap::const_iterator, SpellLearnSpellMap::const_
typedef std::multimap<uint32, SkillLineAbilityEntry const*> SkillLineAbilityMap;
typedef std::pair<SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator> SkillLineAbilityMapBounds;
+typedef std::set<uint32> PetFamilySpellsSet;
+typedef std::map<uint32, PetFamilySpellsSet> PetFamilySpellsStore;
+
typedef std::multimap<uint32, uint32> PetLevelupSpellSet;
typedef std::map<uint32, PetLevelupSpellSet> PetLevelupSpellMap;
@@ -591,6 +594,8 @@ DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group);
DiminishingLevels GetDiminishingReturnsMaxLevel(DiminishingGroup group);
int32 GetDiminishingReturnsLimitDuration(SpellInfo const* spellproto);
+extern PetFamilySpellsStore sPetFamilySpellsStore;
+
class SpellMgr
{
// Constructors
diff --git a/src/server/shared/DataStores/DB2StorageLoader.cpp b/src/server/shared/DataStores/DB2StorageLoader.cpp
index 2a1853b1621..347d3dfab5b 100644
--- a/src/server/shared/DataStores/DB2StorageLoader.cpp
+++ b/src/server/shared/DataStores/DB2StorageLoader.cpp
@@ -228,6 +228,9 @@ uint32 DB2FileLoader::GetFormatRecordSize(const char * format, int32* index_pos)
case FT_BYTE:
recordsize += 1;
break;
+ case FT_LONG:
+ recordsize += 8;
+ break;
}
}
@@ -317,6 +320,10 @@ char* DB2FileLoader::AutoProduceData(const char* format, uint32& records, char**
*((uint8*)(&dataTable[offset])) = getRecord(y).getUInt8(x);
offset += 1;
break;
+ case FT_LONG:
+ *((uint64*)(&dataTable[offset])) = getRecord(y).getUInt64(x);
+ offset += 8;
+ break;
case FT_STRING:
case FT_STRING_NOT_LOCALIZED:
*((char**)(&dataTable[offset])) = nullptr; // will be replaces non-empty or "" strings in AutoProduceStrings
@@ -373,6 +380,9 @@ char* DB2FileLoader::AutoProduceStringsArrayHolders(const char* format, char* da
case FT_BYTE:
offset += 1;
break;
+ case FT_LONG:
+ offset += 8;
+ break;
case FT_STRING:
case FT_STRING_NOT_LOCALIZED:
{
@@ -438,6 +448,9 @@ char* DB2FileLoader::AutoProduceStrings(const char* format, char* dataTable, uin
case FT_BYTE:
offset += 1;
break;
+ case FT_LONG:
+ offset += 8;
+ break;
case FT_STRING:
{
// fill only not filled entries
@@ -563,6 +576,10 @@ char* DB2DatabaseLoader::Load(const char* format, HotfixDatabaseStatements prepa
*((int8*)(&dataValue[offset])) = fields[f].GetInt8();
offset += 1;
break;
+ case FT_LONG:
+ *((int64*)(&dataValue[offset])) = fields[f].GetInt64();
+ offset += 8;
+ break;
case FT_STRING:
{
LocalizedString** slot = (LocalizedString**)(&dataValue[offset]);
@@ -660,6 +677,9 @@ void DB2DatabaseLoader::LoadStrings(const char* format, HotfixDatabaseStatements
case FT_BYTE:
offset += 1;
break;
+ case FT_LONG:
+ offset += 8;
+ break;
case FT_STRING:
{
// fill only not filled entries
diff --git a/src/server/shared/DataStores/DB2StorageLoader.h b/src/server/shared/DataStores/DB2StorageLoader.h
index 587174a804b..14c5964e7d5 100644
--- a/src/server/shared/DataStores/DB2StorageLoader.h
+++ b/src/server/shared/DataStores/DB2StorageLoader.h
@@ -38,23 +38,29 @@ class DB2FileLoader
float getFloat(size_t field) const
{
assert(field < file.fieldCount);
- float val = *reinterpret_cast<float*>(offset+file.GetOffset(field));
+ float val = *reinterpret_cast<float*>(offset + file.GetOffset(field));
EndianConvert(val);
return val;
}
uint32 getUInt(size_t field) const
{
assert(field < file.fieldCount);
- uint32 val = *reinterpret_cast<uint32*>(offset+file.GetOffset(field));
+ uint32 val = *reinterpret_cast<uint32*>(offset + file.GetOffset(field));
EndianConvert(val);
return val;
}
uint8 getUInt8(size_t field) const
{
assert(field < file.fieldCount);
- return *reinterpret_cast<uint8*>(offset+file.GetOffset(field));
+ return *reinterpret_cast<uint8*>(offset + file.GetOffset(field));
+ }
+ uint64 getUInt64(size_t field) const
+ {
+ assert(field < file.fieldCount);
+ uint64 val = *reinterpret_cast<uint64*>(offset + file.GetOffset(field));
+ EndianConvert(val);
+ return val;
}
-
const char *getString(size_t field) const
{
assert(field < file.fieldCount);
diff --git a/src/server/shared/DataStores/DBCFileLoader.h b/src/server/shared/DataStores/DBCFileLoader.h
index 8a5d0b5de71..d9aa34f65a3 100644
--- a/src/server/shared/DataStores/DBCFileLoader.h
+++ b/src/server/shared/DataStores/DBCFileLoader.h
@@ -56,9 +56,10 @@ class DBCFileLoader
uint64 getUInt64(size_t field) const
{
assert(field < file.fieldCount);
- return *reinterpret_cast<uint64*>(offset + file.GetOffset(field));
+ uint64 val = *reinterpret_cast<uint64*>(offset + file.GetOffset(field));
+ EndianConvert(val);
+ return val;
}
-
const char *getString(size_t field) const
{
assert(field < file.fieldCount);