mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Scripts/Karazhan): Fix Nightbane health phase percentages (#17173)
* fix(Scripts/Karazhan): Fix Nightbane health phase percentages * Update boss_nightbane.cpp
This commit is contained in:
@@ -122,7 +122,7 @@ struct boss_nightbane : public BossAI
|
|||||||
MovePhase = 0;
|
MovePhase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScheduleHealthCheckEvent({25, 50, 70}, [&]{
|
ScheduleHealthCheckEvent({ 75, 50, 25 }, [&]{
|
||||||
TakeOff();
|
TakeOff();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -219,9 +219,7 @@ struct boss_nightbane : public BossAI
|
|||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
{
|
{
|
||||||
if (instance)
|
_JustDied();
|
||||||
instance->SetData(DATA_NIGHTBANE, DONE);
|
|
||||||
|
|
||||||
HandleTerraceDoors(true);
|
HandleTerraceDoors(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,6 +396,7 @@ private:
|
|||||||
uint8 _skeletonCount;
|
uint8 _skeletonCount;
|
||||||
uint8 _skeletonSpawnCounter;
|
uint8 _skeletonSpawnCounter;
|
||||||
};
|
};
|
||||||
|
|
||||||
class go_blackened_urn : public GameObjectScript
|
class go_blackened_urn : public GameObjectScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -405,13 +404,17 @@ public:
|
|||||||
|
|
||||||
//if we summon an entity instead of using a sort of invisible entity, we could unsummon boss on reset
|
//if we summon an entity instead of using a sort of invisible entity, we could unsummon boss on reset
|
||||||
//right now that doesn't work because of how the urn works
|
//right now that doesn't work because of how the urn works
|
||||||
bool OnGossipHello(Player* player, GameObject* go) override
|
bool OnGossipHello(Player* /*player*/, GameObject* go) override
|
||||||
{
|
{
|
||||||
if (InstanceScript* pInstance = go->GetInstanceScript())
|
if (InstanceScript* instance = go->GetInstanceScript())
|
||||||
{
|
{
|
||||||
if (pInstance->GetData(DATA_NIGHTBANE) != DONE && !go->FindNearestCreature(NPC_NIGHTBANE, 40.0f))
|
if (instance->GetData(DATA_NIGHTBANE) != DONE && !go->FindNearestCreature(NPC_NIGHTBANE, 40.0f))
|
||||||
if (Creature* cr = ObjectAccessor::GetCreature(*player, pInstance->GetGuidData(DATA_NIGHTBANE)))
|
{
|
||||||
|
if (Creature* cr = instance->GetCreature(DATA_NIGHTBANE))
|
||||||
|
{
|
||||||
cr->GetMotionMaster()->MovePoint(0, IntroWay[0][0], IntroWay[0][1], IntroWay[0][2]);
|
cr->GetMotionMaster()->MovePoint(0, IntroWay[0][0], IntroWay[0][1], IntroWay[0][2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -34,16 +34,17 @@ const Position OptionalSpawn[] =
|
|||||||
|
|
||||||
ObjectData const creatureData[] =
|
ObjectData const creatureData[] =
|
||||||
{
|
{
|
||||||
{ NPC_ATTUMEN_THE_HUNTSMAN, DATA_ATTUMEN },
|
{ NPC_ATTUMEN_THE_HUNTSMAN, DATA_ATTUMEN },
|
||||||
{ NPC_MIDNIGHT, DATA_MIDNIGHT },
|
{ NPC_MIDNIGHT, DATA_MIDNIGHT },
|
||||||
{ NPC_DOROTHEE, DATA_DOROTHEE },
|
{ NPC_DOROTHEE, DATA_DOROTHEE },
|
||||||
{ NPC_TITO, DATA_TITO },
|
{ NPC_TITO, DATA_TITO },
|
||||||
{ NPC_ROAR, DATA_ROAR },
|
{ NPC_ROAR, DATA_ROAR },
|
||||||
{ NPC_STRAWMAN, DATA_STRAWMAN },
|
{ NPC_STRAWMAN, DATA_STRAWMAN },
|
||||||
{ NPC_TINHEAD, DATA_TINHEAD },
|
{ NPC_TINHEAD, DATA_TINHEAD },
|
||||||
{ NPC_ROMULO, DATA_ROMULO },
|
{ NPC_ROMULO, DATA_ROMULO },
|
||||||
{ NPC_JULIANNE, DATA_JULIANNE },
|
{ NPC_JULIANNE, DATA_JULIANNE },
|
||||||
{ 0, 0 }
|
{ NPC_NIGHTBANE, DATA_NIGHTBANE },
|
||||||
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
class instance_karazhan : public InstanceMapScript
|
class instance_karazhan : public InstanceMapScript
|
||||||
|
|||||||
Reference in New Issue
Block a user