Fix Lady Deathwhisper intro

When you are at Lord Marrowgar entrance and he starts his intro, Lady
starts her intro too. With this fix, that is fixed.
This commit is contained in:
Nefertumm
2018-01-28 16:30:22 -03:00
committed by Barbz
parent a3d3042049
commit 00b5e3141a
3 changed files with 38 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
INSERT INTO version_db_world (`sql_rev`) VALUES ('1517167424973293300');
DELETE FROM `areatrigger_scripts` WHERE `entry` = 5709;
INSERT INTO `areatrigger_scripts` VALUES (5709, 'at_lady_deathwhisper_entrance');

View File

@@ -163,6 +163,11 @@ enum DeprogrammingData
POINT_DESPAWN = 384721,
};
enum Actions
{
ACTION_START_INTRO
};
#define NPC_DARNAVAN RAID_MODE<uint32>(NPC_DARNAVAN_10, NPC_DARNAVAN_25, NPC_DARNAVAN_10, NPC_DARNAVAN_25)
#define NPC_DARNAVAN_CREDIT RAID_MODE<uint32>(NPC_DARNAVAN_CREDIT_10, NPC_DARNAVAN_CREDIT_25, NPC_DARNAVAN_CREDIT_10, NPC_DARNAVAN_CREDIT_25)
#define QUEST_DEPROGRAMMING RAID_MODE<uint32>(QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25, QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25)
@@ -511,9 +516,12 @@ class boss_lady_deathwhisper : public CreatureScript
Talk(SAY_KILL);
}
void MoveInLineOfSight(Unit* who)
void DoAction(int32 action)
{
if (!_introDone && me->IsWithinDistInMap(who, 110.0f))
if (action != ACTION_START_INTRO)
return;
if (!_introDone)
{
_introDone = true;
Talk(SAY_INTRO_1);
@@ -525,8 +533,6 @@ class boss_lady_deathwhisper : public CreatureScript
events.ScheduleEvent(EVENT_INTRO_6, 48500, 0, PHASE_INTRO);
events.ScheduleEvent(EVENT_INTRO_7, 58000, 0, PHASE_INTRO);
}
BossAI::MoveInLineOfSight(who);
}
void SummonWaveP1()
@@ -1133,6 +1139,22 @@ public:
}
};
class at_lady_deathwhisper_entrance : public AreaTriggerScript
{
public:
at_lady_deathwhisper_entrance() : AreaTriggerScript("at_lady_deathwhisper_entrance") { }
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/)
{
if (InstanceScript* instance = player->GetInstanceScript())
if (instance->GetBossState(DATA_LADY_DEATHWHISPER) != DONE)
if (!player->IsGameMaster())
if (Creature* ladyDeathwhisper = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_LADY_DEATHWHISPER)))
ladyDeathwhisper->AI()->DoAction(ACTION_START_INTRO);
return true;
}
};
void AddSC_boss_lady_deathwhisper()
{
new boss_lady_deathwhisper();
@@ -1142,4 +1164,5 @@ void AddSC_boss_lady_deathwhisper()
new npc_darnavan();
new spell_deathwhisper_mana_barrier();
new spell_cultist_dark_martyrdom();
new at_lady_deathwhisper_entrance();
}

View File

@@ -157,6 +157,7 @@ class instance_icecrown_citadel : public InstanceMapScript
LoadDoorData(doorData);
TeamIdInInstance = TEAM_NEUTRAL;
HeroicAttempts = MaxHeroicAttempts;
LadyDeathwhisperGUID = 0;
LadyDeathwisperElevatorGUID = 0;
GunshipGUID = 0;
EnemyGunshipGUID = 0;
@@ -344,6 +345,9 @@ class instance_icecrown_citadel : public InstanceMapScript
instance->SummonCreature(NPC_LADY_SYLVANAS_WINDRUNNER_QUEST, SylvanasSpawnPos);
}
break;
case NPC_LADY_DEATHWHISPER:
LadyDeathwhisperGUID = creature->GetGUID();
break;
case NPC_DEATHBRINGER_SAURFANG:
DeathbringerSaurfangGUID = creature->GetGUID();
break;
@@ -925,6 +929,8 @@ class instance_icecrown_citadel : public InstanceMapScript
{
switch (type)
{
case DATA_LADY_DEATHWHISPER:
return LadyDeathwhisperGUID;
case DATA_ICECROWN_GUNSHIP_BATTLE:
return GunshipGUID;
case DATA_ENEMY_GUNSHIP:
@@ -1825,6 +1831,7 @@ class instance_icecrown_citadel : public InstanceMapScript
uint64 ScourgeTransporterFirstGUID;
EventMap Events;
uint64 LadyDeathwhisperGUID;
uint64 LadyDeathwisperElevatorGUID;
uint64 GunshipGUID;
uint64 EnemyGunshipGUID;