Scripts/BWD: scripted heroic intro when entering the instance
* Finkle Einhorn will now only call for help when a player is nearby
This commit is contained in:
1 parent
af6192b61a
commit
37f626b503
5 files changed
+52
-6
No files matched your search
@@ -0,0 +1,7 @@
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`= 48964 AND `GroupID`= 4;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `comment`) VALUES
|
||||
(48964, 4, 0, 'Mortals that fancy themselves HEROES have entered the Broken Hall. Oh, I do hope this \"raid\" will amuse me more than the last.', 14, 0, 100, 0, 0, 23379, 49053, 'Lord Victor Nefarius to Player');
|
||||
|
||||
DELETE FROM `areatrigger_scripts` WHERE `entry`= 6583;
|
||||
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
|
||||
(6583, 'at_bwd_intro');
|
||||
+14
@@ -52,7 +52,21 @@ private:
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
class at_bwd_intro: public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
at_bwd_intro() : AreaTriggerScript("at_bwd_intro") { }
|
||||
|
||||
bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/)
|
||||
{
|
||||
if (InstanceScript * instance = player->GetInstanceScript())
|
||||
instance->SetData(DATA_ENTRANCE_INTRO, IN_PROGRESS);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_blackwing_descent()
|
||||
{
|
||||
RegisterGameObjectAI(go_bwd_ancient_bell);
|
||||
new at_bwd_intro();
|
||||
}
|
||||
+2
@@ -36,10 +36,12 @@ enum BWDDataTypes
|
||||
DATA_NEFARIANS_END = 5,
|
||||
|
||||
/*Events*/
|
||||
|
||||
DATA_DEAD_DWARF_SPIRITS,
|
||||
DATA_ANCIENT_BELL,
|
||||
DATA_COLUMN_OF_LIGHT,
|
||||
DATA_ATRAMEDES_INTRO,
|
||||
DATA_ENTRANCE_INTRO,
|
||||
|
||||
// Encounter Data
|
||||
/*Magmaw*/
|
||||
|
||||
+16
-6
@@ -76,7 +76,8 @@ enum Texts
|
||||
SAY_INTRODUCTION = 0,
|
||||
SAY_STOP_FEUD = 1,
|
||||
SAY_PHASE_2 = 2,
|
||||
SAY_CHIMAERON_LOST = 3
|
||||
SAY_CHIMAERON_LOST = 3,
|
||||
SAY_ENTRANCE_INTRO_HEROIC = 4
|
||||
};
|
||||
|
||||
enum Phases
|
||||
@@ -108,7 +109,8 @@ enum Events
|
||||
EVENT_INTRODUCE_CHIMAERON = 1,
|
||||
EVENT_MOCKING_SHADOWS,
|
||||
EVENT_TALK_CHIMAERON_DIED,
|
||||
EVENT_TELEPORT_AWAY
|
||||
EVENT_TELEPORT_AWAY,
|
||||
EVENT_TALK_HEROIC_INTRO
|
||||
};
|
||||
|
||||
enum Actions
|
||||
@@ -450,7 +452,8 @@ struct npc_chimaeron_finkle_einhorn : public ScriptedAI
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CALL_FOR_HELP:
|
||||
Talk(SAY_CALL_FOR_HELP);
|
||||
if (me->SelectNearestPlayer(60.0f))
|
||||
Talk(SAY_CALL_FOR_HELP);
|
||||
_events.Repeat(14s, 22s);
|
||||
break;
|
||||
case EVENT_TALK_SEARCH_FOR_KEY:
|
||||
@@ -533,13 +536,15 @@ private:
|
||||
|
||||
struct npc_chimaeron_lord_victor_nefarius : public NullCreatureAI
|
||||
{
|
||||
npc_chimaeron_lord_victor_nefarius(Creature* creature) : NullCreatureAI(creature) { }
|
||||
npc_chimaeron_lord_victor_nefarius(Creature* creature) : NullCreatureAI(creature), _instance(me->GetInstanceScript()) { }
|
||||
|
||||
void IsSummonedBy(Unit* summoner) override
|
||||
void JustAppeared() override
|
||||
{
|
||||
DoCastSelf(SPELL_TELEPORT_VISUAL_ONLY);
|
||||
if (summoner->GetEntry() == BOSS_CHIMAERON)
|
||||
if (_instance->GetBossState(DATA_CHIMAERON) == IN_PROGRESS)
|
||||
_events.ScheduleEvent(EVENT_INTRODUCE_CHIMAERON, 4s);
|
||||
else
|
||||
_events.ScheduleEvent(EVENT_TALK_HEROIC_INTRO, 3s);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -569,6 +574,10 @@ struct npc_chimaeron_lord_victor_nefarius : public NullCreatureAI
|
||||
DoCastSelf(SPELL_TELEPORT_VISUAL_ONLY);
|
||||
me->DespawnOrUnsummon(2s);
|
||||
break;
|
||||
case EVENT_TALK_HEROIC_INTRO:
|
||||
Talk(SAY_ENTRANCE_INTRO_HEROIC);
|
||||
_events.ScheduleEvent(EVENT_TELEPORT_AWAY, 6s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -598,6 +607,7 @@ struct npc_chimaeron_lord_victor_nefarius : public NullCreatureAI
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
class spell_chimaeron_caustic_slime_targeting : public SpellScript
|
||||
|
||||
+13
@@ -62,6 +62,7 @@ Position const MassiveCrashTargetPositionRight = { -337.375f, -43.6615f, 212.0
|
||||
Position const ColumnOfLightPosition = { 231.3559f, -224.3038f, 74.95496f, 3.193953f };
|
||||
Position const AtramedesIntroSummonPosition = { 288.325f, -222.438f, 96.61964f, 3.089233f };
|
||||
Position const AtramedesRespawnPosition = { 220.0347f, -224.3125f, 74.88777f, 3.141593f };
|
||||
Position const LordVictorNefariusIntroPosition = { -290.4809f, -224.5955f, 191.6532f, 3.124139 };
|
||||
|
||||
enum Events
|
||||
{
|
||||
@@ -104,6 +105,7 @@ class instance_blackwing_descent : public InstanceMapScript
|
||||
{
|
||||
_deadDwarfSpirits = 0;
|
||||
_atramedesIntroState = NOT_STARTED;
|
||||
_entranceSequenceDone = false;
|
||||
}
|
||||
|
||||
void Create() override
|
||||
@@ -286,6 +288,16 @@ class instance_blackwing_descent : public InstanceMapScript
|
||||
|
||||
SaveToDB();
|
||||
break;
|
||||
case DATA_ENTRANCE_INTRO:
|
||||
if (!_entranceSequenceDone)
|
||||
{
|
||||
if (instance->IsHeroic())
|
||||
{
|
||||
instance->SummonCreature(NPC_LORD_VICTOR_NEFARIUS_CHIMAERON, LordVictorNefariusIntroPosition);
|
||||
_entranceSequenceDone = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -411,6 +423,7 @@ class instance_blackwing_descent : public InstanceMapScript
|
||||
GuidVector _atramedesIntroGUIDs;
|
||||
uint8 _deadDwarfSpirits;
|
||||
uint8 _atramedesIntroState;
|
||||
bool _entranceSequenceDone;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
Reference in new issue
Block a user