Sync with 3.3.5a core
This commit is contained in:
1 parent
0ac5f4a440
commit
303082546b
67 files changed
+254
-177
No files matched your search
@@ -27,6 +27,12 @@
|
||||
|
||||
#include "SmartScriptMgr.h"
|
||||
|
||||
SmartWaypointMgr* SmartWaypointMgr::instance()
|
||||
{
|
||||
static SmartWaypointMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void SmartWaypointMgr::LoadFromDB()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
@@ -98,6 +104,12 @@ SmartWaypointMgr::~SmartWaypointMgr()
|
||||
}
|
||||
}
|
||||
|
||||
SmartAIMgr* SmartAIMgr::instance()
|
||||
{
|
||||
static SmartAIMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void SmartAIMgr::LoadSmartAIFromDB()
|
||||
{
|
||||
LoadHelperStores();
|
||||
|
||||
@@ -1455,11 +1455,7 @@ class SmartWaypointMgr
|
||||
~SmartWaypointMgr();
|
||||
|
||||
public:
|
||||
static SmartWaypointMgr* instance()
|
||||
{
|
||||
static SmartWaypointMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static SmartWaypointMgr* instance();
|
||||
|
||||
void LoadFromDB();
|
||||
|
||||
@@ -1491,11 +1487,7 @@ class SmartAIMgr
|
||||
~SmartAIMgr() { }
|
||||
|
||||
public:
|
||||
static SmartAIMgr* instance()
|
||||
{
|
||||
static SmartAIMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static SmartAIMgr* instance();
|
||||
|
||||
void LoadSmartAIFromDB();
|
||||
|
||||
|
||||
@@ -33,6 +33,12 @@ AccountMgr::~AccountMgr()
|
||||
ClearRBAC();
|
||||
}
|
||||
|
||||
AccountMgr* AccountMgr::instance()
|
||||
{
|
||||
static AccountMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
AccountOpResult AccountMgr::CreateAccount(std::string username, std::string password, std::string email /*= ""*/)
|
||||
{
|
||||
if (utf8length(username) > MAX_ACCOUNT_STR)
|
||||
|
||||
@@ -56,11 +56,7 @@ class AccountMgr
|
||||
~AccountMgr();
|
||||
|
||||
public:
|
||||
static AccountMgr* instance()
|
||||
{
|
||||
static AccountMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static AccountMgr* instance();
|
||||
|
||||
AccountOpResult CreateAccount(std::string username, std::string password, std::string email = "");
|
||||
static AccountOpResult DeleteAccount(uint32 accountId);
|
||||
|
||||
@@ -3131,6 +3131,12 @@ char const* AchievementGlobalMgr::GetCriteriaTypeString(AchievementCriteriaTypes
|
||||
template class AchievementMgr<Guild>;
|
||||
template class AchievementMgr<Player>;
|
||||
|
||||
AchievementGlobalMgr* AchievementGlobalMgr::instance()
|
||||
{
|
||||
static AchievementGlobalMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
//==========================================================
|
||||
void AchievementGlobalMgr::LoadAchievementCriteriaList()
|
||||
{
|
||||
|
||||
@@ -307,11 +307,7 @@ class AchievementGlobalMgr
|
||||
static char const* GetCriteriaTypeString(AchievementCriteriaTypes type);
|
||||
static char const* GetCriteriaTypeString(uint32 type);
|
||||
|
||||
static AchievementGlobalMgr* instance()
|
||||
{
|
||||
static AchievementGlobalMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static AchievementGlobalMgr* instance();
|
||||
|
||||
AchievementCriteriaEntryList const& GetAchievementCriteriaByType(AchievementCriteriaTypes type, bool guild = false) const
|
||||
{
|
||||
|
||||
@@ -44,6 +44,12 @@ AuctionHouseMgr::~AuctionHouseMgr()
|
||||
delete itr->second;
|
||||
}
|
||||
|
||||
AuctionHouseMgr* AuctionHouseMgr::instance()
|
||||
{
|
||||
static AuctionHouseMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
AuctionHouseObject* AuctionHouseMgr::GetAuctionsMap(uint32 factionTemplateId)
|
||||
{
|
||||
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
|
||||
|
||||
@@ -153,11 +153,7 @@ class AuctionHouseMgr
|
||||
~AuctionHouseMgr();
|
||||
|
||||
public:
|
||||
static AuctionHouseMgr* instance()
|
||||
{
|
||||
static AuctionHouseMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static AuctionHouseMgr* instance();
|
||||
|
||||
typedef std::unordered_map<ObjectGuid::LowType, Item*> ItemMap;
|
||||
typedef std::vector<AuctionEntry*> PlayerAuctions;
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
#include "AuctionHouseBotBuyer.h"
|
||||
#include "AuctionHouseBotSeller.h"
|
||||
|
||||
AuctionBotConfig* AuctionBotConfig::instance()
|
||||
{
|
||||
static AuctionBotConfig instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
bool AuctionBotConfig::Initialize()
|
||||
{
|
||||
GetConfigFromFile();
|
||||
@@ -426,6 +432,12 @@ void AuctionHouseBot::Rebuild(bool all)
|
||||
}
|
||||
}
|
||||
|
||||
AuctionHouseBot* AuctionHouseBot::instance()
|
||||
{
|
||||
static AuctionHouseBot instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void AuctionHouseBot::Update()
|
||||
{
|
||||
// nothing do...
|
||||
|
||||
@@ -205,11 +205,7 @@ private:
|
||||
AuctionBotConfig& operator=(const AuctionBotConfig&);
|
||||
|
||||
public:
|
||||
static AuctionBotConfig* instance()
|
||||
{
|
||||
static AuctionBotConfig instance;
|
||||
return &instance;
|
||||
}
|
||||
static AuctionBotConfig* instance();
|
||||
|
||||
bool Initialize();
|
||||
const std::string& GetAHBotIncludes() const { return _AHBotIncludes; }
|
||||
@@ -283,11 +279,7 @@ private:
|
||||
AuctionHouseBot& operator=(const AuctionHouseBot&);
|
||||
|
||||
public:
|
||||
static AuctionHouseBot* instance()
|
||||
{
|
||||
static AuctionHouseBot instance;
|
||||
return &instance;
|
||||
}
|
||||
static AuctionHouseBot* instance();
|
||||
|
||||
void Update();
|
||||
void Initialize();
|
||||
|
||||
@@ -32,6 +32,12 @@ BattlefieldMgr::~BattlefieldMgr()
|
||||
_battlefieldMap.clear();
|
||||
}
|
||||
|
||||
BattlefieldMgr* BattlefieldMgr::instance()
|
||||
{
|
||||
static BattlefieldMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void BattlefieldMgr::InitBattlefield()
|
||||
{
|
||||
Battlefield* wg = new BattlefieldWG();
|
||||
|
||||
@@ -27,11 +27,7 @@ class ZoneScript;
|
||||
class BattlefieldMgr
|
||||
{
|
||||
public:
|
||||
static BattlefieldMgr* instance()
|
||||
{
|
||||
static BattlefieldMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static BattlefieldMgr* instance();
|
||||
|
||||
// create battlefield events
|
||||
void InitBattlefield();
|
||||
|
||||
@@ -35,6 +35,12 @@ ArenaTeamMgr::~ArenaTeamMgr()
|
||||
delete itr->second;
|
||||
}
|
||||
|
||||
ArenaTeamMgr* ArenaTeamMgr::instance()
|
||||
{
|
||||
static ArenaTeamMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
// Arena teams collection
|
||||
ArenaTeam* ArenaTeamMgr::GetArenaTeamById(uint32 arenaTeamId) const
|
||||
{
|
||||
|
||||
@@ -27,11 +27,7 @@ private:
|
||||
~ArenaTeamMgr();
|
||||
|
||||
public:
|
||||
static ArenaTeamMgr* instance()
|
||||
{
|
||||
static ArenaTeamMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static ArenaTeamMgr* instance();
|
||||
|
||||
typedef std::unordered_map<uint32, ArenaTeam*> ArenaTeamContainer;
|
||||
|
||||
|
||||
@@ -77,6 +77,12 @@ void BattlegroundMgr::DeleteAllBattlegrounds()
|
||||
bgDataStore.clear();
|
||||
}
|
||||
|
||||
BattlegroundMgr* BattlegroundMgr::instance()
|
||||
{
|
||||
static BattlegroundMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
// used to update running battlegrounds, and delete finished ones
|
||||
void BattlegroundMgr::Update(uint32 diff)
|
||||
{
|
||||
|
||||
@@ -61,11 +61,7 @@ class BattlegroundMgr
|
||||
~BattlegroundMgr();
|
||||
|
||||
public:
|
||||
static BattlegroundMgr* instance()
|
||||
{
|
||||
static BattlegroundMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static BattlegroundMgr* instance();
|
||||
|
||||
void Update(uint32 diff);
|
||||
|
||||
|
||||
@@ -45,6 +45,12 @@ CalendarMgr::~CalendarMgr()
|
||||
delete *itr2;
|
||||
}
|
||||
|
||||
CalendarMgr* CalendarMgr::instance()
|
||||
{
|
||||
static CalendarMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void CalendarMgr::LoadFromDB()
|
||||
{
|
||||
uint32 count = 0;
|
||||
|
||||
@@ -282,11 +282,7 @@ class CalendarMgr
|
||||
uint64 _maxInviteId;
|
||||
|
||||
public:
|
||||
static CalendarMgr* instance()
|
||||
{
|
||||
static CalendarMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static CalendarMgr* instance();
|
||||
|
||||
void LoadFromDB();
|
||||
|
||||
|
||||
@@ -942,6 +942,12 @@ bool ConditionMgr::IsObjectMeetingVendorItemConditions(uint32 creatureId, uint32
|
||||
return true;
|
||||
}
|
||||
|
||||
ConditionMgr* ConditionMgr::instance()
|
||||
{
|
||||
static ConditionMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void ConditionMgr::LoadConditions(bool isReload)
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -231,11 +231,7 @@ class ConditionMgr
|
||||
~ConditionMgr();
|
||||
|
||||
public:
|
||||
static ConditionMgr* instance()
|
||||
{
|
||||
static ConditionMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static ConditionMgr* instance();
|
||||
|
||||
void LoadConditions(bool isReload = false);
|
||||
bool isConditionTypeValid(Condition* cond) const;
|
||||
|
||||
@@ -258,6 +258,12 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
|
||||
CachedDungeonMapStore.clear();
|
||||
}
|
||||
|
||||
LFGMgr* LFGMgr::instance()
|
||||
{
|
||||
static LFGMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void LFGMgr::Update(uint32 diff)
|
||||
{
|
||||
if (!isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER))
|
||||
|
||||
@@ -302,11 +302,7 @@ class LFGMgr
|
||||
~LFGMgr();
|
||||
|
||||
public:
|
||||
static LFGMgr* instance()
|
||||
{
|
||||
static LFGMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static LFGMgr* instance();
|
||||
|
||||
// Functions used outside lfg namespace
|
||||
void Update(uint32 diff);
|
||||
|
||||
@@ -30,6 +30,12 @@ FormationMgr::~FormationMgr()
|
||||
delete itr->second;
|
||||
}
|
||||
|
||||
FormationMgr* FormationMgr::instance()
|
||||
{
|
||||
static FormationMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void FormationMgr::AddCreatureToGroup(uint32 leaderGuid, Creature* creature)
|
||||
{
|
||||
Map* map = creature->FindMap();
|
||||
|
||||
@@ -45,11 +45,7 @@ class FormationMgr
|
||||
~FormationMgr();
|
||||
|
||||
public:
|
||||
static FormationMgr* instance()
|
||||
{
|
||||
static FormationMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static FormationMgr* instance();
|
||||
|
||||
void AddCreatureToGroup(uint32 group_id, Creature* creature);
|
||||
void RemoveCreatureFromGroup(CreatureGroup* group, Creature* creature);
|
||||
|
||||
@@ -196,6 +196,12 @@ SocialMgr::SocialMgr() { }
|
||||
|
||||
SocialMgr::~SocialMgr() { }
|
||||
|
||||
SocialMgr* SocialMgr::instance()
|
||||
{
|
||||
static SocialMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void SocialMgr::GetFriendInfo(Player* player, ObjectGuid::LowType friendGUID, FriendInfo &friendInfo)
|
||||
{
|
||||
if (!player)
|
||||
|
||||
@@ -128,11 +128,7 @@ class SocialMgr
|
||||
~SocialMgr();
|
||||
|
||||
public:
|
||||
static SocialMgr* instance()
|
||||
{
|
||||
static SocialMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static SocialMgr* instance();
|
||||
|
||||
// Misc
|
||||
void RemovePlayerSocial(ObjectGuid::LowType guid) { m_socialMap.erase(guid); }
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
#include "UnitAI.h"
|
||||
#include "GameObjectAI.h"
|
||||
|
||||
GameEventMgr* GameEventMgr::instance()
|
||||
{
|
||||
static GameEventMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
bool GameEventMgr::CheckOneGameEvent(uint16 entry) const
|
||||
{
|
||||
switch (mGameEvent[entry].state)
|
||||
|
||||
@@ -101,11 +101,7 @@ class GameEventMgr
|
||||
~GameEventMgr() { }
|
||||
|
||||
public:
|
||||
static GameEventMgr* instance()
|
||||
{
|
||||
static GameEventMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static GameEventMgr* instance();
|
||||
|
||||
typedef std::set<uint16> ActiveEvents;
|
||||
typedef std::vector<GameEventData> GameEventDataMap;
|
||||
|
||||
@@ -237,6 +237,12 @@ ObjectMgr::ObjectMgr():
|
||||
_playerInfo[j][i] = NULL;
|
||||
}
|
||||
|
||||
ObjectMgr* ObjectMgr::instance()
|
||||
{
|
||||
static ObjectMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
ObjectMgr::~ObjectMgr()
|
||||
{
|
||||
for (QuestMap::iterator i = _questTemplates.begin(); i != _questTemplates.end(); ++i)
|
||||
|
||||
@@ -697,11 +697,13 @@ class ObjectMgr
|
||||
~ObjectMgr();
|
||||
|
||||
public:
|
||||
static ObjectMgr* instance()
|
||||
{
|
||||
static ObjectMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
ObjectMgr(ObjectMgr const&) = delete;
|
||||
ObjectMgr(ObjectMgr&&) = delete;
|
||||
|
||||
ObjectMgr& operator= (ObjectMgr const&) = delete;
|
||||
ObjectMgr& operator= (ObjectMgr&&) = delete;
|
||||
|
||||
static ObjectMgr* instance();
|
||||
|
||||
typedef std::unordered_map<uint32, Item*> ItemMap;
|
||||
|
||||
|
||||
@@ -92,6 +92,12 @@ ObjectGuid::LowType GroupMgr::GenerateGroupId()
|
||||
return NextGroupId++;
|
||||
}
|
||||
|
||||
GroupMgr* GroupMgr::instance()
|
||||
{
|
||||
static GroupMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
Group* GroupMgr::GetGroupByGUID(ObjectGuid::LowType groupId) const
|
||||
{
|
||||
GroupContainer::const_iterator itr = GroupStore.find(groupId);
|
||||
|
||||
@@ -27,11 +27,7 @@ private:
|
||||
~GroupMgr();
|
||||
|
||||
public:
|
||||
static GroupMgr* instance()
|
||||
{
|
||||
static GroupMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static GroupMgr* instance();
|
||||
|
||||
typedef std::map<ObjectGuid::LowType, Group*> GroupContainer;
|
||||
typedef std::vector<Group*> GroupDbContainer;
|
||||
|
||||
@@ -96,6 +96,12 @@ std::string GuildMgr::GetGuildNameById(ObjectGuid::LowType guildId) const
|
||||
return "";
|
||||
}
|
||||
|
||||
GuildMgr* GuildMgr::instance()
|
||||
{
|
||||
static GuildMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
Guild* GuildMgr::GetGuildByLeader(ObjectGuid guid) const
|
||||
{
|
||||
for (GuildContainer::const_iterator itr = GuildStore.begin(); itr != GuildStore.end(); ++itr)
|
||||
|
||||
@@ -27,11 +27,7 @@ private:
|
||||
~GuildMgr();
|
||||
|
||||
public:
|
||||
static GuildMgr* instance()
|
||||
{
|
||||
static GuildMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static GuildMgr* instance();
|
||||
|
||||
Guild* GetGuildByLeader(ObjectGuid guid) const;
|
||||
Guild* GetGuildById(ObjectGuid::LowType guildId) const;
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
#include "Opcodes.h"
|
||||
#include "Log.h"
|
||||
|
||||
AddonHandler* AddonHandler::instance()
|
||||
{
|
||||
static AddonHandler instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
bool AddonHandler::BuildAddonPacket(WorldPacket* source, WorldPacket* target)
|
||||
{
|
||||
ByteBuffer AddOnPacked;
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
class AddonHandler
|
||||
{
|
||||
public:
|
||||
static AddonHandler* instance()
|
||||
{
|
||||
static AddonHandler instance;
|
||||
return &instance;
|
||||
}
|
||||
static AddonHandler* instance();
|
||||
|
||||
bool BuildAddonPacket(WorldPacket* Source, WorldPacket* Target);
|
||||
|
||||
|
||||
@@ -38,6 +38,12 @@ InstanceSaveManager::~InstanceSaveManager()
|
||||
{
|
||||
}
|
||||
|
||||
InstanceSaveManager* InstanceSaveManager::instance()
|
||||
{
|
||||
static InstanceSaveManager instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void InstanceSaveManager::Unload()
|
||||
{
|
||||
lock_instLists = true;
|
||||
|
||||
@@ -158,11 +158,7 @@ class InstanceSaveManager
|
||||
public:
|
||||
typedef std::unordered_map<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap;
|
||||
|
||||
static InstanceSaveManager* instance()
|
||||
{
|
||||
static InstanceSaveManager instance;
|
||||
return &instance;
|
||||
}
|
||||
static InstanceSaveManager* instance();
|
||||
|
||||
void Unload();
|
||||
|
||||
|
||||
@@ -62,6 +62,12 @@ void MapManager::InitializeVisibilityDistanceInfo()
|
||||
(*iter).second->InitVisibilityDistance();
|
||||
}
|
||||
|
||||
MapManager* MapManager::instance()
|
||||
{
|
||||
static MapManager instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
Map* MapManager::CreateBaseMap(uint32 id)
|
||||
{
|
||||
Map* map = FindBaseMap(id);
|
||||
|
||||
@@ -31,11 +31,7 @@ struct TransportCreatureProto;
|
||||
class MapManager
|
||||
{
|
||||
public:
|
||||
static MapManager* instance()
|
||||
{
|
||||
static MapManager instance;
|
||||
return &instance;
|
||||
}
|
||||
static MapManager* instance();
|
||||
|
||||
Map* CreateBaseMap(uint32 mapId);
|
||||
Map* FindBaseNonInstanceMap(uint32 mapId) const;
|
||||
|
||||
@@ -36,6 +36,12 @@ TransportMgr::TransportMgr() { }
|
||||
|
||||
TransportMgr::~TransportMgr() { }
|
||||
|
||||
TransportMgr* TransportMgr::instance()
|
||||
{
|
||||
static TransportMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void TransportMgr::Unload()
|
||||
{
|
||||
_transportTemplates.clear();
|
||||
|
||||
@@ -101,11 +101,7 @@ class TransportMgr
|
||||
friend void LoadDBCStores(std::string const&);
|
||||
|
||||
public:
|
||||
static TransportMgr* instance()
|
||||
{
|
||||
static TransportMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static TransportMgr* instance();
|
||||
|
||||
void Unload();
|
||||
|
||||
|
||||
@@ -94,6 +94,12 @@ void WaypointMgr::Load()
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u waypoints in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
WaypointMgr* WaypointMgr::instance()
|
||||
{
|
||||
static WaypointMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void WaypointMgr::ReloadPath(uint32 id)
|
||||
{
|
||||
WaypointPathContainer::iterator itr = _waypointStore.find(id);
|
||||
|
||||
@@ -47,11 +47,7 @@ typedef std::unordered_map<uint32, WaypointPath> WaypointPathContainer;
|
||||
class WaypointMgr
|
||||
{
|
||||
public:
|
||||
static WaypointMgr* instance()
|
||||
{
|
||||
static WaypointMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static WaypointMgr* instance();
|
||||
|
||||
// Attempts to reload a single path from database
|
||||
void ReloadPath(uint32 id);
|
||||
|
||||
@@ -37,6 +37,12 @@ void OutdoorPvPMgr::Die()
|
||||
delete itr->second;
|
||||
}
|
||||
|
||||
OutdoorPvPMgr* OutdoorPvPMgr::instance()
|
||||
{
|
||||
static OutdoorPvPMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void OutdoorPvPMgr::InitOutdoorPvP()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -42,11 +42,7 @@ class OutdoorPvPMgr
|
||||
~OutdoorPvPMgr() { };
|
||||
|
||||
public:
|
||||
static OutdoorPvPMgr* instance()
|
||||
{
|
||||
static OutdoorPvPMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static OutdoorPvPMgr* instance();
|
||||
|
||||
// create outdoor pvp events
|
||||
void InitOutdoorPvP();
|
||||
|
||||
@@ -570,6 +570,12 @@ void PoolMgr::Initialize()
|
||||
mCreatureSearchMap.clear();
|
||||
}
|
||||
|
||||
PoolMgr* PoolMgr::instance()
|
||||
{
|
||||
static PoolMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void PoolMgr::LoadFromDB()
|
||||
{
|
||||
// Pool templates
|
||||
|
||||
@@ -108,11 +108,7 @@ class PoolMgr
|
||||
~PoolMgr() { };
|
||||
|
||||
public:
|
||||
static PoolMgr* instance()
|
||||
{
|
||||
static PoolMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static PoolMgr* instance();
|
||||
|
||||
void LoadFromDB();
|
||||
void LoadQuestPools();
|
||||
|
||||
@@ -246,6 +246,12 @@ ScriptMgr::ScriptMgr() : _scriptCount(0), _scheduledScripts(0)
|
||||
|
||||
ScriptMgr::~ScriptMgr() { }
|
||||
|
||||
ScriptMgr* ScriptMgr::instance()
|
||||
{
|
||||
static ScriptMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void ScriptMgr::Initialize()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -856,11 +856,7 @@ class ScriptMgr
|
||||
virtual ~ScriptMgr();
|
||||
|
||||
public: /* Initialization */
|
||||
static ScriptMgr* instance()
|
||||
{
|
||||
static ScriptMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static ScriptMgr* instance();
|
||||
|
||||
void Initialize();
|
||||
void LoadDatabase();
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
|
||||
ScriptPointVector const SystemMgr::_empty;
|
||||
|
||||
SystemMgr* SystemMgr::instance()
|
||||
{
|
||||
static SystemMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void SystemMgr::LoadScriptWaypoints()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -52,11 +52,7 @@ class SystemMgr
|
||||
~SystemMgr() { }
|
||||
|
||||
public:
|
||||
static SystemMgr* instance()
|
||||
{
|
||||
static SystemMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static SystemMgr* instance();
|
||||
|
||||
typedef std::unordered_map<uint32, ScriptPointVector> PointMoveMap;
|
||||
|
||||
|
||||
@@ -69,6 +69,12 @@ PacketLog::~PacketLog()
|
||||
_file = NULL;
|
||||
}
|
||||
|
||||
PacketLog* PacketLog::instance()
|
||||
{
|
||||
static PacketLog instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void PacketLog::Initialize()
|
||||
{
|
||||
std::string logsDir = sConfigMgr->GetStringDefault("LogsDir", "");
|
||||
|
||||
@@ -40,11 +40,7 @@ class PacketLog
|
||||
std::once_flag _initializeFlag;
|
||||
|
||||
public:
|
||||
static PacketLog* instance()
|
||||
{
|
||||
static PacketLog instance;
|
||||
return &instance;
|
||||
}
|
||||
static PacketLog* instance();
|
||||
|
||||
void Initialize();
|
||||
bool CanLogPacket() const { return (_file != NULL); }
|
||||
|
||||
@@ -47,6 +47,12 @@ WorldSocketMgr::WorldSocketMgr() : BaseSocketMgr(), _socketSendBufferSize(-1), m
|
||||
{
|
||||
}
|
||||
|
||||
WorldSocketMgr& WorldSocketMgr::Instance()
|
||||
{
|
||||
static WorldSocketMgr instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool WorldSocketMgr::StartNetwork(boost::asio::io_service& service, std::string const& bindIp, uint16 port)
|
||||
{
|
||||
_tcpNoDelay = sConfigMgr->GetBoolDefault("Network.TcpNodelay", true);
|
||||
|
||||
@@ -35,11 +35,7 @@ class WorldSocketMgr : public SocketMgr<WorldSocket>
|
||||
typedef SocketMgr<WorldSocket> BaseSocketMgr;
|
||||
|
||||
public:
|
||||
static WorldSocketMgr& Instance()
|
||||
{
|
||||
static WorldSocketMgr instance;
|
||||
return instance;
|
||||
}
|
||||
static WorldSocketMgr& Instance();
|
||||
|
||||
/// Start network, listen at address:port .
|
||||
bool StartNetwork(boost::asio::io_service& service, std::string const& bindIp, uint16 port) override;
|
||||
|
||||
@@ -356,6 +356,12 @@ SpellMgr::~SpellMgr()
|
||||
UnloadSpellInfoStore();
|
||||
}
|
||||
|
||||
SpellMgr* SpellMgr::instance()
|
||||
{
|
||||
static SpellMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
/// Some checks for spells, to prevent adding deprecated/broken spells for trainers, spell book, etc
|
||||
bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg)
|
||||
{
|
||||
|
||||
@@ -608,11 +608,7 @@ class SpellMgr
|
||||
|
||||
// Accessors (const or static functions)
|
||||
public:
|
||||
static SpellMgr* instance()
|
||||
{
|
||||
static SpellMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static SpellMgr* instance();
|
||||
|
||||
// Spell correctness for client using
|
||||
static bool IsSpellValid(SpellInfo const* spellInfo, Player* player = NULL, bool msg = true);
|
||||
|
||||
@@ -72,6 +72,12 @@ class PlayerTextBuilder
|
||||
WorldObject const* _target;
|
||||
};
|
||||
|
||||
CreatureTextMgr* CreatureTextMgr::instance()
|
||||
{
|
||||
static CreatureTextMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void CreatureTextMgr::LoadCreatureTexts()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -82,11 +82,7 @@ class CreatureTextMgr
|
||||
~CreatureTextMgr() { }
|
||||
|
||||
public:
|
||||
static CreatureTextMgr* instance()
|
||||
{
|
||||
static CreatureTextMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static CreatureTextMgr* instance();
|
||||
|
||||
void LoadCreatureTexts();
|
||||
void LoadCreatureTextLocales();
|
||||
|
||||
@@ -289,6 +289,12 @@ void TicketMgr::ResetTickets()
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
TicketMgr* TicketMgr::instance()
|
||||
{
|
||||
static TicketMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void TicketMgr::LoadTickets()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -188,11 +188,7 @@ private:
|
||||
~TicketMgr();
|
||||
|
||||
public:
|
||||
static TicketMgr* instance()
|
||||
{
|
||||
static TicketMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static TicketMgr* instance();
|
||||
|
||||
void LoadTickets();
|
||||
void LoadSurveys();
|
||||
|
||||
@@ -189,6 +189,12 @@ void WardenCheckMgr::LoadWardenOverrides()
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u warden action overrides.", count);
|
||||
}
|
||||
|
||||
WardenCheckMgr* WardenCheckMgr::instance()
|
||||
{
|
||||
static WardenCheckMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
WardenCheck* WardenCheckMgr::GetWardenDataById(uint16 Id)
|
||||
{
|
||||
if (Id < CheckStore.size())
|
||||
|
||||
@@ -55,11 +55,7 @@ class WardenCheckMgr
|
||||
~WardenCheckMgr();
|
||||
|
||||
public:
|
||||
static WardenCheckMgr* instance()
|
||||
{
|
||||
static WardenCheckMgr instance;
|
||||
return &instance;
|
||||
}
|
||||
static WardenCheckMgr* instance();
|
||||
|
||||
// We have a linear key without any gaps, so we use vector for fast access
|
||||
typedef std::vector<WardenCheck*> CheckContainer;
|
||||
|
||||
@@ -141,6 +141,12 @@ World::~World()
|
||||
/// @todo free addSessQueue
|
||||
}
|
||||
|
||||
World* World::instance()
|
||||
{
|
||||
static World instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
/// Find a player in a specified zone
|
||||
Player* World::FindPlayerInZone(uint32 zone)
|
||||
{
|
||||
@@ -3382,3 +3388,5 @@ void World::RemoveOldCorpses()
|
||||
{
|
||||
m_timers[WUPDATE_CORPSES].SetCurrent(m_timers[WUPDATE_CORPSES].GetInterval());
|
||||
}
|
||||
|
||||
Realm realm;
|
||||
@@ -558,11 +558,7 @@ struct CharacterInfo
|
||||
class World
|
||||
{
|
||||
public:
|
||||
static World* instance()
|
||||
{
|
||||
static World instance;
|
||||
return &instance;
|
||||
}
|
||||
static World* instance();
|
||||
|
||||
static std::atomic<uint32> m_worldLoopCounter;
|
||||
|
||||
@@ -896,5 +892,6 @@ class World
|
||||
extern Realm realm;
|
||||
|
||||
#define sWorld World::instance()
|
||||
|
||||
#endif
|
||||
/// @}
|
||||
@@ -79,8 +79,6 @@ uint32 _worldLoopCounter(0);
|
||||
uint32 _lastChangeMsTime(0);
|
||||
uint32 _maxCoreStuckTimeInMs(0);
|
||||
|
||||
Realm realm;
|
||||
|
||||
void SignalHandler(const boost::system::error_code& error, int signalNumber);
|
||||
void FreezeDetectorHandler(const boost::system::error_code& error);
|
||||
AsyncAcceptor* StartRaSocketAcceptor(boost::asio::io_service& ioService);
|
||||
|
||||
Reference in new issue
Block a user