public static void LogoutPersona(Blaze.Packet p, PlayerInfo pi, NetworkStream ns) { List <Blaze.Tdf> result = new List <Blaze.Tdf>(); byte[] buff = Blaze.CreatePacket(p.Component, p.Command, 0, 0x1000, p.ID, result); ns.Write(buff, 0, buff.Length); ns.Flush(); AsyncUserSessions.NotifyUserRemoved(pi, p, pi.userId, ns); AsyncUserSessions.NotifyUserStatus(pi, p, pi, ns); }
public static void UpdateMeshConnection(Blaze.Packet p, PlayerInfo pi, NetworkStream ns) { List <Blaze.Tdf> input = Blaze.ReadPacketContent(p); List <Blaze.TdfStruct> entries = (List <Blaze.TdfStruct>)((Blaze.TdfList)input[1]).List; Blaze.TdfInteger pid = (Blaze.TdfInteger)entries[0].Values[1]; Blaze.TdfInteger stat = (Blaze.TdfInteger)entries[0].Values[2]; byte[] buff = Blaze.CreatePacket(p.Component, p.Command, 0, 0x1000, p.ID, new List <Blaze.Tdf>()); ns.Write(buff, 0, buff.Length); ns.Flush(); PlayerInfo target = null; foreach (PlayerInfo info in BlazeServer.allClients) { if (info.userId == pid.Value) { target = info; break; } } if (target != null) { if (stat.Value == 2) { if (pi.isServer) { AsyncUserSessions.UserSessionExtendedDataUpdateNotification(pi, p, target, ns); AsyncGameManager.NotifyGamePlayerStateChange(pi, p, target, ns, 4); AsyncGameManager.NotifyPlayerJoinCompleted(pi, p, target, ns); } else { AsyncGameManager.NotifyGamePlayerStateChange(pi, p, pi, ns, 4); AsyncGameManager.NotifyPlayerJoinCompleted(pi, p, pi, ns); } } else { AsyncUserSessions.NotifyUserRemoved(pi, p, pid.Value, ns); } } }