From c26b6e2c74750c1f4f99ef5d673ea6fc2aac767b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 2 Dec 2014 12:53:06 +0300 Subject: Rename PlayerDeathListener into PlayerPostDeathListener. --- src/listeners/playerdeathlistener.h | 63 --------------------------------- src/listeners/playerpostdeathlistener.h | 63 +++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 63 deletions(-) delete mode 100644 src/listeners/playerdeathlistener.h create mode 100644 src/listeners/playerpostdeathlistener.h (limited to 'src/listeners') diff --git a/src/listeners/playerdeathlistener.h b/src/listeners/playerdeathlistener.h deleted file mode 100644 index 9f7974ae2..000000000 --- a/src/listeners/playerdeathlistener.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2004-2009 The Mana World Development Team - * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2014 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef LISTENERS_PLAYERDEATHLISTENER_H -#define LISTENERS_PLAYERDEATHLISTENER_H - -#include "being/localplayer.h" - -#include "gui/dialogsmanager.h" -#include "gui/popupmanager.h" - -#include "gui/windows/okdialog.h" -#include "gui/windows/npcdialog.h" - -#include "net/net.h" -#include "net/playerhandler.h" - -#include "localconsts.h" - -extern OkDialog *deathNotice; - -/** - * Listener used for handling death message. - */ -struct PlayerDeathListener final : public ActionListener -{ - void action(const ActionEvent &event A_UNUSED) - { - if (playerHandler) - playerHandler->respawn(); - deathNotice = nullptr; - - DialogsManager::closeDialogs(); - - if (popupManager) - popupManager->closePopupMenu(); - - NpcDialog::clearDialogs(); - if (localPlayer) - localPlayer->respawn(); - } -}; - -#endif // LISTENERS_PLAYERDEATHLISTENER_H diff --git a/src/listeners/playerpostdeathlistener.h b/src/listeners/playerpostdeathlistener.h new file mode 100644 index 000000000..6ab8fd25b --- /dev/null +++ b/src/listeners/playerpostdeathlistener.h @@ -0,0 +1,63 @@ +/* + * The ManaPlus Client + * Copyright (C) 2004-2009 The Mana World Development Team + * Copyright (C) 2009-2010 The Mana Developers + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef LISTENERS_PLAYERDEATHLISTENER_H +#define LISTENERS_PLAYERDEATHLISTENER_H + +#include "being/localplayer.h" + +#include "gui/dialogsmanager.h" +#include "gui/popupmanager.h" + +#include "gui/windows/okdialog.h" +#include "gui/windows/npcdialog.h" + +#include "net/net.h" +#include "net/playerhandler.h" + +#include "localconsts.h" + +extern OkDialog *deathNotice; + +/** + * Listener used for handling death message. + */ +struct PlayerPostDeathListener final : public ActionListener +{ + void action(const ActionEvent &event A_UNUSED) + { + if (playerHandler) + playerHandler->respawn(); + deathNotice = nullptr; + + DialogsManager::closeDialogs(); + + if (popupManager) + popupManager->closePopupMenu(); + + NpcDialog::clearDialogs(); + if (localPlayer) + localPlayer->respawn(); + } +}; + +#endif // LISTENERS_PLAYERDEATHLISTENER_H -- cgit v1.2.3-60-g2f50