mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -676,10 +676,10 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI
|
||||
}
|
||||
|
||||
// prevent duplicates
|
||||
if (std::find(_dancerList.begin(), _dancerList.end(), dancer) != _dancerList.end())
|
||||
if (std::find(_dancerList.begin(), _dancerList.end(), dancer->GetGUID()) != _dancerList.end())
|
||||
return;
|
||||
|
||||
_dancerList.push_back(dancer);
|
||||
_dancerList.push_back(dancer->GetGUID());
|
||||
}
|
||||
|
||||
void LocateRibbonPole()
|
||||
@@ -707,10 +707,11 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI
|
||||
return;
|
||||
|
||||
// remove non-dancing players from list
|
||||
std::erase_if(_dancerList, [](Player* dancer)
|
||||
{
|
||||
return !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL);
|
||||
});
|
||||
std::erase_if(_dancerList, [this](ObjectGuid dancerGUID)
|
||||
{
|
||||
Player* dancer = ObjectAccessor::GetPlayer(*me, dancerGUID);
|
||||
return !dancer || !dancer->HasAura(SPELL_RIBBON_POLE_PERIODIC_VISUAL);
|
||||
});
|
||||
}
|
||||
|
||||
void DoFlameCircleChecks()
|
||||
@@ -788,9 +789,7 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI
|
||||
|
||||
for (uint8 i = 0; (i < MAX_COUNT_SPEW_LAVA_TARGETS) && (i < _dancerList.size()); i++)
|
||||
{
|
||||
Player* dancerTarget = _dancerList[i];
|
||||
|
||||
if (dancerTarget)
|
||||
if (Player* dancerTarget = ObjectAccessor::GetPlayer(*me, _dancerList[i]))
|
||||
{
|
||||
Creature* fireSpiralBunny = dancerTarget->SummonCreature(NPC_RIBBON_POLE_FIRE_SPIRAL_BUNNY, dancerTarget->GetPositionX(), dancerTarget->GetPositionY(), dancerTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
|
||||
if (fireSpiralBunny)
|
||||
@@ -823,7 +822,7 @@ struct npc_midsummer_ribbon_pole_target : public ScriptedAI
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<Player*> _dancerList;
|
||||
GuidVector _dancerList;
|
||||
GameObject* _ribbonPole;
|
||||
Creature* _bunny;
|
||||
};
|
||||
|
||||
@@ -530,7 +530,7 @@ public:
|
||||
}
|
||||
|
||||
context.Repeat(timerptr[_currentWave]);
|
||||
if (++_currentWave < maxWaves && _bossWave)
|
||||
if (++_currentWave < maxWaves && _bossWave != TO_BE_DECIDED)
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_WAVES, _currentWave);
|
||||
DoUpdateWorldState(WORLD_STATE_ENEMY, 1);
|
||||
|
||||
@@ -153,6 +153,8 @@ enum ThrallWarchief : uint32
|
||||
AREA_CAMP_TAURAJO = 378,
|
||||
AREA_CROSSROADS = 380,
|
||||
|
||||
GO_UNADORNED_SPIKE = 175787,
|
||||
|
||||
// What the Wind Carries (ID: 6566)
|
||||
QUEST_WHAT_THE_WIND_CARRIES = 6566,
|
||||
GOSSIP_MENU_THRALL = 3664,
|
||||
@@ -246,35 +248,50 @@ public:
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->GetMap()->LoadGrid(heraldOfThrallPos.GetPositionX(), heraldOfThrallPos.GetPositionY());
|
||||
me->SummonCreature(NPC_HERALD_OF_THRALL, heraldOfThrallPos, TEMPSUMMON_TIMED_DESPAWN, 20 * IN_MILLISECONDS);
|
||||
_scheduler.Schedule(2s, [this](TaskContext /*context*/)
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||
scheduler.Schedule(1s, [this](TaskContext /*context*/)
|
||||
{
|
||||
if (GameObject* spike = me->FindNearestGameObject(GO_UNADORNED_SPIKE, 10.0f))
|
||||
{
|
||||
Talk(SAY_THRALL_ON_QUEST_REWARD_0);
|
||||
})
|
||||
.Schedule(13s, [this](TaskContext /*context*/)
|
||||
spike->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}).Schedule(2s, [this](TaskContext /*context*/)
|
||||
{
|
||||
Talk(SAY_THRALL_ON_QUEST_REWARD_0);
|
||||
}).Schedule(9s, [this](TaskContext /*context*/)
|
||||
{
|
||||
Talk(SAY_THRALL_ON_QUEST_REWARD_1);
|
||||
DoCastAOE(SPELL_WARCHIEF_BLESSING, true);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->GetMap()->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
Talk(SAY_THRALL_ON_QUEST_REWARD_1);
|
||||
})
|
||||
.Schedule(15s, [this](TaskContext /*context*/)
|
||||
{
|
||||
DoCastAOE(SPELL_WARCHIEF_BLESSING, true);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->GetMap()->DoForAllPlayers([&](Player* p)
|
||||
if (player->IsAlive() && !player->IsGameMaster())
|
||||
{
|
||||
if (player->GetAreaId() == AREA_ORGRIMMAR)
|
||||
{
|
||||
if (p->IsAlive() && !p->IsGameMaster())
|
||||
{
|
||||
if (p->GetAreaId() == AREA_ORGRIMMAR || p->GetAreaId() == AREA_RAZOR_HILL || p->GetAreaId() == AREA_CROSSROADS || p->GetAreaId() == AREA_CAMP_TAURAJO)
|
||||
{
|
||||
p->CastSpell(p, SPELL_WARCHIEF_BLESSING, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
player->CastSpell(player, SPELL_WARCHIEF_BLESSING, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}).Schedule(19s, [this](TaskContext /*context*/)
|
||||
{
|
||||
me->GetMap()->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->IsAlive() && !player->IsGameMaster())
|
||||
{
|
||||
if (player->GetAreaId() == AREA_CROSSROADS)
|
||||
{
|
||||
player->CastSpell(player, SPELL_WARCHIEF_BLESSING, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_scheduler.Update(diff);
|
||||
scheduler.Update(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
@@ -295,9 +312,6 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
protected:
|
||||
TaskScheduler _scheduler;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -158,7 +158,9 @@ enum Points
|
||||
|
||||
enum Misc
|
||||
{
|
||||
MAX_FLAMECALLERS = 3
|
||||
MAX_FLAMECALLERS = 3,
|
||||
QUEST_SUMMON_AHUNE = 11691,
|
||||
ITEM_MAGMA_TOTEM = 34953
|
||||
};
|
||||
|
||||
Position const SummonPositions[] =
|
||||
@@ -307,8 +309,8 @@ struct npc_frozen_core : public ScriptedAI
|
||||
if (Creature* ahune = _instance->GetCreature(DATA_AHUNE))
|
||||
Unit::Kill(me, ahune);
|
||||
|
||||
DoCast(SPELL_SUMMON_LOOT_MISSILE);
|
||||
DoCast(SPELL_MINION_DESPAWNER);
|
||||
DoCastSelf(SPELL_SUMMON_LOOT_MISSILE, true);
|
||||
DoCastSelf(SPELL_MINION_DESPAWNER, true);
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
@@ -662,6 +664,9 @@ struct go_ahune_ice_stone : public GameObjectAI
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
|
||||
player->DestroyItemCount(ITEM_MAGMA_TOTEM, 1, true, false);
|
||||
player->AreaExploredOrEventHappens(QUEST_SUMMON_AHUNE); //auto rewarded
|
||||
|
||||
if (Creature* ahuneBunny = _instance->GetCreature(DATA_AHUNE_BUNNY))
|
||||
ahuneBunny->AI()->DoAction(ACTION_START_EVENT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user