Changeset 3195

Show
Ignore:
Timestamp:
03/03/2010 02:34:07 PM (6 months ago)
Author:
jackpoz
Message:

FIXED: Crash on WarsongGulch? shutdown.

Location:
trunk/src/arcemu-world
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/arcemu-world/WarsongGulch.cpp

    r3131 r3195  
    608608                (*itr)->SetUInt32Value(GAMEOBJECT_FLAGS, 64); 
    609609                (*itr)->SetByte(GAMEOBJECT_BYTES_1, 0, 0); 
    610                 (*itr)->Despawn(5000, 0); 
    611         } 
     610        } 
     611 
     612        DespawnGates(5000); 
    612613 
    613614        /* add the flags to the world */ 
     
    644645} 
    645646 
     647void WarsongGulch::DespawnGates(uint32 delay) 
     648{ 
     649        if(delay != 0) 
     650        { 
     651                sEventMgr.AddEvent(this, &WarsongGulch::DespawnGates, (uint32)0, EVENT_GAMEOBJECT_EXPIRE, delay, 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT); 
     652                return; 
     653        } 
     654        for(list<GameObject*>::iterator itr = m_gates.begin(); itr != m_gates.end(); ++itr) 
     655        { 
     656                (*itr)->Despawn(0,0); 
     657        } 
     658        m_gates.clear(); 
     659} 
  • trunk/src/arcemu-world/WarsongGulch.h

    r3131 r3195  
    6363 
    6464        void SetIsWeekend(bool isweekend); 
     65        void DespawnGates(uint32 delay); 
    6566};