Upload from upload_mods.ps1
This commit is contained in:
19
Scripts/Dialog/DialogActionAddBuffRebirth.cs
Normal file
19
Scripts/Dialog/DialogActionAddBuffRebirth.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user