ManaPlus
Public Member Functions | Protected Attributes
SkillWarpListener Class Reference

#include <skillwarplistener.h>

Inheritance diagram for SkillWarpListener:
ActionListener

Public Member Functions

 SkillWarpListener ()
 
void action (const ActionEvent &event)
 
void setDialog (TextSelectDialog *const dialog)
 
void setSkill (const int skillId)
 
- Public Member Functions inherited from ActionListener
virtual ~ActionListener ()
 

Protected Attributes

TextSelectDialogmDialog
 
int mSkillId
 

Additional Inherited Members

- Protected Member Functions inherited from ActionListener
 ActionListener ()
 

Detailed Description

Definition at line 31 of file skillwarplistener.h.

Constructor & Destructor Documentation

◆ SkillWarpListener()

SkillWarpListener::SkillWarpListener ( )

Definition at line 32 of file skillwarplistener.cpp.

32  :
34  mDialog(nullptr),
35  mSkillId(0)
36 {
37 }
TextSelectDialog * mDialog

Member Function Documentation

◆ action()

void SkillWarpListener::action ( const ActionEvent actionEvent)
virtual

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 39 of file skillwarplistener.cpp.

40 {
41  if (event.getId() != "OK")
42  return;
43  if ((mDialog != nullptr) && (skillHandler != nullptr))
44  {
46  mDialog->getText());
47  }
48  mDialog = nullptr;
49 }
virtual void useMap(const int id, const std::string &map) const =0
std::string getText() const
Net::SkillHandler * skillHandler
Definition: net.cpp:97

References ActionEvent::getId(), TextSelectDialog::getText(), mDialog, mSkillId, skillHandler, and Net::SkillHandler::useMap().

◆ setDialog()

void SkillWarpListener::setDialog ( TextSelectDialog *const  dialog)
inline

Definition at line 40 of file skillwarplistener.h.

41  { mDialog = dialog; }

References mDialog.

Referenced by EAthena::SkillRecv::processSkillWarpPoint(), and EAthena::SkillRecv::processSkillWarpPoint2().

◆ setSkill()

void SkillWarpListener::setSkill ( const int  skillId)
inline

Definition at line 43 of file skillwarplistener.h.

44  { mSkillId = skillId; }

References mSkillId.

Referenced by EAthena::SkillRecv::processSkillWarpPoint(), and EAthena::SkillRecv::processSkillWarpPoint2().

Field Documentation

◆ mDialog

TextSelectDialog* SkillWarpListener::mDialog
protected

Definition at line 47 of file skillwarplistener.h.

Referenced by action(), and setDialog().

◆ mSkillId

int SkillWarpListener::mSkillId
protected

Definition at line 48 of file skillwarplistener.h.

Referenced by action(), and setSkill().


The documentation for this class was generated from the following files: