nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::TrainerWindow Class Reference

#include <trainer_window.h>

Public Member Functions

 TrainerWindow (SkillTable skills)
void Open (uint32_t npc, std::string name, std::vector< uint32_t > teaches)
bool open () const
void Close ()
std::optional< protocol::Learn > Build (const std::vector< Figure > &figures, const protocol::World &world)

Detailed Description

A window with the skills a trainer teaches, which opens when the player clicks the trainer.

Definition at line 18 of file trainer_window.h.

Constructor & Destructor Documentation

◆ TrainerWindow()

nanommo::TrainerWindow::TrainerWindow ( SkillTable skills)
inlineexplicit

Definition at line 20 of file trainer_window.h.

Member Function Documentation

◆ Build()

std::optional< protocol::Learn > nanommo::TrainerWindow::Build ( const std::vector< Figure > & figures,
const protocol::World & world )

Draws the window, while it's open: each skill, with a button to learn it, once the player has reached its level. Returns the skill the player asks for.

Definition at line 35 of file trainer_window.cc.

◆ Close()

void nanommo::TrainerWindow::Close ( )
inline

Definition at line 25 of file trainer_window.h.

◆ Open()

void nanommo::TrainerWindow::Open ( uint32_t npc,
std::string name,
std::vector< uint32_t > teaches )

Definition at line 28 of file trainer_window.cc.

◆ open()

bool nanommo::TrainerWindow::open ( ) const
inline

Definition at line 24 of file trainer_window.h.


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