Exemplo n.º 1
0
 private void HandlePetSkillCmd(CommandParser.Command param)
 {
     int num = 0;
     int.TryParse(param.GetParam(1), out num);
     int index = 0;
     int.TryParse(param.GetParam(2), out index);
     SocketDataEx socket = Globals.Instance.Player.TeamSystem.GetSocket(num);
     if (socket == null)
     {
         global::Debug.LogFormat("pet is empty, slot = {0}", new object[]
         {
             num
         });
     }
     PetDataEx pet = socket.GetPet();
     MC2S_PetSkill mC2S_PetSkill = new MC2S_PetSkill();
     mC2S_PetSkill.PetID = pet.Data.ID;
     mC2S_PetSkill.Index = index;
     Globals.Instance.CliSession.Send(406, mC2S_PetSkill);
 }
Exemplo n.º 2
0
 public void OnShengjiBtnClick(GameObject go)
 {
     Globals.Instance.EffectSoundMgr.Play("ui/ui_001");
     PetDataEx curPetDataEx = this.mBaseScene.CurPetDataEx;
     if (curPetDataEx != null)
     {
         if (curPetDataEx.Data.Further < 3u)
         {
             GameUIManager.mInstance.ShowMessageTipByKey("furtherTooLow", 0f, 0f);
         }
         else
         {
             MC2S_PetSkill mC2S_PetSkill = new MC2S_PetSkill();
             mC2S_PetSkill.PetID = curPetDataEx.Data.ID;
             mC2S_PetSkill.Index = this.GetCurSkillArrayIndex();
             Globals.Instance.CliSession.Send(406, mC2S_PetSkill);
         }
     }
 }