mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
DB/Quest: Convert & update support for 'When the Cows Come Home' to SAI
Closes #24685
This commit is contained in:
@@ -24,7 +24,6 @@ EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_commander_dawnforge
|
||||
npc_bessy
|
||||
npc_maxx_a_million
|
||||
go_captain_tyralius_prison
|
||||
EndContentData */
|
||||
@@ -469,90 +468,6 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_bessy
|
||||
######*/
|
||||
enum BessyData
|
||||
{
|
||||
Q_ALMABTRIEB = 10337,
|
||||
N_THADELL = 20464,
|
||||
SPAWN_FIRST = 20512,
|
||||
SPAWN_SECOND = 19881,
|
||||
SAY_THADELL_1 = 0,
|
||||
SAY_THADELL_2 = 1,
|
||||
};
|
||||
|
||||
class npc_bessy : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_bessy() : CreatureScript("npc_bessy") { }
|
||||
|
||||
struct npc_bessyAI : public EscortAI
|
||||
{
|
||||
npc_bessyAI(Creature* creature) : EscortAI(creature) { }
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
player->FailQuest(Q_ALMABTRIEB);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 3: //first spawn
|
||||
me->SummonCreature(SPAWN_FIRST, 2449.67f, 2183.11f, 96.85f, 6.20f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(SPAWN_FIRST, 2449.53f, 2184.43f, 96.36f, 6.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(SPAWN_FIRST, 2449.85f, 2186.34f, 97.57f, 6.08f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 7:
|
||||
me->SummonCreature(SPAWN_SECOND, 2309.64f, 2186.24f, 92.25f, 6.06f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
me->SummonCreature(SPAWN_SECOND, 2309.25f, 2183.46f, 91.75f, 6.22f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 12:
|
||||
player->GroupEventHappens(Q_ALMABTRIEB, me);
|
||||
if (me->FindNearestCreature(N_THADELL, 30))
|
||||
Talk(SAY_THADELL_1);
|
||||
break;
|
||||
case 13:
|
||||
if (me->FindNearestCreature(N_THADELL, 30))
|
||||
Talk(SAY_THADELL_2, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
void QuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == Q_ALMABTRIEB)
|
||||
{
|
||||
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
Start(true, false, player->GetGUID());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_bessyAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_maxx_a_million
|
||||
######*/
|
||||
@@ -759,7 +674,6 @@ void AddSC_netherstorm()
|
||||
new npc_commander_dawnforge();
|
||||
new at_commander_dawnforge();
|
||||
new npc_phase_hunter();
|
||||
new npc_bessy();
|
||||
new npc_maxx_a_million_escort();
|
||||
new go_captain_tyralius_prison();
|
||||
new npc_captain_tyralius();
|
||||
|
||||
Reference in New Issue
Block a user