Merge branch 'master' into Playerbot
This commit is contained in:
@@ -874,7 +874,7 @@ struct boss_sartharion_dragonAI : public BossAI
|
||||
Talk(SAY_TENEBRON_DEATH);
|
||||
if (!isCalledBySartharion || instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
|
||||
{
|
||||
instance->SetBossState(DATA_SHADRON, DONE);
|
||||
instance->SetBossState(DATA_TENEBRON, DONE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
-25
@@ -46,17 +46,6 @@ public:
|
||||
LoadBossBoundaries(boundaries);
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
|
||||
{
|
||||
if (GetBossState(i) == IN_PROGRESS)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature) override
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
@@ -150,20 +139,6 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) override
|
||||
{
|
||||
if (InstanceScript::SetBossState(type, state))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (state == DONE)
|
||||
{
|
||||
SaveToDB();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
switch (action)
|
||||
|
||||
+1
@@ -389,6 +389,7 @@ public:
|
||||
if (action == ACTION_BALTHARUS_DEATH)
|
||||
{
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
_isIntro = false;
|
||||
|
||||
_events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_0, 6s);
|
||||
|
||||
@@ -339,6 +339,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_ICY_GRIP, 33s + 500ms, EVENT_GROUP_LAND_PHASE);
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetInCombatWithZone();
|
||||
instance->SetBossState(DATA_SINDRAGOSA, IN_PROGRESS);
|
||||
|
||||
@@ -377,6 +378,7 @@ public:
|
||||
return;
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetSpeed(MOVE_RUN, 4.28571f);
|
||||
@@ -1407,6 +1409,7 @@ public:
|
||||
return;
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetImmuneToPC(true);
|
||||
float moveTime = me->GetExactDist(&SpinestalkerFlyPos) / (me->GetSpeed(MOVE_RUN) * 0.001f);
|
||||
me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, SpinestalkerLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250));
|
||||
@@ -1423,6 +1426,7 @@ public:
|
||||
return;
|
||||
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
me->SetDisableGravity(false);
|
||||
me->SetHomePosition(SpinestalkerLandPos);
|
||||
me->SetFacingTo(SpinestalkerLandPos.GetOrientation());
|
||||
@@ -1538,6 +1542,7 @@ public:
|
||||
return;
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetImmuneToPC(true);
|
||||
float moveTime = me->GetExactDist(&RimefangFlyPos) / (me->GetSpeed(MOVE_RUN) * 0.001f);
|
||||
me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, RimefangLandPos), me->m_Events.CalculateTime(uint64(moveTime) + 250));
|
||||
@@ -1556,6 +1561,8 @@ public:
|
||||
if (point == POINT_FROSTWYRM_LAND)
|
||||
{
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
me->SetFarVisible(false);
|
||||
me->SetDisableGravity(false);
|
||||
me->SetHomePosition(RimefangLandPos);
|
||||
me->SetFacingTo(RimefangLandPos.GetOrientation());
|
||||
|
||||
@@ -293,16 +293,12 @@ public:
|
||||
_instance(creature->GetInstanceScript()), _portalCount(RAID_MODE<uint32>(3, 8, 3, 8))
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
_spawnHealth = 1; // just in case if not set below
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetSpawnId()))
|
||||
if (data->curhealth)
|
||||
_spawnHealth = data->curhealth;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
me->SetHealth(_spawnHealth);
|
||||
me->SetHealth(me->GetMaxHealth() * 0.5f); // starts at 50% health
|
||||
me->LoadCreaturesAddon(true);
|
||||
// immune to percent heals
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_OBS_MOD_HEALTH, true);
|
||||
@@ -440,8 +436,9 @@ public:
|
||||
// does not enter combat
|
||||
if (_instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == NOT_STARTED)
|
||||
{
|
||||
if (me->GetHealth() != _spawnHealth) // healing when boss cannot be engaged (lower spire not finished, cheating) doesn't start the fight, prevent winning this way
|
||||
me->SetHealth(_spawnHealth);
|
||||
uint32 startingHealth = me->GetMaxHealth() * 0.5f;
|
||||
if (me->GetHealth() != startingHealth) // healing when boss cannot be engaged (lower spire not finished, cheating) doesn't start the fight, prevent winning this way
|
||||
me->SetHealth(startingHealth);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -484,7 +481,6 @@ public:
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
uint32 _spawnHealth;
|
||||
uint32 const _portalCount;
|
||||
uint32 _missedPortals;
|
||||
bool _under25PercentTalkDone;
|
||||
@@ -756,7 +752,7 @@ public:
|
||||
if (!me->IsInCombat())
|
||||
if (me->GetSpawnId())
|
||||
if (!me->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
|
||||
me->CastSpell(me, SPELL_CORRUPTION, false);
|
||||
me->CastSpell(me, SPELL_CORRUPTION, true);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
@@ -388,6 +388,11 @@ public:
|
||||
_phaseTwo = false;
|
||||
_heraldOfTheTitans = true;
|
||||
|
||||
if (m_pInstance->GetData(TYPE_ALGALON) == FAIL)
|
||||
{
|
||||
_firstPull = false;
|
||||
}
|
||||
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(TYPE_ALGALON, NOT_STARTED);
|
||||
}
|
||||
@@ -479,6 +484,7 @@ public:
|
||||
|
||||
uint32 introDelay = 0;
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetInCombatWithZone();
|
||||
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetImmuneToNPC(true);
|
||||
@@ -1151,6 +1157,14 @@ public:
|
||||
|
||||
if (GameObject* sigil = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_DOODAD_UL_SIGILDOOR_02)))
|
||||
sigil->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
if (Map* map = player->GetMap())
|
||||
{
|
||||
if (InstanceMap* instanceMap = map->ToInstanceMap())
|
||||
{
|
||||
instanceMap->PermBindAllPlayers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -175,6 +175,7 @@ public:
|
||||
{
|
||||
me->SetDisableGravity(true);
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
Reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -517,6 +517,7 @@ public:
|
||||
if (m_pInstance && !_encounterFinished)
|
||||
m_pInstance->SetData(TYPE_THORIM, IN_PROGRESS);
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
DisableThorim(true);
|
||||
me->CastSpell(me, SPELL_SHEATH_OF_LIGHTNING, true);
|
||||
//me->CastSpell(me, SPELL_TOUCH_OF_DOMINION, true);
|
||||
|
||||
Reference in New Issue
Block a user