Mana
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
playerinfo.cpp File Reference
#include "playerinfo.h"
#include "client.h"
#include "equipment.h"
#include "event.h"
#include "inventory.h"
#include "eventlistener.h"
#include "log.h"
#include "net/inventoryhandler.h"
#include "net/net.h"
#include "utils/time.h"

Go to the source code of this file.

Classes

class  PlayerInfo::PlayerLogic
 

Namespaces

namespace  PlayerInfo
 A database like namespace which holds global info about the localplayer.
 

Functions

void PlayerInfo::triggerAttr (int id, int old)
 
void PlayerInfo::triggerStat (int id, const std::string &changed, int old1, int old2=0)
 
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.
 
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.
 
InventoryPlayerInfo::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.
 
EquipmentPlayerInfo::getEquipment ()
 Returns the player's equipment.
 
ItemPlayerInfo::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.