Planeshift
Public Types | Public Member Functions

psSkillCacheItem Class Reference

psSkillCacheItem item is one stat or skill in the skill cache. More...

#include <skillcache.h>

List of all members.

Public Types

enum  Oper { UPDATE_OR_ADD, REMOVE }
 

Operations with this skill item:

More...

Public Member Functions

unsigned short getActualStat () const
unsigned short getCategory () const
unsigned short getKnowledge () const
unsigned short getKnowledgeCost () const
unsigned int getNameId () const
unsigned short getPractice () const
unsigned short getPracticeCost () const
unsigned short getRank () const
int getSkillId () const
bool isModified () const
bool isRemoved () const
bool isStat () const
 psSkillCacheItem (psSkillCacheItem *item)
 Constructs the cache item using values from another cache item.
 psSkillCacheItem (unsigned int nameId)
 Constructs an empty cache item where nameId and skillId are both set to the nameId value.
 psSkillCacheItem (int skillId, unsigned int nameId, unsigned short R, unsigned short AS, unsigned short Y, unsigned short YC, unsigned short Z, unsigned short ZC, unsigned short CAT, bool stat=false)
 Constructs the cache item with the given values.
void read (MsgEntry *)
 Reads the cache item from the message entry and sets the modified state to true.
void setModified (bool modified)
void setRemoved (bool value)
unsigned short size () const
 Calculates the number of bytes needed for the message entry.
void update (psSkillCacheItem *item)
 Updates the cache item with values form another cache item.
void update (unsigned short R, unsigned short AS, unsigned short Y, unsigned short YC, unsigned short Z, unsigned short ZC)
 The update() function updates the cache item and sets the modified state if needed.
void write (MsgEntry *)
 Writes the cache item to the message entry and changes the modified state to false.
 ~psSkillCacheItem ()

Detailed Description

psSkillCacheItem item is one stat or skill in the skill cache.

Definition at line 37 of file skillcache.h.


Member Enumeration Documentation

Operations with this skill item:

Enumerator:
UPDATE_OR_ADD 

The item is updated or added.

REMOVE 

The item should be removed from the list.

Definition at line 44 of file skillcache.h.


Constructor & Destructor Documentation

psSkillCacheItem::psSkillCacheItem ( psSkillCacheItem item)

Constructs the cache item using values from another cache item.

psSkillCacheItem::psSkillCacheItem ( unsigned int  nameId)

Constructs an empty cache item where nameId and skillId are both set to the nameId value.

This constructor is used on the client side and is followed be the read() function that reads the rest of values from the message entry.

psSkillCacheItem::psSkillCacheItem ( int  skillId,
unsigned int  nameId,
unsigned short  R,
unsigned short  AS,
unsigned short  Y,
unsigned short  YC,
unsigned short  Z,
unsigned short  ZC,
unsigned short  CAT,
bool  stat = false 
)

Constructs the cache item with the given values.

This constructor is used on the server side.

psSkillCacheItem::~psSkillCacheItem ( )

Member Function Documentation

unsigned short psSkillCacheItem::getActualStat ( ) const [inline]

Definition at line 124 of file skillcache.h.

unsigned short psSkillCacheItem::getCategory ( ) const [inline]

Definition at line 122 of file skillcache.h.

unsigned short psSkillCacheItem::getKnowledge ( ) const [inline]

Definition at line 125 of file skillcache.h.

unsigned short psSkillCacheItem::getKnowledgeCost ( ) const [inline]

Definition at line 126 of file skillcache.h.

unsigned int psSkillCacheItem::getNameId ( ) const [inline]

Definition at line 121 of file skillcache.h.

unsigned short psSkillCacheItem::getPractice ( ) const [inline]

Definition at line 127 of file skillcache.h.

unsigned short psSkillCacheItem::getPracticeCost ( ) const [inline]

Definition at line 128 of file skillcache.h.

unsigned short psSkillCacheItem::getRank ( ) const [inline]

Definition at line 123 of file skillcache.h.

int psSkillCacheItem::getSkillId ( ) const [inline]

Definition at line 120 of file skillcache.h.

bool psSkillCacheItem::isModified ( ) const [inline]

Definition at line 114 of file skillcache.h.

bool psSkillCacheItem::isRemoved ( ) const [inline]

Definition at line 116 of file skillcache.h.

bool psSkillCacheItem::isStat ( ) const [inline]

Definition at line 119 of file skillcache.h.

void psSkillCacheItem::read ( MsgEntry )

Reads the cache item from the message entry and sets the modified state to true.

void psSkillCacheItem::setModified ( bool  modified) [inline]

Definition at line 115 of file skillcache.h.

void psSkillCacheItem::setRemoved ( bool  value) [inline]

Definition at line 117 of file skillcache.h.

unsigned short psSkillCacheItem::size ( ) const

Calculates the number of bytes needed for the message entry.

void psSkillCacheItem::update ( psSkillCacheItem item)

Updates the cache item with values form another cache item.

void psSkillCacheItem::update ( unsigned short  R,
unsigned short  AS,
unsigned short  Y,
unsigned short  YC,
unsigned short  Z,
unsigned short  ZC 
)

The update() function updates the cache item and sets the modified state if needed.

void psSkillCacheItem::write ( MsgEntry )

Writes the cache item to the message entry and changes the modified state to false.


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