diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-10-11 23:09:23 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-10-11 23:09:23 +0000 |
commit | 9c7c7093b94e908efff0798004c2595a8b5c0fcd (patch) | |
tree | becf8282418c64134ac8250d941570ce36e1c511 /src/progs/manaplus/actions/commands.cpp | |
parent | 089532258084660366fdeb11ec5d25b115fe6b0e (diff) | |
download | plus-9c7c7093b94e908efff0798004c2595a8b5c0fcd.tar.gz plus-9c7c7093b94e908efff0798004c2595a8b5c0fcd.tar.bz2 plus-9c7c7093b94e908efff0798004c2595a8b5c0fcd.tar.xz plus-9c7c7093b94e908efff0798004c2595a8b5c0fcd.zip |
Add confirmation dialog for leaving guild
Memory may not be freed properly, also code is IMO ugly. See !109 for the other way of implementing this (unrelated). Was done in socialWindow as the join confirmation is already there.
****
mana/plus!110
Diffstat (limited to 'src/progs/manaplus/actions/commands.cpp')
-rw-r--r-- | src/progs/manaplus/actions/commands.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/progs/manaplus/actions/commands.cpp b/src/progs/manaplus/actions/commands.cpp index ff0d91e3d..53c0996ac 100644 --- a/src/progs/manaplus/actions/commands.cpp +++ b/src/progs/manaplus/actions/commands.cpp @@ -986,11 +986,11 @@ impHandler0(leaveParty) impHandler0(leaveGuild) { - if ((guildHandler != nullptr) && (localPlayer != nullptr)) + if ((socialWindow != nullptr) && (localPlayer != nullptr)) { const Guild *const guild = localPlayer->getGuild(); if (guild != nullptr) - guildHandler->leave(guild->getId()); + socialWindow->confirmGuildLeave(); return true; } return false; |