Exemplo n.º 1
0
 public PetData(pet_base_info pet_info)
 {
     configId = (int)pet_info.id;
     //serverInstanceID = (int)pet_info.id;
     type             = (int)pet_info.type;
     status           = (int)pet_info.status;
     fight_score      = (int)pet_info.fight_score;
     aptitude         = (int)pet_info.aptitude;
     grow_up          = (int)pet_info.grow_up;
     lev              = (int)pet_info.lev;
     pet_name         = pet_info.pet_name;
     all_property     = pet_info.all_property;
     grow_up_property = pet_info.grow_up_property;
     jinghun_property = pet_info.jinghun_property;
     tian_soul        = (int)pet_info.tian_soul;
     di_soul          = (int)pet_info.di_soul;
     life_soul        = (int)pet_info.life_soul;
     pet_skill        = pet_info.pet_skill;
     for (int i = 0, max = pet_info.pet_skill.Count; i < max; i++)
     {
         NewPetSkillRef skill = ConfigMng.Instance.GetPetSkillRef((int)pet_info.pet_skill[i]);
         if (skill != null && skill.skillId > 0)
         {
             petSkill.Add(skill.skillId);
         }
     }
     grow_up_exp     = (int)pet_info.grow_up_exp;
     aptitude_exp    = (int)pet_info.aptitude_exp;
     hasChange       = true;
     ownerInstanceID = GameCenter.mainPlayerMng.MainPlayerInfo.ServerInstanceID;
     ownerName       = GameCenter.mainPlayerMng.MainPlayerInfo.Name;
 }
Exemplo n.º 2
0
    /// <summary>
    /// 服务端数据构造
    /// </summary>
    public MercenaryInfo(pet_base_info _data, PlayerBaseInfo _info)
    {
        PetData data = new PetData(_data);

        serverData = data;
        ownerInfo  = _info;
        SetTitle();
    }