Upload from upload_mods.ps1
This commit is contained in:
38
Scripts/MinEvents/MinEventActionLoseInventoryRebirth.cs
Normal file
38
Scripts/MinEvents/MinEventActionLoseInventoryRebirth.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
public class MinEventActionLoseInventoryRebirth : MinEventActionRemoveBuff
|
||||
{
|
||||
public override void Execute(MinEventParams _params)
|
||||
{
|
||||
if (GameManager.IsDedicatedServer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var player = _params.Self as EntityPlayerLocal;
|
||||
|
||||
var uiforPlayer = LocalPlayerUI.GetUIForPlayer(player as EntityPlayerLocal);
|
||||
var playerInventory = uiforPlayer.xui.PlayerInventory;
|
||||
|
||||
//Log.Out("MinEventActionLoseInventoryRebirth-Execute Clearing Backpack");
|
||||
playerInventory.Backpack.Clear();
|
||||
//Log.Out("MinEventActionLoseInventoryRebirth-Execute Clearing Toolbelt");
|
||||
playerInventory.Toolbelt.Clear();
|
||||
|
||||
int numIndex;
|
||||
|
||||
float flClass = player.Buffs.GetCustomVar("$ActiveClass_FR");
|
||||
|
||||
foreach (var classKey in RebirthVariables.localClasses.Keys)
|
||||
{
|
||||
if (RebirthVariables.localClasses[classKey] == flClass)
|
||||
{
|
||||
player.Buffs.AddBuff("FuriousRamsayGive" + classKey + "Weapon");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
string ID = "PermadeathRebirth";
|
||||
|
||||
//Log.Out("MinEventActionLoseInventoryRebirth-Execute OPENING WINDOW: " + ID);
|
||||
uiforPlayer.windowManager.Open(ID, true, false, true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user