Beispiel #1
0
 public void SetExtraData(GameCmd.PetData pet)
 {
     SetName(pet.name);
     petBaseID        = pet.base_id;
     replacetalent    = pet.replace_talent;
     attrpoint        = pet.attr_point;
     petSkillList     = pet.skill_list;
     exPlan           = pet.ex_plan;
     petInheritNum    = pet.inherit_time;
     freeResetAttrNum = pet.free_reset_attr_time;
     attrplan         = pet.attr_plan;
 }
Beispiel #2
0
    /// <summary>
    /// 构建宠物属性列表
    /// </summary>
    /// <param name="data"></param>
    /// <param name="propList"></param>
    public static void BuildPetPropListByPetData(GameCmd.PetData data, ref EntityAttr[] propList)
    {
        if (propList.Length < 0 || propList.Length > (int)PetProp.End - (int)EntityProp.Begin)
        {
            Engine.Utility.Log.Error("BuildPlayerPropList:属性列表长度非法");
            return;
        }

        int index = 0;

        propList[index++] = new EntityAttr((int)CreatureProp.Hp, (int)data.hp);
        propList[index++] = new EntityAttr((int)PetProp.LevelExp, (int)data.exp);      // 经验
        propList[index++] = new EntityAttr((int)CreatureProp.Level, (int)data.lv);
        propList[index++] = new EntityAttr((int)PetProp.Sex, (data.male == true) ? 0 : 1);
        propList[index++] = new EntityAttr((int)PetProp.Character, (int)data.character);
        propList[index++] = new EntityAttr((int)PetProp.PetGuiYuanStatus, (int)data.grade);
        propList[index++] = new EntityAttr((int)PetProp.YinHunExp, (int)data.yh_exp);
        propList[index++] = new EntityAttr((int)PetProp.YinHunLevel, (int)data.yh_lv);
        propList[index++] = new EntityAttr((int)PetProp.Life, (int)data.life);
        propList[index++] = new EntityAttr((int)PetProp.MaxPoint, (int)data.max_point);
        propList[index++] = new EntityAttr((int)PetProp.BaseID, (int)data.base_id);
        //  propList[index++] = new EntityAttr( (int)FightCreatureProp.Power , (int)data.power ); // 战斗力
        //当前天赋
        propList[index++] = new EntityAttr((int)PetProp.StrengthTalent, (int)data.cur_talent.liliang);
        propList[index++] = new EntityAttr((int)PetProp.CorporeityTalent, (int)data.cur_talent.tizhi);
        propList[index++] = new EntityAttr((int)PetProp.IntelligenceTalent, (int)data.cur_talent.zhili);
        propList[index++] = new EntityAttr((int)PetProp.SpiritTalent, (int)data.cur_talent.jingshen);
        propList[index++] = new EntityAttr((int)PetProp.AgilityTalent, (int)data.cur_talent.minjie);
        propList[index++] = new EntityAttr((int)PetProp.CommonJieBianLv, (int)data.by_lv);
        propList[index++] = new EntityAttr((int)PetProp.AdvaceJieBianLv, (int)data.replace_by_lv);
        //属性
        propList[index++] = new EntityAttr((int)FightCreatureProp.PhysicsAttack, (int)data.attr.pdam);
        propList[index++] = new EntityAttr((int)FightCreatureProp.PhysicsDefend, (int)data.attr.pdef);
        propList[index++] = new EntityAttr((int)FightCreatureProp.MagicAttack, (int)data.attr.mdam);
        propList[index++] = new EntityAttr((int)FightCreatureProp.MagicDefend, (int)data.attr.mdef);
        propList[index++] = new EntityAttr((int)FightCreatureProp.PhysicsCrit, (int)data.attr.plucky);  // 暴击
        propList[index++] = new EntityAttr((int)FightCreatureProp.MagicCrit, (int)data.attr.mlucky);
        propList[index++] = new EntityAttr((int)FightCreatureProp.Hit, (int)data.attr.hit);
        propList[index++] = new EntityAttr((int)FightCreatureProp.Dodge, (int)data.attr.hide);
        propList[index++] = new EntityAttr((int)FightCreatureProp.FireDefend, (int)data.attr.heatdef + data.attr.mdef);
        propList[index++] = new EntityAttr((int)FightCreatureProp.IceDefend, (int)data.attr.biochdef + data.attr.mdef);
        propList[index++] = new EntityAttr((int)FightCreatureProp.EleDefend, (int)data.attr.lightdef + data.attr.mdef);
        propList[index++] = new EntityAttr((int)FightCreatureProp.WitchDefend, (int)data.attr.wavedef + data.attr.mdef);
        propList[index++] = new EntityAttr((int)FightCreatureProp.Power, (int)data.attr.fight_power);
        propList[index++] = new EntityAttr((int)CreatureProp.MaxHp, (int)data.attr.maxhp);

        // 战斗属性
    }