Ejemplo n.º 1
0
 public WeihuaGames.ClientClass.CombatAvatarData FromProtobuf(com.kodgames.corgi.protocol.CombatAvatarData protocol)
 {
     this.avatarType     = protocol.avatarType;
     this.resourceId     = protocol.resourceId;
     this.breakThrough   = protocol.breakThrough;
     this.displayName    = protocol.displayName;
     this.levelAttrib    = new WeihuaGames.ClientClass.LevelAttrib().FromProtobuf(protocol.levelAttrib);
     this.battlePosition = protocol.battlePosition;
     this.evaluation     = protocol.evaluation;
     this.scale          = protocol.scale;
     this.npcType        = protocol.npcType;
     this.npcId          = protocol.npcId;
     this.illusionID     = protocol.illusionId;
     this.equipments.Clear();
     foreach (com.kodgames.corgi.protocol.EquipmentData data in protocol.equips)
     {
         this.equipments.Add(new WeihuaGames.ClientClass.EquipmentData().FromProtobuf(data));
     }
     this.skills.Clear();
     foreach (com.kodgames.corgi.protocol.SkillData data2 in protocol.skills)
     {
         this.skills.Add(new WeihuaGames.ClientClass.SkillData().FromProtobuf(data2));
     }
     this.buffs.Clear();
     foreach (com.kodgames.corgi.protocol.BuffData data3 in protocol.buffs)
     {
         this.buffs.Add(new WeihuaGames.ClientClass.BuffData().FromProtobuf(data3));
     }
     this.attributes.Clear();
     foreach (com.kodgames.corgi.protocol.Attribute attribute in protocol.attributes)
     {
         this.attributes.Add(new WeihuaGames.ClientClass.Attribute().FromProtobuf(attribute));
     }
     return(this);
 }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
0
 public void Copy(WeihuaGames.ClientClass.LevelAttrib levelAttrib)
 {
     this.Level      = levelAttrib.Level;
     this.Experience = levelAttrib.Experience;
 }