MovePet(CharIndex, PetPos, GiveCharIndex);


函数功能:

根据指定对象的宠物栏位置,将宠物转移到另一个对象的身上


操作参数:

参数名 是否必须 类型 说明
CharIndex int 转移方对象索引 (人物)
PetPos int 宠物所在宠物栏位置
GiveCharIndex int 被转移对象索引(人物)

返回值:

返回值类型 成功 失败
int 被转移后的宠物栏位置 -1

操作实例:

  1. local PetPos = 1;
  2. Char.MovePet(CharIndex,PetPos,GiveCharIndex);
  3. local StringBuf = string.format("%s宠物栏%d的宠物,转移到了%s身上",Char.GetData(CharIndex,%对象_原名%),PetPos,Char.GetData(GiveCharIndex,%对象_原名%));
  4. print(StringBuf);

备注:

  • 更多返回错误代码请看首页的错误代码描述
文档更新时间: 2022-11-08 14:44   作者:105493660