ManaPlus
Public Member Functions
PlayerPostDeathListener Struct Reference

#include <playerpostdeathlistener.h>

Inheritance diagram for PlayerPostDeathListener:
ActionListener

Public Member Functions

 PlayerPostDeathListener ()
 
void action (const ActionEvent &event)
 
- Public Member Functions inherited from ActionListener
virtual ~ActionListener ()
 

Additional Inherited Members

- Protected Member Functions inherited from ActionListener
 ActionListener ()
 

Detailed Description

Listener used for handling death message.

Definition at line 44 of file playerpostdeathlistener.h.

Constructor & Destructor Documentation

◆ PlayerPostDeathListener()

PlayerPostDeathListener::PlayerPostDeathListener ( )
inline

Definition at line 46 of file playerpostdeathlistener.h.

46  :
48  { }

Member Function Documentation

◆ action()

void PlayerPostDeathListener::action ( const ActionEvent actionEvent)
inlinevirtual

Called when an action is recieved from a widget. It is used to be able to recieve a notification that an action has occured.

Parameters
actionEventThe event of the action.

Implements ActionListener.

Definition at line 52 of file playerpostdeathlistener.h.

53  {
54  const bool respawn = !(event.getId() == "no");
55  deathNotice = nullptr;
56  if (respawn)
57  {
58  if (playerHandler != nullptr)
60 
64 
65  if (localPlayer != nullptr)
67  }
68  else
69  {
73  if (localPlayer != nullptr)
75  }
76  }
Net::AdminHandler * adminHandler
Definition: net.cpp:84
const std::string & getName() const
Definition: being.h:232
static void closeDialogs()
virtual void alive(const std::string &name) const =0
virtual void respawn() const =0
static void clearDialogs()
Definition: npcdialog.cpp:1217
static void closePopupMenu()
LocalPlayer * localPlayer
Net::PlayerHandler * playerHandler
Definition: net.cpp:96
Window * deathNotice

References adminHandler, Net::AdminHandler::alive(), NpcDialog::clearDialogs(), DialogsManager::closeDialogs(), PopupManager::closePopupMenu(), deathNotice, Being::getName(), localPlayer, playerHandler, LocalPlayer::respawn(), and Net::PlayerHandler::respawn().


The documentation for this struct was generated from the following file: