BWL: Instance.NefarianCapAdds, at most 42 drakonids in Nefarian phase 1

The TrinityCore way: Lord Victor Nefarius stops calling drakonids once 42
have come. The 1.12 spawn timing stays. Nefarian lands at 40 kills, or once
all 42 are gone when some left alive out of combat. Off by default (1.12:
they keep coming until 42 are killed); the repack realm turns it on.
This commit is contained in:
Karrz1
2026-11-14 13:36:07 +00:00
parent 693d4e9cf8
commit a757572d9e
5 changed files with 43 additions and 21 deletions
+1
View File
@@ -9,6 +9,7 @@ Every option below is OFF in the shipped `worldserver.conf.dist`, which gives th
| `Instance.IgnoreAttunement` | No attunement item or quest is needed to enter an instance (Molten Core, Onyxia, Blackwing Lair, Naxxramas and so on). Level limits are separate: `Instance.IgnoreLevel`. | 0 |
| `Instance.AhnQirajGatesOpen` | The Gate of Ahn'Qiraj stands open, so the war effort and the Scarab Gong are not needed to reach Ruins and Temple of Ahn'Qiraj. | 0 |
| `Instance.PersistRaidTrash` | Raid trash that was killed stays dead until the lockout resets, including after you leave the instance, the instance unloads or the server restarts. Needs `Instance.BindOnEntry = 1` for players without a lockout yet. | 0 |
| `Instance.NefarianCapAdds` | Nefarian phase 1: Victor Nefarius stops calling drakonids after 42 have come (spawn timing unchanged). Off (1.12): they keep coming until 42 are killed. | 0 |
| `Instance.MoltenCoreHoundsLinked` | Core Hounds as in 1.12 (feign death and rise again unless the whole pack dies together). Off (standard): hound packs are unlinked and can be killed one by one. | 0 |
Note: the first five switch off Blizzlike rules; `MoltenCoreHoundsLinked` is the reverse, its off state is the shared default for this project (packs unlinked).
+1
View File
@@ -632,6 +632,7 @@ void World::LoadConfigSettings(bool reload)
{ .Name = "Instance.PersistRaidTrash"sv, .DefaultValue = false, .Index = CONFIG_INSTANCE_PERSIST_RAID_TRASH },
{ .Name = "Instance.MoltenCoreHoundsLinked"sv, .DefaultValue = false, .Index = CONFIG_MC_CORE_HOUNDS_LINKED },
{ .Name = "Instance.MoltenCoreSkipRunes"sv, .DefaultValue = false, .Index = CONFIG_MC_SKIP_RUNES },
{ .Name = "Instance.NefarianCapAdds"sv, .DefaultValue = false, .Index = CONFIG_BWL_NEFARIAN_CAP_ADDS },
{ .Name = "Instance.IgnoreRaid"sv, .DefaultValue = false, .Index = CONFIG_INSTANCE_IGNORE_RAID },
{ .Name = "Instance.CombatResurrectionLimit"sv, .DefaultValue = false, .Index = CONFIG_INSTANCE_COMBAT_RES_LIMIT },
{ .Name = "CastUnstuck"sv, .DefaultValue = true, .Index = CONFIG_CAST_UNSTUCK },
+1
View File
@@ -123,6 +123,7 @@ enum WorldBoolConfigs : uint32
CONFIG_INSTANCE_PERSIST_RAID_TRASH,
CONFIG_MC_CORE_HOUNDS_LINKED,
CONFIG_MC_SKIP_RUNES,
CONFIG_BWL_NEFARIAN_CAP_ADDS,
CONFIG_INSTANCE_COMBAT_RES_LIMIT,
CONFIG_CAST_UNSTUCK,
CONFIG_ALLOW_GM_GROUP,
@@ -31,6 +31,7 @@
#include "ScriptedGossip.h"
#include "SpellInfo.h"
#include "TemporarySummon.h"
#include "World.h"
#include "ThreatManager.h"
#include "classic_blackwing_lair.h"
#include "classic_script_text.h"
@@ -139,6 +140,8 @@ struct classic_boss_victor_nefarius : public ScriptedAI
bool m_bInert;
uint32 m_uiKilledAdds = 0;
uint32 m_uiSpawnedAdds = 0; // Instance.NefarianCapAdds: drakonids called this phase 1
uint32 m_uiLostAdds = 0; // drakonids that went away alive (out of combat for 10 s): never killed
uint32 m_uiAddSpawnTimer = 6000;
uint32 m_uiAddChromaSpawnTimer = 8000;
uint32 m_uiShadowBoltTimer = 5000;
@@ -172,6 +175,8 @@ struct classic_boss_victor_nefarius : public ScriptedAI
return;
m_uiKilledAdds = 0;
m_uiSpawnedAdds = 0;
m_uiLostAdds = 0;
m_uiAddSpawnTimer = 6000;
m_uiAddChromaSpawnTimer = urand(7000, 9000);
m_uiShadowBoltTimer = 5000;
@@ -319,6 +324,12 @@ struct classic_boss_victor_nefarius : public ScriptedAI
++m_uiKilledAdds;
}
void SummonedCreatureDespawn(Creature* pSummoned) override
{
if (pSummoned->GetEntry() != CLASSIC_BWL_NPC_NEFARIAN && pSummoned->IsAlive())
++m_uiLostAdds;
}
// VMaNGOS gossip_scripts 604500 (gossip option "Attack them, minions!"):
// the instance forwards SetData(CLASSIC_BWL_GOSSIP_OPTION_NEFARIUS) here.
void DoAction(int32 action) override
@@ -417,19 +428,21 @@ struct classic_boss_victor_nefarius : public ScriptedAI
return;
}
// Instance.NefarianCapAdds (the TrinityCore way): no drakonid after the 42nd has come. Off: they come until 42 are killed (1.12).
bool const capAdds = sWorld->getBoolConfig(CONFIG_BWL_NEFARIAN_CAP_ADDS);
auto callAdd = [&](uint32 entry, Position const& at)
{
if (capAdds && m_uiSpawnedAdds >= CLASSIC_BWL_MAX_DRAKE_KILLED)
return;
if (me->SummonCreature(entry, at.GetPositionX(), at.GetPositionY(), at.GetPositionZ(), 5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10s))
++m_uiSpawnedAdds;
};
// Add spawning mechanism
if (m_uiAddSpawnTimer < uiDiff)
{
me->SummonCreature(m_uiDrakeTypeOne,
ClassicBwlNefarianLocs[0].GetPositionX(),
ClassicBwlNefarianLocs[0].GetPositionY(),
ClassicBwlNefarianLocs[0].GetPositionZ(),
5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10s);
me->SummonCreature(m_uiDrakeTypeTwo,
ClassicBwlNefarianLocs[1].GetPositionX(),
ClassicBwlNefarianLocs[1].GetPositionY(),
ClassicBwlNefarianLocs[1].GetPositionZ(),
5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10s);
callAdd(m_uiDrakeTypeOne, ClassicBwlNefarianLocs[0]);
callAdd(m_uiDrakeTypeTwo, ClassicBwlNefarianLocs[1]);
m_uiAddSpawnTimer = urand(6000, 7000);
}
@@ -438,16 +451,8 @@ struct classic_boss_victor_nefarius : public ScriptedAI
if (m_uiAddChromaSpawnTimer < uiDiff)
{
me->SummonCreature(CLASSIC_BWL_NPC_CHROMATIC_DRAKANOID,
ClassicBwlNefarianLocs[0].GetPositionX(),
ClassicBwlNefarianLocs[0].GetPositionY(),
ClassicBwlNefarianLocs[0].GetPositionZ(),
5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10s);
me->SummonCreature(CLASSIC_BWL_NPC_CHROMATIC_DRAKANOID,
ClassicBwlNefarianLocs[1].GetPositionX(),
ClassicBwlNefarianLocs[1].GetPositionY(),
ClassicBwlNefarianLocs[1].GetPositionZ(),
5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10s);
callAdd(CLASSIC_BWL_NPC_CHROMATIC_DRAKANOID, ClassicBwlNefarianLocs[0]);
callAdd(CLASSIC_BWL_NPC_CHROMATIC_DRAKANOID, ClassicBwlNefarianLocs[1]);
m_uiAddChromaSpawnTimer = 35000;
}
else
@@ -457,7 +462,11 @@ struct classic_boss_victor_nefarius : public ScriptedAI
return;
// Begin phase 2 by spawning Nefarian
if (m_uiKilledAdds >= (CLASSIC_BWL_MAX_DRAKE_KILLED - 2)) // 40 drakes killed
// Instance.NefarianCapAdds: with no more drakonids to come, one that went away alive must not leave the raid short of 40 kills
// for good. He lands once all 42 are gone.
bool const allGone = capAdds && m_uiSpawnedAdds >= CLASSIC_BWL_MAX_DRAKE_KILLED &&
m_uiKilledAdds + m_uiLostAdds >= CLASSIC_BWL_MAX_DRAKE_KILLED;
if (m_uiKilledAdds >= (CLASSIC_BWL_MAX_DRAKE_KILLED - 2) || allGone) // 40 drakes killed
{
// Inturrupt any spell casting
me->InterruptNonMeleeSpells(false);
@@ -1280,6 +1280,16 @@ Instance.MoltenCoreSkipRunes = 0
Instance.MoltenCoreRagnarosReady = 0
#
# Instance.NefarianCapAdds
# Description: Blackwing Lair, Nefarian phase 1: Lord Victor Nefarius stops calling drakonids once
# 42 have come (the TrinityCore way). The spawn timing stays as in 1.12 (two every
# 6-7 seconds, two Chromatic every 35 seconds); Nefarian still lands at 40 kills.
# Default: 0 - (Disabled, the 1.12 way: drakonids keep coming until 42 are killed)
# 1 - (Enabled, at most 42 drakonids in phase 1)
Instance.NefarianCapAdds = 0
#
# Instance.CombatResurrectionLimit
# Description: Limit resurrections during a boss encounter to the encounter's combat