[Zone] Make zone controller less likely to be visible, immune to all forms of combat (#4750)

* [Zone] Make zone controller less likely to be visible, immune to all forms of combat

* Exclude zone controller from scanning
This commit is contained in:
Chris Miles
2025-03-06 16:08:08 -06:00
committed by GitHub
parent d6a21be25e
commit 0c301419c2
4 changed files with 13 additions and 7 deletions
+5 -1
View File
@@ -1453,6 +1453,10 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
ns->spawn.flymode = 0;
}
if (IsZoneController()) {
ns->spawn.invis = 255; // gm invis
}
if (RuleB(Character, AllowCrossClassTrainers) && ForWho) {
if (ns->spawn.class_ >= Class::WarriorGM && ns->spawn.class_ <= Class::BerserkerGM) {
int trainer_class = Class::WarriorGM + (ForWho->GetClass() - 1);
@@ -8347,7 +8351,7 @@ int Mob::DispatchZoneControllerEvent(
RuleB(Zone, UseZoneController) &&
(
!IsNPC() ||
(IsNPC() && GetNPCTypeID() != ZONE_CONTROLLER_NPC_ID)
(IsNPC() && !IsZoneController())
)
) {
auto controller = entity_list.GetNPCByNPCTypeID(ZONE_CONTROLLER_NPC_ID);