bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override { uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId); ClearGossipMenuFor(player); DeSpawnVeins();//despawn the alliance veins switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: StartEvent(player); break; case GOSSIP_ACTION_INFO_DEF + 2: FirstBossDead = true; WaveCount = 9; StartEvent(player); break; case GOSSIP_ACTION_INFO_DEF + 3: Retreat(); break; case GOSSIP_ACTION_INFO_DEF: Debug = !Debug; TC_LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled"); break; } return true; }
void hyjalAI::StartEvent(Player* player) { if (!player || IsDummy || !instance) return; Talk(BEGIN); EventBegun = true; Summon = true; NextWaveTimer = 15000; CheckTimer = 5000; PlayerGUID = player->GetGUID(); me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); instance->DoUpdateWorldState(WORLD_STATE_WAVES, 0); instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0); DeSpawnVeins(); }