mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 16:26:08 +00:00
fix(Core): Fixed a few crashes/bugs that were found via static code analysis (#2617)
This commit is contained in:
@@ -201,13 +201,14 @@ public:
|
||||
events.RescheduleEvent(EVENT_RESPAWN_SPHERE, 4000);
|
||||
|
||||
for( std::list<uint64>::iterator itr = summons.begin(); itr != summons.end(); ++itr )
|
||||
if( Creature* c = pInstance->instance->GetCreature(*itr) )
|
||||
{
|
||||
c->GetMotionMaster()->MoveIdle();
|
||||
c->StopMoving();
|
||||
c->CastSpell(c, SPELL_SUBMERGE, false);
|
||||
c->AI()->DoAction(1);
|
||||
}
|
||||
if (pInstance)
|
||||
if(Creature* c = pInstance->instance->GetCreature(*itr) )
|
||||
{
|
||||
c->GetMotionMaster()->MoveIdle();
|
||||
c->StopMoving();
|
||||
c->CastSpell(c, SPELL_SUBMERGE, false);
|
||||
c->AI()->DoAction(1);
|
||||
}
|
||||
summons.clear();
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
if( Creature* c = me->SummonCreature(NPC_BURROW, AnubLocs[i+1]) )
|
||||
|
||||
Reference in New Issue
Block a user