feat(Core/Threading): replace ace threading (#4821)
This commit is contained in:
@@ -115,7 +115,7 @@ void OutdoorPvPMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid)
|
||||
if (itr == m_OutdoorPvPMap.end())
|
||||
return;
|
||||
|
||||
ACORE_GUARD(ACE_Thread_Mutex, _lock); // pussywizard
|
||||
std::lock_guard<std::mutex> guard(_lock); // pussywizard
|
||||
|
||||
if (itr->second->HasPlayer(player))
|
||||
return;
|
||||
@@ -132,7 +132,7 @@ void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
|
||||
if (itr == m_OutdoorPvPMap.end())
|
||||
return;
|
||||
|
||||
ACORE_GUARD(ACE_Thread_Mutex, _lock); // pussywizard
|
||||
std::lock_guard<std::mutex> guard(_lock); // pussywizard
|
||||
|
||||
// teleport: remove once in removefromworld, once in updatezone
|
||||
if (!itr->second->HasPlayer(player))
|
||||
@@ -188,7 +188,7 @@ ZoneScript* OutdoorPvPMgr::GetZoneScript(uint32 zoneId)
|
||||
|
||||
bool OutdoorPvPMgr::HandleOpenGo(Player* player, uint64 guid)
|
||||
{
|
||||
ACORE_GUARD(ACE_Thread_Mutex, _lock); // pussywizard
|
||||
std::lock_guard<std::mutex> guard(_lock); // pussywizard
|
||||
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->HandleOpenGo(player, guid))
|
||||
@@ -199,7 +199,7 @@ bool OutdoorPvPMgr::HandleOpenGo(Player* player, uint64 guid)
|
||||
|
||||
void OutdoorPvPMgr::HandleGossipOption(Player* player, uint64 guid, uint32 gossipid)
|
||||
{
|
||||
ACORE_GUARD(ACE_Thread_Mutex, _lock); // pussywizard
|
||||
std::lock_guard<std::mutex> guard(_lock); // pussywizard
|
||||
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->HandleGossipOption(player, guid, gossipid))
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
void HandleDropFlag(Player* player, uint32 spellId);
|
||||
|
||||
// pussywizard: lock required because different functions affect m_players
|
||||
ACE_Thread_Mutex _lock;
|
||||
std::mutex _lock;
|
||||
|
||||
private:
|
||||
typedef std::vector<OutdoorPvP*> OutdoorPvPSet;
|
||||
|
||||
Reference in New Issue
Block a user