30 lines
619 B
Lua
30 lines
619 B
Lua
local Buff_Invincible = {};
|
|
|
|
--- 下面的可以直接用,就能获取到值
|
|
Buff_Invincible.PlayerKey = nil;
|
|
Buff_Invincible.BuffType = nil;
|
|
Buff_Invincible.Owner = nil;
|
|
Buff_Invincible.BuffName = nil;
|
|
|
|
function Buff_Invincible:Init(Params)
|
|
return true;
|
|
end
|
|
|
|
---@param Pawn UGCPlayerPawn_C
|
|
function Buff_Invincible:AddBuff(Pawn)
|
|
if IsServer then
|
|
Pawn:SetInvincible(true);
|
|
end
|
|
return true;
|
|
end
|
|
|
|
function Buff_Invincible:RemoveBuff(Pawn)
|
|
if IsServer then
|
|
local SelfPawn = UGCGameSystem.GetPlayerPawnByPlayerKey(self.PlayerKey);
|
|
SelfPawn:SetInvincible(false);
|
|
end
|
|
return true;
|
|
end
|
|
|
|
|
|
return Buff_Invincible; |