public static void SafeKeep(Player plr) { IBattlefront battlefront = plr.Region.Bttlfront; if (GameData.Constants.DoomsdaySwitch == 2) { ProximityProgressingBattlefront pBttlfront = battlefront as ProximityProgressingBattlefront; if (pBttlfront != null) { foreach (Keep keep in pBttlfront._Keeps) { keep.SafeKeep(); } plr.SendClientMessage("Keeps set to status safe"); } else { ProximityBattlefront bttlfront = battlefront as ProximityBattlefront; foreach (Keep keep in bttlfront._Keeps) { keep.SafeKeep(); } plr.SendClientMessage("Keeps set to status safe"); } } else { ProgressingBattlefront pBttlfront = battlefront as ProgressingBattlefront; if (pBttlfront != null) { foreach (Keep keep in pBttlfront._Keeps) { keep.SafeKeep(); } plr.SendClientMessage("Keeps set to status safe"); } else { Battlefront bttlfront = battlefront as Battlefront; foreach (Keep keep in bttlfront._Keeps) { keep.SafeKeep(); } plr.SendClientMessage("Keeps set to status safe"); } } }
public static void Lock(Player plr, Realms realm, string noReward) { if (noReward == "0" || noReward == "1") { plr.SendClientMessage($"Attempting to lock the {plr.Region.RegionId} campaign..."); IBattlefront battlefront = plr.Region.Bttlfront; bool b = false; if (noReward == "0") { b = true; } if (GameData.Constants.DoomsdaySwitch == 2) { ProximityProgressingBattlefront pBttlfront = battlefront as ProximityProgressingBattlefront; if (pBttlfront != null) { pBttlfront.LockZone(realm, (int)plr.ZoneId, true, false, b); // Reset changed to false } else { battlefront.LockPairing(realm, false, false, b); } } else if (GameData.Constants.DoomsdaySwitch > 0) { ProgressingBattlefront pBttlfront = battlefront as ProgressingBattlefront; if (pBttlfront != null) { pBttlfront.LockZone(realm, (int)plr.ZoneId, true, true, b); } else { battlefront.LockPairing(realm, false, false, b); } } else { battlefront.LockPairing(realm, true); } } else { plr.SendClientMessage("Second parameter must be 0 or 1 - 0 no rewards, 1 grants rewards."); } }
public static void Grace(Player plr) { IBattlefront battlefront = plr.Region.Bttlfront; if (GameData.Constants.DoomsdaySwitch == 2) { ProximityProgressingBattlefront pBttlfront = battlefront as ProximityProgressingBattlefront; if (pBttlfront != null) { if (pBttlfront.GraceDisabled) { pBttlfront.StartGrace(); } else { pBttlfront.EndGrace(); } plr.SendClientMessage("Current Value of Grace: " + pBttlfront.GraceDisabled, ChatLogFilters.CHATLOGFILTERS_TELL_RECEIVE); } else { ProximityBattlefront bttlfront = battlefront as ProximityBattlefront; if (bttlfront.GraceDisabled) { bttlfront.StartGrace(); } else { bttlfront.EndGrace(); } plr.SendClientMessage("Current Value of Grace: " + bttlfront.GraceDisabled, ChatLogFilters.CHATLOGFILTERS_TELL_RECEIVE); } } else { ProgressingBattlefront pBttlfront = battlefront as ProgressingBattlefront; if (pBttlfront != null) { if (pBttlfront.GraceDisabled) { pBttlfront.StartGrace(); } else { pBttlfront.EndGrace(); } plr.SendClientMessage("Current Value of Grace: " + pBttlfront.GraceDisabled); } else { Battlefront bttlfront = battlefront as Battlefront; if (bttlfront.GraceDisabled) { bttlfront.StartGrace(); } else { bttlfront.EndGrace(); } plr.SendClientMessage("Current Value of Grace: " + pBttlfront.GraceDisabled); } } }