diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-02 23:59:25 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-02 23:59:25 +0200 |
commit | 8ff22344af60a8f1d7de4501f04c7f659bd5bb08 (patch) | |
tree | db241c9647d8e4c51d49d1f47c1b3236842f3747 /source/Player.cpp | |
parent | Added the possibility to specify enchantments by name in the constructor and AddFromString() function (diff) | |
download | cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.gz cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.bz2 cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.lz cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.xz cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.tar.zst cuberite-8ff22344af60a8f1d7de4501f04c7f659bd5bb08.zip |
Diffstat (limited to 'source/Player.cpp')
-rw-r--r-- | source/Player.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/Player.cpp b/source/Player.cpp index 519837f6a..dd71ca834 100644 --- a/source/Player.cpp +++ b/source/Player.cpp @@ -128,7 +128,7 @@ void cPlayer::Initialize( cWorld* a_World ) void cPlayer::Destroyed() { - CloseWindow(); + CloseWindow(false); m_ClientHandle = NULL; } @@ -437,7 +437,7 @@ void cPlayer::OpenWindow(cWindow * a_Window) { if (a_Window != m_CurrentWindow) { - CloseWindow(); + CloseWindow(false); } a_Window->OpenedByPlayer(*this); m_CurrentWindow = a_Window; @@ -448,7 +448,7 @@ void cPlayer::OpenWindow(cWindow * a_Window) -void cPlayer::CloseWindow(void) +void cPlayer::CloseWindow(bool a_CanRefuse) { if (m_CurrentWindow == NULL) { @@ -456,7 +456,7 @@ void cPlayer::CloseWindow(void) return; } - if (m_CurrentWindow->ClosedByPlayer(*this)) + if (m_CurrentWindow->ClosedByPlayer(*this, a_CanRefuse) || !a_CanRefuse) { // Close accepted, go back to inventory window (the default): m_CurrentWindow = m_InventoryWindow; @@ -473,7 +473,7 @@ void cPlayer::CloseWindow(void) -void cPlayer::CloseWindowIfID(char a_WindowID) +void cPlayer::CloseWindowIfID(char a_WindowID, bool a_CanRefuse) { if ((m_CurrentWindow == NULL) || (m_CurrentWindow->GetWindowID() != a_WindowID)) { |