Mana
|
#include <map>
Go to the source code of this file.
Classes | |
struct | Stat |
Stat information storage structure. More... | |
struct | PlayerInfoBackend |
Backend for core player information. More... | |
struct | Ability |
Ability information storage structure. More... | |
Namespaces | |
namespace | PlayerInfo |
A database like namespace which holds global info about the localplayer. | |
Enumerations | |
enum | Attribute { LEVEL , HP , MAX_HP , MP , MAX_MP , EXP , EXP_NEEDED , MONEY , TOTAL_WEIGHT , MAX_WEIGHT , SKILL_POINTS , CHAR_POINTS , CORR_POINTS } |
Standard attributes for players. More... | |
enum | BuySellState { BUYSELL_NONE , BUYSELL_CHOOSING , BUYSELL_BUYING , BUYSELL_SELLING } |
Functions | |
int | PlayerInfo::getAttribute (int id) |
Returns the value of the given attribute. | |
void | PlayerInfo::setAttribute (int id, int value, bool notify=true) |
Changes the value of the given attribute. | |
int | PlayerInfo::getStatBase (int id) |
Returns the base value of the given stat. | |
void | PlayerInfo::setStatBase (int id, int value, bool notify=true) |
Changes the base value of the given stat. | |
int | PlayerInfo::getStatMod (int id) |
Returns the modifier for the given stat. | |
void | PlayerInfo::setStatMod (int id, int value, bool notify=true) |
Changes the modifier for the given stat. | |
int | PlayerInfo::getStatEffective (int id) |
Returns the current effective value of the given stat. | |
void | PlayerInfo::setStatLevel (int id, int value, bool notify=true) |
Changes the level of the given stat. | |
std::pair< int, int > | PlayerInfo::getStatExperience (int id) |
Returns the experience of the given stat. | |
void | PlayerInfo::setStatExperience (int id, int have, int need, bool notify=true) |
Changes the experience of the given stat. | |
Inventory * | PlayerInfo::getInventory () |
Returns the player's inventory. | |
void | PlayerInfo::clearInventory () |
Clears the player's inventory and equipment. | |
void | PlayerInfo::setInventoryItem (int index, int id, int amount) |
Changes the inventory item at the given slot. | |
Equipment * | PlayerInfo::getEquipment () |
Returns the player's equipment. | |
Item * | PlayerInfo::getEquipment (unsigned int slot) |
Returns the player's equipment at the given slot. | |
int | PlayerInfo::getStorageCount () |
Returns the number of currently open storage windows. | |
void | PlayerInfo::setStorageCount (int count) |
Sets the number of currently open storage windows. | |
int | PlayerInfo::getNPCInteractionCount () |
Returns the number of currently open NPC interaction windows. | |
void | PlayerInfo::setNPCInteractionCount (int count) |
Sets the number of currently open NPC interaction windows. | |
int | PlayerInfo::getNPCPostCount () |
Returns the number of currently open NPC post windows. | |
void | PlayerInfo::setNPCPostCount (int count) |
Sets the number of currently open NPC post windows. | |
BuySellState | PlayerInfo::getBuySellState () |
Returns the current buy, sell, or related interaction the player is involved in. | |
void | PlayerInfo::setBuySellState (BuySellState buySellState) |
Sets which buy, sell, or related interaction the player is currently involved in. | |
void | PlayerInfo::clearAbilityStatus (int id) |
Removes the status for the given ability. | |
void | PlayerInfo::setAbilityStatus (int id, int current, int max, int recharge) |
Changes the status of the given ability. | |
const std::map< int, Ability > & | PlayerInfo::getAbilityStatus () |
Returns the status all abilities. | |
void | PlayerInfo::setBackend (const PlayerInfoBackend &backend) |
Changes the internal PlayerInfoBackend reference;. | |
bool | PlayerInfo::isTalking () |
Returns true if the player is involved in a NPC interaction, false otherwise. | |
void | PlayerInfo::logic () |
Does necessary updates every tick. | |
void | PlayerInfo::init () |
Initializes some internals. | |
enum Attribute |
Standard attributes for players.
Enumerator | |
---|---|
LEVEL | |
HP | |
MAX_HP | |
MP | |
MAX_MP | |
EXP | |
EXP_NEEDED | |
MONEY | |
TOTAL_WEIGHT | |
MAX_WEIGHT | |
SKILL_POINTS | |
CHAR_POINTS | |
CORR_POINTS |
Definition at line 28 of file playerinfo.h.
enum BuySellState |
Enumerator | |
---|---|
BUYSELL_NONE | |
BUYSELL_CHOOSING | |
BUYSELL_BUYING | |
BUYSELL_SELLING |
Definition at line 64 of file playerinfo.h.