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,54 @@
using System.Xml.Linq;
public class MinEventActionFactionChangeSDX : MinEventActionRemoveBuff
{
private string Faction = "";
public override void Execute(MinEventParams _params)
{
//Log.Out("MinEventActionFactionChangeSDX-Execute START");
for (var i = 0; i < targets.Count; i++)
{
var entity = targets[i];
//Log.Out("MinEventActionFactionChangeSDX-Execute entityClassName:" + entity.EntityClass.entityClassName);
if (entity != null)
{
//Log.Out("MinEventActionFactionChangeSDX-Execute 1");
// If the faction name is original, try to find the original faction of the entity, stored via cvar.
if (Faction == "original")
{
//Log.Out("MinEventActionFactionChangeSDX-Execute 2");
entity.Buffs.SetCustomVar("$faction", 0);
}
else
{
//Log.Out("MinEventActionFactionChangeSDX-Execute 3");
entity.Buffs.SetCustomVar("$faction", RebirthUtilities.GetFactionID(Faction));
}
entity.attackTarget = (EntityAlive) null;
entity.SetRevengeTarget((EntityAlive) null);
}
}
}
public override bool ParseXmlAttribute(XAttribute _attribute)
{
var flag = base.ParseXmlAttribute(_attribute);
if (!flag)
{
var name = _attribute.Name;
if (name != null)
if (name == "value")
{
Faction = _attribute.Value;
return true;
}
}
return flag;
}
}