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

What we keep of a player from one session to the next. More...

#include <players.h>

Public Member Functions

bool operator== (const Progress &) const =default

Public Attributes

float x = 0.0f
float z = 0.0f
uint32_t experience = 0
int health = 0
int land = 0
uint32_t weapon = 0
std::set< uint32_t > skills
uint32_t items_revision = 0
std::map< uint32_t, uint32_t > quests
std::set< uint32_t > quests_done
uint32_t quests_revision = 0
uint32_t faction = 0

Detailed Description

What we keep of a player from one session to the next.

Definition at line 23 of file players.h.

Member Function Documentation

◆ operator==()

bool nanommo::Progress::operator== ( const Progress & ) const
default

Member Data Documentation

◆ experience

uint32_t nanommo::Progress::experience = 0

Definition at line 26 of file players.h.

◆ faction

uint32_t nanommo::Progress::faction = 0

The faction they've sworn to, by its id, or 0 for none. They swear to it in the world, which saves it with the rest of them, as it does what they learn, through Redis.

Definition at line 47 of file players.h.

◆ health

int nanommo::Progress::health = 0

Definition at line 27 of file players.h.

◆ items_revision

uint32_t nanommo::Progress::items_revision = 0

Their bag's revision, which goes up with each change to it, so that telling whether it needs saving takes a number, not the bag.

Definition at line 35 of file players.h.

◆ land

int nanommo::Progress::land = 0

Definition at line 28 of file players.h.

◆ quests

std::map<uint32_t, uint32_t> nanommo::Progress::quests

The quests they're on, with how many they've killed for each, and the ones they've done, by their ids.

Definition at line 38 of file players.h.

◆ quests_done

std::set<uint32_t> nanommo::Progress::quests_done

Definition at line 39 of file players.h.

◆ quests_revision

uint32_t nanommo::Progress::quests_revision = 0

Their quests' revision, which goes up with each change to them. Saved with them, it tells a player who's given up all they were on from a hash from before there were quests, which leaves MySQL's.

Definition at line 43 of file players.h.

◆ skills

std::set<uint32_t> nanommo::Progress::skills

Definition at line 32 of file players.h.

◆ weapon

uint32_t nanommo::Progress::weapon = 0

What's in their main hand, which servers from before bags read, and the website might.

Definition at line 31 of file players.h.

◆ x

float nanommo::Progress::x = 0.0f

Definition at line 24 of file players.h.

◆ z

float nanommo::Progress::z = 0.0f

Definition at line 25 of file players.h.


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