Core/Scripts: Fixed script unloading
This commit is contained in:
1 parent
c058e6740b
commit
78e8de5913
2 files changed
+10
-6
No files matched your search
@@ -260,7 +260,7 @@ void ScriptMgr::Initialize()
|
||||
void ScriptMgr::Unload()
|
||||
{
|
||||
#define SCR_CLEAR(T) \
|
||||
FOR_SCRIPTS(T, itr, end) \
|
||||
for (SCR_REG_ITR(T) itr = SCR_REG_LST(T).begin(); itr != SCR_REG_LST(T).end(); ++itr) \
|
||||
delete itr->second; \
|
||||
SCR_REG_LST(T).clear();
|
||||
|
||||
|
||||
@@ -444,18 +444,22 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Say_Timer = 5000;
|
||||
ReleasedFromCage = false;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (Say_Timer <= diff && ReleasedFromCage)
|
||||
if (ReleasedFromCage)
|
||||
{
|
||||
me->ForcedDespawn();
|
||||
ReleasedFromCage = false;
|
||||
if (Say_Timer <= diff)
|
||||
{
|
||||
me->ForcedDespawn();
|
||||
ReleasedFromCage = false;
|
||||
}
|
||||
else
|
||||
Say_Timer -= diff;
|
||||
}
|
||||
else
|
||||
Say_Timer -= diff;
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
|
||||
Reference in new issue
Block a user