private void BtnConfirmHireInformation_OnPressed(XUiController _sender, OnPressEventArgs _onPressEventArgs) { EntityPlayer player = base.xui.playerUI.entityPlayer; int entityID = 0; if (player.Buffs.HasCustomVar("CurrentNPC")) { entityID = (int)player.Buffs.GetCustomVar("CurrentNPC"); } if (entityID == 0) { return; } EntityAliveSDX myEntity = player.world.GetEntity(entityID) as EntityAliveSDX; if (myEntity != null) { EntityUtilities.Hire(entityID, player as EntityPlayerLocal); } base.xui.playerUI.windowManager.Close(windowGroup.ID); }
private void BtnOk_OnPressed(XUiController _sender, OnPressEventArgs _onPressEventArgs) { string text = this.txtPassword.Text; float code = 0f; StringParsers.TryParseFloat(text, out code); myEntity.Buffs.AddCustomVar("PathingCode", code); SphereCache.RemovePaths(myEntity.entityId); EntityUtilities.GetNewPositon(myEntity.entityId); EntityUtilities.SetCurrentOrder(myEntity.entityId, EntityUtilities.Orders.Wander); GameManager.ShowTooltip(base.xui.playerUI.entityPlayer, "Pathing Code Set"); base.xui.playerUI.windowManager.Close(base.WindowGroup.ID); }
private void BtnConfirmHireInformation_OnPressed(XUiController _sender, OnPressEventArgs _onPressEventArgs) { LocalPlayerUI uiforPlayer = base.xui.playerUI; // The respondent is an EntityNPC, and we don't have that. Check for the patch scripted otherEntitySDX. Entity respondent = uiforPlayer.xui.Dialog.Respondent; if (respondent == null) { respondent = uiforPlayer.xui.Dialog.otherEntitySDX; } if (respondent != null) { EntityAliveSDX myEntity = uiforPlayer.entityPlayer.world.GetEntity(respondent.entityId) as EntityAliveSDX; if (myEntity != null) { myEntity.SetOwner(uiforPlayer.entityPlayer as EntityPlayerLocal); } } base.xui.playerUI.windowManager.Close(this.windowGroup.ID); }
private void BtnCancelHireInformation_OnPressed(XUiController _sender, OnPressEventArgs _onPressEventArgs) { this.hireInformationPanel.IsVisible = false; base.xui.playerUI.windowManager.Close(this.windowGroup.ID); }
private void closeButton_OnPress(XUiController _sender, OnPressEventArgs _e) { xui.playerUI.windowManager.Close(WindowGroup.ID); }
private void BtnCancel_OnPressed(XUiController _sender, OnPressEventArgs _e) { base.xui.playerUI.windowManager.Close(base.WindowGroup.ID); }