My Project
 
Loading...
Searching...
No Matches
Ring Class Reference

#include <ring.h>

Inheritance diagram for Ring:
Collaboration diagram for Ring:

Classes

class  RingBuff
 

Public Member Functions

 Ring ()
 
void syncGem ()
 
virtual void actions (Hero *hero, std::vector< std::string > &actions)
 
virtual bool doEquip (Hero *hero)
 
void activate (Char *ch)
 
virtual bool doUnequip (Hero *hero, bool collect, bool single)
 
virtual bool isEquipped (Hero *hero)
 
virtual int effectiveLevel ()
 
virtual void getBroken ()
 
virtual void fix ()
 
virtual int maxDurability (int lvl)
 
virtual bool isKnown ()
 
virtual std::string toString ()
 
virtual std::string Name ()
 
virtual std::string desc ()
 
virtual std::string info ()
 
virtual bool isIdentified ()
 
virtual Itemidentify ()
 
virtual Itemrandom ()
 
virtual int price ()
 
virtual void storeInBundle (Bundle *bundle)
 
virtual void restoreFromBundle (Bundle *bundle)
 
virtual std::string getClassName ()
 
- Public Member Functions inherited from EquipableItem
virtual void execute (Hero *hero, std::string action)
 
virtual void doDrop (Hero *hero)
 
virtual void cast (Hero *user, int dst)
 
virtual bool doUnequip (Hero *hero, bool collect)
 
- Public Member Functions inherited from Item
 CLASSNAME (Item)
 
 CLASSOBJECT (Item)
 
 Item ()
 
virtual bool doPickUp (Hero *hero)
 
virtual void doThrow (Hero *hero)
 
std::string trueName ()
 
int Image ()
 
Itemdetach (Bag *container)
 
ItemdetachAll (Bag *container)
 
virtual ItemSprite::Glowingglowing ()
 
virtual bool isUpgradable ()
 
int Quantity ()
 
void Quantity (int value)
 
bool isBroken ()
 
int maxDurability ()
 
int visiblyUpgraded ()
 
virtual void Level (int value)
 
int Level ()
 
virtual boolean collect (Bag *container)
 
void use ()
 
void updateQuickslot ()
 
virtual Itemupgrade ()
 
virtual Itemdegrade ()
 
Itemdegrade (int n)
 
int considerState (int price)
 
void polish ()
 
std::string status ()
 
- Public Member Functions inherited from Object
virtual std::string getObject ()=0
 

Static Public Member Functions

static void initGems ()
 
static void save (Bundle *bundle)
 
static void restore (Bundle *bundle)
 
static bool allKnown ()
 
- Static Public Member Functions inherited from Item
static void evoke (Hero *hero)
 
static ItemVirtual (const std::string &cl)
 

Protected Member Functions

void setKnown ()
 
virtual RingBuffBuff ()
 
- Protected Member Functions inherited from EquipableItem
virtual float time2equip (Hero *hero)
 
- Protected Member Functions inherited from Item
virtual void onThrow (int cell)
 
virtual void onDetach ()
 

Protected Attributes

Buffbuff
 

Additional Inherited Members

- Public Attributes inherited from Item
std::string defaultAction
 
std::string name = "smth"
 
int image = 0
 
bool stackable = false
 
bool levelKnown = false
 
bool cursed
 
bool cursedKnown
 
bool unique = false
 
int quantity
 
- Static Public Attributes inherited from EquipableItem
static const std::string AC_EQUIP = "EQUIP"
 
static const std::string AC_UNEQUIP = "UNEQUIP"
 
- Static Public Attributes inherited from Item
static HerocurUser
 
static ItemcurItem
 
- Static Protected Member Functions inherited from EquipableItem
static void equipCursed (Hero *hero)
 
- Static Protected Attributes inherited from Item
static const float TIME_TO_THROW = 1.0f
 
static const float TIME_TO_PICK_UP = 1.0f
 
static const float TIME_TO_DROP = 0.5f
 
static const std::string AC_DROP = "lang.item_drop"
 
static const std::string AC_THROW = "lang.item_throw"
 
static CellSelector::Listenerthrower = new CellSelectorListenerNew()
 

Constructor & Destructor Documentation

◆ Ring()

Ring::Ring ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ actions()

void Ring::actions ( Hero * hero,
std::vector< std::string > & actions )
virtual

Reimplemented from Item.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ activate()

void Ring::activate ( Char * ch)

◆ allKnown()

bool Ring::allKnown ( )
static

◆ Buff()

◆ desc()

std::string Ring::desc ( )
virtual

Reimplemented from Item.

Reimplemented in RingOfAccuracy, RingOfElements, RingOfEvasion, RingOfHaggler, RingOfHaste, RingOfHerbalism, RingOfMending, RingOfPower, RingOfSatiety, RingOfShadows, and RingOfThorns.

Here is the caller graph for this function:

◆ doEquip()

bool Ring::doEquip ( Hero * hero)
virtual

Implements EquipableItem.

Reimplemented in RingOfDetection.

Here is the caller graph for this function:

◆ doUnequip()

bool Ring::doUnequip ( Hero * hero,
bool collect,
bool single )
virtual

Reimplemented from EquipableItem.

Here is the call graph for this function:

◆ effectiveLevel()

int Ring::effectiveLevel ( )
virtual

Reimplemented from Item.

◆ fix()

void Ring::fix ( )
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ getBroken()

void Ring::getBroken ( )
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ getClassName()

◆ identify()

Item * Ring::identify ( )
virtual

Reimplemented from Item.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ info()

std::string Ring::info ( )
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ initGems()

void Ring::initGems ( )
static

◆ isEquipped()

bool Ring::isEquipped ( Hero * hero)
virtual

Reimplemented from Item.

◆ isIdentified()

bool Ring::isIdentified ( )
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ isKnown()

bool Ring::isKnown ( )
virtual
Here is the caller graph for this function:

◆ maxDurability()

int Ring::maxDurability ( int lvl)
virtual

Reimplemented from Item.

◆ Name()

std::string Ring::Name ( )
virtual

Reimplemented from Item.

◆ price()

int Ring::price ( )
virtual

Reimplemented from Item.

◆ random()

Item * Ring::random ( )
virtual

Reimplemented from Item.

Reimplemented in RingOfHaggler, and RingOfThorns.

Here is the call graph for this function:

◆ restore()

void Ring::restore ( Bundle * bundle)
static

◆ restoreFromBundle()

void Ring::restoreFromBundle ( Bundle * bundle)
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ save()

void Ring::save ( Bundle * bundle)
static

◆ setKnown()

void Ring::setKnown ( )
protected

◆ storeInBundle()

void Ring::storeInBundle ( Bundle * bundle)
virtual

Reimplemented from Item.

Here is the call graph for this function:

◆ syncGem()

void Ring::syncGem ( )
Here is the caller graph for this function:

◆ toString()

std::string Ring::toString ( )
virtual

Reimplemented from Item.

Member Data Documentation

◆ buff

Buff* Ring::buff
protected

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