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,63 @@
public class DialogActionNPCCommand : DialogActionAddBuff
{
public override void PerformAction(EntityPlayer player)
{
//Log.Out("DialogActionNPCCommand-PerformAction START");
var entityId = -1;
if (player.Buffs.HasCustomVar("CurrentNPC"))
{
//Log.Out("DialogActionNPCCommand-PerformAction 1");
entityId = (int)player.Buffs.GetCustomVar("CurrentNPC");
}
if (entityId == -1)
{
//Log.Out("DialogActionNPCCommand-PerformAction 2");
return;
}
//Log.Out("ENTITY ID: " + entityId);
var entity = GameManager.Instance.World.GetEntity(entityId) as EntityAliveV2;
if (entity)
{
switch (ID)
{
case "follow":
//Log.Out("DialogActionNPCCommand-PerformAction entity: " + entity.EntityClass.entityClassName);
float flMode = player.Buffs.GetCustomVar("varNPCModMode");
float flHalt = player.Buffs.GetCustomVar("varNPCModStopAttacking");
if (flMode == 0)
{
//Log.Out("DialogActionNPCCommand-PerformAction 1");
entity.Buffs.AddBuff("buffNPCModFullControlMode");
}
else
{
//Log.Out("DialogActionNPCCommand-PerformAction 2");
entity.Buffs.RemoveBuff("buffNPCModFullControlMode");
}
if (flHalt == 1)
{
//Log.Out("DialogActionNPCCommand-PerformAction 3");
entity.Buffs.AddBuff("buffNPCModStopAttacking");
}
else
{
//Log.Out("DialogActionNPCCommand-PerformAction 4");
entity.Buffs.RemoveBuff("buffNPCModStopAttacking");
}
//Log.Out("DialogActionNPCCommand-PerformAction SET TO FOLLOW");
entity.Buffs.SetCustomVar("CurrentOrder", (int)EntityUtilities.Orders.Follow);
break;
}
}
////Log.Out("DialogActionNPCCommand-PerformAction END");
}
}