mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* Update for quest changes * Fix issue with Emote.Motion and MotionCommand.Dead * Fix FellowPortalSending spells * Update WorldObject_Magic.cs * things * updates * update house permissions checks * Update WorldManager.cs * further improvements * Update Player_House.cs * Update Player_Tick.cs * update chargen stuff * Update Player_Tracking.cs * channel work * . * Update PlayerManager.cs * channel stuff * Update WorldObject_Magic.cs * audits * Update AdminCommands.cs * Update AdminCommands.cs * Update PlayerManager.cs * fix a bool
25 lines
861 B
C#
25 lines
861 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using ACE.Entity.Enum;
|
|
using ACE.Server.Managers;
|
|
|
|
namespace ACE.Server.Network.GameEvent.Events
|
|
{
|
|
public class GameEventChannelList : GameEventMessage
|
|
{
|
|
public GameEventChannelList(Session session, Channel chatChannel) : base(GameEventType.ChannelList, GameMessageGroup.UIQueue, session)
|
|
{
|
|
uint numClientsConnected = 0;
|
|
List<string> playerNames = new List<string>();
|
|
foreach (var client in PlayerManager.GetAllOnline().Where(p => (p.ChannelsActive ?? 0).HasFlag(chatChannel)))
|
|
{
|
|
numClientsConnected++;
|
|
playerNames.Add(client.Name);
|
|
}
|
|
|
|
Writer.Write(numClientsConnected);
|
|
foreach (var name in playerNames)
|
|
Writer.WriteString16L(name);
|
|
}
|
|
}
|
|
}
|