mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
fix(DB/SAI): Move the Ashbringer event AI of the Bloody Monastery mob to Smartai (#17078)
* Move scarlet_guard's Ashbringer event to smartAI * Remove the code from the script * Delete the commented out code * Modify the distance of the "Scarlet Wizard" Cast Arcane Explosion * Fix errors * Update rev_1692891765582381000.sql * Update rev_1692891765582381000.sql * Remove duplicate statements * Remove duplicate statements
This commit is contained in:
@@ -203,52 +203,6 @@ enum ScarletMonasteryTrashMisc
|
||||
SPELL_FORGIVENESS = 28697,
|
||||
};
|
||||
|
||||
class npc_scarlet_guard : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_scarlet_guard() : CreatureScript("npc_scarlet_guard") { }
|
||||
|
||||
struct npc_scarlet_guardAI : public SmartAI
|
||||
{
|
||||
npc_scarlet_guardAI(Creature* creature) : SmartAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
SayAshbringer = false;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (who && who->GetDistance2d(me) < 12.0f)
|
||||
{
|
||||
if (Player* player = who->ToPlayer())
|
||||
{
|
||||
if (player->HasAura(AURA_ASHBRINGER) && !SayAshbringer)
|
||||
{
|
||||
Talk(SAY_WELCOME);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->SetSheath(SHEATH_STATE_UNARMED);
|
||||
me->SetFacingToObject(player);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
me->AddAura(SPELL_AURA_MOD_ROOT, me);
|
||||
me->CastSpell(me, SPELL_AURA_MOD_ROOT, true);
|
||||
SayAshbringer = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SmartAI::MoveInLineOfSight(who);
|
||||
}
|
||||
private:
|
||||
bool SayAshbringer = false;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetScarletMonasteryAI<npc_scarlet_guardAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
enum MograineEvents
|
||||
{
|
||||
EVENT_SPELL_CRUSADER_STRIKE = 1,
|
||||
@@ -733,7 +687,6 @@ public:
|
||||
void AddSC_instance_scarlet_monastery()
|
||||
{
|
||||
new instance_scarlet_monastery();
|
||||
new npc_scarlet_guard();
|
||||
new npc_fairbanks();
|
||||
new npc_mograine();
|
||||
new boss_high_inquisitor_whitemane();
|
||||
|
||||
Reference in New Issue
Block a user