Merge pull request #104 from edgegamers/dev

Join and Leave PrintToChatAll bug fixes
This commit is contained in:
Isaac
2025-05-11 02:24:57 -07:00
committed by GitHub
2 changed files with 8 additions and 3 deletions

View File

@@ -127,7 +127,9 @@ public class JoinCommand(IServiceProvider provider) : ICommand {
await players.UpdatePlayer(player);
if (chatPerk != null) await chatPerk.SendGangChat(player, gang, "joined.");
await Server.NextFrameAsync(() =>
Server.PrintToChatAll(localizer.Get(MSG.GANG_PLAYER_JOINED,
player.Name ?? player.Steam.ToString(), gang.Name));
player.Name ?? player.Steam.ToString(), gang.Name)));
}
}

View File

@@ -35,8 +35,11 @@ public class LeaveCommand(IServiceProvider provider)
player.GangRank = null;
await Players.UpdatePlayer(player);
Server.PrintToChatAll(Locale.Get(MSG.COMMAND_LEAVE_LEFT,
player.Name ?? player.Steam.ToString(), gang.Name));
await Server.NextFrameAsync(() =>
Server.PrintToChatAll(Locale.Get(MSG.COMMAND_LEAVE_LEFT,
player.Name ?? player.Steam.ToString(), gang.Name)));
return CommandResult.SUCCESS;
}
}