mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
fix(Scripts/Spell): adjust Thrall's and Herald WCB timings, limit to Orgrimmar and Crossroads (#19026)
* update smartAI herald * refactor _scheduler to scheduler * adjust timings of WCB Thrall * limit WCB to Orgrimmar and Crossroads * add roar emote * style, add second loop to delay crossroads cast * limit shout range to area * rename p to player
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
--
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10719);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(10719, 0, 0, 0, 1, 0, 100, 0, 12000, 12000, 0, 0, 0, 0, 1, 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Herald of Thrall - Out of Combat - Say Line 0'),
|
||||
(10719, 0, 1, 0, 1, 0, 100, 0, 15000, 15000, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Herald of Thrall - Out of Combat - Say Line 1'),
|
||||
(10719, 0, 2, 0, 1, 0, 100, 0, 19000, 19000, 0, 0, 0, 0, 11, 16609, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Herald of Thrall - Out of Combat - Cast \'Warchief`s Blessing\'');
|
||||
|
||||
-- Limit Herald of Thrall shout range to Area
|
||||
UPDATE `creature_text` SET `TextRange` = 1 WHERE `CreatureID` = 10719;
|
||||
@@ -246,35 +246,44 @@ 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(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_0);
|
||||
})
|
||||
.Schedule(13s, [this](TaskContext /*context*/)
|
||||
{
|
||||
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 +304,6 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
protected:
|
||||
TaskScheduler _scheduler;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user