Planeshift
Classes | Defines | Typedefs | Enumerations | Functions

psitemstats.h File Reference

#include <csutil/parray.h>
#include <csutil/set.h>
#include "util/poolallocator.h"
#include "util/slots.h"
#include "util/psxmlparser.h"
#include "util/scriptvar.h"
#include "util/psconst.h"
#include "rpgrules/psmoney.h"
#include <idal.h>
#include "psskills.h"

Go to the source code of this file.

Classes

struct  ItemRequirement
 This is a struct used by item stats to say that a person must have a certain level at a certain skill to use the weapon effectively. More...
class  psItemAmmoStats
 This little class holds info about Ammunition for Ranged Weapons. More...
struct  psItemAnimation
 Each weapon specifies what anims can be used with it. More...
class  psItemArmorStats
 This class stores an items various armour related information. More...
class  psItemCreativeStats
 This class holds info about Creative items such as books, etc. More...
class  psItemStats
 This huge class stores all the properties of any object a player can have in the game. More...
class  psItemWeaponStats
 This class holds the various cached database information relating to the weapon skills of a an item_stat. More...
struct  psWeaponType
struct  st_attribute_bonus

Defines

#define CREATIVEDEF_MAX   65535
#define PSITEMSTATS_FLAG_AVERAGEQUALITY   0x00080000
 Flag if the item can stack and average out quality.
#define PSITEMSTATS_FLAG_BUY_PERSONALISE   0x00200000
 duplicate & personalise at purchase
#define PSITEMSTATS_FLAG_CAN_TRANSFORM   0x00000100
#define PSITEMSTATS_FLAG_CIRCLE   0x00001000
#define PSITEMSTATS_FLAG_CONSUMABLE   0x00002000
#define PSITEMSTATS_FLAG_CREATIVE   0x00100000
 A creative thing, eg book, sketch.
#define PSITEMSTATS_FLAG_HEXA   0x00000400
#define PSITEMSTATS_FLAG_IS_A_CONTAINER   0x00000010
#define PSITEMSTATS_FLAG_IS_A_MELEE_WEAPON   0x00000001
#define PSITEMSTATS_FLAG_IS_A_RANGED_WEAPON   0x00000002
#define PSITEMSTATS_FLAG_IS_A_SHIELD   0x00000004
#define PSITEMSTATS_FLAG_IS_A_TRAP   0x00800000
#define PSITEMSTATS_FLAG_IS_AMMO   0x00000008
#define PSITEMSTATS_FLAG_IS_ARMOR   0x00008000
#define PSITEMSTATS_FLAG_IS_CONSTRUCTIBLE   0x01000000
#define PSITEMSTATS_FLAG_IS_EQUIP_STACKABLE   0x00010000
#define PSITEMSTATS_FLAG_IS_GLYPH   0x00000080
#define PSITEMSTATS_FLAG_IS_READABLE   0x00004000
#define PSITEMSTATS_FLAG_IS_RECHARGEABLE   0x00400000
#define PSITEMSTATS_FLAG_IS_RENAMEABLE   0x02000000
#define PSITEMSTATS_FLAG_IS_STACKABLE   0x00000040
#define PSITEMSTATS_FLAG_IS_WRITEABLE   0x00020000
#define PSITEMSTATS_FLAG_NOPICKUP   0x00040000
#define PSITEMSTATS_FLAG_OCTA   0x00000800
#define PSITEMSTATS_FLAG_TRIA   0x00000200
#define PSITEMSTATS_FLAG_USES_AMMO   0x00000020
#define PSITEMSTATS_SLOT_ARMS   0x00000200
#define PSITEMSTATS_SLOT_AZURE   0x00080000
#define PSITEMSTATS_SLOT_BACK   0x00000100
#define PSITEMSTATS_SLOT_BANK   0x00020000
#define PSITEMSTATS_SLOT_BELT   0x00002000
#define PSITEMSTATS_SLOT_BLUE   0x00800000
#define PSITEMSTATS_SLOT_BOOTS   0x00000800
#define PSITEMSTATS_SLOT_BOTHHANDS   0x00000008
#define PSITEMSTATS_SLOT_BRACERS   0x00004000
#define PSITEMSTATS_SLOT_BROWN   0x00400000
#define PSITEMSTATS_SLOT_BULK   0x00000001
#define PSITEMSTATS_SLOT_CRYSTAL   0x00040000
#define PSITEMSTATS_SLOT_DARK   0x00200000
#define PSITEMSTATS_SLOT_GLOVES   0x00000400
#define PSITEMSTATS_SLOT_HELM   0x00000040
#define PSITEMSTATS_SLOT_LEFTFINGER   0x00000020
#define PSITEMSTATS_SLOT_LEFTHAND   0x00000004
#define PSITEMSTATS_SLOT_LEGS   0x00001000
#define PSITEMSTATS_SLOT_MIND   0x00010000
#define PSITEMSTATS_SLOT_NECK   0x00000080
#define PSITEMSTATS_SLOT_RED   0x00100000
#define PSITEMSTATS_SLOT_RIGHTFINGER   0x00000010
#define PSITEMSTATS_SLOT_RIGHTHAND   0x00000002
#define PSITEMSTATS_SLOT_TORSO   0x00008000
#define PSITEMSTATS_STAT_BONUS_COUNT   3

Typedefs

typedef unsigned int PSITEMSTATS_FLAGS
typedef unsigned int PSITEMSTATS_SLOTLIST

Enumerations

enum  PSITEMSTATS_AMMOTYPE {
  PSITEMSTATS_AMMOTYPE_NONE = -1, PSITEMSTATS_AMMOTYPE_ARROWS, PSITEMSTATS_AMMOTYPE_BOLTS, PSITEMSTATS_AMMOTYPE_ROCKS,
  PSITEMSTATS_AMMOTYPE_COUNT
}
enum  PSITEMSTATS_ARMORTYPE {
  PSITEMSTATS_ARMORTYPE_NONE = -1, PSITEMSTATS_ARMORTYPE_LIGHT, PSITEMSTATS_ARMORTYPE_MEDIUM, PSITEMSTATS_ARMORTYPE_HEAVY,
  PSITEMSTATS_ARMORTYPE_COUNT
}
enum  PSITEMSTATS_CREATIVETYPE { PSITEMSTATS_CREATIVETYPE_NONE = -1, PSITEMSTATS_CREATIVETYPE_LITERATURE, PSITEMSTATS_CREATIVETYPE_SKETCH, PSITEMSTATS_CREATIVETYPE_MUSIC }
enum  PSITEMSTATS_CREATORSTATUS { PSITEMSTATS_CREATOR_VALID = 0, PSITEMSTATS_CREATOR_PUBLIC, PSITEMSTATS_CREATOR_UNASSIGNED, PSITEMSTATS_CREATOR_UNKNOWN }
enum  PSITEMSTATS_DAMAGETYPE {
  PSITEMSTATS_DAMAGETYPE_NONE = -1, PSITEMSTATS_DAMAGETYPE_SLASH, PSITEMSTATS_DAMAGETYPE_BLUNT, PSITEMSTATS_DAMAGETYPE_PIERCE,
  PSITEMSTATS_DAMAGETYPE_COUNT
}
enum  PSITEMSTATS_STAT {
  PSITEMSTATS_STAT_NONE = -1, PSITEMSTATS_STAT_STRENGTH, PSITEMSTATS_STAT_AGILITY, PSITEMSTATS_STAT_ENDURANCE,
  PSITEMSTATS_STAT_INTELLIGENCE, PSITEMSTATS_STAT_WILL, PSITEMSTATS_STAT_CHARISMA, PSITEMSTATS_STAT_CONSTITUTION,
  PSITEMSTATS_STAT_STAMINA, PSITEMSTATS_STAT_COUNT
}
enum  PSITEMSTATS_WEAPONSKILL_INDEX { PSITEMSTATS_WEAPONSKILL_INDEX_0 = 0, PSITEMSTATS_WEAPONSKILL_INDEX_1, PSITEMSTATS_WEAPONSKILL_INDEX_2, PSITEMSTATS_WEAPONSKILL_INDEX_COUNT }

Functions

PSSKILL statToSkill (PSITEMSTATS_STAT stat)
 Convenience function to convert between STAT and SKILL.

Define Documentation

#define CREATIVEDEF_MAX   65535

Definition at line 188 of file psitemstats.h.

#define PSITEMSTATS_FLAG_AVERAGEQUALITY   0x00080000

Flag if the item can stack and average out quality.

Definition at line 180 of file psitemstats.h.

#define PSITEMSTATS_FLAG_BUY_PERSONALISE   0x00200000

duplicate & personalise at purchase

Definition at line 182 of file psitemstats.h.

#define PSITEMSTATS_FLAG_CAN_TRANSFORM   0x00000100

Definition at line 169 of file psitemstats.h.

#define PSITEMSTATS_FLAG_CIRCLE   0x00001000

Definition at line 173 of file psitemstats.h.

#define PSITEMSTATS_FLAG_CONSUMABLE   0x00002000

Definition at line 174 of file psitemstats.h.

#define PSITEMSTATS_FLAG_CREATIVE   0x00100000

A creative thing, eg book, sketch.

Definition at line 181 of file psitemstats.h.

#define PSITEMSTATS_FLAG_HEXA   0x00000400

Definition at line 171 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_A_CONTAINER   0x00000010

Definition at line 165 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_A_MELEE_WEAPON   0x00000001

Definition at line 161 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_A_RANGED_WEAPON   0x00000002

Definition at line 162 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_A_SHIELD   0x00000004

Definition at line 163 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_A_TRAP   0x00800000

Definition at line 184 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_AMMO   0x00000008

Definition at line 164 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_ARMOR   0x00008000

Definition at line 176 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_CONSTRUCTIBLE   0x01000000

Definition at line 185 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_EQUIP_STACKABLE   0x00010000

Definition at line 177 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_GLYPH   0x00000080

Definition at line 168 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_READABLE   0x00004000

Definition at line 175 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_RECHARGEABLE   0x00400000

Definition at line 183 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_RENAMEABLE   0x02000000

Definition at line 186 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_STACKABLE   0x00000040

Definition at line 167 of file psitemstats.h.

#define PSITEMSTATS_FLAG_IS_WRITEABLE   0x00020000

Definition at line 178 of file psitemstats.h.

#define PSITEMSTATS_FLAG_NOPICKUP   0x00040000

Definition at line 179 of file psitemstats.h.

#define PSITEMSTATS_FLAG_OCTA   0x00000800

Definition at line 172 of file psitemstats.h.

#define PSITEMSTATS_FLAG_TRIA   0x00000200

Definition at line 170 of file psitemstats.h.

#define PSITEMSTATS_FLAG_USES_AMMO   0x00000020

Definition at line 166 of file psitemstats.h.

#define PSITEMSTATS_SLOT_ARMS   0x00000200

Definition at line 143 of file psitemstats.h.

#define PSITEMSTATS_SLOT_AZURE   0x00080000

Definition at line 153 of file psitemstats.h.

#define PSITEMSTATS_SLOT_BACK   0x00000100

Definition at line 142 of file psitemstats.h.

#define PSITEMSTATS_SLOT_BANK   0x00020000

Definition at line 151 of file psitemstats.h.

#define PSITEMSTATS_SLOT_BELT   0x00002000

Definition at line 147 of file psitemstats.h.

#define PSITEMSTATS_SLOT_BLUE   0x00800000

Definition at line 157 of file psitemstats.h.

#define PSITEMSTATS_SLOT_BOOTS   0x00000800

Definition at line 145 of file psitemstats.h.

#define PSITEMSTATS_SLOT_BOTHHANDS   0x00000008

Definition at line 137 of file psitemstats.h.

#define PSITEMSTATS_SLOT_BRACERS   0x00004000

Definition at line 148 of file psitemstats.h.

#define PSITEMSTATS_SLOT_BROWN   0x00400000

Definition at line 156 of file psitemstats.h.

#define PSITEMSTATS_SLOT_BULK   0x00000001

Definition at line 134 of file psitemstats.h.

#define PSITEMSTATS_SLOT_CRYSTAL   0x00040000

Definition at line 152 of file psitemstats.h.

#define PSITEMSTATS_SLOT_DARK   0x00200000

Definition at line 155 of file psitemstats.h.

#define PSITEMSTATS_SLOT_GLOVES   0x00000400

Definition at line 144 of file psitemstats.h.

#define PSITEMSTATS_SLOT_HELM   0x00000040

Definition at line 140 of file psitemstats.h.

#define PSITEMSTATS_SLOT_LEFTFINGER   0x00000020

Definition at line 139 of file psitemstats.h.

#define PSITEMSTATS_SLOT_LEFTHAND   0x00000004

Definition at line 136 of file psitemstats.h.

#define PSITEMSTATS_SLOT_LEGS   0x00001000

Definition at line 146 of file psitemstats.h.

#define PSITEMSTATS_SLOT_MIND   0x00010000

Definition at line 150 of file psitemstats.h.

#define PSITEMSTATS_SLOT_NECK   0x00000080

Definition at line 141 of file psitemstats.h.

#define PSITEMSTATS_SLOT_RED   0x00100000

Definition at line 154 of file psitemstats.h.

#define PSITEMSTATS_SLOT_RIGHTFINGER   0x00000010

Definition at line 138 of file psitemstats.h.

#define PSITEMSTATS_SLOT_RIGHTHAND   0x00000002

Definition at line 135 of file psitemstats.h.

#define PSITEMSTATS_SLOT_TORSO   0x00008000

Definition at line 149 of file psitemstats.h.

#define PSITEMSTATS_STAT_BONUS_COUNT   3

Definition at line 198 of file psitemstats.h.


Typedef Documentation

Definition at line 190 of file psitemstats.h.

Definition at line 159 of file psitemstats.h.


Enumeration Type Documentation

Enumerator:
PSITEMSTATS_AMMOTYPE_NONE 
PSITEMSTATS_AMMOTYPE_ARROWS 
PSITEMSTATS_AMMOTYPE_BOLTS 
PSITEMSTATS_AMMOTYPE_ROCKS 
PSITEMSTATS_AMMOTYPE_COUNT 

Definition at line 106 of file psitemstats.h.

Enumerator:
PSITEMSTATS_ARMORTYPE_NONE 
PSITEMSTATS_ARMORTYPE_LIGHT 
PSITEMSTATS_ARMORTYPE_MEDIUM 
PSITEMSTATS_ARMORTYPE_HEAVY 
PSITEMSTATS_ARMORTYPE_COUNT 

Definition at line 60 of file psitemstats.h.

Enumerator:
PSITEMSTATS_CREATIVETYPE_NONE 
PSITEMSTATS_CREATIVETYPE_LITERATURE 
PSITEMSTATS_CREATIVETYPE_SKETCH 
PSITEMSTATS_CREATIVETYPE_MUSIC 

Definition at line 115 of file psitemstats.h.

Enumerator:
PSITEMSTATS_CREATOR_VALID 
PSITEMSTATS_CREATOR_PUBLIC 
PSITEMSTATS_CREATOR_UNASSIGNED 
PSITEMSTATS_CREATOR_UNKNOWN 

Definition at line 123 of file psitemstats.h.

Enumerator:
PSITEMSTATS_DAMAGETYPE_NONE 
PSITEMSTATS_DAMAGETYPE_SLASH 
PSITEMSTATS_DAMAGETYPE_BLUNT 
PSITEMSTATS_DAMAGETYPE_PIERCE 
PSITEMSTATS_DAMAGETYPE_COUNT 

Definition at line 89 of file psitemstats.h.

Enumerator:
PSITEMSTATS_STAT_NONE 
PSITEMSTATS_STAT_STRENGTH 
PSITEMSTATS_STAT_AGILITY 
PSITEMSTATS_STAT_ENDURANCE 
PSITEMSTATS_STAT_INTELLIGENCE 
PSITEMSTATS_STAT_WILL 
PSITEMSTATS_STAT_CHARISMA 
PSITEMSTATS_STAT_CONSTITUTION 
PSITEMSTATS_STAT_STAMINA 
PSITEMSTATS_STAT_COUNT 

Definition at line 69 of file psitemstats.h.

Enumerator:
PSITEMSTATS_WEAPONSKILL_INDEX_0 
PSITEMSTATS_WEAPONSKILL_INDEX_1 
PSITEMSTATS_WEAPONSKILL_INDEX_2 
PSITEMSTATS_WEAPONSKILL_INDEX_COUNT 

Definition at line 52 of file psitemstats.h.


Function Documentation

PSSKILL statToSkill ( PSITEMSTATS_STAT  stat)

Convenience function to convert between STAT and SKILL.