Ejemplo n.º 1
0
        public void SpriteEnter(NetState netstate, TradeAge.Server.Entity.Character.SimplePlayer obj)
        {
            var           pw            = new PacketWriter(1102);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1102);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            SimplePlayerWriteProxy.Write(obj, pw); netstate.Send(pw); pw.Dispose();
        }
Ejemplo n.º 2
0
        public void SpriteLeave(NetState netstate, int playerId)
        {
            var           pw            = new PacketWriter(1104);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1104);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.Write(playerId);
            netstate.Send(pw); pw.Dispose();
        }
Ejemplo n.º 3
0
        public void CreatePlayerResult(NetState netstate, TradeAge.Server.Entity.Login.CraetePlayerResult result)
        {
            var           pw            = new PacketWriter(1003);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1003);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.Write((byte)result);
            netstate.Send(pw); pw.Dispose();
        }
Ejemplo n.º 4
0
        public void SpriteLeave(NetState netstate, int playerId)
        {
            var           pw            = PacketWriter.AcquireContent(1104);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1104);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.Write(playerId);
            netstate.Send(pw); PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 5
0
        public void EnterSceneInfo(NetState netstate, DogSE.Common.Vector3 postion, DogSE.Common.Vector3 direction)
        {
            var           pw            = new PacketWriter(1101);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1101);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.WriteStruct(postion);
            pw.WriteStruct(direction);
            netstate.Send(pw); pw.Dispose();
        }
Ejemplo n.º 6
0
        public void EnterSceneInfo(NetState netstate, TradeAge.Server.Entity.Common.Vector3 postion, TradeAge.Server.Entity.Common.Vector3 direction)
        {
            var           pw            = PacketWriter.AcquireContent(1101);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1101);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            Vector3WriteProxy.Write(postion, pw);
            Vector3WriteProxy.Write(direction, pw);
            netstate.Send(pw); PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 7
0
        public void LoginServerResult(NetState netstate, TradeAge.Server.Entity.Login.LoginServerResult result, bool isCreatePlayer)
        {
            var           pw            = PacketWriter.AcquireContent(1001);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1001);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.Write((byte)result);
            pw.Write(isCreatePlayer);
            netstate.Send(pw); PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 8
0
        public void SpriteMove(NetState netstate, int playerId, DogSE.Common.Vector3 postion, DogSE.Common.Vector3 direction)
        {
            var           pw            = new PacketWriter(1103);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1103);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.Write(playerId);
            pw.WriteStruct(postion);
            pw.WriteStruct(direction);
            netstate.Send(pw); pw.Dispose();
        }
Ejemplo n.º 9
0
        public void SyncInitDataFinish(NetState netstate)
        {
            var           pw            = PacketWriter.AcquireContent(1004);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1004);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            netstate.Send(pw);
            if (packetProfile != null)
            {
                packetProfile.Record(pw.Length);
            }
            PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 10
0
        public void EnterSceneInfo(NetState netstate, TradeAge.Server.Entity.Character.SimplePlayer player)
        {
            var           pw            = PacketWriter.AcquireContent(1101);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1101);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            SimplePlayerWriteProxy.Write(player, pw);
            netstate.Send(pw);
            if (packetProfile != null)
            {
                packetProfile.Record(pw.Length);
            }
            PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 11
0
        public void CreatePlayerResult(NetState netstate, TradeAge.Server.Entity.Login.CraetePlayerResult result)
        {
            var           pw            = PacketWriter.AcquireContent(1003);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1003);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.Write((byte)result);
            netstate.Send(pw);
            if (packetProfile != null)
            {
                packetProfile.Record(pw.Length);
            }
            PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 12
0
        public void SyncServerTime(NetState netstate, DateTime serverTime, int id)
        {
            var           pw            = PacketWriter.AcquireContent(2);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(2);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.Write(serverTime.Ticks);
            pw.Write(id);
            netstate.Send(pw);
            if (packetProfile != null)
            {
                packetProfile.Record(pw.Length);
            }
            PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 13
0
        public void SpriteMove(NetState netstate, int playerId, TradeAge.Server.Entity.Common.Vector3 postion, TradeAge.Server.Entity.Common.Vector3 direction)
        {
            var           pw            = PacketWriter.AcquireContent(1103);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1103);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.Write(playerId);
            Vector3WriteProxy.Write(postion, pw);
            Vector3WriteProxy.Write(direction, pw);
            netstate.Send(pw);
            if (packetProfile != null)
            {
                packetProfile.Record(pw.Length);
            }
            PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 14
0
        public void SpriteLeave(NetState netstate, System.Int32[] spriteId)
        {
            var           pw            = PacketWriter.AcquireContent(1104);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1104);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            int spriteIdlen = spriteId == null ? 0:spriteId.Length; pw.Write(spriteIdlen);

            for (int i = 0; i < spriteIdlen; i++)
            {
                pw.Write(spriteId[i]);
            }
            netstate.Send(pw);
            if (packetProfile != null)
            {
                packetProfile.Record(pw.Length);
            }
            PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 15
0
        public void SpriteEnter(NetState netstate, TradeAge.Server.Entity.Character.SceneSprite[] sprite)
        {
            var           pw            = PacketWriter.AcquireContent(1102);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1102);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            int spritelen = sprite == null ? 0:sprite.Length; pw.Write(spritelen);

            for (int i = 0; i < spritelen; i++)
            {
                SceneSpriteWriteProxy.Write(sprite[i], pw);
            }
            netstate.Send(pw);
            if (packetProfile != null)
            {
                packetProfile.Record(pw.Length);
            }
            PacketWriter.ReleaseContent(pw);
        }
Ejemplo n.º 16
0
        public void SpriteMove(NetState netstate, int spriteId, DateTime time, DogSE.Library.Maths.Vector3 postion, DogSE.Library.Maths.Quaternion rotation, float speed, float rotationRate, TradeAge.Server.Entity.Ship.SpeedUpTypes speedUpType)
        {
            var           pw            = PacketWriter.AcquireContent(1103);
            PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1103);

            if (packetProfile != null)
            {
                packetProfile.RegConstruct();
            }
            pw.Write(spriteId);
            pw.Write(time.Ticks);
            Vector3WriteProxy.Write(postion, pw);
            QuaternionWriteProxy.Write(rotation, pw);
            pw.Write(speed);
            pw.Write(rotationRate);
            pw.Write((byte)speedUpType);
            netstate.Send(pw);
            if (packetProfile != null)
            {
                packetProfile.Record(pw.Length);
            }
            PacketWriter.ReleaseContent(pw);
        }