Exemplo n.º 1
0
 public void ParseFormBinary(BinaryReader reader)
 {
     UserID  = reader.ReadInt64();
     TimeNow = reader.ReadSingle();
     Gold    = reader.ReadInt32();
     Package = new PlayerPackage(); Package.ParseFormBinary(reader);
 }
Exemplo n.º 2
0
 public void ParseFormBinary(BinaryReader reader)
 {
     Code    = (ErrorCode)reader.ReadInt32();
     Hero    = new DHero(); Hero.ParseFormBinary(reader);
     Package = new PlayerPackage(); Package.ParseFormBinary(reader);
     Gold    = reader.ReadInt32();
     Coin    = reader.ReadInt32();
 }
Exemplo n.º 3
0
        private void SaveEquip(long userID, Proto.PlayerPackage package, DataBaseContext.GameDb db)
        {
            var eqiup = db.TBPLayerEquip.Where(t => t.UserID == userID).SingleOrDefault();

            if (eqiup == null)
            {
                return;
            }
            eqiup.UserEquipValues = JsonTool.Serialize(package.Equips);
        }
Exemplo n.º 4
0
        private void SavePackage(long userID, Proto.PlayerPackage package, int gold, int coin, DataBaseContext.GameDb db)
        {
            var user = db.TBGAmePlayer.Where(t => t.UserID == userID)
                       .SingleOrDefault();

            if (user == null)
            {
                return;
            }
            user.UserPackage = JsonTool.Serialize(package.Items);
            user.Coin        = coin;
            user.Gold        = gold;
        }
Exemplo n.º 5
0
 public void ParseFormBinary(BinaryReader reader)
 {
     Package = new PlayerPackage(); Package.ParseFormBinary(reader);
     Gold    = reader.ReadInt32();
     Coin    = reader.ReadInt32();
 }
Exemplo n.º 6
0
 public Task_G2C_SyncPackage()
 {
     Package = new PlayerPackage();
 }
Exemplo n.º 7
0
 public G2C_Login()
 {
     Hero    = new DHero();
     Package = new PlayerPackage();
 }
Exemplo n.º 8
0
 public Notify_PlayerJoinState()
 {
     Package = new PlayerPackage();
 }
Exemplo n.º 9
0
 public G2B_GetPlayerInfo()
 {
     Hero    = new DHero();
     Package = new PlayerPackage();
 }