Example #1
0
 public WeihuaGames.ClientClass.WolfSmokePlayer FromProtobuf(com.kodgames.corgi.protocol.WolfSmokePlayer wolfSmokePlayer)
 {
     if (wolfSmokePlayer != null)
     {
         this.playerId = wolfSmokePlayer.playerId;
         this.name     = wolfSmokePlayer.name;
         WeihuaGames.ClientClass.Position position = new WeihuaGames.ClientClass.Position();
         position.FromProtobuf(wolfSmokePlayer.position);
         this.position = position;
         foreach (com.kodgames.corgi.protocol.Avatar avatar in wolfSmokePlayer.avatars)
         {
             WeihuaGames.ClientClass.Avatar item = new WeihuaGames.ClientClass.Avatar();
             item.FromProtobuf(avatar);
             this.avatars.Add(item);
         }
         foreach (com.kodgames.corgi.protocol.Equipment equipment in wolfSmokePlayer.equipments)
         {
             WeihuaGames.ClientClass.Equipment equipment2 = new WeihuaGames.ClientClass.Equipment();
             this.equipments.Add(equipment2.FromProtobuf(equipment));
         }
         foreach (com.kodgames.corgi.protocol.Skill skill in wolfSmokePlayer.skills)
         {
             WeihuaGames.ClientClass.Skill skill2 = new WeihuaGames.ClientClass.Skill();
             skill2.FromProtobuf(skill);
             this.skills.Add(skill2);
         }
     }
     return(this);
 }
Example #2
0
 public void PutPosition(WeihuaGames.ClientClass.Position position)
 {
     if (this.GetPositionById(position.PositionId) == null)
     {
         this.positions.Add(position);
     }
     else
     {
         this.GetPositionById(position.PositionId).PostionShallCopy(position);
     }
 }
Example #3
0
 public void FromProtobuf(com.kodgames.corgi.protocol.PositionData positionData)
 {
     this.activePositionId = positionData.masterPositionId;
     if (positionData.positions != null)
     {
         foreach (com.kodgames.corgi.protocol.Position position in positionData.positions)
         {
             WeihuaGames.ClientClass.Position item = new WeihuaGames.ClientClass.Position();
             item.FromProtobuf(position);
             this.positions.Add(item);
         }
     }
 }
Example #4
0
 public void PostionShallCopy(WeihuaGames.ClientClass.Position position)
 {
     this.positionId           = position.positionId;
     this.employLocationId     = position.employLocationId;
     this.employShowLocationId = position.employShowLocationId;
     this.avatarLocations.Clear();
     for (int i = 0; i < position.AvatarLocations.Count; i++)
     {
         this.avatarLocations.Add(position.AvatarLocations[i]);
     }
     this.equipLocations.Clear();
     for (int j = 0; j < position.EquipLocations.Count; j++)
     {
         this.equipLocations.Add(position.EquipLocations[j]);
     }
     this.danLocations.Clear();
     for (int k = 0; k < position.DanLocations.Count; k++)
     {
         this.danLocations.Add(position.DanLocations[k]);
     }
     this.beastLocations.Clear();
     for (int m = 0; m < position.BeastLocations.Count; m++)
     {
         this.beastLocations.Add(position.BeastLocations[m]);
     }
     this.skillLocations.Clear();
     for (int n = 0; n < position.SkillLocations.Count; n++)
     {
         this.skillLocations.Add(position.SkillLocations[n]);
     }
     this.partners.Clear();
     for (int num6 = 0; num6 < position.partners.Count; num6++)
     {
         this.partners.Add(position.partners[num6]);
     }
     this.pairs.Clear();
     for (int num7 = 0; num7 < position.pairs.Count; num7++)
     {
         this.pairs.Add(position.pairs[num7]);
     }
 }