void EnterCombat(Unit* who) override { if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_ILLIDARI_COUNCIL))) ENSURE_AI(npc_illidari_council::npc_illidari_councilAI, controller->AI())->StartEvent(who); DoZoneInCombat(); // Load GUIDs on first aggro because the Creature guids are only set as the creatures are created in world- // this means that for each creature, it will attempt to LoadGUIDs even though some of the other creatures are // not in world, and thus have no GUID set in the instance data system. Putting it in aggro ensures that all the creatures // have been loaded and have their GUIDs set in the instance data system. if (!LoadedGUIDs) LoadGUIDs(); }
void EnterCombat(Unit* who) { if (instance) { Creature* Controller = (Unit::GetCreature(*me, instance->GetData64(DATA_ILLIDARICOUNCIL))); if (Controller) CAST_AI(mob_illidari_council::mob_illidari_councilAI, Controller->AI())->StartEvent(who); } else { sLog->outError(ERROR_INST_DATA); EnterEvadeMode(); return; } DoZoneInCombat(); // Load GUIDs on first aggro because the Creature guids are only set as the creatures are created in world- // this means that for each creature, it will attempt to LoadGUIDs even though some of the other creatures are // not in world, and thus have no GUID set in the instance data system. Putting it in aggro ensures that all the creatures // have been loaded and have their GUIDs set in the instance data system. if (!LoadedGUIDs) LoadGUIDs(); }