From 3d123f409fb7eaf6d4a53faccd363efbd338933c Mon Sep 17 00:00:00 2001 From: Lucca Faria Ferri Date: Wed, 8 Feb 2023 05:18:53 -0800 Subject: [PATCH] Fixed waypoints appearing unlocked even though they were reportedly locked It would only set in DEBUG mode to unlock all, so I've changed to a config in the [Game-Server] section named "UnlockAllWaypoints". --- .../D3-GameServer/GSSystem/PlayerSystem/Player.cs | 7 +------ src/DiIiS-NA/D3-GameServer/GameServerConfig.cs | 11 +++++++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs index 2d2486a..f570f55 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs @@ -4093,12 +4093,7 @@ public class Player : Actor, IMessageConsumer, IUpdateable }, SkillSlotEverAssigned = 0x0F, //0xB4, PlaytimeTotal = Toon.TimePlayed, -#if DEBUG - WaypointFlags = 0x0000ffff, -#else - WaypointFlags = this.World.Game.WaypointFlags, -#endif - + WaypointFlags = GameServerConfig.Instance.UnlockAllWaypoints ? 0x0000ffff : this.World.Game.WaypointFlags, HirelingData = new HirelingSavedData() { HirelingInfos = HirelingInfo, diff --git a/src/DiIiS-NA/D3-GameServer/GameServerConfig.cs b/src/DiIiS-NA/D3-GameServer/GameServerConfig.cs index a6408fc..dd81268 100644 --- a/src/DiIiS-NA/D3-GameServer/GameServerConfig.cs +++ b/src/DiIiS-NA/D3-GameServer/GameServerConfig.cs @@ -187,7 +187,18 @@ namespace DiIiS_NA.GameServer get => GetFloat(nameof(HealthPotionCooldown), 30f); set => Set(nameof(HealthPotionCooldown), value); } + + /// + /// Unlocks all waypoints in the campaign. + /// + public bool UnlockAllWaypoints + { + get => GetBoolean(nameof(UnlockAllWaypoints), false); + set => Set(nameof(UnlockAllWaypoints), value); + } + public static GameServerConfig Instance { get; } = new(); + private GameServerConfig() : base("Game-Server") {