From 33001803e695bfd90839500a45ed7af0bd66e431 Mon Sep 17 00:00:00 2001 From: Lucca Faria Ferri Date: Thu, 27 Jul 2023 01:22:41 -0700 Subject: [PATCH] unique follower --- src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActI.cs | 4 ++-- .../D3-GameServer/GSSystem/QuestSystem/QuestProgress.cs | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActI.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActI.cs index 490d19e..96176c7 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActI.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/ActI.cs @@ -254,7 +254,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem // { // actor.Teleport(Game.FirstPlayer().Position.Around(2f)); // } - AddFollower(Game.GetWorld(WorldSno.trout_town), ActorSno._leah); + AddUniqueFollower(Game.GetWorld(WorldSno.trout_town), ActorSno._leah); } else { @@ -272,7 +272,7 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem NextStep = 49, OnAdvance = () => { //go to gates - AddFollower(Game.GetWorld(WorldSno.trout_town), ActorSno._leah); + AddUniqueFollower(Game.GetWorld(WorldSno.trout_town), ActorSno._leah); var world = Game.GetWorld(WorldSno.trout_town); StartConversation(world, 166678); ListenProximity(ActorSno._trout_oldtristram_exit_gate, new Advance()); diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestProgress.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestProgress.cs index 30aaa07..157eea3 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestProgress.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/QuestSystem/QuestProgress.cs @@ -276,6 +276,12 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem return Game.Players.Values.First().Followers.Any(x => x.Value == sno); } + public void AddUniqueFollower(World world, ActorSno sno) + { + if (!HasFollower(sno)) + AddFollower(world, sno); + } + public void AddFollower(World world, ActorSno sno) { if (Game.Players.Count > 0)