mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
refactor(scripts/BlackrockMountain): Remove commented NPC scripts (#3229)
This commit is contained in:
@@ -448,628 +448,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// npc_dughal_stormwing
|
||||
enum DughalQuests
|
||||
{
|
||||
QUEST_JAIL_BREAK = 4322
|
||||
};
|
||||
|
||||
#define SAY_DUGHAL_FREE "Thank you, $N! I'm free!!!"
|
||||
#define GOSSIP_DUGHAL "You're free, Dughal! Get out of here!"
|
||||
|
||||
/*
|
||||
class npc_dughal_stormwing : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_dughal_stormwing() : CreatureScript("npc_dughal_stormwing") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
npc_dughal_stormwingAI* dughal_stormwingAI = new npc_dughal_stormwingAI(creature);
|
||||
|
||||
dughal_stormwingAI->AddWaypoint(0, 280.42f, -82.86f, -77.12f, 0);
|
||||
dughal_stormwingAI->AddWaypoint(1, 287.64f, -87.01f, -76.79f, 0);
|
||||
dughal_stormwingAI->AddWaypoint(2, 354.63f, -64.95f, -67.53f, 0);
|
||||
|
||||
return dughal_stormwingAI;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) override
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
CloseGossipMenuFor(player);
|
||||
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID());
|
||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_DUGHAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, 2846, creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
struct npc_dughal_stormwingAI : public npc_escortAI
|
||||
{
|
||||
npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
me->Say(SAY_DUGHAL_FREE, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 1:
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_OBJECTIVE_COMPLETED);
|
||||
break;
|
||||
case 2:
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) { }
|
||||
void Reset() { }
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (IsBeingEscorted && killer == me)
|
||||
{
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return;
|
||||
if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_ENDED)
|
||||
{
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetVisible(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
// npc_marshal_windsor
|
||||
#define SAY_WINDSOR_AGGRO1 "You locked up the wrong Marshal. Prepare to be destroyed!"
|
||||
#define SAY_WINDSOR_AGGRO2 "I bet you're sorry now, aren't you !?!!"
|
||||
#define SAY_WINDSOR_AGGRO3 "You better hold me back $N or they are going to feel some prison house beatings."
|
||||
#define SAY_WINDSOR_1 "Let's get a move on. My gear should be in the storage area up this way..."
|
||||
#define SAY_WINDSOR_4_1 "Check that cell, $N. If someone is alive in there, we need to get them out."
|
||||
#define SAY_WINDSOR_4_2 "Get him out of there!"
|
||||
#define SAY_WINDSOR_4_3 "Good work! We're almost there, $N. This way."
|
||||
#define SAY_WINDSOR_6 "This is it, $N. My stuff should be in that room. Cover me, I'm going in!"
|
||||
#define SAY_WINDSOR_9 "Ah, there it is!"
|
||||
|
||||
enum MarshalWindsor
|
||||
{
|
||||
NPC_REGINALD_WINDSOR = 9682
|
||||
};
|
||||
|
||||
/*
|
||||
Player* playerStart;
|
||||
class npc_marshal_windsor : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_marshal_windsor() : CreatureScript("npc_marshal_windsor") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(creature);
|
||||
|
||||
marshal_windsorAI->AddWaypoint(0, 316.336f, -225.528f, -77.7258f, 7000);
|
||||
marshal_windsorAI->AddWaypoint(1, 316.336f, -225.528f, -77.7258f, 2000);
|
||||
marshal_windsorAI->AddWaypoint(2, 322.96f, -207.13f, -77.87f, 0);
|
||||
marshal_windsorAI->AddWaypoint(3, 281.05f, -172.16f, -75.12f, 0);
|
||||
marshal_windsorAI->AddWaypoint(4, 272.19f, -139.14f, -70.61f, 0);
|
||||
marshal_windsorAI->AddWaypoint(5, 283.62f, -116.09f, -70.21f, 0);
|
||||
marshal_windsorAI->AddWaypoint(6, 296.18f, -94.30f, -74.08f, 0);
|
||||
marshal_windsorAI->AddWaypoint(7, 294.57f, -93.11f, -74.08f, 0);
|
||||
marshal_windsorAI->AddWaypoint(8, 314.31f, -74.31f, -76.09f, 0);
|
||||
marshal_windsorAI->AddWaypoint(9, 360.22f, -62.93f, -66.77f, 0);
|
||||
marshal_windsorAI->AddWaypoint(10, 383.38f, -69.40f, -63.25f, 0);
|
||||
marshal_windsorAI->AddWaypoint(11, 389.99f, -67.86f, -62.57f, 0);
|
||||
marshal_windsorAI->AddWaypoint(12, 400.98f, -72.01f, -62.31f, 0);
|
||||
marshal_windsorAI->AddWaypoint(13, 404.22f, -62.30f, -63.50f, 2300);
|
||||
marshal_windsorAI->AddWaypoint(14, 404.22f, -62.30f, -63.50f, 1500);
|
||||
marshal_windsorAI->AddWaypoint(15, 407.65f, -51.86f, -63.96f, 0);
|
||||
marshal_windsorAI->AddWaypoint(16, 403.61f, -51.71f, -63.92f, 1000);
|
||||
marshal_windsorAI->AddWaypoint(17, 403.61f, -51.71f, -63.92f, 2000);
|
||||
marshal_windsorAI->AddWaypoint(18, 403.61f, -51.71f, -63.92f, 1000);
|
||||
marshal_windsorAI->AddWaypoint(19, 403.61f, -51.71f, -63.92f, 0);
|
||||
|
||||
return marshal_windsorAI;
|
||||
}
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == 4322)
|
||||
{
|
||||
PlayerStart = player;
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
|
||||
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
creature->setFaction(11);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
struct npc_marshal_windsorAI : public npc_escortAI
|
||||
{
|
||||
npc_marshal_windsorAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
me->Say(SAY_WINDSOR_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 7:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_WINDSOR_4_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold = true;
|
||||
break;
|
||||
case 10:
|
||||
me->setFaction(534);
|
||||
break;
|
||||
case 12:
|
||||
me->Say(SAY_WINDSOR_6, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
break;
|
||||
case 13:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
|
||||
break;
|
||||
case 14:
|
||||
instance->SetData(DATA_GATE_SR, 0);
|
||||
me->setFaction(11);
|
||||
break;
|
||||
case 16:
|
||||
me->Say(SAY_WINDSOR_9, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 17:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_USESTANDING);//EMOTE_STATE_WORK
|
||||
break;
|
||||
case 18:
|
||||
instance->SetData(DATA_GATE_SC, 0);
|
||||
break;
|
||||
case 19:
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SummonCreature(NPC_REGINALD_WINDSOR, 403.61f, -51.71f, -63.92f, 3.600434f, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
instance->SetData(DATA_SUPPLY_ROOM, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 1:
|
||||
me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 2:
|
||||
me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void JustDied(Unit* slayer)
|
||||
{
|
||||
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
return;
|
||||
|
||||
if (instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED)
|
||||
SetEscortPaused(false);
|
||||
|
||||
if (!instance->GetData(DATA_GATE_D) && instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
me->Say(SAY_WINDSOR_4_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_BEFORE_START);
|
||||
}
|
||||
if (instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED)
|
||||
{
|
||||
me->Say(SAY_WINDSOR_4_3, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_DUGHAL, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_SUPPLY_ROOM) == ENCOUNTER_STATE_ENDED)
|
||||
{
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetVisible(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
// npc_marshal_reginald_windsor
|
||||
#define SAY_REGINALD_WINDSOR_0_1 "Can you feel the power, $N??? It's time to ROCK!"
|
||||
#define SAY_REGINALD_WINDSOR_0_2 "Now we just have to free Tobias and we can get out of here. This way!"
|
||||
#define SAY_REGINALD_WINDSOR_5_1 "Open it."
|
||||
#define SAY_REGINALD_WINDSOR_5_2 "I never did like those two. Let's get moving."
|
||||
#define SAY_REGINALD_WINDSOR_7_1 "Open it and be careful this time!"
|
||||
#define SAY_REGINALD_WINDSOR_7_2 "That intolerant dirtbag finally got what was coming to him. Good riddance!"
|
||||
#define SAY_REGINALD_WINDSOR_7_3 "Alright, let's go."
|
||||
#define SAY_REGINALD_WINDSOR_13_1 "Open it. We need to hurry up. I can smell those Dark Irons coming a mile away and I can tell you one thing, they're COMING!"
|
||||
#define SAY_REGINALD_WINDSOR_13_2 "Administering fists of fury on Crest Killer!"
|
||||
#define SAY_REGINALD_WINDSOR_13_3 "He has to be in the last cell. Unless... they killed him."
|
||||
#define SAY_REGINALD_WINDSOR_14_1 "Get him out of there!"
|
||||
#define SAY_REGINALD_WINDSOR_14_2 "Excellent work, $N. Let's find the exit. I think I know the way. Follow me!"
|
||||
#define SAY_REGINALD_WINDSOR_20_1 "We made it!"
|
||||
#define SAY_REGINALD_WINDSOR_20_2 "Meet me at Maxwell's encampment. We'll go over the next stages of the plan there and figure out a way to decode my tablets without the decryption ring."
|
||||
|
||||
enum MarshalReginaldWindor
|
||||
{
|
||||
NPC_SHILL_DINGER = 9678,
|
||||
NPC_CREST_KILLER = 9680
|
||||
};
|
||||
|
||||
/*
|
||||
int wp = 0;
|
||||
class npc_marshal_reginald_windsor : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_marshal_reginald_windsor() : CreatureScript("npc_marshal_reginald_windsor") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(creature);
|
||||
|
||||
marshal_reginald_windsorAI->AddWaypoint(0, 403.61f, -52.71f, -63.92f, 4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(1, 403.61f, -52.71f, -63.92f, 4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(2, 406.33f, -54.87f, -63.95f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(3, 407.99f, -73.91f, -62.26f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(4, 557.03f, -119.71f, -61.83f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(5, 573.40f, -124.39f, -65.07f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(6, 593.91f, -130.29f, -69.25f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(7, 593.21f, -132.16f, -69.25f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(8, 593.21f, -132.16f, -69.25f, 3000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(9, 622.81f, -135.55f, -71.92f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(10, 634.68f, -151.29f, -70.32f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(11, 635.06f, -153.25f, -70.32f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(12, 635.06f, -153.25f, -70.32f, 3000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(13, 635.06f, -153.25f, -70.32f, 1500);
|
||||
marshal_reginald_windsorAI->AddWaypoint(14, 655.25f, -172.39f, -73.72f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(15, 654.79f, -226.30f, -83.06f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(16, 622.85f, -268.85f, -83.96f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(17, 579.45f, -275.56f, -80.44f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(18, 561.19f, -266.85f, -75.59f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(19, 547.91f, -253.92f, -70.34f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(20, 549.20f, -252.40f, -70.34f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(21, 549.20f, -252.40f, -70.34f, 4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(22, 555.33f, -269.16f, -74.40f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(23, 554.31f, -270.88f, -74.40f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(24, 554.31f, -270.88f, -74.40f, 4000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(25, 536.10f, -249.60f, -67.47f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(26, 520.94f, -216.65f, -59.28f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(27, 505.99f, -148.74f, -62.17f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(28, 484.21f, -56.24f, -62.43f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(29, 470.39f, -6.01f, -70.10f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(30, 451.27f, 30.85f, -70.07f, 0);
|
||||
marshal_reginald_windsorAI->AddWaypoint(31, 452.45f, 29.85f, -70.37f, 1500);
|
||||
marshal_reginald_windsorAI->AddWaypoint(32, 452.45f, 29.85f, -70.37f, 7000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(33, 452.45f, 29.85f, -70.37f, 10000);
|
||||
marshal_reginald_windsorAI->AddWaypoint(34, 451.27f, 31.85f, -70.07f, 0);
|
||||
|
||||
return marshal_reginald_windsorAI;
|
||||
}
|
||||
|
||||
struct npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
{
|
||||
npc_marshal_reginald_windsorAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
wp = waypointId;
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
me->setFaction(11);
|
||||
me->Say(SAY_REGINALD_WINDSOR_0_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 1:
|
||||
me->Say(SAY_REGINALD_WINDSOR_0_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 7:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_5_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 8:
|
||||
me->Say(SAY_REGINALD_WINDSOR_5_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 11:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_7_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 12:
|
||||
me->Say(SAY_REGINALD_WINDSOR_7_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 13:
|
||||
me->Say(SAY_REGINALD_WINDSOR_7_3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 20:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 21:
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 23:
|
||||
me->HandleEmoteCommand(EMOTE_STATE_POINT);
|
||||
me->Say(SAY_REGINALD_WINDSOR_14_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
IsOnHold=true;
|
||||
break;
|
||||
case 24:
|
||||
me->Say(SAY_REGINALD_WINDSOR_14_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 31:
|
||||
me->Say(SAY_REGINALD_WINDSOR_20_1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 32:
|
||||
me->Say(SAY_REGINALD_WINDSOR_20_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
PlayerStart->GroupEventHappens(QUEST_JAIL_BREAK, me);
|
||||
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
|
||||
{
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
return;
|
||||
|
||||
if (Player* player = who->ToPlayer())
|
||||
{
|
||||
if (player->GetQuestStatus(4322) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
float Radius = 10.0f;
|
||||
if (me->IsWithinDistInMap(who, Radius))
|
||||
{
|
||||
SetEscortPaused(false);
|
||||
Start(true, false, who->GetGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
me->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 1:
|
||||
me->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 2:
|
||||
me->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
void Reset() { }
|
||||
|
||||
void JustDied(Unit* slayer)
|
||||
{
|
||||
instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
return;
|
||||
|
||||
if (wp == 7)
|
||||
{
|
||||
if (!instance->GetData(DATA_GATE_J) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
instance->SetData(DATA_NPC_JAZ, 1);
|
||||
instance->SetData(DATA_JAZ, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (instance->GetData(DATA_NPC_JAZ) && instance->GetData(DATA_NPC_OGRABISI) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
SetEscortPaused(false);
|
||||
instance->SetData(DATA_JAZ, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
else if (wp == 11)
|
||||
{
|
||||
if (!instance->GetData(DATA_GATE_S) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
instance->SetData(DATA_NPC_SHILL, 1);
|
||||
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (instance->GetData(DATA_NPC_SHILL) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED);
|
||||
SetEscortPaused(false);
|
||||
}
|
||||
}
|
||||
else if (wp == 20)
|
||||
{
|
||||
if (!instance->GetData(DATA_GATE_C) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
{
|
||||
instance->SetData(DATA_NPC_CREST, 1);
|
||||
me->Say(SAY_REGINALD_WINDSOR_13_2, LANG_UNIVERSAL, PlayerGUID);
|
||||
instance->SetData(DATA_CREST, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
if (instance->GetData(DATA_NPC_CREST) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
SetEscortPaused(false);
|
||||
instance->SetData(DATA_CREST, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
if (instance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_OBJECTIVE_COMPLETED) SetEscortPaused(false);
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
// npc_tobias_seecher
|
||||
#define SAY_TOBIAS_FREE "Thank you! I will run for safety immediately!"
|
||||
|
||||
/*
|
||||
class npc_tobias_seecher : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_tobias_seecher() : CreatureScript("npc_tobias_seecher") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
npc_tobias_seecherAI* tobias_seecherAI = new npc_tobias_seecherAI(creature);
|
||||
|
||||
tobias_seecherAI->AddWaypoint(0, 549.21f, -281.07f, -75.27f);
|
||||
tobias_seecherAI->AddWaypoint(1, 554.39f, -267.39f, -73.68f);
|
||||
tobias_seecherAI->AddWaypoint(2, 533.59f, -249.38f, -67.04f);
|
||||
tobias_seecherAI->AddWaypoint(3, 519.44f, -217.02f, -59.34f);
|
||||
tobias_seecherAI->AddWaypoint(4, 506.55f, -153.49f, -62.34f);
|
||||
|
||||
return tobias_seecherAI;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
CloseGossipMenuFor(player);
|
||||
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, player->GetGUID());
|
||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_IN_PROGRESS);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS)
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Get out of here, Tobias, you're free!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, 2847, creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
struct npc_tobias_seecherAI : public npc_escortAI
|
||||
{
|
||||
npc_tobias_seecherAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
void EnterCombat(Unit* who) { }
|
||||
void Reset() { }
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (IsBeingEscorted && killer == me)
|
||||
{
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED);
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId)
|
||||
{
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
me->Say(SAY_TOBIAS_FREE, LANG_UNIVERSAL, PlayerGUID);
|
||||
break;
|
||||
case 2:
|
||||
instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_OBJECTIVE_COMPLETED);
|
||||
break;
|
||||
case 4:
|
||||
me->SetVisible(false);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
instance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_ENDED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
|
||||
return;
|
||||
|
||||
if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_TOBIAS) == ENCOUNTER_STATE_ENDED)
|
||||
{
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
me->SetVisible(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
// npc_rocknot
|
||||
enum RocknotSays
|
||||
{
|
||||
@@ -1222,10 +600,4 @@ void AddSC_blackrock_depths()
|
||||
new npc_phalanx();
|
||||
new npc_lokhtos_darkbargainer();
|
||||
new npc_rocknot();
|
||||
// Fix us
|
||||
/*new npc_dughal_stormwing();
|
||||
new npc_tobias_seecher();
|
||||
new npc_marshal_windsor();
|
||||
new npc_marshal_reginald_windsor();
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user