mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
feat(Core/Misc): remove and replace ACE_Singleton (#2418)
This commit is contained in:
@@ -37,6 +37,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))
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#ifndef _AUCTION_HOUSE_MGR_H
|
||||
#define _AUCTION_HOUSE_MGR_H
|
||||
|
||||
#include <ace/Singleton.h>
|
||||
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCStructure.h"
|
||||
@@ -131,8 +129,6 @@ class AuctionHouseObject
|
||||
|
||||
class AuctionHouseMgr
|
||||
{
|
||||
friend class ACE_Singleton<AuctionHouseMgr, ACE_Null_Mutex>;
|
||||
|
||||
private:
|
||||
AuctionHouseMgr();
|
||||
~AuctionHouseMgr();
|
||||
@@ -141,6 +137,8 @@ class AuctionHouseMgr
|
||||
|
||||
typedef std::unordered_map<uint32, Item*> ItemMap;
|
||||
|
||||
static AuctionHouseMgr* instance();
|
||||
|
||||
AuctionHouseObject* GetAuctionsMap(uint32 factionTemplateId);
|
||||
AuctionHouseObject* GetBidsMap(uint32 factionTemplateId);
|
||||
|
||||
@@ -184,6 +182,6 @@ class AuctionHouseMgr
|
||||
ItemMap mAitems;
|
||||
};
|
||||
|
||||
#define sAuctionMgr ACE_Singleton<AuctionHouseMgr, ACE_Null_Mutex>::instance()
|
||||
#define sAuctionMgr AuctionHouseMgr::instance()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user