Include config options from Progression System

This commit is contained in:
郑佩茹
2022-09-06 17:34:56 -06:00
parent 35383aa98b
commit b74f5eab8a
3 changed files with 25 additions and 71 deletions

View File

@@ -127,4 +127,25 @@ IndividualProgression.HunterPetLevelFix = 1
# 0 - Disabled
#
IndividualProgression.RequirePreAQQuests = 1
IndividualProgression.RequirePreAQQuests = 1
#
#
#
# IndividualProgression.MoltenCore.ManualRuneHandling
# Description: Defines whether Molten Core runes are handled manually (dousing through Aqual Quintessence) or automatic when bosses are defeated (WotLK default)
# Default: 1 - Enabled (requires dousing)
# 0 - Disabled (automatic, handled when bosses are defeated)
#
#
IndividualProgression.MoltenCore.ManualRuneHandling = 1
#
# IndividualProgression.MoltenCore.AqualEssenceCooldownReduction
# Description: Reduces the cooldown of Eternal Quintessences by the amount specified.
# Default: 0 - Disabled (1 hour cooldown)
# 60 - (No cooldown)
#
#
IndividualProgression.MoltenCore.AqualEssenceCooldownReduction = 0

View File

@@ -104,52 +104,6 @@ public:
{
Talk(SAY_AGGRO);
if (sConfigMgr->GetOption<int>("ProgressionSystem.60.WorldBosses.KazzakPhasing", 1))
{
me->SetPhaseMask(PHASE_OUTRO, true);
if (Player* player = who->ToPlayer())
{
PhaseOutPlayers(player, PHASE_OUTRO);
_playerOwnerGUID = player->GetGUID();
}
else if (Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself())
{
PhaseOutPlayers(player, PHASE_OUTRO);
_playerOwnerGUID = player->GetGUID();
}
}
}
void PhaseOutPlayers(Player* source, uint8 phase)
{
if (Group* group = source->GetGroup())
{
for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
{
Player* groupGuy = itr->GetSource();
if (!groupGuy)
{
continue;
}
if (!groupGuy->IsInWorld())
{
continue;
}
if (!groupGuy->IsWithinDist(me, 500.0f))
{
continue;
}
groupGuy->SetPhaseMask(phase, true);
}
}
else
{
source->SetPhaseMask(phase, true);
}
}
void KilledUnit(Unit* /*victim*/) override
@@ -163,32 +117,12 @@ public:
Talk(SAY_WIPE);
ScriptedAI::EnterEvadeMode(why);
if (sConfigMgr->GetOption<int>("ProgressionSystem.60.WorldBosses.KazzakPhasing", 1))
{
me->SetPhaseMask(PHASE_NORMAL, true);
if (Player* player = ObjectAccessor::FindConnectedPlayer(_playerOwnerGUID))
{
PhaseOutPlayers(player, PHASE_NORMAL);
}
_playerOwnerGUID.Clear();
}
}
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_DEATH);
if (sConfigMgr->GetOption<int>("ProgressionSystem.60.WorldBosses.KazzakPhasing", 1))
{
if (Player* player = ObjectAccessor::FindConnectedPlayer(_playerOwnerGUID))
{
me->SetPhaseMask(PHASE_NORMAL, true);
PhaseOutPlayers(player, PHASE_NORMAL);
}
}
me->SetRespawnTime(urand(2 * DAY, 3 * DAY));
me->SaveRespawnTime();
}
@@ -257,7 +191,6 @@ public:
private:
EventMap _events;
ObjectGuid _playerOwnerGUID;
bool _supremeMode;
};

View File

@@ -321,7 +321,7 @@ public:
{
if (GameObject* rune = instance->GetGameObject(_runesGUIDs[bossId]))
{
if (sConfigMgr->GetOption<int>("ProgressionSystem.60.MoltenCore.ManualRuneHandling", 1))
if (sConfigMgr->GetOption<int>("IndividualProgression.MoltenCore.ManualRuneHandling", 1))
{
rune->SetGoState(GO_STATE_ACTIVE);
rune->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
@@ -432,7 +432,7 @@ public:
return false;
}
if (sConfigMgr->GetOption<int>("ProgressionSystem.60.MoltenCore.ManualRuneHandling", 1))
if (sConfigMgr->GetOption<int>("IndividualProgression.MoltenCore.ManualRuneHandling", 1))
{
return CheckFirelordRunes();
}
@@ -556,7 +556,7 @@ public:
if (uint32 cooldown = player->GetSpellCooldownDelay(SPELL_AQUAL_QUINTESSENCE))
{
int32 cooldownredux = sConfigMgr->GetOption<int>("ProgressionSystem.60.MoltenCore.AqualEssenceCooldownReduction", 0);
int32 cooldownredux = sConfigMgr->GetOption<int>("IndividualProgression.MoltenCore.AqualEssenceCooldownReduction", 0);
player->ModifySpellCooldown(SPELL_AQUAL_QUINTESSENCE, -(cooldownredux * MINUTE * IN_MILLISECONDS));
}