39 lines
1.5 KiB
Lua
39 lines
1.5 KiB
Lua
|
local BuffAction_SingleRespiratoryRegurgitation = {
|
|||
|
|
|||
|
-- 以下参数信息可以通过manager的 GetBuffDefaultParam(BuffPath, ParamName)来获取 --
|
|||
|
-- 默认颜色信息,非必要参数
|
|||
|
BuffColor = {R = 0.97, G = 0.88, B = 0.1, A = 1.};
|
|||
|
--BuffIconPath = "默认Icon路径,非必要参数";
|
|||
|
--BuffParticlePath = "默认粒子路径,非必要参数";
|
|||
|
--BuffDesc = "Buff描述信息,非必要参数";
|
|||
|
--------------------------------------------------------------------------------
|
|||
|
|
|||
|
PlayerKey = {};
|
|||
|
};
|
|||
|
|
|||
|
--- 必须包含ApplyBuff函数
|
|||
|
---@param BuffTag int32 Buff的标签
|
|||
|
---@param ValidPawn UGCPlayerPawn_C
|
|||
|
---@tparam Any
|
|||
|
---@return bool 是否执行成功
|
|||
|
function BuffAction_SingleRespiratoryRegurgitation:ApplyBuff(BuffTag, ValidPawn)
|
|||
|
-- 添加一下
|
|||
|
print(string.format('[BuffAction_SingleRespiratoryRegurgitation:ApplyBuff] 执行'))
|
|||
|
UGCEventSystem.SendEvent(EventTypes.PlayerEnableRR, ValidPawn.PlayerKey, true);
|
|||
|
self.PlayerKey = {
|
|||
|
[1] = ValidPawn.PlayerKey;
|
|||
|
}
|
|||
|
return true
|
|||
|
end
|
|||
|
|
|||
|
function BuffAction_SingleRespiratoryRegurgitation:RemoveBuff(BuffTag, ValidPawn)
|
|||
|
print(string.format('[BuffAction_SingleRespiratoryRegurgitation:RemoveBuff] 结束执行'))
|
|||
|
UGCEventSystem.SendEvent(EventTypes.PlayerEnableRR, ValidPawn.PlayerKey, false);
|
|||
|
self.PlayerKey = {};
|
|||
|
end
|
|||
|
|
|||
|
function BuffAction_SingleRespiratoryRegurgitation:GetBenefitPlayer()
|
|||
|
return self.PlayerKey;
|
|||
|
end
|
|||
|
|
|||
|
return BuffAction_SingleRespiratoryRegurgitation;
|