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"); } }