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:
@@ -16,6 +16,12 @@ LootItemStorage::~LootItemStorage()
|
||||
{
|
||||
}
|
||||
|
||||
LootItemStorage* LootItemStorage::instance()
|
||||
{
|
||||
static LootItemStorage instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void LootItemStorage::LoadStorageFromDB()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -6,12 +6,10 @@ Xinef
|
||||
#define ACORE_LOOTITEMSTORAGE_H
|
||||
|
||||
#include "Common.h"
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
||||
#include "ace/Singleton.h"
|
||||
#include "LootMgr.h"
|
||||
#include "Item.h"
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
||||
struct StoredLootItem
|
||||
{
|
||||
@@ -30,13 +28,13 @@ typedef std::unordered_map<uint32, StoredLootItemList> LootItemContainer;
|
||||
|
||||
class LootItemStorage
|
||||
{
|
||||
friend class ACE_Singleton<LootItemStorage, ACE_Thread_Mutex>;
|
||||
|
||||
private:
|
||||
LootItemStorage();
|
||||
~LootItemStorage();
|
||||
|
||||
public:
|
||||
static LootItemStorage* instance();
|
||||
|
||||
void LoadStorageFromDB();
|
||||
void RemoveEntryFromDB(uint32 containerId, uint32 itemid, uint32 count);
|
||||
|
||||
@@ -51,5 +49,6 @@ class LootItemStorage
|
||||
LootItemContainer lootItemStore;
|
||||
};
|
||||
|
||||
#define sLootItemStorage ACE_Singleton<LootItemStorage, ACE_Thread_Mutex>::instance()
|
||||
#define sLootItemStorage LootItemStorage::instance()
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user