aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/hotfixes/2015_03_04_00_hotfixes.sql223
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp20
-rw-r--r--src/server/game/DataStores/DB2Stores.h5
-rw-r--r--src/server/game/DataStores/DB2Structure.h77
-rw-r--r--src/server/game/DataStores/DB2fmt.h8
-rw-r--r--src/server/game/DataStores/DBCStores.cpp9
-rw-r--r--src/server/game/DataStores/DBCStores.h4
-rw-r--r--src/server/game/DataStores/DBCStructure.h51
-rw-r--r--src/server/game/DataStores/DBCfmt.h4
-rw-r--r--src/server/game/Entities/Player/Player.cpp8
-rw-r--r--src/server/game/Spells/SpellInfo.cpp14
-rw-r--r--src/server/shared/Database/Implementation/HotfixDatabase.cpp29
-rw-r--r--src/server/shared/Database/Implementation/HotfixDatabase.h10
13 files changed, 359 insertions, 103 deletions
diff --git a/sql/updates/hotfixes/2015_03_04_00_hotfixes.sql b/sql/updates/hotfixes/2015_03_04_00_hotfixes.sql
new file mode 100644
index 00000000000..cda2e375976
--- /dev/null
+++ b/sql/updates/hotfixes/2015_03_04_00_hotfixes.sql
@@ -0,0 +1,223 @@
+--
+-- Table structure for table `area_group`
+--
+
+DROP TABLE IF EXISTS `area_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `area_group` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `area_group`
+--
+
+LOCK TABLES `area_group` WRITE;
+/*!40000 ALTER TABLE `area_group` DISABLE KEYS */;
+/*!40000 ALTER TABLE `area_group` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `area_group_member`
+--
+
+DROP TABLE IF EXISTS `area_group_member`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `area_group_member` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `AreaGroupID` int(10) unsigned NOT NULL DEFAULT '0',
+ `AreaID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `area_group_member`
+--
+
+LOCK TABLES `area_group_member` WRITE;
+/*!40000 ALTER TABLE `area_group_member` DISABLE KEYS */;
+/*!40000 ALTER TABLE `area_group_member` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `currency_types`
+--
+
+DROP TABLE IF EXISTS `currency_types`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `currency_types` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `CategoryID` int(10) unsigned NOT NULL DEFAULT '0',
+ `Name` text,
+ `InventoryIcon1` text,
+ `InventoryIcon2` text,
+ `SpellWeight` int(10) unsigned NOT NULL DEFAULT '0',
+ `SpellCategory` int(10) unsigned NOT NULL DEFAULT '0',
+ `MaxQty` int(10) unsigned NOT NULL DEFAULT '0',
+ `MaxEarnablePerWeek` int(10) unsigned NOT NULL DEFAULT '0',
+ `Flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `Quality` int(10) unsigned NOT NULL DEFAULT '0',
+ `Description` text,
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `currency_types`
+--
+
+LOCK TABLES `currency_types` WRITE;
+/*!40000 ALTER TABLE `currency_types` DISABLE KEYS */;
+/*!40000 ALTER TABLE `currency_types` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `currency_types_locale`
+--
+
+DROP TABLE IF EXISTS `currency_types_locale`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `currency_types_locale` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `locale` varchar(4) NOT NULL,
+ `Name_lang` text,
+ `InventoryIcon1_lang` text,
+ `InventoryIcon2_lang` text,
+ `Description_lang` text,
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`,`locale`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `currency_types_locale`
+--
+
+LOCK TABLES `currency_types_locale` WRITE;
+/*!40000 ALTER TABLE `currency_types_locale` DISABLE KEYS */;
+/*!40000 ALTER TABLE `currency_types_locale` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `curve_point`
+--
+
+--
+-- Table structure for table `sound_entries`
+--
+
+DROP TABLE IF EXISTS `sound_entries`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `sound_entries` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `SoundType` int(10) unsigned NOT NULL DEFAULT '0',
+ `Name` text,
+ `FileDataID1` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID2` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID3` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID4` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID5` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID6` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID7` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID8` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID9` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID10` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID11` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID12` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID13` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID14` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID15` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID16` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID17` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID18` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID19` int(10) unsigned NOT NULL DEFAULT '0',
+ `FileDataID20` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq1` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq2` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq3` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq4` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq5` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq6` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq7` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq8` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq9` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq10` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq11` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq12` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq13` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq14` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq15` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq16` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq17` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq18` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq19` int(10) unsigned NOT NULL DEFAULT '0',
+ `Freq20` int(10) unsigned NOT NULL DEFAULT '0',
+ `VolumeFloat` float NOT NULL DEFAULT '0',
+ `Flags` int(10) unsigned NOT NULL DEFAULT '0',
+ `MinDistance` float NOT NULL DEFAULT '0',
+ `DistanceCutoff` float NOT NULL DEFAULT '0',
+ `EAXDef` int(10) unsigned NOT NULL DEFAULT '0',
+ `SoundEntriesAdvancedID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VolumeVariationPlus` float NOT NULL DEFAULT '0',
+ `VolumeVariationMinus` float NOT NULL DEFAULT '0',
+ `PitchVariationPlus` float NOT NULL DEFAULT '0',
+ `PitchVariationMinus` float NOT NULL DEFAULT '0',
+ `PitchAdjust` float NOT NULL DEFAULT '0',
+ `DialogType` int(10) unsigned NOT NULL DEFAULT '0',
+ `BusOverwriteID` int(10) unsigned NOT NULL DEFAULT '0',
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `sound_entries`
+--
+
+LOCK TABLES `sound_entries` WRITE;
+/*!40000 ALTER TABLE `sound_entries` DISABLE KEYS */;
+/*!40000 ALTER TABLE `sound_entries` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `sound_entries_locale`
+--
+
+DROP TABLE IF EXISTS `sound_entries_locale`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `sound_entries_locale` (
+ `ID` int(10) unsigned NOT NULL DEFAULT '0',
+ `locale` varchar(4) NOT NULL,
+ `Name_lang` text,
+ `VerifiedBuild` smallint(6) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`ID`,`locale`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `sound_entries_locale`
+--
+
+LOCK TABLES `sound_entries_locale` WRITE;
+/*!40000 ALTER TABLE `sound_entries_locale` DISABLE KEYS */;
+/*!40000 ALTER TABLE `sound_entries_locale` ENABLE KEYS */;
+UNLOCK TABLES;
+
+ALTER TABLE `item_extended_cost`
+ DROP `RequiredHonorPoints`,
+ DROP `RequiredArenaPoints`,
+ ADD `RequiredMoney` int(10) unsigned NOT NULL DEFAULT '0' AFTER `RequiredAchievement`;
+
+ALTER TABLE `taxi_nodes` ADD `LearnableIndex` int(10) unsigned NOT NULL DEFAULT '0' AFTER `ConditionID`;
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index dcf6caee62d..3431f79e61f 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -23,7 +23,10 @@
#include "World.h"
#include <functional>
+DB2Storage<AreaGroupEntry> sAreaGroupStore(AreaGroupFormat, HOTFIX_SEL_AREA_GROUP);
+DB2Storage<AreaGroupMemberEntry> sAreaGroupMemberStore(AreaGroupMemberFormat, HOTFIX_SEL_AREA_GROUP_MEMBER);
DB2Storage<BroadcastTextEntry> sBroadcastTextStore(BroadcastTextFormat, HOTFIX_SEL_BROADCAST_TEXT);
+DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore(CurrencyTypesFormat, HOTFIX_SEL_CURRENCY_TYPES);
DB2Storage<CurvePointEntry> sCurvePointStore(CurvePointFormat, HOTFIX_SEL_CURVE_POINT);
DB2Storage<HolidaysEntry> sHolidaysStore(HolidaysEntryFormat, HOTFIX_SEL_HOLIDAYS);
DB2Storage<ItemAppearanceEntry> sItemAppearanceStore(ItemAppearanceFormat, HOTFIX_SEL_ITEM_APPEARANCE);
@@ -40,6 +43,7 @@ DB2Storage<KeyChainEntry> sKeyChainStore(KeyChainFormat, HOTFI
DB2Storage<MountEntry> sMountStore(MountFormat, HOTFIX_SEL_MOUNT);
DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore(OverrideSpellDataFormat, HOTFIX_SEL_OVERRIDE_SPELL_DATA);
DB2Storage<PhaseGroupEntry> sPhaseGroupStore(PhaseGroupFormat, HOTFIX_SEL_PHASE_GROUP);
+DB2Storage<SoundEntriesEntry> sSoundEntriesStore(SoundEntriesFormat, HOTFIX_SEL_SOUND_ENTRIES);
DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore(SpellAuraRestrictionsFormat, HOTFIX_SEL_SPELL_AURA_RESTRICTIONS);
DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore(SpellCastingRequirementsFormat, HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS);
DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore(SpellClassOptionsFormat, HOTFIX_SEL_SPELL_CLASS_OPTIONS);
@@ -127,7 +131,10 @@ void DB2Manager::LoadStores(std::string const& dataPath)
DB2StoreProblemList bad_db2_files;
uint32 availableDb2Locales = 0xFF;
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sAreaGroupStore, db2Path, "AreaGroup.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sAreaGroupMemberStore, db2Path, "AreaGroupMember.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sBroadcastTextStore, db2Path, "BroadcastText.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sCurrencyTypesStore, db2Path, "CurrencyTypes.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sCurvePointStore, db2Path, "CurvePoint.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sHolidaysStore, db2Path, "Holidays.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sItemAppearanceStore, db2Path, "ItemAppearance.db2");
@@ -144,6 +151,7 @@ void DB2Manager::LoadStores(std::string const& dataPath)
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sMountStore, db2Path, "Mount.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sOverrideSpellDataStore, db2Path, "OverrideSpellData.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sPhaseGroupStore, db2Path, "PhaseXPhaseGroup.db2");
+ LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSoundEntriesStore, db2Path, "SoundEntries.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellAuraRestrictionsStore, db2Path, "SpellAuraRestrictions.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellCastingRequirementsStore, db2Path, "SpellCastingRequirements.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sSpellClassOptionsStore, db2Path, "SpellClassOptions.db2");
@@ -157,6 +165,9 @@ void DB2Manager::LoadStores(std::string const& dataPath)
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sTaxiPathNodeStore, db2Path, "TaxiPathNode.db2");
LoadDB2(availableDb2Locales, bad_db2_files, _stores, &sTaxiPathStore, db2Path, "TaxiPath.db2");
+ for (AreaGroupMemberEntry const* areaGroupMember : sAreaGroupMemberStore)
+ _areaGroupMembers[areaGroupMember->AreaGroupID].push_back(areaGroupMember->AreaID);
+
for (ItemBonusEntry const* bonus : sItemBonusStore)
_itemBonusLists[bonus->BonusListID].push_back(bonus);
@@ -359,6 +370,15 @@ time_t DB2Manager::GetHotfixDate(uint32 entry, uint32 type) const
return ret ? ret : time(NULL);
}
+std::vector<uint32> DB2Manager::GetAreasForGroup(uint32 areaGroupId) const
+{
+ auto itr = _areaGroupMembers.find(areaGroupId);
+ if (itr != _areaGroupMembers.end())
+ return itr->second;
+
+ return std::vector<uint32>();
+}
+
char const* DB2Manager::GetBroadcastTextValue(BroadcastTextEntry const* broadcastText, LocaleConstant locale /*= DEFAULT_LOCALE*/, uint8 gender /*= GENDER_MALE*/, bool forceGender /*= false*/)
{
if (gender == GENDER_FEMALE && (forceGender || broadcastText->FemaleText->Str[DEFAULT_LOCALE][0] != '\0'))
diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h
index 80334a396d6..6fc9ab614b9 100644
--- a/src/server/game/DataStores/DB2Stores.h
+++ b/src/server/game/DataStores/DB2Stores.h
@@ -24,6 +24,7 @@
extern DB2Storage<BroadcastTextEntry> sBroadcastTextStore;
extern DB2Storage<HolidaysEntry> sHolidaysStore;
+extern DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore;
extern DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore;
extern DB2Storage<ItemEffectEntry> sItemEffectStore;
extern DB2Storage<ItemEntry> sItemStore;
@@ -31,6 +32,7 @@ extern DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore;
extern DB2Storage<ItemSparseEntry> sItemSparseStore;
extern DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore;
extern DB2Storage<PhaseGroupEntry> sPhaseGroupStore;
+extern DB2Storage<SoundEntriesEntry> sSoundEntriesStore;
extern DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore;
extern DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore;
extern DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore;
@@ -65,6 +67,7 @@ class DB2Manager
{
public:
typedef std::map<uint32 /*hash*/, DB2StorageBase*> StorageMap;
+ typedef std::unordered_map<uint32 /*areaGroupId*/, std::vector<uint32/*areaId*/>> AreaGroupMemberContainer;
typedef std::map<uint32 /*curveID*/, std::map<uint32/*index*/, CurvePointEntry const*, std::greater<uint32>>> HeirloomCurvesContainer;
typedef std::vector<ItemBonusEntry const*> ItemBonusList;
typedef std::unordered_map<uint32 /*bonusListId*/, ItemBonusList> ItemBonusListContainer;
@@ -87,6 +90,7 @@ public:
HotfixData const* GetHotfixData() const { return &_hotfixData; }
time_t GetHotfixDate(uint32 entry, uint32 type) const;
+ std::vector<uint32> GetAreasForGroup(uint32 areaGroupId) const;
static char const* GetBroadcastTextValue(BroadcastTextEntry const* broadcastText, LocaleConstant locale = DEFAULT_LOCALE, uint8 gender = GENDER_MALE, bool forceGender = false);
uint32 GetHeirloomItemLevel(uint32 curveId, uint32 level) const;
ItemBonusList GetItemBonusList(uint32 bonusListId) const;
@@ -99,6 +103,7 @@ private:
StorageMap _stores;
HotfixData _hotfixData;
+ AreaGroupMemberContainer _areaGroupMembers;
HeirloomCurvesContainer _heirloomCurvePoints;
ItemBonusListContainer _itemBonusLists;
ItemBonusTreeContainer _itemBonusTrees;
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index 4fcbf093f2d..8145ae743a9 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -32,6 +32,18 @@
#define MAX_ITEM_PROTO_SOCKETS 3
#define MAX_ITEM_PROTO_STATS 10
+struct AreaGroupEntry
+{
+ uint32 ID; // 0
+};
+
+struct AreaGroupMemberEntry
+{
+ uint32 ID; // 0
+ uint32 AreaGroupID; // 1
+ uint32 AreaID; // 2
+};
+
struct BroadcastTextEntry
{
uint32 ID;
@@ -45,6 +57,21 @@ struct BroadcastTextEntry
uint32 Type;
};
+struct CurrencyTypesEntry
+{
+ uint32 ID; // 0
+ uint32 CategoryID; // 1
+ LocalizedString* Name_lang; // 2
+ LocalizedString* InventoryIcon[2]; // 3-4
+ uint32 SpellWeight; // 5
+ uint32 SpellCategory; // 6
+ uint32 MaxQty; // 7
+ uint32 MaxEarnablePerWeek; // 8
+ uint32 Flags; // 9
+ uint32 Quality; // 10
+ LocalizedString* Description_lang; // 11
+};
+
struct CurvePointEntry
{
uint32 ID; // 0
@@ -133,19 +160,18 @@ struct ItemEntry
struct ItemExtendedCostEntry
{
uint32 ID; // 0 extended-cost entry id
- uint32 RequiredHonorPoints; // 1 required honor points
- uint32 RequiredArenaPoints; // 2 required arena points
uint32 RequiredArenaSlot; // 3 arena slot restrictions (min slot value)
- uint32 RequiredItem[MAX_ITEM_EXT_COST_ITEMS]; // 4-8 required item id
- uint32 RequiredItemCount[MAX_ITEM_EXT_COST_ITEMS]; // 9-13 required count of 1st item
- uint32 RequiredPersonalArenaRating; // 14 required personal arena rating
- uint32 ItemPurchaseGroup; // 15
- uint32 RequiredCurrency[MAX_ITEM_EXT_COST_CURRENCIES]; // 16-20 required curency id
- uint32 RequiredCurrencyCount[MAX_ITEM_EXT_COST_CURRENCIES];// 21-25 required curency count
- uint32 RequiredFactionId;
- uint32 RequiredFactionStanding;
- uint32 RequirementFlags;
- uint32 RequiredAchievement;
+ uint32 RequiredItem[MAX_ITEM_EXT_COST_ITEMS]; // 3-6 required item id
+ uint32 RequiredItemCount[MAX_ITEM_EXT_COST_ITEMS]; // 7-11 required count of 1st item
+ uint32 RequiredPersonalArenaRating; // 12 required personal arena rating
+ uint32 ItemPurchaseGroup; // 13
+ uint32 RequiredCurrency[MAX_ITEM_EXT_COST_CURRENCIES]; // 14-18 required curency id
+ uint32 RequiredCurrencyCount[MAX_ITEM_EXT_COST_CURRENCIES];// 19-23 required curency count
+ uint32 RequiredFactionId; // 24
+ uint32 RequiredFactionStanding; // 25
+ uint32 RequirementFlags; // 26
+ uint32 RequiredAchievement; // 27
+ uint32 RequiredMoney; // 28
};
struct ItemModifiedAppearanceEntry
@@ -270,6 +296,28 @@ struct PhaseGroupEntry
uint32 PhaseGroupID;
};
+struct SoundEntriesEntry
+{
+ uint32 ID; // 0
+ uint32 SoundType; // 1
+ LocalizedString* Name; // 2
+ uint32 FileDataID[20]; // 3-22
+ uint32 Freq[20]; // 23-42
+ float VolumeFloat; // 43
+ uint32 Flags; // 44
+ float MinDistance; // 45
+ float DistanceCutoff; // 46
+ uint32 EAXDef; // 47
+ uint32 SoundEntriesAdvancedID; // 48
+ float VolumeVariationPlus; // 49
+ float VolumeVariationMinus; // 50
+ float PitchVariationPlus; // 51
+ float PitchVariationMinus; // 52
+ float PitchAdjust; // 53
+ uint32 DialogType; // 54
+ uint32 BusOverwriteID; // 55
+};
+
struct SpellAuraRestrictionsEntry
{
uint32 ID; // 0
@@ -395,8 +443,9 @@ struct TaxiNodesEntry
LocalizedString* Name_lang; // 5
uint32 MountCreatureID[2]; // 6-7
uint32 ConditionID; // 8
- uint32 Flags; // 9
- DBCPosition2D MapOffset; // 10-11
+ uint32 LearnableIndex; // 9 - some kind of index only for learnable nodes
+ uint32 Flags; // 10
+ DBCPosition2D MapOffset; // 11-12
};
struct TaxiPathEntry
diff --git a/src/server/game/DataStores/DB2fmt.h b/src/server/game/DataStores/DB2fmt.h
index ba088b2cbb1..e660adee257 100644
--- a/src/server/game/DataStores/DB2fmt.h
+++ b/src/server/game/DataStores/DB2fmt.h
@@ -18,7 +18,10 @@
#ifndef TRINITY_DB2SFRM_H
#define TRINITY_DB2SFRM_H
+char const AreaGroupFormat[] = "n";
+char const AreaGroupMemberFormat[] = "nii";
char const BroadcastTextFormat[] = "nissiiiiiiiii";
+char const CurrencyTypesFormat[] = "nisssiiiiiis";
char const CurvePointFormat[] = "niiff";
char const HolidaysEntryFormat[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiisiii";
char const ItemFormat[] = "niiiiiiii";
@@ -26,7 +29,7 @@ char const ItemAppearanceFormat[] = "nii";
char const ItemBonusFormat[] = "niiiii";
char const ItemBonusTreeNodeFormat[] = "niiii";
char const ItemCurrencyCostFormat[] = "in";
-char const ItemExtendedCostFormat[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii";
+char const ItemExtendedCostFormat[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiii";
char const ItemEffectFormat[] = "niiiiiiii";
char const ItemModifiedAppearanceFormat[] = "niiiii";
char const ItemSparseFormat[] = "niiiiffiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffffffiiifisssssiiiiiiiiiiiiiiiiiiifiiifiii";
@@ -35,6 +38,7 @@ char const KeyChainFormat[] = "nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
char const MountFormat[] = "niiisssiii";
char const OverrideSpellDataFormat[] = "niiiiiiiiiiii";
char const PhaseGroupFormat[] = "nii";
+char const SoundEntriesFormat[] = "nisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiififfiifffffii";
char const SpellAuraRestrictionsFormat[] = "niiiiiiii";
char const SpellCastingRequirementsFormat[] = "niiiiii";
char const SpellClassOptionsFormat[] = "niiiiii";
@@ -44,7 +48,7 @@ char const SpellPowerFormat[] = "niiiiiiiiiffif";
char const SpellReagentsFormat[] = "niiiiiiiiiiiiiiiiii";
char const SpellRuneCostFormat[] = "niiiii";
char const SpellTotemsFormat[] = "niiii";
-char const TaxiNodesFormat[] = "nifffsiiiiff";
+char const TaxiNodesFormat[] = "nifffsiiiiiff";
char const TaxiPathFormat[] = "niii";
char const TaxiPathNodeFormat[] = "niiifffiiii";
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 5ae83833cfc..4794120d188 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -53,7 +53,6 @@ struct WMOAreaTableTripple
typedef std::map<WMOAreaTableTripple, WMOAreaTableEntry const*> WMOAreaInfoByTripple;
DBCStorage <AreaTableEntry> sAreaStore(AreaTableEntryfmt);
-DBCStorage <AreaGroupEntry> sAreaGroupStore(AreaGroupEntryfmt);
static AreaFlagByAreaID sAreaFlagByAreaID;
static AreaFlagByMapID sAreaFlagByMapID; // for instances without generated *.map files
@@ -85,7 +84,6 @@ DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore(CreatureSpellDatafmt
DBCStorage <CreatureTypeEntry> sCreatureTypeStore(CreatureTypefmt);
DBCStorage <CriteriaEntry> sCriteriaStore(Criteriafmt);
DBCStorage <CriteriaTreeEntry> sCriteriaTreeStore(CriteriaTreefmt);
-DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore(CurrencyTypesfmt);
uint32 PowersByClass[MAX_CLASSES][MAX_POWERS];
DBCStorage <DestructibleModelDataEntry> sDestructibleModelDataStore(DestructibleModelDatafmt);
@@ -122,7 +120,6 @@ GameTable <GtNpcTotalHpExp2Entry> sGtNpcTotalHpExp2Store(GtNpcTotalHpExp2
GameTable <GtNpcTotalHpExp3Entry> sGtNpcTotalHpExp3Store(GtNpcTotalHpExp3fmt);
GameTable <GtNpcTotalHpExp4Entry> sGtNpcTotalHpExp4Store(GtNpcTotalHpExp4fmt);
GameTable <GtNpcTotalHpExp5Entry> sGtNpcTotalHpExp5Store(GtNpcTotalHpExp5fmt);
-GameTable <GtOCTClassCombatRatingScalarEntry> sGtOCTClassCombatRatingScalarStore(GtOCTClassCombatRatingScalarfmt);
GameTable <GtOCTLevelExperienceEntry> sGtOCTLevelExperienceStore(GtOCTLevelExperiencefmt);
GameTable <GtOCTRegenHPEntry> sGtOCTRegenHPStore(GtOCTRegenHPfmt);
GameTable <gtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore(GtOCTHpPerStaminafmt);
@@ -195,8 +192,6 @@ DBCStorage <SkillRaceClassInfoEntry> sSkillRaceClassInfoStore(SkillRaceClassInfo
SkillRaceClassInfoMap SkillRaceClassInfoBySkill;
DBCStorage <SkillTiersEntry> sSkillTiersStore(SkillTiersfmt);
-DBCStorage <SoundEntriesEntry> sSoundEntriesStore(SoundEntriesfmt);
-
DBCStorage <SpecializationSpellsEntry> sSpecializationSpellsStore(SpecializationSpellsEntryfmt);
std::unordered_map<uint32, std::vector<SpecializationSpellsEntry const*>> sSpecializationSpellsBySpecStore;
DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore(SpellItemEnchantmentfmt);
@@ -369,7 +364,6 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementStore, dbcPath, "Achievement.dbc"/*, &CustomAchievementfmt, &CustomAchievementIndex*/);//19116
LoadDBC(availableDbcLocales, bad_dbc_files, sAreaTriggerStore, dbcPath, "AreaTrigger.dbc");//19116
- LoadDBC(availableDbcLocales, bad_dbc_files, sAreaGroupStore, dbcPath, "AreaGroup.dbc");//19116
LoadDBC(availableDbcLocales, bad_dbc_files, sAuctionHouseStore, dbcPath, "AuctionHouse.dbc");//19116
LoadDBC(availableDbcLocales, bad_dbc_files, sArmorLocationStore, dbcPath, "ArmorLocation.dbc");//19116
LoadDBC(availableDbcLocales, bad_dbc_files, sBankBagSlotPricesStore, dbcPath, "BankBagSlotPrices.dbc");//19116
@@ -418,7 +412,6 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureTypeStore, dbcPath, "CreatureType.dbc");//19116
LoadDBC(availableDbcLocales, bad_dbc_files, sCriteriaStore, dbcPath, "Criteria.dbc");//19342
LoadDBC(availableDbcLocales, bad_dbc_files, sCriteriaTreeStore, dbcPath, "CriteriaTree.dbc");//19342
- LoadDBC(availableDbcLocales, bad_dbc_files, sCurrencyTypesStore, dbcPath, "CurrencyTypes.dbc");//19116
LoadDBC(availableDbcLocales, bad_dbc_files, sDestructibleModelDataStore, dbcPath, "DestructibleModelData.dbc");//19116
LoadDBC(availableDbcLocales, bad_dbc_files, sDifficultyStore, dbcPath, "Difficulty.dbc");//19342
LoadDBC(availableDbcLocales, bad_dbc_files, sDungeonEncounterStore, dbcPath, "DungeonEncounter.dbc");//19116
@@ -542,7 +535,6 @@ void LoadDBCStores(const std::string& dataPath)
SkillRaceClassInfoBySkill.emplace(entry->SkillID, entry);
LoadDBC(availableDbcLocales, bad_dbc_files, sSkillTiersStore, dbcPath, "SkillTiers.dbc");
- LoadDBC(availableDbcLocales, bad_dbc_files, sSoundEntriesStore, dbcPath, "SoundEntries.dbc");//15595
LoadDBC(availableDbcLocales, bad_dbc_files, sSpecializationSpellsStore, dbcPath, "SpecializationSpells.dbc");
for (uint32 i = 0; i < sSpecializationSpellsStore.GetNumRows(); ++i)
{
@@ -658,7 +650,6 @@ void LoadDBCStores(const std::string& dataPath)
LoadGameTable(bad_dbc_files, "NpcTotalHpExp3", sGtNpcTotalHpExp3Store, dbcPath, "gtNpcTotalHpExp3.dbc"); // 19445
LoadGameTable(bad_dbc_files, "NpcTotalHpExp4", sGtNpcTotalHpExp4Store, dbcPath, "gtNpcTotalHpExp4.dbc"); // 19445
LoadGameTable(bad_dbc_files, "NpcTotalHpExp5", sGtNpcTotalHpExp5Store, dbcPath, "gtNpcTotalHpExp5.dbc"); // 19445
- LoadGameTable(bad_dbc_files, "OCTClassCombatRatingScalar", sGtOCTClassCombatRatingScalarStore, dbcPath, "gtOCTClassCombatRatingScalar.dbc");//19342
LoadGameTable(bad_dbc_files, "OCTHPPerStamina", sGtOCTHpPerStaminaStore, dbcPath, "gtOCTHpPerStamina.dbc");//19342
LoadGameTable(bad_dbc_files, "OCTLevelExperience", sGtOCTLevelExperienceStore, dbcPath, "gtOCTLevelExperience.dbc"); // 19342
LoadGameTable(bad_dbc_files, "RegenMPPerSpt", sGtRegenMPPerSptStore, dbcPath, "gtRegenMPPerSpt.dbc");//19342
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index 984f767cf91..6a8cd69e5d7 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -124,7 +124,6 @@ private:
extern DBCStorage <AchievementEntry> sAchievementStore;
extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions
-extern DBCStorage <AreaGroupEntry> sAreaGroupStore;
extern DBCStorage <AreaTriggerEntry> sAreaTriggerStore;
extern DBCStorage <ArmorLocationEntry> sArmorLocationStore;
extern DBCStorage <AuctionHouseEntry> sAuctionHouseStore;
@@ -149,7 +148,6 @@ extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore;
extern DBCStorage <CriteriaEntry> sCriteriaStore;
extern DBCStorage <CriteriaTreeEntry> sCriteriaTreeStore;
-extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore;
extern DBCStorage <DestructibleModelDataEntry> sDestructibleModelDataStore;
extern DBCStorage <DifficultyEntry> sDifficultyStore;
extern DBCStorage <DungeonEncounterEntry> sDungeonEncounterStore;
@@ -178,7 +176,6 @@ extern GameTable <GtNpcTotalHpExp2Entry> sGtNpcTotalHpExp2Store;
extern GameTable <GtNpcTotalHpExp3Entry> sGtNpcTotalHpExp3Store;
extern GameTable <GtNpcTotalHpExp4Entry> sGtNpcTotalHpExp4Store;
extern GameTable <GtNpcTotalHpExp5Entry> sGtNpcTotalHpExp5Store;
-extern GameTable <GtOCTClassCombatRatingScalarEntry> sGtOCTClassCombatRatingScalarStore;
extern GameTable <GtOCTLevelExperienceEntry> sGtOCTLevelExperienceStore;
extern GameTable <gtOCTHpPerStaminaEntry> sGtOCTHpPerStaminaStore;
extern GameTable <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
@@ -235,7 +232,6 @@ extern DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore;
extern DBCStorage <SkillLineEntry> sSkillLineStore;
extern DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore;
extern DBCStorage <SkillTiersEntry> sSkillTiersStore;
-extern DBCStorage <SoundEntriesEntry> sSoundEntriesStore;
extern SpellEffectScallingByEffectId sSpellEffectScallingByEffectId;
extern DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore;
extern DBCStorage <SpellCategoryEntry> sSpellCategoryStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index c5b6fe52ae4..ce76b94035d 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -104,15 +104,6 @@ struct AreaTableEntry
}
};
-#define MAX_GROUP_AREA_IDS 6
-
-struct AreaGroupEntry
-{
- uint32 ID; // 0
- uint32 AreaID[MAX_GROUP_AREA_IDS]; // 1-6
- uint32 NextAreaID; // 7 index of next group
-};
-
struct AreaTriggerEntry
{
uint32 ID; // 0
@@ -565,21 +556,6 @@ struct CurrencyCategoryEntry
};
*/
-struct CurrencyTypesEntry
-{
- uint32 ID; // 0
- uint32 CategoryID; // 1
- //char* Name_lang; // 2
- //char* InventoryIcon[2]; // 3-4
- //uint32 SpellWeight; // 5 archaeology-related (?)
- //uint32 SpellCategory; // 6
- uint32 MaxQty; // 7
- uint32 MaxEarnablePerWeek; // 8
- uint32 Flags; // 9
- //uint32 Quality; // 10
- //char* Description_lang; // 11
-};
-
struct DestructibleModelDataEntry
{
uint32 ID; // 0
@@ -885,11 +861,6 @@ struct GtChanceToSpellCritEntry
float ratio;
};
-struct GtOCTClassCombatRatingScalarEntry
-{
- float ratio;
-};
-
struct GtOCTLevelExperienceEntry
{
float Data;
@@ -1445,28 +1416,6 @@ struct SkillTiersEntry
uint32 Value[MAX_SKILL_STEP]; // 1-16
};
-struct SoundEntriesEntry
-{
- uint32 ID; // 0
- //uint32 SoundType; // 1
- //char* Name; // 2
- //uint32 FileDataID[20]; // 3-22
- //uint32 Freq[20]; // 23-42
- //float VolumeFloat; // 43
- //uint32 Flags; // 44
- //float MinDistance; // 45
- //float DistanceCutoff; // 46
- //uint32 EAXDef; // 47
- //uint32 SoundEntriesAdvancedID; // 48
- //float VolumeVariationPlus; // 49
- //float VolumeVariationMinus; // 50
- //float PitchVariationPlus; // 51
- //float PitchVariationMinus; // 52
- //float PitchAdjust; // 53
- //uint32 DialogType; // 54
- //uint32 BusOverwriteID; // 55
-};
-
// SpecializationSpells.dbc
struct SpecializationSpellsEntry
{
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index 7832ace476d..fa1e460e956 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -26,7 +26,6 @@ char const Achievementfmt[] = "niixsxiixixxiii";
const std::string CustomAchievementfmt = "pppaaaapapaapp";
const std::string CustomAchievementIndex = "ID";
char const AreaTableEntryfmt[] = "iiiniixxxxsxixiiiiixxxxxxxxxx";
-char const AreaGroupEntryfmt[] = "niiiiiii";
char const AreaTriggerEntryfmt[] = "nifffxxxfffffxxxx";
char const ArmorLocationfmt[] = "nfffff";
char const AuctionHouseEntryfmt[] = "niiix";
@@ -50,7 +49,6 @@ char const CreatureSpellDatafmt[] = "niiiixxxx";
char const CreatureTypefmt[] = "nxx";
char const Criteriafmt[] = "niiiiiiiixii";
char const CriteriaTreefmt[] = "niliixxx";
-char const CurrencyTypesfmt[] = "nixxxxxiiixx";
char const DestructibleModelDatafmt[] = "nixxxixxxxixxxxixxxxxxxx";
char const DifficultyFmt[] = "niiiixiixxxxi";
char const DungeonEncounterfmt[] = "niiixsxxx";
@@ -81,7 +79,6 @@ char const GtNpcTotalHpExp2fmt[] = "xf";
char const GtNpcTotalHpExp3fmt[] = "xf";
char const GtNpcTotalHpExp4fmt[] = "xf";
char const GtNpcTotalHpExp5fmt[] = "xf";
-char const GtOCTClassCombatRatingScalarfmt[] = "df";
char const GtOCTRegenHPfmt[] = "f";
//char const GtOCTRegenMPfmt[] = "f";
char const GtRegenMPPerSptfmt[] = "xf";
@@ -134,7 +131,6 @@ char const SkillLinefmt[] = "nisxixixx";
char const SkillLineAbilityfmt[] = "niiiiiiiiiiii";
char const SkillRaceClassInfofmt[] = "diiiixxi";
char const SkillTiersfmt[] = "niiiiiiiiiiiiiiii";
-char const SoundEntriesfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
char const SpecializationSpellsEntryfmt[] = "niiix";
char const SpellCastTimefmt[] = "nixx";
char const SpellCategoriesEntryfmt[] = "diiiiiiiii";
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index bd2c766ea27..299b68b9be1 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -5365,12 +5365,10 @@ float Player::GetRatingMultiplier(CombatRating cr) const
level = sGtCombatRatingsStore.GetTableRowCount() - 1;
GtCombatRatingsEntry const* Rating = sGtCombatRatingsStore.EvaluateTable(level - 1, cr);
- // gtOCTClassCombatRatingScalarStore.dbc starts with 1, CombatRating with zero, so cr+1
- GtOCTClassCombatRatingScalarEntry const* classRating = sGtOCTClassCombatRatingScalarStore.EvaluateTable(cr + 1, getClass() - 1);
- if (!Rating || !classRating || !Rating->ratio)
+ if (!Rating || !Rating->ratio)
return 1.0f; // By default use minimum coefficient (not must be called)
- return classRating->ratio / Rating->ratio;
+ return 1.0f / Rating->ratio;
}
float Player::GetRatingBonusValue(CombatRating cr) const
@@ -8800,7 +8798,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
packet.Worldstates.emplace_back(3191, int32(sWorld->getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS) ? sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) : 0)); // 7 Current Season - Arena season in progress
// 0 - End of season
- packet.Worldstates.emplace_back(3901, int32(sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) - sWorld->getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS))); // 8 PreviousSeason
+ packet.Worldstates.emplace_back(3901, int32(sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) - sWorld->getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS))); // 8 PreviousSeason
if (mapid == 530) // Outland
{
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 14fcef182a0..ebc4cf53b98 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1695,16 +1695,14 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
if (RequiredAreasID > 0)
{
bool found = false;
- AreaGroupEntry const* groupEntry = sAreaGroupStore.LookupEntry(RequiredAreasID);
- while (groupEntry)
+ std::vector<uint32> areaGroupMembers = sDB2Manager.GetAreasForGroup(RequiredAreasID);
+ for (uint32 areaId : areaGroupMembers)
{
- for (uint8 i = 0; i < MAX_GROUP_AREA_IDS; ++i)
- if (groupEntry->AreaID[i] == zone_id || groupEntry->AreaID[i] == area_id)
- found = true;
- if (found || !groupEntry->NextAreaID)
+ if (areaId == zone_id || areaId == area_id)
+ {
+ found = true;
break;
- // Try search in next group
- groupEntry = sAreaGroupStore.LookupEntry(groupEntry->NextAreaID);
+ }
}
if (!found)
diff --git a/src/server/shared/Database/Implementation/HotfixDatabase.cpp b/src/server/shared/Database/Implementation/HotfixDatabase.cpp
index 559ddd18b1e..f85c1e821a1 100644
--- a/src/server/shared/Database/Implementation/HotfixDatabase.cpp
+++ b/src/server/shared/Database/Implementation/HotfixDatabase.cpp
@@ -27,11 +27,21 @@ void HotfixDatabaseConnection::DoPrepareStatements()
if (!m_reconnecting)
m_stmts.resize(MAX_HOTFIXDATABASE_STATEMENTS);
+ // AreaGroup.db2
+ PrepareStatement(HOTFIX_SEL_AREA_GROUP, "SELECT ID FROM area_group ORDER BY ID DESC", CONNECTION_SYNCH);
+
+ // AreaGroupMember.db2
+ PrepareStatement(HOTFIX_SEL_AREA_GROUP_MEMBER, "SELECT ID, AreaGroupID, AreaID FROM area_group_member ORDER BY ID DESC", CONNECTION_SYNCH);
+
// BroadcastText.db2
PrepareStatement(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, Language, MaleText, FemaleText, EmoteID1, EmoteID2, EmoteID3, "
"EmoteDelay1, EmoteDelay2, EmoteDelay3, SoundID, UnkEmoteID, Type FROM broadcast_text ORDER BY ID DESC", CONNECTION_SYNCH);
PREPARE_LOCALE_STMT(HOTFIX_SEL_BROADCAST_TEXT, "SELECT ID, MaleText_lang, FemaleText_lang FROM broadcast_text_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);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_CURRENCY_TYPES, "SELECT ID, Name_lang, InventoryIcon1_lang, InventoryIcon2_lang, Description_lang FROM currency_types_locale WHERE locale = ?", CONNECTION_SYNCH);
+
// CurvePoint.db2
PrepareStatement(HOTFIX_SEL_CURVE_POINT, "SELECT ID, CurveID, `Index`, X, Y FROM curve_point ORDER BY ID DESC", CONNECTION_SYNCH);
@@ -63,13 +73,11 @@ void HotfixDatabaseConnection::DoPrepareStatements()
"FileDataID, GroupSoundsID FROM item ORDER BY ID DESC", CONNECTION_SYNCH);
// ItemExtendedCost.db2
- PrepareStatement(HOTFIX_SEL_ITEM_EXTENDED_COST, "SELECT ID, RequiredHonorPoints, RequiredArenaPoints, RequiredArenaSlot, "
- "RequiredItem1, RequiredItem2, RequiredItem3, RequiredItem4, RequiredItem5, "
- "RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, "
- "RequiredPersonalArenaRating, ItemPurchaseGroup, "
+ PrepareStatement(HOTFIX_SEL_ITEM_EXTENDED_COST, "SELECT ID, RequiredArenaSlot, RequiredItem1, RequiredItem2, RequiredItem3, RequiredItem4, RequiredItem5, "
+ "RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, RequiredPersonalArenaRating, ItemPurchaseGroup, "
"RequiredCurrency1, RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, RequiredCurrency5, "
"RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, "
- "RequiredFactionId, RequiredFactionStanding, RequirementFlags, RequiredAchievement FROM item_extended_cost ORDER BY ID DESC", CONNECTION_SYNCH);
+ "RequiredFactionId, RequiredFactionStanding, RequirementFlags, RequiredAchievement, RequiredMoney FROM item_extended_cost ORDER BY ID DESC", CONNECTION_SYNCH);
// ItemModifiedAppearance.db2
PrepareStatement(HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE, "SELECT ID, ItemID, AppearanceModID, AppearanceID, "
@@ -110,6 +118,15 @@ void HotfixDatabaseConnection::DoPrepareStatements()
// PhaseGroup.db2
PrepareStatement(HOTFIX_SEL_PHASE_GROUP, "SELECT ID, PhaseID, PhaseGroupID FROM phase_group ORDER BY ID DESC", CONNECTION_SYNCH);
+ // SoundEntries.db2
+ PrepareStatement(HOTFIX_SEL_SOUND_ENTRIES, "SELECT ID, SoundType, Name, FileDataID1, FileDataID2, FileDataID3, FileDataID4, FileDataID5, "
+ "FileDataID6, FileDataID7, FileDataID8, FileDataID9, FileDataID10, FileDataID11, FileDataID12, FileDataID13, FileDataID14, FileDataID15, "
+ "FileDataID16, FileDataID17, FileDataID18, FileDataID19, FileDataID20, Freq1, Freq2, Freq3, Freq4, Freq5, Freq6, Freq7, Freq8, Freq9, Freq10, "
+ "Freq11, Freq12, Freq13, Freq14, Freq15, Freq16, Freq17, Freq18, Freq19, Freq20, VolumeFloat, Flags, MinDistance, DistanceCutoff, "
+ "EAXDef, SoundEntriesAdvancedID, VolumeVariationPlus, VolumeVariationMinus, PitchVariationPlus, "
+ "PitchVariationMinus, PitchAdjust, DialogType, BusOverwriteID FROM sound_entries ORDER BY ID DESC", CONNECTION_SYNCH);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_SOUND_ENTRIES, "SELECT ID, Name_lang FROM sound_entries_locale WHERE locale = ?", CONNECTION_SYNCH);
+
// SpellAuraRestrictions.db2
PrepareStatement(HOTFIX_SEL_SPELL_AURA_RESTRICTIONS, "SELECT ID, CasterAuraState, TargetAuraState, ExcludeCasterAuraState, ExcludeTargetAuraState, "
"CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, ExcludeTargetAuraSpell FROM spell_aura_restrictions ORDER BY ID DESC", CONNECTION_SYNCH);
@@ -147,7 +164,7 @@ void HotfixDatabaseConnection::DoPrepareStatements()
// TaxiNodes.db2
PrepareStatement(HOTFIX_SEL_TAXI_NODES, "SELECT ID, MapID, PosX, PosY, PosZ, Name, MountCreatureID1, MountCreatureID2, ConditionID, "
- "Flags, MapOffsetX, MapOffsetY FROM taxi_nodes ORDER BY ID DESC", CONNECTION_SYNCH);
+ "LearnableIndex, Flags, MapOffsetX, MapOffsetY FROM taxi_nodes ORDER BY ID DESC", CONNECTION_SYNCH);
PREPARE_LOCALE_STMT(HOTFIX_SEL_TAXI_NODES, "SELECT ID, Name_lang FROM taxi_nodes_locale WHERE locale = ?", CONNECTION_SYNCH);
// TaxiPath.db2
diff --git a/src/server/shared/Database/Implementation/HotfixDatabase.h b/src/server/shared/Database/Implementation/HotfixDatabase.h
index 5ea7cc481aa..b5130ff6f20 100644
--- a/src/server/shared/Database/Implementation/HotfixDatabase.h
+++ b/src/server/shared/Database/Implementation/HotfixDatabase.h
@@ -42,9 +42,16 @@ enum HotfixDatabaseStatements
name for a suiting suffix.
*/
+ HOTFIX_SEL_AREA_GROUP,
+
+ HOTFIX_SEL_AREA_GROUP_MEMBER,
+
HOTFIX_SEL_BROADCAST_TEXT,
HOTFIX_SEL_BROADCAST_TEXT_LOCALE,
+ HOTFIX_SEL_CURRENCY_TYPES,
+ HOTFIX_SEL_CURRENCY_TYPES_LOCALE,
+
HOTFIX_SEL_CURVE_POINT,
HOTFIX_SEL_HOLIDAYS,
@@ -80,6 +87,9 @@ enum HotfixDatabaseStatements
HOTFIX_SEL_PHASE_GROUP,
+ HOTFIX_SEL_SOUND_ENTRIES,
+ HOTFIX_SEL_SOUND_ENTRIES_LOCALE,
+
HOTFIX_SEL_SPELL_AURA_RESTRICTIONS,
HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS,