Beispiel #1
0
 void onClick_Skill_shengji_Btn(GameObject caster)
 {
     if (petDataManager.SelectSkillDataBase != null && CurPet != null)
     {
         int itemCount = DataManager.Manager <ItemManager>().GetItemNumByBaseId(m_nSkillNeedItemID);
         if (skillUpAutobuy)
         {
             if (!ShowJiNengColdLabel(m_nSkillNeedItemID))
             {
                 TipsManager.Instance.ShowTipsById(5);
                 return;
             }
         }
         else
         {
             if (itemCount <= 0)
             {
                 TipsManager.Instance.ShowTipsById(6);
                 return;
             }
         }
         stUpSkillPetUserCmd_CS cmd = new stUpSkillPetUserCmd_CS();
         cmd.id       = CurPet.GetID();
         cmd.skill    = (int)petDataManager.SelectSkillDataBase.wdID;
         cmd.auto_buy = skillUpAutobuy;
         NetService.Instance.Send(cmd);
     }
 }
Beispiel #2
0
    public void OnSkillUpGrade(stUpSkillPetUserCmd_CS cmd)
    {
        IPet pet = GetPetByThisID(cmd.id);

        if (pet != null)
        {
            ShowTipsEnum(LocalTextType.Pet_Skill_jinengshengjichenggong);

            // ShowTips(108508);
            pet.PetSkillUpGrade(cmd.skill);
        }
        DispatchValueUpdateEvent(new ValueUpdateEventArgs()
        {
            key = PetDispatchEventString.PetRefreshProp.ToString()
        });
    }
Beispiel #3
0
 public void OnPetSkillUPGrade(stUpSkillPetUserCmd_CS cmd)
 {
     DataManager.Manager <PetDataManager>().OnSkillUpGrade(cmd);
 }