Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit d9b854a

Browse files
committed
Core/Datastores: backported hotfix system implementation
1 parent 4bc9c07 commit d9b854a

File tree

87 files changed

+2224
-2248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2224
-2248
lines changed

revision_data.h.in.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
#define _BUILD_DIRECTORY R"(@BUILDDIR@)"
1111
#define _MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)"
1212
#define _FULL_DATABASE "TDB_full_world_434.34_2018_09_15.sql"
13+
#define _HOTFIXES_DATABASE "TDB_full_hotfixes_434.01_2020_02_21.sql"
1314
#define VER_COMPANYNAME_STR "TrinityCore Developers"
14-
#define VER_LEGALCOPYRIGHT_STR "(c)2008-2018 TrinityCore"
15+
#define VER_LEGALCOPYRIGHT_STR "(c)2008-2020 TrinityCore"
1516
#define VER_FILEVERSION 0,0,0
1617
#define VER_FILEVERSION_STR "@rev_hash@ @rev_date@ (@rev_branch@ branch)"
1718
#define VER_PRODUCTVERSION VER_FILEVERSION

sql/create/create_mysql.sql

+4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
66

77
CREATE DATABASE `auth` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
88

9+
CREATE DATABASE `hotfixes` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
10+
911
GRANT ALL PRIVILEGES ON `world` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
1012

1113
GRANT ALL PRIVILEGES ON `characters` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
1214

1315
GRANT ALL PRIVILEGES ON `auth` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
16+
17+
GRANT ALL PRIVILEGES ON `hotfixes` . * TO 'trinity'@'localhost' WITH GRANT OPTION;

sql/create/drop_mysql.sql

+6
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ REVOKE ALL PRIVILEGES ON `auth` . * FROM 'trinity'@'localhost';
1212

1313
REVOKE GRANT OPTION ON `auth` . * FROM 'trinity'@'localhost';
1414

15+
REVOKE ALL PRIVILEGES ON `hotfixes` . * FROM 'trinity'@'localhost';
16+
17+
REVOKE GRANT OPTION ON `hotfixes` . * FROM 'trinity'@'localhost';
18+
1519
DROP USER 'trinity'@'localhost';
1620

1721
DROP DATABASE IF EXISTS `world`;
1822

1923
DROP DATABASE IF EXISTS `characters`;
2024

2125
DROP DATABASE IF EXISTS `auth`;
26+
27+
DROP DATABASE IF EXISTS `hotfixes`;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DROP TABLE IF EXISTS `hotfix_data`;
2+
DROP TABLE IF EXISTS `keychain_db2`;
3+
DROP TABLE IF EXISTS `item_template`;
4+
DROP TABLE IF EXISTS `item_template_locale`;

src/common/GitRevision.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ char const* GitRevision::GetFullDatabase()
6868
return _FULL_DATABASE;
6969
}
7070

71+
char const* GitRevision::GetHotfixesDatabase()
72+
{
73+
return _HOTFIXES_DATABASE;
74+
}
75+
7176
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
7277
# ifdef _WIN64
7378
# define TRINITY_PLATFORM_STR "Win64"

src/common/GitRevision.h

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ namespace GitRevision
3232
TC_COMMON_API char const* GetSourceDirectory();
3333
TC_COMMON_API char const* GetMySQLExecutable();
3434
TC_COMMON_API char const* GetFullDatabase();
35+
TC_COMMON_API char const* GetHotfixesDatabase();
3536
TC_COMMON_API char const* GetFullVersion();
3637
TC_COMMON_API char const* GetCompanyNameStr();
3738
TC_COMMON_API char const* GetLegalCopyrightStr();

src/server/database/Database/DatabaseEnv.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabase;
2121
DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabase;
2222
DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabase;
23+
DatabaseWorkerPool<HotfixDatabaseConnection> HotfixDatabase;

src/server/database/Database/DatabaseEnv.h

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "Implementation/LoginDatabase.h"
2525
#include "Implementation/CharacterDatabase.h"
2626
#include "Implementation/WorldDatabase.h"
27+
#include "Implementation/HotfixDatabase.h"
2728

2829
#include "Field.h"
2930
#include "PreparedStatement.h"
@@ -37,5 +38,7 @@ TC_DATABASE_API extern DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabase
3738
TC_DATABASE_API extern DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabase;
3839
/// Accessor to the realm/login database
3940
TC_DATABASE_API extern DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabase;
41+
/// Accessor to the hotfix database
42+
TC_DATABASE_API extern DatabaseWorkerPool<HotfixDatabaseConnection> HotfixDatabase;
4043

4144
#endif

src/server/database/Database/DatabaseLoader.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,5 @@ template TC_DATABASE_API
184184
DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&, std::string const&);
185185
template TC_DATABASE_API
186186
DatabaseLoader& DatabaseLoader::AddDatabase<WorldDatabaseConnection>(DatabaseWorkerPool<WorldDatabaseConnection>&, std::string const&);
187+
template TC_DATABASE_API
188+
DatabaseLoader& DatabaseLoader::AddDatabase<HotfixDatabaseConnection>(DatabaseWorkerPool<HotfixDatabaseConnection>&, std::string const&);

src/server/database/Database/DatabaseLoader.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ class TC_DATABASE_API DatabaseLoader
4848
DATABASE_LOGIN = 1,
4949
DATABASE_CHARACTER = 2,
5050
DATABASE_WORLD = 4,
51+
DATABASE_HOTFIX = 5,
5152

52-
DATABASE_MASK_ALL = DATABASE_LOGIN | DATABASE_CHARACTER | DATABASE_WORLD
53+
DATABASE_MASK_ALL = DATABASE_LOGIN | DATABASE_CHARACTER | DATABASE_WORLD | DATABASE_HOTFIX
5354
};
5455

5556
private:

src/server/database/Database/DatabaseWorkerPool.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "Implementation/LoginDatabase.h"
2323
#include "Implementation/WorldDatabase.h"
2424
#include "Implementation/CharacterDatabase.h"
25+
#include "Implementation/HotfixDatabase.h"
2526
#include "Log.h"
2627
#include "PreparedStatement.h"
2728
#include "ProducerConsumerQueue.h"
@@ -470,3 +471,5 @@ void DatabaseWorkerPool<T>::ExecuteOrAppend(SQLTransaction& trans, PreparedState
470471
template class TC_DATABASE_API DatabaseWorkerPool<LoginDatabaseConnection>;
471472
template class TC_DATABASE_API DatabaseWorkerPool<WorldDatabaseConnection>;
472473
template class TC_DATABASE_API DatabaseWorkerPool<CharacterDatabaseConnection>;
474+
template class TC_DATABASE_API DatabaseWorkerPool<HotfixDatabaseConnection>;
475+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3+
*
4+
* This program is free software; you can redistribute it and/or modify it
5+
* under the terms of the GNU General Public License as published by the
6+
* Free Software Foundation; either version 2 of the License, or (at your
7+
* option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12+
* more details.
13+
*
14+
* You should have received a copy of the GNU General Public License along
15+
* with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
// DO NOT EDIT!
19+
// Autogenerated from DB2Structure.h
20+
21+
#include "HotfixDatabase.h"
22+
23+
// Force locale statments to appear exactly in locale declaration order, right after normal data fetch statement
24+
#define PREPARE_LOCALE_STMT(stmtBase, sql, con) \
25+
static_assert(stmtBase + 1 == stmtBase##_LOCALE, "Invalid prepared statement index for " #stmtBase "_LOCALE"); \
26+
PrepareStatement(stmtBase##_LOCALE, sql, con);
27+
28+
void HotfixDatabaseConnection::DoPrepareStatements()
29+
{
30+
if (!m_reconnecting)
31+
m_stmts.resize(MAX_HOTFIXDATABASE_STATEMENTS);
32+
33+
// KeyChain.db2
34+
PrepareStatement(HOTFIX_SEL_KEY_CHAIN, "SELECT Id, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, Key11, Key12, Key13, Key14, Key15, Key16, "
35+
"Key17, Key18, Key19, Key20, Key21, Key22, Key23, Key24, Key25, Key26, Key27, Key28, Key29, Key30, Key31, Key32 FROM key_chain ORDER BY ID DESC", CONNECTION_SYNCH);
36+
37+
// Item.db2
38+
PrepareStatement(HOTFIX_SEL_ITEM, "SELECT ID, Class, SubClass, SoundOverrideSubclass, Material, InventoryType, Sheath FROM item ORDER BY ID DESC", CONNECTION_SYNCH);
39+
40+
// ItemCurrencyCost.db2
41+
PrepareStatement(HOTFIX_SEL_ITEM_CURRENCY_COST, "SELECT ID, ItemID FROM item_currency_cost ORDER BY ItemID DESC", CONNECTION_SYNCH);
42+
43+
// ItemExtendedCost.db2
44+
PrepareStatement(HOTFIX_SEL_ITEM_EXTENDED_COST, "SELECT ID, RequiredHonorPoints, RequiredArenaPoints, RequiredArenaSlot, "
45+
"RequiredItem1, RequiredItem2, RequiredItem3, RequiredItem4, RequiredItem5, "
46+
"RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, "
47+
"RequiredPersonalArenaRating, ItemPurchaseGroup, "
48+
"RequiredCurrency1, RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, RequiredCurrency5, "
49+
"RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, "
50+
"RequiredFactionId, RequiredFactionStanding, RequirementFlags, RequiredAchievement FROM item_extended_cost ORDER BY ID DESC", CONNECTION_SYNCH);
51+
52+
// Item-sparse.db2
53+
PrepareStatement(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Quality, Flags1, Flags2, Unk1, Unk2, BuyCount, BuyPrice, SellPrice, InventoryType, "
54+
"AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, RequiredSpell, RequiredHonorRank, "
55+
"RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, MaxCount, Stackable, ContainerSlots, "
56+
"ItemStatType1, ItemStatType2, ItemStatType3, ItemStatType4, ItemStatType5, "
57+
"ItemStatType6, ItemStatType7, ItemStatType8, ItemStatType9, ItemStatType10, "
58+
"ItemStatValue1, ItemStatValue2, ItemStatValue3, ItemStatValue4, ItemStatValue5, "
59+
"ItemStatValue6, ItemStatValue7, ItemStatValue8, ItemStatValue9, ItemStatValue10, "
60+
"ItemStatAllocation1, ItemStatAllocation2, ItemStatAllocation3, ItemStatAllocation4, ItemStatAllocation5, "
61+
"ItemStatAllocation6, ItemStatAllocation7, ItemStatAllocation8, ItemStatAllocation9, ItemStatAllocation10, "
62+
"ItemStatSocketCostMultiplier1, ItemStatSocketCostMultiplier2, ItemStatSocketCostMultiplier3, ItemStatSocketCostMultiplier4, ItemStatSocketCostMultiplier5, "
63+
"ItemStatSocketCostMultiplier6, ItemStatSocketCostMultiplier7, ItemStatSocketCostMultiplier8, ItemStatSocketCostMultiplier9, ItemStatSocketCostMultiplier10, "
64+
"ScalingStatDistribution, DamageType, Delay, RangedModRange, "
65+
"SpellID1, SpellID2, SpellID3, SpellID4, SpellID5, "
66+
"SpellTrigger1, SpellTrigger2, SpellTrigger3, SpellTrigger4, SpellTrigger5, "
67+
"SpellCharges1, SpellCharges2, SpellCharges3, SpellCharges4, SpellCharges5, "
68+
"SpellCooldown1, SpellCooldown2, SpellCooldown3, SpellCooldown4, SpellCooldown5, "
69+
"SpellCategory1, SpellCategory2, SpellCategory3, SpellCategory4, SpellCategory5, "
70+
"SpellCategoryCooldown1, SpellCategoryCooldown2, SpellCategoryCooldown3, SpellCategoryCooldown4, SpellCategoryCooldown5, "
71+
"Bonding, Name, Name2, Name3, Name4, Description, PageText, LanguageID, PageMaterial, StartQuest, LockID, Material, Sheath, RandomProperty, RandomSuffix, ItemSet, "
72+
"Area, Map, BagFamily, TotemCategory, SocketColor1, SocketColor2, SocketColor3, Content1, Content2, Content3, SocketBonus, GemProperties, ArmorDamageModifier, "
73+
"Duration, ItemLimitCategory, HolidayID, StatScalingFactor, CurrencySubstitutionID, CurrencySubstitutionCount FROM item_sparse ORDER BY ID DESC", CONNECTION_SYNCH);
74+
PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Name_lang, Name2_lang, Name3_lang, Name4_lang, Description_lang FROM item_sparse_locale WHERE locale = ?", CONNECTION_SYNCH);
75+
}
76+
77+
HotfixDatabaseConnection::HotfixDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo)
78+
{
79+
}
80+
81+
HotfixDatabaseConnection::HotfixDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo)
82+
{
83+
}
84+
85+
HotfixDatabaseConnection::~HotfixDatabaseConnection()
86+
{
87+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3+
*
4+
* This program is free software; you can redistribute it and/or modify it
5+
* under the terms of the GNU General Public License as published by the
6+
* Free Software Foundation; either version 2 of the License, or (at your
7+
* option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12+
* more details.
13+
*
14+
* You should have received a copy of the GNU General Public License along
15+
* with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
// DO NOT EDIT!
19+
// Autogenerated from DB2Structure.h
20+
21+
#ifndef _HOTFIXDATABASE_H
22+
#define _HOTFIXDATABASE_H
23+
24+
#include "MySQLConnection.h"
25+
26+
enum HotfixDatabaseStatements : uint32
27+
{
28+
/* Naming standard for defines:
29+
{DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed}
30+
When updating more than one field, consider looking at the calling function
31+
name for a suiting suffix.
32+
33+
DB2 locale loading statements must have the name of base statement with locale enum value name suffix
34+
*/
35+
36+
HOTFIX_SEL_KEY_CHAIN,
37+
HOTFIX_SEL_ITEM,
38+
HOTFIX_SEL_ITEM_CURRENCY_COST,
39+
HOTFIX_SEL_ITEM_EXTENDED_COST,
40+
HOTFIX_SEL_ITEM_SPARSE,
41+
HOTFIX_SEL_ITEM_SPARSE_LOCALE,
42+
MAX_HOTFIXDATABASE_STATEMENTS
43+
};
44+
45+
class TC_DATABASE_API HotfixDatabaseConnection : public MySQLConnection
46+
{
47+
public:
48+
typedef HotfixDatabaseStatements Statements;
49+
50+
//- Constructors for sync and async connections
51+
HotfixDatabaseConnection(MySQLConnectionInfo& connInfo);
52+
HotfixDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo);
53+
~HotfixDatabaseConnection();
54+
55+
//- Loads database type specific prepared statements
56+
void DoPrepareStatements() override;
57+
};
58+
59+
#endif

src/server/database/Database/Implementation/WorldDatabase.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ void WorldDatabaseConnection::DoPrepareStatements()
7979
PrepareStatement(WORLD_SEL_COMMANDS, "SELECT name, permission, help FROM command", CONNECTION_SYNCH);
8080
PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, femaleName, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, exp_unk, faction, npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, dynamicflags, family, trainer_class, type, type_flags, type_flags2, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, ctm.Ground, ctm.Swim, ctm.Flight, ctm.Rooted, HoverHeight, HealthModifier, HealthModifierExtra, ManaModifier, ManaModifierExtra, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, movementId, RegenHealth, mechanic_immune_mask, spell_school_immune_mask, flags_extra, ScriptName FROM creature_template ct LEFT JOIN creature_template_movement ctm ON ct.entry = ctm.CreatureId WHERE entry = ?", CONNECTION_SYNCH);
8181
PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?", CONNECTION_SYNCH);
82-
PrepareStatement(WORLD_SEL_ITEM_TEMPLATE_BY_NAME, "SELECT entry FROM item_template WHERE name = ?", CONNECTION_SYNCH);
8382
PrepareStatement(WORLD_SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?", CONNECTION_SYNCH);
8483
PrepareStatement(WORLD_SEL_GAMEOBJECT_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM gameobject WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? ORDER BY order_", CONNECTION_SYNCH);
8584
PrepareStatement(WORLD_SEL_CREATURE_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM creature WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? ORDER BY order_", CONNECTION_SYNCH);

src/server/database/Database/Implementation/WorldDatabase.h

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ enum WorldDatabaseStatements : uint32
8484
WORLD_SEL_COMMANDS,
8585
WORLD_SEL_CREATURE_TEMPLATE,
8686
WORLD_SEL_WAYPOINT_SCRIPT_BY_ID,
87-
WORLD_SEL_ITEM_TEMPLATE_BY_NAME,
8887
WORLD_SEL_CREATURE_BY_ID,
8988
WORLD_SEL_GAMEOBJECT_NEAREST,
9089
WORLD_SEL_CREATURE_NEAREST,

src/server/database/Updater/DBUpdater.cpp

+33
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,38 @@ bool DBUpdater<CharacterDatabaseConnection>::IsEnabled(uint32 const updateMask)
150150
return (updateMask & DatabaseLoader::DATABASE_CHARACTER) ? true : false;
151151
}
152152

153+
// Hotfix Database
154+
template<>
155+
std::string DBUpdater<HotfixDatabaseConnection>::GetConfigEntry()
156+
{
157+
return "Updates.Hotfix";
158+
}
159+
160+
template<>
161+
std::string DBUpdater<HotfixDatabaseConnection>::GetTableName()
162+
{
163+
return "Hotfixes";
164+
}
165+
166+
template<>
167+
std::string DBUpdater<HotfixDatabaseConnection>::GetBaseFile()
168+
{
169+
return GitRevision::GetHotfixesDatabase();
170+
}
171+
172+
template<>
173+
bool DBUpdater<HotfixDatabaseConnection>::IsEnabled(uint32 const updateMask)
174+
{
175+
// This way silences warnings under msvc
176+
return (updateMask & DatabaseLoader::DATABASE_HOTFIX) ? true : false;
177+
}
178+
179+
template<>
180+
BaseLocation DBUpdater<HotfixDatabaseConnection>::GetBaseLocationType()
181+
{
182+
return LOCATION_DOWNLOAD;
183+
}
184+
153185
// All
154186
template<class T>
155187
BaseLocation DBUpdater<T>::GetBaseLocationType()
@@ -391,3 +423,4 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
391423
template class TC_DATABASE_API DBUpdater<LoginDatabaseConnection>;
392424
template class TC_DATABASE_API DBUpdater<WorldDatabaseConnection>;
393425
template class TC_DATABASE_API DBUpdater<CharacterDatabaseConnection>;
426+
template class TC_DATABASE_API DBUpdater<HotfixDatabaseConnection>;

src/server/game/AI/PlayerAI/PlayerAI.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ bool PlayerAI::IsPlayerRangedAttacker(Player const* who)
509509
// check if we have a ranged weapon equipped
510510
Item const* rangedSlot = who->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED);
511511
if (ItemTemplate const* rangedTemplate = rangedSlot ? rangedSlot->GetTemplate() : nullptr)
512-
if ((1 << rangedTemplate->SubClass) & ITEM_SUBCLASS_MASK_WEAPON_RANGED)
512+
if ((1 << rangedTemplate->GetSubClass()) & ITEM_SUBCLASS_MASK_WEAPON_RANGED)
513513
return true;
514514
return false;
515515
}
@@ -640,7 +640,7 @@ void PlayerAI::DoRangedAttackIfReady()
640640
Item const* rangedItem = me->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED);
641641
if (ItemTemplate const* rangedTemplate = rangedItem ? rangedItem->GetTemplate() : nullptr)
642642
{
643-
switch (rangedTemplate->SubClass)
643+
switch (rangedTemplate->GetSubClass())
644644
{
645645
case ITEM_SUBCLASS_WEAPON_BOW:
646646
case ITEM_SUBCLASS_WEAPON_GUN:

src/server/game/Accounts/RBAC.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ enum RBACPermissions
559559
RBAC_PERM_COMMAND_RELOAD_CRETURE_TEXT_LOCALE = 659,
560560
RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_TEMPLATE_LOCALE = 660,
561561
RBAC_PERM_COMMAND_RELOAD_GOSSIP_MENU_OPTION_LOCALE = 661,
562-
RBAC_PERM_COMMAND_RELOAD_ITEM_TEMPLATE_LOCALE = 662,
562+
// UNUSED
563563
RBAC_PERM_COMMAND_RELOAD_ITEM_SET_NAME_LOCALE = 663,
564564
RBAC_PERM_COMMAND_RELOAD_NPC_TEXT_LOCALE = 664,
565565
RBAC_PERM_COMMAND_RELOAD_PAGE_TEXT_LOCALE = 665,

0 commit comments

Comments
 (0)