Files
zzz_REBIRTH__Utils/Scripts/Dialog/DialogActionAddBuffRebirth.cs
2025-06-04 16:44:53 +09:30

20 lines
674 B
C#

public class DialogActionAddBuffRebirth : BaseDialogAction
{
public override void PerformAction(EntityPlayer player)
{
LocalPlayerUI uiforPlayer = LocalPlayerUI.GetUIForPlayer(player as EntityPlayerLocal);
if (!string.IsNullOrEmpty(Value) && Value.ToLower() == "self")
{
var entityNPC = uiforPlayer.xui.Dialog.Respondent;
if (entityNPC != null)
{
Debug.Log($"Adding {ID}...");
// calls buffOrderDismiss, removes the cvar. Doesn't work
entityNPC.Buffs.AddBuff(base.ID);
}
return;
}
player.Buffs.AddBuff(ID);
}
}