函数名称:LuaFnPetStudySkill
注册函数:PetStudySkill
参数说明:sceneId(场景编号),selfId(调用者ID),petGUID_H(宠物GUID高位),petGUID_L(宠物GUID低位),skillId(技能ID)
功能说明:宠物学习技能
示例说明:
-- 珍兽技能学习
function x335000_PetStudy( sceneId, selfId, skillId )
petGUID_H = LuaFnGetHighSectionOfTargetPetGuid( sceneId, selfId )
petGUID_L = LuaFnGetLowSectionOfTargetPetGuid( sceneId, selfId )
local checkAvailable = LuaFnIsPetAvailableByGUIDNoPW(sceneId, selfId, petGUID_H, petGUID_L);
if checkAvailable and checkAvailable == 1 then
local ret = PetStudySkill( sceneId, selfId, petGUID_H, petGUID_L, skillId )
if ret and ret > 0 then
--成功的光效
LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0);
return 1
end
end
return 0;
end
|