Example #1
0
 public void Copy(WeihuaGames.ClientClass.CombatAvatarData data)
 {
     this.avatarType     = data.avatarType;
     this.resourceId     = data.resourceId;
     this.breakThrough   = data.breakThrough;
     this.displayName    = data.displayName;
     this.battlePosition = data.battlePosition;
     this.evaluation     = data.evaluation;
     this.scale          = data.scale;
     this.npcType        = data.npcType;
     this.levelAttrib.Copy(data.LevelAttrib);
     this.equipments = new List <WeihuaGames.ClientClass.EquipmentData>();
     this.illusionID = data.illusionID;
     foreach (WeihuaGames.ClientClass.EquipmentData data2 in data.equipments)
     {
         WeihuaGames.ClientClass.EquipmentData item = new WeihuaGames.ClientClass.EquipmentData();
         item.Copy(data2);
         this.equipments.Add(item);
     }
     this.skills = new List <WeihuaGames.ClientClass.SkillData>();
     foreach (WeihuaGames.ClientClass.SkillData data4 in data.Skills)
     {
         WeihuaGames.ClientClass.SkillData data5 = new WeihuaGames.ClientClass.SkillData();
         data5.Copy(data4);
         this.skills.Add(data5);
     }
     this.buffs = new List <WeihuaGames.ClientClass.BuffData>();
     foreach (WeihuaGames.ClientClass.BuffData data6 in data.buffs)
     {
         WeihuaGames.ClientClass.BuffData data7 = new WeihuaGames.ClientClass.BuffData();
         data7.Copy(data6);
         this.buffs.Add(data7);
     }
     this.attributes = new List <WeihuaGames.ClientClass.Attribute>();
     foreach (WeihuaGames.ClientClass.Attribute attribute in data.Attributes)
     {
         WeihuaGames.ClientClass.Attribute attribute2 = new WeihuaGames.ClientClass.Attribute();
         attribute2.Copy(attribute);
         this.attributes.Add(attribute2);
     }
 }
Example #2
0
 public void ShallowCopy(WeihuaGames.ClientClass.RecruiteNpc recruiteNpc)
 {
     this.avatarId          = recruiteNpc.avatarId;
     this.name              = recruiteNpc.name;
     this.level             = recruiteNpc.level;
     this.npcId             = recruiteNpc.npcId;
     this.traitType         = recruiteNpc.traitType;
     this.breakthroughLevel = recruiteNpc.breakthroughLevel;
     this.qualityType       = recruiteNpc.qualityType;
     this.npcDesc           = recruiteNpc.npcDesc;
     this.skillIds.Clear();
     foreach (int num in recruiteNpc.skillIds)
     {
         this.skillIds.Add(num);
     }
     this.attributes.Clear();
     foreach (WeihuaGames.ClientClass.Attribute attribute in recruiteNpc.attributes)
     {
         WeihuaGames.ClientClass.Attribute item = new WeihuaGames.ClientClass.Attribute();
         item.Copy(attribute);
         this.attributes.Add(item);
     }
 }