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,45 @@
public class DialogActionDespawnEntityRebirth : DialogActionAddBuff
{
public override BaseDialogAction.ActionTypes ActionType => BaseDialogAction.ActionTypes.AddBuff;
public override void PerformAction(EntityPlayer player)
{
var entityId = -1;
if (player.Buffs.HasCustomVar("CurrentNPC"))
{
//Log.Out("DialogActionDespawnEntityRebirth-PerformAction 1");
entityId = (int)player.Buffs.GetCustomVar("CurrentNPC");
}
if (entityId == -1)
{
//Log.Out("DialogActionDespawnEntityRebirth-PerformAction 2");
return;
}
var myEntity = GameManager.Instance.World.GetEntity(entityId) as EntityNPCRebirth;
if (myEntity == null)
{
//Log.Out("DialogActionDespawnEntityRebirth-PerformAction 3");
return;
}
RebirthUtilities.DespawnEntity(myEntity);
/*player.Companions.Remove(myEntity);
if (!SingletonMonoBehaviour<ConnectionManager>.Instance.IsServer)
{
//Log.Out("DialogActionDespawnEntityRebirth-PerformAction 5");
SingletonMonoBehaviour<ConnectionManager>.Instance.SendToServer(NetPackageManager.GetPackage<NetPackageDespawnEntityRebirth>().Setup(myEntity.entityId), false);
}
else
{
//Log.Out("DialogActionDespawnEntityRebirth-PerformAction 6");
////Log.Out("DialogActionDespawnEntityRebirth-PerformAction REMOVE HIRE/OWNED ENTITY, hire: " + myEntity.entityId);
RebirthManager.RemoveHire(myEntity.entityId, true);
myEntity.bWillRespawn = false;
GameManager.Instance.World.RemoveEntity(myEntity.entityId, EnumRemoveEntityReason.Unloaded);
}*/
}
}