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,41 @@
public class DialogActionSetRespawnPointRebirth : DialogActionAddBuff
{
public override void PerformAction(EntityPlayer player)
{
//Log.Out("DialogActionSetRespawnPointRebirth-PerformAction START");
var entityId = -1;
if (player.Buffs.HasCustomVar("CurrentNPC"))
{
//Log.Out("DialogActionSetRespawnPointRebirth-PerformAction 1");
entityId = (int)player.Buffs.GetCustomVar("CurrentNPC");
}
if (entityId == -1)
{
//Log.Out("DialogActionSetRespawnPointRebirth-PerformAction 2");
return;
}
//Log.Out("ENTITY ID: " + entityId);
EntityAliveV2 entity = GameManager.Instance.World.GetEntity(entityId) as EntityAliveV2;
if (entity)
{
//Log.Out("DialogActionSetRespawnPointRebirth-PerformAction Entity: " + entity.EntityName);
entity.bWillRespawn = true;
RebirthManager.UpdateHireInfo(entity.entityId, "reSpawnPosition", "", entity.position.ToString(), entity.rotation.ToString());
try
{
GameManager.ShowTooltip(GameManager.Instance.World.GetPrimaryPlayer().PlayerUI.xui.playerUI.entityPlayer, Localization.Get("ttSetRespawnPoint") + " " + entity.EntityName);
}
catch (Exception ex)
{
}
}
//Log.Out("DialogActionSetRespawnPointRebirth-PerformAction END");
}
}