logoHourGlass
Pet.TradePet

Pet.TradePet

Pet.TradePet(FromCharIndex, TargetCharIndex, PetSlot)

函數功能

將玩家的寵物交易給另外一個玩家。

參數說明

  • FromCharIndex數值型 對象index。
  • TargetCharIndex數值型 交易給的對象index。
  • PetSlot數值型 指定的寵物欄位上的寵物。

返回值

負數失敗,正數表示成功,且表示寵物所在的寵物欄位置。

  • -1:參數錯誤
  • -2:身上位置無寵物
  • -3:TargetCharIndex身上無空位
  • -4:等級不符(寵物比TargetCharIndex等級大5級以上)