mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
fix(Scripts/Karazhan): Barnes should respawn on wipe. (#13953)
* fix(Scripts/Karazhan): Barnes should respawn on wipe. Fixes #4437 * Update.
This commit is contained in:
@@ -709,6 +709,13 @@ public:
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason reason) override
|
||||
{
|
||||
ScriptedAI::EnterEvadeMode(reason);
|
||||
|
||||
instance->SetBossState(DATA_OPERA_PERFORMANCE, FAIL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_CRONE_DEATH);
|
||||
@@ -891,6 +898,13 @@ public:
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason reason) override
|
||||
{
|
||||
ScriptedAI::EnterEvadeMode(reason);
|
||||
|
||||
instance->SetBossState(DATA_OPERA_PERFORMANCE, FAIL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
DoPlaySoundToSet(me, SOUND_WOLF_DEATH);
|
||||
@@ -1138,6 +1152,13 @@ public:
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override;
|
||||
|
||||
void EnterEvadeMode(EvadeReason reason) override
|
||||
{
|
||||
ScriptedAI::EnterEvadeMode(reason);
|
||||
|
||||
instance->SetBossState(DATA_OPERA_PERFORMANCE, FAIL);
|
||||
}
|
||||
|
||||
void JustDied(Unit*) override
|
||||
{
|
||||
Talk(SAY_JULIANNE_DEATH02);
|
||||
@@ -1287,6 +1308,13 @@ public:
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason reason) override
|
||||
{
|
||||
ScriptedAI::EnterEvadeMode(reason);
|
||||
|
||||
instance->SetBossState(DATA_OPERA_PERFORMANCE, FAIL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_ROMULO_DEATH);
|
||||
|
||||
@@ -73,7 +73,18 @@ public:
|
||||
case NPC_RELAY:
|
||||
m_uiRelayGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_BARNES:
|
||||
_barnesGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_OPERA_PERFORMANCE) != DONE && !creature->IsAlive())
|
||||
{
|
||||
creature->Respawn(true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
InstanceScript::OnCreatureCreate(creature);
|
||||
}
|
||||
|
||||
void OnUnitDeath(Unit* unit) override
|
||||
@@ -162,6 +173,13 @@ public:
|
||||
sideEntrance->RemoveGameObjectFlag(GO_FLAG_LOCKED);
|
||||
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, 16812, nullptr);
|
||||
}
|
||||
else if (state == FAIL)
|
||||
{
|
||||
HandleGameObject(m_uiStageDoorLeftGUID, false);
|
||||
HandleGameObject(m_uiStageDoorRightGUID, false);
|
||||
HandleGameObject(m_uiCurtainGUID, false);
|
||||
DoRespawnCreature(_barnesGUID, true);
|
||||
}
|
||||
break;
|
||||
case DATA_CHESS:
|
||||
if (state == DONE)
|
||||
@@ -336,6 +354,7 @@ public:
|
||||
ObjectGuid ImageGUID;
|
||||
ObjectGuid DustCoveredChest;
|
||||
ObjectGuid m_uiRelayGUID;
|
||||
ObjectGuid _barnesGUID;
|
||||
GuidVector _operaDecorations[EVENT_RAJ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -90,7 +90,8 @@ enum KZMiscCreatures
|
||||
NPC_DREADBEAST = 16177,
|
||||
NPC_SHADOWBEAST = 16176,
|
||||
NPC_KILREK = 17229,
|
||||
NPC_RELAY = 17645
|
||||
NPC_RELAY = 17645,
|
||||
NPC_BARNES = 16812
|
||||
};
|
||||
|
||||
enum KZGameObjectIds
|
||||
|
||||
Reference in New Issue
Block a user