Пример #1
0
 public void SpriteEnter(NetState netstate, TradeAge.Server.Entity.Character.SimplePlayer obj)
 {
     var pw = PacketWriter.AcquireContent(1102);
     PacketProfile packetProfile = PacketProfile.GetOutgoingProfile( 1102 );
     if ( packetProfile != null )
         packetProfile.RegConstruct();
         SimplePlayerWriteProxy.Write(obj, pw);netstate.Send(pw);PacketWriter.ReleaseContent(pw);
 }
Пример #2
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);PacketWriter.ReleaseContent(pw);
 }
Пример #3
0
 public void LoginServerResult(NetState netstate, TradeAge.Server.Entity.Login.LoginServerResult result)
 {
     var pw = new PacketWriter(1001);
     PacketProfile packetProfile = PacketProfile.GetOutgoingProfile(1001);
     if (packetProfile != null)
         packetProfile.RegConstruct();
     pw.Write((byte)result);
     netstate.Send(pw); pw.Dispose();
 }
Пример #4
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);
 }
Пример #5
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);
 }
Пример #6
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);
 }
Пример #7
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);
 }
Пример #8
0
 public void SpriteMove(NetState netstate,int spriteId,DateTime time,TradeAge.Server.Entity.Common.Vector2 postion,TradeAge.Server.Entity.Common.Vector2 direction)
 {
     var pw = PacketWriter.AcquireContent(1103);
     PacketProfile packetProfile = PacketProfile.GetOutgoingProfile( 1103 );
     if ( packetProfile != null )
         packetProfile.RegConstruct();
         pw.Write(spriteId);
     pw.Write(time.Ticks);
     Vector2WriteProxy.Write(postion, pw);
     Vector2WriteProxy.Write(direction, pw);
     netstate.Send(pw);
      if ( packetProfile != null ) packetProfile.Record(pw.Length);
     PacketWriter.ReleaseContent(pw);
 }
Пример #9
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);
 }
Пример #10
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);
 }
Пример #11
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);
      if ( packetProfile != null ) packetProfile.Record(pw.Length);
     PacketWriter.ReleaseContent(pw);
 }