mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna fix freeze on reload. Closes #99
This commit is contained in:
@@ -76,12 +76,7 @@ void Eluna::ReloadEluna()
|
|||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
// Re initialize creature AI restoring C++ AI or applying lua AI
|
// Re initialize creature AI restoring C++ AI or applying lua AI
|
||||||
{
|
{
|
||||||
#ifdef BOOST_VERSION
|
HashMapHolder<Creature>::MapType const m = ObjectAccessor::GetCreatures();
|
||||||
boost::shared_lock<boost::shared_mutex> lock(*HashMapHolder<Creature>::GetLock());
|
|
||||||
#else
|
|
||||||
TRINITY_READ_GUARD(HashMapHolder<Creature>::LockType, *HashMapHolder<Creature>::GetLock());
|
|
||||||
#endif
|
|
||||||
HashMapHolder<Creature>::MapType const& m = ObjectAccessor::GetCreatures();
|
|
||||||
for (HashMapHolder<Creature>::MapType::const_iterator iter = m.begin(); iter != m.end(); ++iter)
|
for (HashMapHolder<Creature>::MapType::const_iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||||
if (iter->second->IsInWorld())
|
if (iter->second->IsInWorld())
|
||||||
iter->second->AIM_Initialize();
|
iter->second->AIM_Initialize();
|
||||||
|
|||||||
Reference in New Issue
Block a user