Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.x
This commit is contained in:
commit
bc37c75dfd
3 files changed
+10
-1
No files matched your search
@@ -247,6 +247,9 @@ namespace VMAP
|
||||
|
||||
WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename)
|
||||
{
|
||||
//! Critical section, thread safe access to iLoadedModelFiles
|
||||
TRINITY_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
|
||||
|
||||
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
|
||||
if (model == iLoadedModelFiles.end())
|
||||
{
|
||||
@@ -267,6 +270,9 @@ namespace VMAP
|
||||
|
||||
void VMapManager2::releaseModelInstance(const std::string &filename)
|
||||
{
|
||||
//! Critical section, thread safe access to iLoadedModelFiles
|
||||
TRINITY_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
|
||||
|
||||
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
|
||||
if (model == iLoadedModelFiles.end())
|
||||
{
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "IVMapManager.h"
|
||||
#include "Dynamic/UnorderedMap.h"
|
||||
#include "Define.h"
|
||||
#include <ace/Thread_Mutex.h>
|
||||
|
||||
//===========================================================
|
||||
|
||||
@@ -71,6 +72,8 @@ namespace VMAP
|
||||
// Tree to check collision
|
||||
ModelFileMap iLoadedModelFiles;
|
||||
InstanceTreeMap iInstanceMapTrees;
|
||||
// Mutex for iLoadedModelFiles
|
||||
ACE_Thread_Mutex LoadedModelFilesLock;
|
||||
|
||||
bool _loadMap(uint32 mapId, const std::string& basePath, uint32 tileX, uint32 tileY);
|
||||
/* void _unloadMap(uint32 pMapId, uint32 x, uint32 y); */
|
||||
|
||||
@@ -18443,7 +18443,7 @@ void Player::SaveToDB(bool create /*=false*/)
|
||||
|
||||
ss.str("");
|
||||
for (uint32 i = 0; i < KNOWN_TITLES_SIZE*2; ++i)
|
||||
ss << GetUInt32Value(PLAYER__FIELD_KNOWN_TITLES + i);
|
||||
ss << GetUInt32Value(PLAYER__FIELD_KNOWN_TITLES + i) << ' ';
|
||||
|
||||
stmt->setString(index++, ss.str());
|
||||
stmt->setUInt8(index++, GetByteValue(PLAYER_FIELD_BYTES, 2));
|
||||
|
||||
Reference in new issue
Block a user