Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:44:53 +09:30
commit f1fbbe67bb
1722 changed files with 165268 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
using System.Xml.Linq;
public class MinEventActionHideNPCRebirth : MinEventActionTargetedBase
{
private bool hide;
public override void Execute(MinEventParams _params)
{
var entity = _params.Self as EntityNPCRebirth;
if (entity == null)
{
return;
}
float flHidden = entity.Buffs.GetCustomVar("$FR_NPC_Hidden");
//Log.Out("MinEventActionHideNPCRebirth-Execute flHidden: " + flHidden);
if (hide)
{
//Log.Out("MinEventActionHideNPCRebirth-Execute HIDE 1");
if (flHidden == 0)
{
//Log.Out("MinEventActionHideNPCRebirth-Execute HIDE 2");
entity.HideNPC(true);
}
}
else
{
//Log.Out("MinEventActionHideNPCRebirth-Execute SHOW 1");
if (flHidden == 1)
{
//Log.Out("MinEventActionHideNPCRebirth-Execute SHOW 2");
entity.HideNPC(false);
}
}
}
public override bool ParseXmlAttribute(XAttribute _attribute)
{
var flag = base.ParseXmlAttribute(_attribute);
if (!flag)
{
var name = _attribute.Name;
if (name != null)
if (name == "hide")
hide = StringParsers.ParseBool(_attribute.Value);
}
return flag;
}
}