Exemple #1
0
 public void ShallowCopy(WeihuaGames.ClientClass.Partner partner)
 {
     this.positionId = partner.positionId;
     this.partnerId  = partner.partnerId;
     this.resourceId = partner.resourceId;
     this.avatarGuid = partner.avatarGuid;
 }
Exemple #2
0
 public void FromProtobuf(com.kodgames.corgi.protocol.Position position)
 {
     this.positionId           = position.positionId;
     this.employLocationId     = position.employLocationId;
     this.employShowLocationId = position.employShowLocationId;
     if (position.avatarLocations != null)
     {
         foreach (com.kodgames.corgi.protocol.Location location in position.avatarLocations)
         {
             WeihuaGames.ClientClass.Location item = new WeihuaGames.ClientClass.Location();
             item.FromProtobuf(location);
             this.avatarLocations.Add(item);
         }
     }
     if (position.equipLocations != null)
     {
         foreach (com.kodgames.corgi.protocol.Location location3 in position.equipLocations)
         {
             WeihuaGames.ClientClass.Location location4 = new WeihuaGames.ClientClass.Location();
             location4.FromProtobuf(location3);
             this.equipLocations.Add(location4);
         }
     }
     if (position.danLocations != null)
     {
         foreach (com.kodgames.corgi.protocol.Location location5 in position.danLocations)
         {
             WeihuaGames.ClientClass.Location location6 = new WeihuaGames.ClientClass.Location();
             location6.FromProtobuf(location5);
             this.danLocations.Add(location6);
         }
     }
     if (position.beastLocations != null)
     {
         foreach (com.kodgames.corgi.protocol.Location location7 in position.beastLocations)
         {
             WeihuaGames.ClientClass.Location location8 = new WeihuaGames.ClientClass.Location();
             location8.FromProtobuf(location7);
             this.beastLocations.Add(location8);
         }
     }
     if (position.skillLocations != null)
     {
         foreach (com.kodgames.corgi.protocol.Location location9 in position.skillLocations)
         {
             WeihuaGames.ClientClass.Location location10 = new WeihuaGames.ClientClass.Location();
             location10.FromProtobuf(location9);
             this.skillLocations.Add(location10);
         }
     }
     if (position.partners != null)
     {
         foreach (com.kodgames.corgi.protocol.Partner partner in position.partners)
         {
             WeihuaGames.ClientClass.Partner partner2 = new WeihuaGames.ClientClass.Partner();
             partner2.FromProtobuf(partner);
             this.partners.Add(partner2);
         }
     }
     if (position.pairs != null)
     {
         foreach (com.kodgames.corgi.protocol.Pair pair in position.pairs)
         {
             Pair pair2 = new Pair();
             pair2.FromProtobuf(pair);
             this.pairs.Add(pair2);
         }
     }
 }
Exemple #3
0
 public com.kodgames.corgi.protocol.Position toProtobuf()
 {
     com.kodgames.corgi.protocol.Position position = new com.kodgames.corgi.protocol.Position {
         positionId           = this.positionId,
         employLocationId     = this.employLocationId,
         employShowLocationId = this.employShowLocationId
     };
     if (this.avatarLocations != null)
     {
         foreach (WeihuaGames.ClientClass.Location location in this.avatarLocations)
         {
             com.kodgames.corgi.protocol.Location item = location.ToProtobuf();
             position.avatarLocations.Add(item);
         }
     }
     if (this.equipLocations != null)
     {
         foreach (WeihuaGames.ClientClass.Location location3 in this.equipLocations)
         {
             com.kodgames.corgi.protocol.Location location4 = location3.ToProtobuf();
             position.equipLocations.Add(location4);
         }
     }
     if (this.danLocations != null)
     {
         foreach (WeihuaGames.ClientClass.Location location5 in this.danLocations)
         {
             com.kodgames.corgi.protocol.Location location6 = location5.ToProtobuf();
             position.danLocations.Add(location6);
         }
     }
     if (this.beastLocations != null)
     {
         foreach (WeihuaGames.ClientClass.Location location7 in this.beastLocations)
         {
             com.kodgames.corgi.protocol.Location location8 = location7.ToProtobuf();
             position.beastLocations.Add(location8);
         }
     }
     if (this.skillLocations != null)
     {
         foreach (WeihuaGames.ClientClass.Location location9 in this.skillLocations)
         {
             com.kodgames.corgi.protocol.Location location10 = location9.ToProtobuf();
             position.skillLocations.Add(location10);
         }
     }
     if (position.partners != null)
     {
         foreach (com.kodgames.corgi.protocol.Partner partner in position.partners)
         {
             WeihuaGames.ClientClass.Partner partner2 = new WeihuaGames.ClientClass.Partner();
             partner2.FromProtobuf(partner);
             this.partners.Add(partner2);
         }
     }
     if (this.partners != null)
     {
         foreach (WeihuaGames.ClientClass.Partner partner3 in this.partners)
         {
             com.kodgames.corgi.protocol.Partner partner4 = partner3.ToProtobuf();
             position.partners.Add(partner4);
         }
     }
     if (this.pairs != null)
     {
         foreach (WeihuaGames.ClientClass.Pair pair in this.pairs)
         {
             com.kodgames.corgi.protocol.Pair pair2 = pair.ToProtobuf();
             position.pairs.Add(pair2);
         }
     }
     return(position);
 }