Пример #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);
 }
Пример #2
0
 public void RemoveEquipment(string guid)
 {
     WeihuaGames.ClientClass.Equipment item = this.SearchEquipment(guid);
     if (item != null)
     {
         this.equipments.Remove(item);
     }
 }
Пример #3
0
 public WeihuaGames.ClientClass.Reward FromProtobuf(com.kodgames.corgi.protocol.Reward reward)
 {
     if (reward != null)
     {
         this.isBeastDecomposed = reward.isBeastDecomposed;
         foreach (com.kodgames.corgi.protocol.Equipment equipment in reward.equips)
         {
             WeihuaGames.ClientClass.Equipment item = new WeihuaGames.ClientClass.Equipment();
             item.FromProtobuf(equipment);
             this.equip.Add(item);
         }
         foreach (com.kodgames.corgi.protocol.Avatar avatar in reward.avatars)
         {
             WeihuaGames.ClientClass.Avatar avatar2 = new WeihuaGames.ClientClass.Avatar();
             avatar2.FromProtobuf(avatar);
             this.avatar.Add(avatar2);
         }
         foreach (com.kodgames.corgi.protocol.Skill skill in reward.skills)
         {
             WeihuaGames.ClientClass.Skill skill2 = new WeihuaGames.ClientClass.Skill();
             skill2.FromProtobuf(skill);
             this.skill.Add(skill2);
         }
         foreach (com.kodgames.corgi.protocol.Consumable consumable in reward.consumables)
         {
             WeihuaGames.ClientClass.Consumable consumable2 = new WeihuaGames.ClientClass.Consumable();
             consumable2.FromProtobuf(consumable);
             this.consumable.Add(consumable2);
         }
         foreach (com.kodgames.corgi.protocol.Consumable consumable3 in reward.hideConsumables)
         {
             WeihuaGames.ClientClass.Consumable consumable4 = new WeihuaGames.ClientClass.Consumable();
             consumable4.FromProtobuf(consumable3);
             this.hideConsumables.Add(consumable4);
         }
         foreach (com.kodgames.corgi.protocol.Dan dan in reward.dans)
         {
             WeihuaGames.ClientClass.Dan dan2 = new WeihuaGames.ClientClass.Dan();
             dan2.FromProtobuf(dan);
             this.dan.Add(dan2);
         }
         foreach (com.kodgames.corgi.protocol.Beast beast in reward.beasts)
         {
             WeihuaGames.ClientClass.Beast beast2 = new WeihuaGames.ClientClass.Beast();
             beast2.FromProtobuf(beast);
             this.beast.Add(beast2);
         }
     }
     return(this);
 }
Пример #4
0
 public WeihuaGames.ClientClass.Player FromProtobuf(com.kodgames.corgi.protocol.Player player)
 {
     this.levelAttrib       = new WeihuaGames.ClientClass.LevelAttrib();
     this.skills            = new List <WeihuaGames.ClientClass.Skill>();
     this.equipments        = new List <WeihuaGames.ClientClass.Equipment>();
     this.consumables       = new List <WeihuaGames.ClientClass.Consumable>();
     this.avatars           = new List <WeihuaGames.ClientClass.Avatar>();
     this.SignData          = new WeihuaGames.ClientClass.SignData();
     this.playerId          = player.playerId;
     this.name              = player.name;
     this.gameMoney         = player.gameMoney;
     this.realMoney         = player.realMoney;
     this.iron              = player.iron;
     this.spirit            = player.spirit;
     this.medals            = player.medals;
     this.wineSoul          = player.wineSoul;
     this.zentia            = player.zentia;
     this.guildMoney        = player.guildMoney;
     this.guildBossCount    = player.guildBossCount;
     this.power             = player.power;
     this.stamina.Point     = new TimerIncreaseValue(player.stamina, player.staminaLastCalculateTime);
     this.lastChatResetTime = player.lastResetChatTime;
     this.currentChatCount  = player.currentChatCount;
     this.chatData.UnreadPrivateChatMsgCount = player.unreadPrivateMsgCount;
     this.chatData.UnreadGuildChatCount      = player.guildUnreadChatCount;
     this.timeZone                    = player.timeZone;
     this.newCombatEmailCount         = player.newCombatEmailCount;
     this.newFriendEmailCount         = player.newFriendEmailCount;
     this.newSystemEmailCount         = player.newSystemEmailCount;
     this.newGuildEmailCount          = player.newGuildEmailCount;
     this.energy.Point                = new TimerIncreaseValue(player.energy, player.energyLastCalculateTime);
     this.energyBuyCount              = player.energyBuyCount;
     this.energyBuyCountLastResetTime = player.energyBuyCountLastResetTime;
     this.vipLevel                    = player.vipLevel;
     this.totalCostRMB                = player.totalCostRMB;
     this.remainingCostRMB            = player.remainningCostRMB;
     this.badge     = player.badge;
     this.loginTime = player.loginTime;
     if (player.levelAttrib != null)
     {
         this.levelAttrib.FromProtobuf(player.levelAttrib);
     }
     this.soul = player.soul;
     this.currentPickedLevel = player.curentPickedLevel;
     if (player.signData != null)
     {
         this.SignData.FromProtobuf(player.signData);
     }
     foreach (com.kodgames.corgi.protocol.Avatar avatar in player.avatars)
     {
         WeihuaGames.ClientClass.Avatar item = new WeihuaGames.ClientClass.Avatar();
         item.FromProtobuf(avatar);
         this.avatars.Add(item);
     }
     foreach (com.kodgames.corgi.protocol.Equipment equipment in player.equipments)
     {
         WeihuaGames.ClientClass.Equipment equipment2 = new WeihuaGames.ClientClass.Equipment();
         equipment2.FromProtobuf(equipment);
         this.equipments.Add(equipment2);
     }
     foreach (com.kodgames.corgi.protocol.Consumable consumable in player.consumables)
     {
         WeihuaGames.ClientClass.Consumable consumable2 = new WeihuaGames.ClientClass.Consumable();
         consumable2.FromProtobuf(consumable);
         this.consumables.Add(consumable2);
     }
     foreach (com.kodgames.corgi.protocol.Skill skill in player.skills)
     {
         WeihuaGames.ClientClass.Skill skill2 = new WeihuaGames.ClientClass.Skill();
         skill2.FromProtobuf(skill);
         this.skills.Add(skill2);
     }
     this.didCharge = player.didCharge;
     if (player.unDoneTutorialIds != null)
     {
         this.unDoneTutorials = player.unDoneTutorialIds;
     }
     this.staminaBuyCount = player.staminaBuyCount;
     this.staminaBuyCountLastResetTime = player.staminaBuyCountLastResetTime;
     this.trialStamp = player.trialStamp;
     this.threeToken = player.threeToken;
     if (player.questQuick != null)
     {
         this.questData.QuestQuick = new WeihuaGames.ClientClass.QuestQuick().FromProtoBuffer(player.questQuick);
     }
     if (player.startServerRewardInfo != null)
     {
         this.startServerRewardInfo = new WeihuaGames.ClientClass.StartServerRewardInfo().FromProtoBuf(player.startServerRewardInfo);
     }
     this.hasEvaluate         = player.hasEvaluate;
     this.cancelEvaluateLevel = player.cancelEvaluateLevel;
     if (player.hireDinerData != null)
     {
         this.hireDinerData.FromProtoBuf(player.hireDinerData);
     }
     this.qinInfoAnswerCount.Point = new TimerIncreaseValue(player.qinInfoAnswerCount, player.qinInfoAnswerCountRecoverTime);
     this.positionData.FromProtobuf(player.positionData);
     foreach (int num in player.appleGoodIds)
     {
         this.appleGoodIds.Add(num);
     }
     this.illusionData = new com.kodgames.corgi.protocol.IllusionData();
     if (player.illusionData != null)
     {
         this.illusionData = player.illusionData;
     }
     foreach (com.kodgames.corgi.protocol.Dan dan in player.dans)
     {
         WeihuaGames.ClientClass.Dan dan2 = new WeihuaGames.ClientClass.Dan();
         dan2.FromProtobuf(dan);
         this.dans.Add(dan2);
     }
     foreach (com.kodgames.corgi.protocol.Beast beast in player.beasts)
     {
         WeihuaGames.ClientClass.Beast beast2 = new WeihuaGames.ClientClass.Beast();
         beast2.FromProtobuf(beast);
         this.beasts.Add(beast2);
     }
     return(this);
 }
Пример #5
0
 public void AddEquipment(WeihuaGames.ClientClass.Equipment equipment)
 {
     this.equipments.Add(equipment);
 }