Beispiel #1
0
    public void OnRefreshPetAttr(stRefreshAttrPetUserCmd_S cmd)
    {
        IPet pet = GetPetByThisID(cmd.id);

        if (pet != null)
        {
            pet.SetProp((int)FightCreatureProp.PhysicsAttack, (int)cmd.attr.pdam);
            pet.SetProp((int)FightCreatureProp.PhysicsDefend, (int)cmd.attr.pdef);
            pet.SetProp((int)FightCreatureProp.MagicAttack, (int)cmd.attr.mdam);
            pet.SetProp((int)FightCreatureProp.PhysicsCrit, (int)cmd.attr.plucky);
            pet.SetProp((int)FightCreatureProp.MagicCrit, (int)cmd.attr.mlucky);
            pet.SetProp((int)FightCreatureProp.Hit, (int)cmd.attr.hit);
            pet.SetProp((int)FightCreatureProp.Dodge, (int)cmd.attr.hide);
            pet.SetProp((int)FightCreatureProp.FireDefend, (int)cmd.attr.heatdef);
            pet.SetProp((int)FightCreatureProp.IceDefend, (int)cmd.attr.biochdef);
            pet.SetProp((int)FightCreatureProp.EleDefend, (int)cmd.attr.lightdef);
            pet.SetProp((int)FightCreatureProp.WitchDefend, (int)cmd.attr.wavedef);
            pet.SetProp((int)FightCreatureProp.Power, (int)cmd.attr.fight_power);
            pet.SetProp((int)CreatureProp.MaxHp, (int)cmd.attr.maxhp);
        }
        DispatchValueUpdateEvent(new ValueUpdateEventArgs()
        {
            key = PetDispatchEventString.PetRefreshProp.ToString()
        });
    }
Beispiel #2
0
 public void OnRefreshPetAttr(stRefreshAttrPetUserCmd_S cmd)
 {
     DataManager.Manager <PetDataManager>().OnRefreshPetAttr(cmd);
 }