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

Commit

Permalink
Core/Datastores: backported hotfix system implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovahlord committed Feb 21, 2020
1 parent 4bc9c07 commit d9b854a
Show file tree
Hide file tree
Showing 87 changed files with 2,224 additions and 2,248 deletions.
3 changes: 2 additions & 1 deletion revision_data.h.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
#define _BUILD_DIRECTORY R"(@BUILDDIR@)"
#define _MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)"
#define _FULL_DATABASE "TDB_full_world_434.34_2018_09_15.sql"
#define _HOTFIXES_DATABASE "TDB_full_hotfixes_434.01_2020_02_21.sql"
#define VER_COMPANYNAME_STR "TrinityCore Developers"
#define VER_LEGALCOPYRIGHT_STR "(c)2008-2018 TrinityCore"
#define VER_LEGALCOPYRIGHT_STR "(c)2008-2020 TrinityCore"
#define VER_FILEVERSION 0,0,0
#define VER_FILEVERSION_STR "@rev_hash@ @rev_date@ (@rev_branch@ branch)"
#define VER_PRODUCTVERSION VER_FILEVERSION
Expand Down
4 changes: 4 additions & 0 deletions sql/create/create_mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ CREATE DATABASE `characters` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

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

CREATE DATABASE `hotfixes` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

GRANT ALL PRIVILEGES ON `world` . * TO 'trinity'@'localhost' WITH GRANT OPTION;

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

GRANT ALL PRIVILEGES ON `auth` . * TO 'trinity'@'localhost' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON `hotfixes` . * TO 'trinity'@'localhost' WITH GRANT OPTION;
6 changes: 6 additions & 0 deletions sql/create/drop_mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ REVOKE ALL PRIVILEGES ON `auth` . * FROM 'trinity'@'localhost';

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

REVOKE ALL PRIVILEGES ON `hotfixes` . * FROM 'trinity'@'localhost';

REVOKE GRANT OPTION ON `hotfixes` . * FROM 'trinity'@'localhost';

DROP USER 'trinity'@'localhost';

DROP DATABASE IF EXISTS `world`;

DROP DATABASE IF EXISTS `characters`;

DROP DATABASE IF EXISTS `auth`;

DROP DATABASE IF EXISTS `hotfixes`;
4 changes: 4 additions & 0 deletions sql/updates/world/custom/custom_2020_02_21_00_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DROP TABLE IF EXISTS `hotfix_data`;
DROP TABLE IF EXISTS `keychain_db2`;
DROP TABLE IF EXISTS `item_template`;
DROP TABLE IF EXISTS `item_template_locale`;
5 changes: 5 additions & 0 deletions src/common/GitRevision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ char const* GitRevision::GetFullDatabase()
return _FULL_DATABASE;
}

char const* GitRevision::GetHotfixesDatabase()
{
return _HOTFIXES_DATABASE;
}

#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
# ifdef _WIN64
# define TRINITY_PLATFORM_STR "Win64"
Expand Down
1 change: 1 addition & 0 deletions src/common/GitRevision.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ namespace GitRevision
TC_COMMON_API char const* GetSourceDirectory();
TC_COMMON_API char const* GetMySQLExecutable();
TC_COMMON_API char const* GetFullDatabase();
TC_COMMON_API char const* GetHotfixesDatabase();
TC_COMMON_API char const* GetFullVersion();
TC_COMMON_API char const* GetCompanyNameStr();
TC_COMMON_API char const* GetLegalCopyrightStr();
Expand Down
1 change: 1 addition & 0 deletions src/server/database/Database/DatabaseEnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabase;
DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabase;
DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabase;
DatabaseWorkerPool<HotfixDatabaseConnection> HotfixDatabase;
3 changes: 3 additions & 0 deletions src/server/database/Database/DatabaseEnv.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "Implementation/LoginDatabase.h"
#include "Implementation/CharacterDatabase.h"
#include "Implementation/WorldDatabase.h"
#include "Implementation/HotfixDatabase.h"

#include "Field.h"
#include "PreparedStatement.h"
Expand All @@ -37,5 +38,7 @@ TC_DATABASE_API extern DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabase
TC_DATABASE_API extern DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabase;
/// Accessor to the realm/login database
TC_DATABASE_API extern DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabase;
/// Accessor to the hotfix database
TC_DATABASE_API extern DatabaseWorkerPool<HotfixDatabaseConnection> HotfixDatabase;

#endif
2 changes: 2 additions & 0 deletions src/server/database/Database/DatabaseLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,5 @@ template TC_DATABASE_API
DatabaseLoader& DatabaseLoader::AddDatabase<CharacterDatabaseConnection>(DatabaseWorkerPool<CharacterDatabaseConnection>&, std::string const&);
template TC_DATABASE_API
DatabaseLoader& DatabaseLoader::AddDatabase<WorldDatabaseConnection>(DatabaseWorkerPool<WorldDatabaseConnection>&, std::string const&);
template TC_DATABASE_API
DatabaseLoader& DatabaseLoader::AddDatabase<HotfixDatabaseConnection>(DatabaseWorkerPool<HotfixDatabaseConnection>&, std::string const&);
3 changes: 2 additions & 1 deletion src/server/database/Database/DatabaseLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ class TC_DATABASE_API DatabaseLoader
DATABASE_LOGIN = 1,
DATABASE_CHARACTER = 2,
DATABASE_WORLD = 4,
DATABASE_HOTFIX = 5,

DATABASE_MASK_ALL = DATABASE_LOGIN | DATABASE_CHARACTER | DATABASE_WORLD
DATABASE_MASK_ALL = DATABASE_LOGIN | DATABASE_CHARACTER | DATABASE_WORLD | DATABASE_HOTFIX
};

private:
Expand Down
3 changes: 3 additions & 0 deletions src/server/database/Database/DatabaseWorkerPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "Implementation/LoginDatabase.h"
#include "Implementation/WorldDatabase.h"
#include "Implementation/CharacterDatabase.h"
#include "Implementation/HotfixDatabase.h"
#include "Log.h"
#include "PreparedStatement.h"
#include "ProducerConsumerQueue.h"
Expand Down Expand Up @@ -470,3 +471,5 @@ void DatabaseWorkerPool<T>::ExecuteOrAppend(SQLTransaction& trans, PreparedState
template class TC_DATABASE_API DatabaseWorkerPool<LoginDatabaseConnection>;
template class TC_DATABASE_API DatabaseWorkerPool<WorldDatabaseConnection>;
template class TC_DATABASE_API DatabaseWorkerPool<CharacterDatabaseConnection>;
template class TC_DATABASE_API DatabaseWorkerPool<HotfixDatabaseConnection>;

87 changes: 87 additions & 0 deletions src/server/database/Database/Implementation/HotfixDatabase.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// DO NOT EDIT!
// Autogenerated from DB2Structure.h

#include "HotfixDatabase.h"

// Force locale statments to appear exactly in locale declaration order, right after normal data fetch statement
#define PREPARE_LOCALE_STMT(stmtBase, sql, con) \
static_assert(stmtBase + 1 == stmtBase##_LOCALE, "Invalid prepared statement index for " #stmtBase "_LOCALE"); \
PrepareStatement(stmtBase##_LOCALE, sql, con);

void HotfixDatabaseConnection::DoPrepareStatements()
{
if (!m_reconnecting)
m_stmts.resize(MAX_HOTFIXDATABASE_STATEMENTS);

// KeyChain.db2
PrepareStatement(HOTFIX_SEL_KEY_CHAIN, "SELECT Id, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, Key11, Key12, Key13, Key14, Key15, Key16, "
"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);

// Item.db2
PrepareStatement(HOTFIX_SEL_ITEM, "SELECT ID, Class, SubClass, SoundOverrideSubclass, Material, InventoryType, Sheath FROM item ORDER BY ID DESC", CONNECTION_SYNCH);

// ItemCurrencyCost.db2
PrepareStatement(HOTFIX_SEL_ITEM_CURRENCY_COST, "SELECT ID, ItemID FROM item_currency_cost ORDER BY ItemID 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, "
"RequiredCurrency1, RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, RequiredCurrency5, "
"RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, "
"RequiredFactionId, RequiredFactionStanding, RequirementFlags, RequiredAchievement FROM item_extended_cost ORDER BY ID DESC", CONNECTION_SYNCH);

// Item-sparse.db2
PrepareStatement(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Quality, Flags1, Flags2, Unk1, Unk2, BuyCount, BuyPrice, SellPrice, InventoryType, "
"AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, RequiredSpell, RequiredHonorRank, "
"RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, MaxCount, Stackable, ContainerSlots, "
"ItemStatType1, ItemStatType2, ItemStatType3, ItemStatType4, ItemStatType5, "
"ItemStatType6, ItemStatType7, ItemStatType8, ItemStatType9, ItemStatType10, "
"ItemStatValue1, ItemStatValue2, ItemStatValue3, ItemStatValue4, ItemStatValue5, "
"ItemStatValue6, ItemStatValue7, ItemStatValue8, ItemStatValue9, ItemStatValue10, "
"ItemStatAllocation1, ItemStatAllocation2, ItemStatAllocation3, ItemStatAllocation4, ItemStatAllocation5, "
"ItemStatAllocation6, ItemStatAllocation7, ItemStatAllocation8, ItemStatAllocation9, ItemStatAllocation10, "
"ItemStatSocketCostMultiplier1, ItemStatSocketCostMultiplier2, ItemStatSocketCostMultiplier3, ItemStatSocketCostMultiplier4, ItemStatSocketCostMultiplier5, "
"ItemStatSocketCostMultiplier6, ItemStatSocketCostMultiplier7, ItemStatSocketCostMultiplier8, ItemStatSocketCostMultiplier9, ItemStatSocketCostMultiplier10, "
"ScalingStatDistribution, DamageType, Delay, RangedModRange, "
"SpellID1, SpellID2, SpellID3, SpellID4, SpellID5, "
"SpellTrigger1, SpellTrigger2, SpellTrigger3, SpellTrigger4, SpellTrigger5, "
"SpellCharges1, SpellCharges2, SpellCharges3, SpellCharges4, SpellCharges5, "
"SpellCooldown1, SpellCooldown2, SpellCooldown3, SpellCooldown4, SpellCooldown5, "
"SpellCategory1, SpellCategory2, SpellCategory3, SpellCategory4, SpellCategory5, "
"SpellCategoryCooldown1, SpellCategoryCooldown2, SpellCategoryCooldown3, SpellCategoryCooldown4, SpellCategoryCooldown5, "
"Bonding, Name, Name2, Name3, Name4, Description, PageText, LanguageID, PageMaterial, StartQuest, LockID, Material, Sheath, RandomProperty, RandomSuffix, ItemSet, "
"Area, Map, BagFamily, TotemCategory, SocketColor1, SocketColor2, SocketColor3, Content1, Content2, Content3, SocketBonus, GemProperties, ArmorDamageModifier, "
"Duration, ItemLimitCategory, HolidayID, StatScalingFactor, CurrencySubstitutionID, CurrencySubstitutionCount FROM item_sparse ORDER BY ID DESC", CONNECTION_SYNCH);
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);
}

HotfixDatabaseConnection::HotfixDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo)
{
}

HotfixDatabaseConnection::HotfixDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo)
{
}

HotfixDatabaseConnection::~HotfixDatabaseConnection()
{
}
59 changes: 59 additions & 0 deletions src/server/database/Database/Implementation/HotfixDatabase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// DO NOT EDIT!
// Autogenerated from DB2Structure.h

#ifndef _HOTFIXDATABASE_H
#define _HOTFIXDATABASE_H

#include "MySQLConnection.h"

enum HotfixDatabaseStatements : uint32
{
/* Naming standard for defines:
{DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed}
When updating more than one field, consider looking at the calling function
name for a suiting suffix.
DB2 locale loading statements must have the name of base statement with locale enum value name suffix
*/

HOTFIX_SEL_KEY_CHAIN,
HOTFIX_SEL_ITEM,
HOTFIX_SEL_ITEM_CURRENCY_COST,
HOTFIX_SEL_ITEM_EXTENDED_COST,
HOTFIX_SEL_ITEM_SPARSE,
HOTFIX_SEL_ITEM_SPARSE_LOCALE,
MAX_HOTFIXDATABASE_STATEMENTS
};

class TC_DATABASE_API HotfixDatabaseConnection : public MySQLConnection
{
public:
typedef HotfixDatabaseStatements Statements;

//- Constructors for sync and async connections
HotfixDatabaseConnection(MySQLConnectionInfo& connInfo);
HotfixDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo);
~HotfixDatabaseConnection();

//- Loads database type specific prepared statements
void DoPrepareStatements() override;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ void WorldDatabaseConnection::DoPrepareStatements()
PrepareStatement(WORLD_SEL_COMMANDS, "SELECT name, permission, help FROM command", CONNECTION_SYNCH);
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);
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);
PrepareStatement(WORLD_SEL_ITEM_TEMPLATE_BY_NAME, "SELECT entry FROM item_template WHERE name = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?", CONNECTION_SYNCH);
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);
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ enum WorldDatabaseStatements : uint32
WORLD_SEL_COMMANDS,
WORLD_SEL_CREATURE_TEMPLATE,
WORLD_SEL_WAYPOINT_SCRIPT_BY_ID,
WORLD_SEL_ITEM_TEMPLATE_BY_NAME,
WORLD_SEL_CREATURE_BY_ID,
WORLD_SEL_GAMEOBJECT_NEAREST,
WORLD_SEL_CREATURE_NEAREST,
Expand Down
33 changes: 33 additions & 0 deletions src/server/database/Updater/DBUpdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,38 @@ bool DBUpdater<CharacterDatabaseConnection>::IsEnabled(uint32 const updateMask)
return (updateMask & DatabaseLoader::DATABASE_CHARACTER) ? true : false;
}

// Hotfix Database
template<>
std::string DBUpdater<HotfixDatabaseConnection>::GetConfigEntry()
{
return "Updates.Hotfix";
}

template<>
std::string DBUpdater<HotfixDatabaseConnection>::GetTableName()
{
return "Hotfixes";
}

template<>
std::string DBUpdater<HotfixDatabaseConnection>::GetBaseFile()
{
return GitRevision::GetHotfixesDatabase();
}

template<>
bool DBUpdater<HotfixDatabaseConnection>::IsEnabled(uint32 const updateMask)
{
// This way silences warnings under msvc
return (updateMask & DatabaseLoader::DATABASE_HOTFIX) ? true : false;
}

template<>
BaseLocation DBUpdater<HotfixDatabaseConnection>::GetBaseLocationType()
{
return LOCATION_DOWNLOAD;
}

// All
template<class T>
BaseLocation DBUpdater<T>::GetBaseLocationType()
Expand Down Expand Up @@ -391,3 +423,4 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
template class TC_DATABASE_API DBUpdater<LoginDatabaseConnection>;
template class TC_DATABASE_API DBUpdater<WorldDatabaseConnection>;
template class TC_DATABASE_API DBUpdater<CharacterDatabaseConnection>;
template class TC_DATABASE_API DBUpdater<HotfixDatabaseConnection>;
4 changes: 2 additions & 2 deletions src/server/game/AI/PlayerAI/PlayerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ bool PlayerAI::IsPlayerRangedAttacker(Player const* who)
// check if we have a ranged weapon equipped
Item const* rangedSlot = who->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED);
if (ItemTemplate const* rangedTemplate = rangedSlot ? rangedSlot->GetTemplate() : nullptr)
if ((1 << rangedTemplate->SubClass) & ITEM_SUBCLASS_MASK_WEAPON_RANGED)
if ((1 << rangedTemplate->GetSubClass()) & ITEM_SUBCLASS_MASK_WEAPON_RANGED)
return true;
return false;
}
Expand Down Expand Up @@ -640,7 +640,7 @@ void PlayerAI::DoRangedAttackIfReady()
Item const* rangedItem = me->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED);
if (ItemTemplate const* rangedTemplate = rangedItem ? rangedItem->GetTemplate() : nullptr)
{
switch (rangedTemplate->SubClass)
switch (rangedTemplate->GetSubClass())
{
case ITEM_SUBCLASS_WEAPON_BOW:
case ITEM_SUBCLASS_WEAPON_GUN:
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Accounts/RBAC.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ enum RBACPermissions
RBAC_PERM_COMMAND_RELOAD_CRETURE_TEXT_LOCALE = 659,
RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_TEMPLATE_LOCALE = 660,
RBAC_PERM_COMMAND_RELOAD_GOSSIP_MENU_OPTION_LOCALE = 661,
RBAC_PERM_COMMAND_RELOAD_ITEM_TEMPLATE_LOCALE = 662,
// UNUSED
RBAC_PERM_COMMAND_RELOAD_ITEM_SET_NAME_LOCALE = 663,
RBAC_PERM_COMMAND_RELOAD_NPC_TEXT_LOCALE = 664,
RBAC_PERM_COMMAND_RELOAD_PAGE_TEXT_LOCALE = 665,
Expand Down
Loading

0 comments on commit d9b854a

Please sign in to comment.