internal void SendWeatherSync(Session Player)
 {
     Packet p = new Packet()
     {
         _opcode = Packet.Opcode.SMSG_WEATHER_SYNC
     };
     p.Push(_weatherManager.Current);
     Player.Write(p);
 }
 internal void SendTimeSync(Session Player)
 {
     Packet p = new Packet()
     {
         _opcode = Packet.Opcode.SMSG_TIME_SYNC
     };
     p.Push(_timeManager.Hour);
     p.Push(_timeManager.Day);
     p.Push(_timeManager.Month);
     Player.Write(p);
 }
示例#3
0
        public void Add(Session Player)
        {
            lock (_sessions)
            {
                _sessions.Enqueue(Player);
            }
            Player.SetWorld(this);
            Packet packet = new Packet()
            {
                _opcode = Packet.Opcode.SMSG_SHARD_HANDSHAKE
            };
            packet.Push((uint)1);
            Player.Write(packet);

            SendTimeSync(Player);
            SendWeatherSync(Player);
        }
示例#4
0
 internal void HandlePlayerEvent(Session S)
 {
 }
示例#5
0
 public void Add(Session S)
 {
 }
示例#6
0
 void Remove(Session Player)
 {
     lock (_sessions)
     {
         // ♥ LINQ
         _sessions = new Queue<Session>(
             from s in _sessions
             where s._client.Client.RemoteEndPoint != Player._client.Client.RemoteEndPoint
             select s);
     }
 }
示例#7
0
 void DispatchToAllButMe(Packet Packet, Session Player)
 {
 }
示例#8
0
 void DispatchPlayerMoveAndLook(Session pPlayer)
 {
     lock (_sessions)
     {
         foreach (Session s in _sessions)
             if (s != pPlayer)
                 s.HandlePlayerEvent(pPlayer);
     }
 }