ManaPlus
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
BeingInfo Class Reference

#include <beinginfo.h>

Public Member Functions

 BeingInfo ()
 
 ~BeingInfo ()
 
void setName (const std::string &name)
 
const std::string & getName () const
 
void setDisplay (const SpriteDisplay &display)
 
const SpriteDisplaygetDisplay () const
 
void setTargetCursorSize (const std::string &size)
 
void setTargetCursorSize (const TargetCursorSizeT &targetSize)
 
void setHoverCursor (const std::string &name)
 
void setHoverCursor (const CursorT &cursor)
 
CursorT getHoverCursor () const
 
TargetCursorSizeT getTargetCursorSize () const
 
void addSound (const ItemSoundEvent::Type event, const std::string &filename, const int delay)
 
const SoundInfogetSound (const ItemSoundEvent::Type event) const
 
void addAttack (const int id, const std::string &action, const std::string &skyAttack, const std::string &waterAttack, const std::string &rideAttack, const int effectId, const int hitEffectId, const int criticalHitEffectId, const int missEffectId, const std::string &missileParticle, const float missileZ, const float missileSpeed, const float missileDieDistance, const int missileLifeTime)
 
const AttackgetAttack (const int id) const
 
void setBlockWalkMask (const unsigned char mask)
 
unsigned char getBlockWalkMask () const
 
void setBlockType (const BlockTypeT &blockType)
 
BlockTypeT getBlockType () const
 
void setTargetOffsetX (const int n)
 
int getTargetOffsetX () const
 
void setTargetOffsetY (const int n)
 
int getTargetOffsetY () const
 
void setNameOffsetX (const int n)
 
int getNameOffsetX () const
 
void setNameOffsetY (const int n)
 
int getNameOffsetY () const
 
void setHpBarOffsetX (const int n)
 
int getHpBarOffsetX () const
 
void setHpBarOffsetY (const int n)
 
int getHpBarOffsetY () const
 
void setMaxHP (const int n)
 
int getMaxHP () const
 
bool isStaticMaxHP () const
 
void setStaticMaxHP (const bool n)
 
void setTargetSelection (const bool n)
 
bool isTargetSelection () const
 
int getSortOffsetY () const
 
void setSortOffsetY (const int n)
 
int getDeadSortOffsetY () const
 
void setDeadSortOffsetY (const int n)
 
BeingTypeId getAvatarId () const
 
void setAvatarId (const BeingTypeId id)
 
int getWidth () const
 
int getHeight () const
 
void setWidth (const int n)
 
void setHeight (const int n)
 
void setStartFollowDist (const int n)
 
int getStartFollowDist () const
 
void setFollowDist (const int n)
 
int getFollowDist () const
 
void setWalkSpeed (const int n)
 
int getWalkSpeed () const
 
void setWarpDist (const int n)
 
int getWarpDist () const
 
void setSitOffsetX (const int n)
 
int getSitOffsetX () const
 
void setSitOffsetY (const int n)
 
int getSitOffsetY () const
 
void setMoveOffsetX (const int n)
 
int getMoveOffsetX () const
 
void setMoveOffsetY (const int n)
 
int getMoveOffsetY () const
 
void setDeadOffsetX (const int n)
 
int getDeadOffsetX () const
 
void setDeadOffsetY (const int n)
 
int getDeadOffsetY () const
 
void setAttackOffsetX (const int n)
 
int getAttackOffsetX () const
 
void setAttackOffsetY (const int n)
 
int getAttackOffsetY () const
 
void setThinkTime (const int n)
 
int getThinkTime () const
 
void setDirectionType (const int n)
 
int getDirectionType () const
 
void setSitDirectionType (const int n)
 
int getSitDirectionType () const
 
void setDeadDirectionType (const int n)
 
int getDeadDirectionType () const
 
void setAttackDirectionType (const int n)
 
int getAttackDirectionType () const
 
void setAllowDelete (const bool b)
 
int getAllowDelete () const
 
void setAllowEquipment (const bool b)
 
bool getAllowEquipment () const
 
void setQuickActionEffectId (const int n)
 
int getQuickActionEffectId () const
 
void setColorsList (const std::string &name)
 
std::string getColor (const ItemColor idx) const
 
void addMenu (const std::string &name, const std::string &command)
 
const std::vector< BeingMenuItem > & getMenu () const A_CONST
 
void setString (const int idx, const std::string &value)
 
std::string getString (const int idx) const
 
std::string getCurrency () const
 
void setCurrency (const std::string &name)
 

Static Public Member Functions

static void init ()
 
static void clear ()
 

Static Public Attributes

static BeingInfounknown = 0
 
static Attackempty
 

Private Attributes

SpriteDisplay mDisplay
 
std::string mName
 
TargetCursorSizeT mTargetCursorSize
 
CursorT mHoverCursor
 
ItemSoundEvents mSounds
 
Attacks mAttacks
 
std::vector< BeingMenuItemmMenu
 
std::map< int, std::string > mStrings
 
std::string mCurrency
 
unsigned char mBlockWalkMask
 
BlockTypeT mBlockType
 
const std::map< ItemColor, ItemColorData > * mColors
 
int mTargetOffsetX
 
int mTargetOffsetY
 
int mNameOffsetX
 
int mNameOffsetY
 
int mHpBarOffsetX
 
int mHpBarOffsetY
 
int mMaxHP
 
int mSortOffsetY
 
int mDeadSortOffsetY
 
BeingTypeId mAvatarId
 
int mWidth
 
int mHeight
 
int mStartFollowDist
 
int mFollowDist
 
int mWarpDist
 
int mWalkSpeed
 
int mSitOffsetX
 
int mSitOffsetY
 
int mMoveOffsetX
 
int mMoveOffsetY
 
int mDeadOffsetX
 
int mDeadOffsetY
 
int mAttackOffsetX
 
int mAttackOffsetY
 
int mThinkTime
 
int mDirectionType
 
int mSitDirectionType
 
int mDeadDirectionType
 
int mAttackDirectionType
 
int mQuickActionEffectId
 
bool mStaticMaxHP
 
bool mTargetSelection
 
bool mAllowDelete
 
bool mAllowEquipment
 

Detailed Description

Holds information about a certain type of monster. This includes the name of the monster, the sprite to display and the sounds the monster makes.

See also
MonsterDB
NPCDB

Definition at line 52 of file beinginfo.h.

Constructor & Destructor Documentation

◆ BeingInfo()

BeingInfo::BeingInfo ( )

Definition at line 60 of file beinginfo.cpp.

60  :
61  mDisplay(),
62  // TRANSLATORS: being info default name
63  mName(_("unnamed")),
66  mSounds(),
67  mAttacks(),
68  mMenu(),
69  mStrings(),
70  mCurrency(),
76  mColors(nullptr),
77  mTargetOffsetX(0),
78  mTargetOffsetY(0),
79  mNameOffsetX(0),
80  mNameOffsetY(0),
81  mHpBarOffsetX(0),
82  mHpBarOffsetY(0),
83  mMaxHP(0),
84  mSortOffsetY(0),
85  mDeadSortOffsetY(31),
87  mWidth(0),
88  mHeight(0),
90  mFollowDist(1),
91  mWarpDist(11),
92  mWalkSpeed(0),
93  mSitOffsetX(0),
94  mSitOffsetY(0),
95  mMoveOffsetX(0),
96  mMoveOffsetY(0),
97  mDeadOffsetX(0),
98  mDeadOffsetY(0),
99  mAttackOffsetX(0),
100  mAttackOffsetY(0),
101  mThinkTime(50),
102  mDirectionType(1),
107  mStaticMaxHP(false),
108  mTargetSelection(true),
109  mAllowDelete(true),
110  mAllowEquipment(false)
111 {
112  SpriteDisplay display;
113  display.sprites.push_back(SpriteReference::Empty);
114 
115  setDisplay(display);
116 }

References SpriteReference::Empty, setDisplay(), and SpriteDisplay::sprites.

◆ ~BeingInfo()

BeingInfo::~BeingInfo ( )

Definition at line 118 of file beinginfo.cpp.

119 {
122  mSounds.clear();
124 }

References delete_all(), mAttacks, mDisplay, mSounds, and SpriteDisplay::sprites.

Member Function Documentation

◆ addAttack()

void BeingInfo::addAttack ( const int  id,
const std::string &  action,
const std::string &  skyAttack,
const std::string &  waterAttack,
const std::string &  rideAttack,
const int  effectId,
const int  hitEffectId,
const int  criticalHitEffectId,
const int  missEffectId,
const std::string &  missileParticle,
const float  missileZ,
const float  missileSpeed,
const float  missileDieDistance,
const int  missileLifeTime 
)

Definition at line 185 of file beinginfo.cpp.

199 {
200  delete mAttacks[id];
201  mAttacks[id] = new Attack(action,
202  skyAction,
203  waterAction,
204  rideAction,
205  effectId,
206  hitEffectId,
207  criticalHitEffectId,
208  missEffectId,
209  missileParticle,
210  missileZ,
211  missileSpeed,
212  missileDieDistance,
213  missileLifeTime);
214 }

References SkillType::Attack, and mAttacks.

Referenced by BeingCommon::readObjectNodes().

◆ addMenu()

void BeingInfo::addMenu ( const std::string &  name,
const std::string &  command 
)

Definition at line 253 of file beinginfo.cpp.

254 {
255  mMenu.push_back(BeingMenuItem(name, command));
256 }

References mMenu.

Referenced by NPCDB::loadXmlFile().

◆ addSound()

void BeingInfo::addSound ( const ItemSoundEvent::Type  event,
const std::string &  filename,
const int  delay 
)

Definition at line 153 of file beinginfo.cpp.

156 {
157  if (mSounds.find(event) == mSounds.end())
158  mSounds[event] = new SoundInfoVect;
159 
160  if (mSounds[event] != nullptr)
161  mSounds[event]->push_back(SoundInfo(filename, delay));
162 }

References mSounds.

Referenced by BeingCommon::readObjectNodes().

◆ clear()

void BeingInfo::clear ( )
static

Definition at line 216 of file beinginfo.cpp.

217 {
219  delete2(empty)
220 }

References delete2, empty, and unknown.

◆ getAllowDelete()

int BeingInfo::getAllowDelete ( ) const
inline

Definition at line 320 of file beinginfo.h.

321  { return static_cast<int>(mAllowDelete); }

References mAllowDelete.

◆ getAllowEquipment()

bool BeingInfo::getAllowEquipment ( ) const
inline

Definition at line 326 of file beinginfo.h.

327  { return mAllowEquipment; }

References mAllowEquipment.

◆ getAttack()

const Attack * BeingInfo::getAttack ( const int  id) const

Definition at line 179 of file beinginfo.cpp.

180 {
181  const Attacks::const_iterator i = mAttacks.find(id);
182  return (i == mAttacks.end()) ? empty : (*i).second;
183 }

References empty, and mAttacks.

◆ getAttackDirectionType()

int BeingInfo::getAttackDirectionType ( ) const
inline

Definition at line 314 of file beinginfo.h.

315  { return mAttackDirectionType; }

References mAttackDirectionType.

Referenced by Being::updateBotDirection().

◆ getAttackOffsetX()

int BeingInfo::getAttackOffsetX ( ) const
inline

Definition at line 278 of file beinginfo.h.

279  { return mAttackOffsetX; }

References mAttackOffsetX.

Referenced by Being::botFixOffset().

◆ getAttackOffsetY()

int BeingInfo::getAttackOffsetY ( ) const
inline

Definition at line 284 of file beinginfo.h.

285  { return mAttackOffsetY; }

References mAttackOffsetY.

Referenced by Being::botFixOffset().

◆ getAvatarId()

BeingTypeId BeingInfo::getAvatarId ( ) const
inline

Definition at line 197 of file beinginfo.h.

198  { return mAvatarId; }

References mAvatarId.

◆ getBlockType()

BlockTypeT BeingInfo::getBlockType ( ) const
inline

Definition at line 128 of file beinginfo.h.

129  { return mBlockType; }

References mBlockType.

Referenced by Being::getBlockType().

◆ getBlockWalkMask()

unsigned char BeingInfo::getBlockWalkMask ( ) const
inline

Gets the way the being is blocked by other objects

Definition at line 122 of file beinginfo.h.

123  { return mBlockWalkMask; }

References mBlockWalkMask.

Referenced by Being::getBlockWalkMask().

◆ getColor()

std::string BeingInfo::getColor ( const ItemColor  idx) const

Definition at line 241 of file beinginfo.cpp.

242 {
243  if (mColors == nullptr)
244  return std::string();
245 
246  const std::map <ItemColor, ItemColorData>::const_iterator
247  it = mColors->find(idx);
248  if (it == mColors->end())
249  return std::string();
250  return it->second.color;
251 }

References mColors.

◆ getCurrency()

std::string BeingInfo::getCurrency ( ) const
inline

Definition at line 349 of file beinginfo.h.

350  { return mCurrency; }

References mCurrency.

◆ getDeadDirectionType()

int BeingInfo::getDeadDirectionType ( ) const
inline

Definition at line 308 of file beinginfo.h.

309  { return mDeadDirectionType; }

References mDeadDirectionType.

Referenced by Being::updateBotDirection().

◆ getDeadOffsetX()

int BeingInfo::getDeadOffsetX ( ) const
inline

Definition at line 266 of file beinginfo.h.

267  { return mDeadOffsetX; }

References mDeadOffsetX.

Referenced by Being::botFixOffset().

◆ getDeadOffsetY()

int BeingInfo::getDeadOffsetY ( ) const
inline

Definition at line 272 of file beinginfo.h.

273  { return mDeadOffsetY; }

References mDeadOffsetY.

Referenced by Being::botFixOffset().

◆ getDeadSortOffsetY()

int BeingInfo::getDeadSortOffsetY ( ) const
inline

Definition at line 191 of file beinginfo.h.

192  { return mDeadSortOffsetY; }

References mDeadSortOffsetY.

◆ getDirectionType()

int BeingInfo::getDirectionType ( ) const
inline

Definition at line 296 of file beinginfo.h.

297  { return mDirectionType; }

References mDirectionType.

Referenced by Being::updateBotDirection().

◆ getDisplay()

const SpriteDisplay& BeingInfo::getDisplay ( ) const
inline

Definition at line 72 of file beinginfo.h.

73  { return mDisplay; }

References mDisplay.

◆ getFollowDist()

int BeingInfo::getFollowDist ( ) const
inline

Definition at line 224 of file beinginfo.h.

225  { return mFollowDist; }

References mFollowDist.

Referenced by Being::updateBotFollow().

◆ getHeight()

int BeingInfo::getHeight ( ) const
inline

Definition at line 206 of file beinginfo.h.

207  { return mHeight; }

References mHeight.

◆ getHoverCursor()

CursorT BeingInfo::getHoverCursor ( ) const
inline

Definition at line 86 of file beinginfo.h.

87  { return mHoverCursor; }

References mHoverCursor.

Referenced by Being::getHoverCursor().

◆ getHpBarOffsetX()

int BeingInfo::getHpBarOffsetX ( ) const
inline

Definition at line 158 of file beinginfo.h.

159  { return mHpBarOffsetX; }

References mHpBarOffsetX.

◆ getHpBarOffsetY()

int BeingInfo::getHpBarOffsetY ( ) const
inline

Definition at line 164 of file beinginfo.h.

165  { return mHpBarOffsetY; }

References mHpBarOffsetY.

◆ getMaxHP()

int BeingInfo::getMaxHP ( ) const
inline

Definition at line 170 of file beinginfo.h.

171  { return mMaxHP; }

References mMaxHP.

Referenced by ElementalDb::loadXmlFile(), MonsterDB::loadXmlFile(), MercenaryDB::loadXmlFile(), and HomunculusDB::loadXmlFile().

◆ getMenu()

const std::vector< BeingMenuItem > & BeingInfo::getMenu ( ) const

Definition at line 258 of file beinginfo.cpp.

259 {
260  return mMenu;
261 }

References mMenu.

Referenced by NPCDB::loadXmlFile().

◆ getMoveOffsetX()

int BeingInfo::getMoveOffsetX ( ) const
inline

Definition at line 254 of file beinginfo.h.

255  { return mMoveOffsetX; }

References mMoveOffsetX.

Referenced by Being::botFixOffset().

◆ getMoveOffsetY()

int BeingInfo::getMoveOffsetY ( ) const
inline

Definition at line 260 of file beinginfo.h.

261  { return mMoveOffsetY; }

References mMoveOffsetY.

Referenced by Being::botFixOffset().

◆ getName()

const std::string& BeingInfo::getName ( ) const
inline

Definition at line 67 of file beinginfo.h.

68  { return mName; }

References mName.

Referenced by BeingCommon::readObjectNodes(), and setTargetCursorSize().

◆ getNameOffsetX()

int BeingInfo::getNameOffsetX ( ) const
inline

Definition at line 146 of file beinginfo.h.

147  { return mNameOffsetX; }

References mNameOffsetX.

Referenced by Being::showName(), and Being::updateCoords().

◆ getNameOffsetY()

int BeingInfo::getNameOffsetY ( ) const
inline

Definition at line 152 of file beinginfo.h.

153  { return mNameOffsetY; }

References mNameOffsetY.

Referenced by Being::showName(), and Being::updateCoords().

◆ getQuickActionEffectId()

int BeingInfo::getQuickActionEffectId ( ) const
inline

Definition at line 332 of file beinginfo.h.

333  { return mQuickActionEffectId; }

References mQuickActionEffectId.

◆ getSitDirectionType()

int BeingInfo::getSitDirectionType ( ) const
inline

Definition at line 302 of file beinginfo.h.

303  { return mSitDirectionType; }

References mSitDirectionType.

Referenced by Being::updateBotDirection().

◆ getSitOffsetX()

int BeingInfo::getSitOffsetX ( ) const
inline

Definition at line 242 of file beinginfo.h.

243  { return mSitOffsetX; }

References mSitOffsetX.

Referenced by Being::botFixOffset().

◆ getSitOffsetY()

int BeingInfo::getSitOffsetY ( ) const
inline

Definition at line 248 of file beinginfo.h.

249  { return mSitOffsetY; }

References mSitOffsetY.

Referenced by Being::botFixOffset().

◆ getSortOffsetY()

int BeingInfo::getSortOffsetY ( ) const
inline

Definition at line 185 of file beinginfo.h.

186  { return mSortOffsetY; }

References mSortOffsetY.

◆ getSound()

const SoundInfo & BeingInfo::getSound ( const ItemSoundEvent::Type  event) const

Definition at line 164 of file beinginfo.cpp.

165 {
166  static SoundInfo emptySound("", 0);
167 
168  const ItemSoundEvents::const_iterator i = mSounds.find(event);
169 
170  if (i == mSounds.end())
171  return emptySound;
172 
173  const SoundInfoVect *const vect = i->second;
174  if (vect == nullptr || vect->empty())
175  return emptySound;
176  return vect->at(CAST_SIZE(rand()) % vect->size());
177 }

References CAST_SIZE, and mSounds.

◆ getStartFollowDist()

int BeingInfo::getStartFollowDist ( ) const
inline

Definition at line 218 of file beinginfo.h.

219  { return mStartFollowDist; }

References mStartFollowDist.

Referenced by Being::updateBotFollow().

◆ getString()

std::string BeingInfo::getString ( const int  idx) const

Definition at line 263 of file beinginfo.cpp.

264 {
265  const std::map<int, std::string>::const_iterator it = mStrings.find(idx);
266  if (it == mStrings.end())
267  return "";
268  return (*it).second;
269 }

References mStrings.

◆ getTargetCursorSize()

TargetCursorSizeT BeingInfo::getTargetCursorSize ( ) const
inline

Definition at line 89 of file beinginfo.h.

90  { return mTargetCursorSize; }

References mTargetCursorSize.

Referenced by Being::getTargetCursorSize().

◆ getTargetOffsetX()

int BeingInfo::getTargetOffsetX ( ) const
inline

Definition at line 134 of file beinginfo.h.

135  { return mTargetOffsetX; }

References mTargetOffsetX.

Referenced by Being::botFixOffset(), Being::drawBeingCursor(), and Being::getTargetOffsetX().

◆ getTargetOffsetY()

int BeingInfo::getTargetOffsetY ( ) const
inline

Definition at line 140 of file beinginfo.h.

141  { return mTargetOffsetY; }

References mTargetOffsetY.

Referenced by Being::botFixOffset(), Being::drawBeingCursor(), and Being::getTargetOffsetY().

◆ getThinkTime()

int BeingInfo::getThinkTime ( ) const
inline

Definition at line 290 of file beinginfo.h.

291  { return mThinkTime; }

References mThinkTime.

Referenced by Being::botLogic().

◆ getWalkSpeed()

int BeingInfo::getWalkSpeed ( ) const
inline

Definition at line 230 of file beinginfo.h.

231  { return mWalkSpeed; }

References mWalkSpeed.

◆ getWarpDist()

int BeingInfo::getWarpDist ( ) const
inline

Definition at line 236 of file beinginfo.h.

237  { return mWarpDist; }

References mWarpDist.

Referenced by Being::botLogic().

◆ getWidth()

int BeingInfo::getWidth ( ) const
inline

Definition at line 203 of file beinginfo.h.

204  { return mWidth; }

References mWidth.

◆ init()

void BeingInfo::init ( )
static

Definition at line 222 of file beinginfo.cpp.

223 {
224  if (empty != nullptr)
225  {
226  empty->mEffectId = paths.getIntValue("effectId");
227  empty->mHitEffectId = paths.getIntValue("hitEffectId");
228  empty->mCriticalHitEffectId = paths.getIntValue("criticalHitEffectId");
229  empty->mMissEffectId = paths.getIntValue("missEffectId");
230  }
231 }

References empty, Configuration::getIntValue(), Attack::mCriticalHitEffectId, Attack::mEffectId, Attack::mHitEffectId, Attack::mMissEffectId, and paths.

Referenced by initEngines().

◆ isStaticMaxHP()

bool BeingInfo::isStaticMaxHP ( ) const
inline

Definition at line 173 of file beinginfo.h.

174  { return mStaticMaxHP; }

References mStaticMaxHP.

◆ isTargetSelection()

bool BeingInfo::isTargetSelection ( ) const
inline

◆ setAllowDelete()

void BeingInfo::setAllowDelete ( const bool  b)
inline

Definition at line 317 of file beinginfo.h.

318  { mAllowDelete = b; }

References mAllowDelete.

Referenced by NPCDB::loadXmlFile().

◆ setAllowEquipment()

void BeingInfo::setAllowEquipment ( const bool  b)
inline

Definition at line 323 of file beinginfo.h.

324  { mAllowEquipment = b; }

References mAllowEquipment.

Referenced by NPCDB::loadXmlFile().

◆ setAttackDirectionType()

void BeingInfo::setAttackDirectionType ( const int  n)
inline

Definition at line 311 of file beinginfo.h.

312  { mAttackDirectionType = n; }

References mAttackDirectionType.

◆ setAttackOffsetX()

void BeingInfo::setAttackOffsetX ( const int  n)
inline

Definition at line 275 of file beinginfo.h.

276  { mAttackOffsetX = n; }

References mAttackOffsetX.

◆ setAttackOffsetY()

void BeingInfo::setAttackOffsetY ( const int  n)
inline

Definition at line 281 of file beinginfo.h.

282  { mAttackOffsetY = n; }

References mAttackOffsetY.

◆ setAvatarId()

void BeingInfo::setAvatarId ( const BeingTypeId  id)
inline

Definition at line 200 of file beinginfo.h.

201  { mAvatarId = id; }

References mAvatarId.

Referenced by NPCDB::loadXmlFile().

◆ setBlockType()

void BeingInfo::setBlockType ( const BlockTypeT blockType)
inline

Definition at line 125 of file beinginfo.h.

126  { mBlockType = blockType; }

References mBlockType.

Referenced by ElementalDb::loadXmlFile(), MonsterDB::loadXmlFile(), MercenaryDB::loadXmlFile(), and HomunculusDB::loadXmlFile().

◆ setBlockWalkMask()

void BeingInfo::setBlockWalkMask ( const unsigned char  mask)
inline

Definition at line 116 of file beinginfo.h.

117  { mBlockWalkMask = mask; }

References mBlockWalkMask.

◆ setColorsList()

void BeingInfo::setColorsList ( const std::string &  name)

Definition at line 233 of file beinginfo.cpp.

234 {
235  if (name.empty())
236  mColors = nullptr;
237  else
239 }

References ColorDB::getColorsList(), and mColors.

Referenced by ElementalDb::loadXmlFile(), MonsterDB::loadXmlFile(), MercenaryDB::loadXmlFile(), and HomunculusDB::loadXmlFile().

◆ setCurrency()

void BeingInfo::setCurrency ( const std::string &  name)
inline

Definition at line 352 of file beinginfo.h.

353  { mCurrency = name; }

References mCurrency.

Referenced by NPCDB::loadXmlFile().

◆ setDeadDirectionType()

void BeingInfo::setDeadDirectionType ( const int  n)
inline

Definition at line 305 of file beinginfo.h.

306  { mDeadDirectionType = n; }

References mDeadDirectionType.

◆ setDeadOffsetX()

void BeingInfo::setDeadOffsetX ( const int  n)
inline

Definition at line 263 of file beinginfo.h.

264  { mDeadOffsetX = n; }

References mDeadOffsetX.

◆ setDeadOffsetY()

void BeingInfo::setDeadOffsetY ( const int  n)
inline

Definition at line 269 of file beinginfo.h.

270  { mDeadOffsetY = n; }

References mDeadOffsetY.

◆ setDeadSortOffsetY()

void BeingInfo::setDeadSortOffsetY ( const int  n)
inline

◆ setDirectionType()

void BeingInfo::setDirectionType ( const int  n)
inline

Definition at line 293 of file beinginfo.h.

294  { mDirectionType = n; }

References mDirectionType.

◆ setDisplay()

void BeingInfo::setDisplay ( const SpriteDisplay display)

◆ setFollowDist()

void BeingInfo::setFollowDist ( const int  n)
inline

Definition at line 221 of file beinginfo.h.

222  { mFollowDist = n; }

References mFollowDist.

◆ setHeight()

void BeingInfo::setHeight ( const int  n)
inline

Definition at line 212 of file beinginfo.h.

213  { mHeight = n; }

References mHeight.

Referenced by AvatarDB::loadXmlFile().

◆ setHoverCursor() [1/2]

void BeingInfo::setHoverCursor ( const CursorT cursor)
inline

Definition at line 83 of file beinginfo.h.

84  { mHoverCursor = cursor; }

References mHoverCursor.

◆ setHoverCursor() [2/2]

void BeingInfo::setHoverCursor ( const std::string &  name)
inline

Definition at line 80 of file beinginfo.h.

81  { return setHoverCursor(Cursors::stringToCursor(name)); }

References Cursors::stringToCursor().

◆ setHpBarOffsetX()

void BeingInfo::setHpBarOffsetX ( const int  n)
inline

Definition at line 155 of file beinginfo.h.

156  { mHpBarOffsetX = n; }

References mHpBarOffsetX.

◆ setHpBarOffsetY()

void BeingInfo::setHpBarOffsetY ( const int  n)
inline

Definition at line 161 of file beinginfo.h.

162  { mHpBarOffsetY = n; }

References mHpBarOffsetY.

◆ setMaxHP()

void BeingInfo::setMaxHP ( const int  n)
inline

Definition at line 167 of file beinginfo.h.

168  { mMaxHP = n; }

References mMaxHP.

Referenced by ElementalDb::loadXmlFile(), MonsterDB::loadXmlFile(), MercenaryDB::loadXmlFile(), and HomunculusDB::loadXmlFile().

◆ setMoveOffsetX()

void BeingInfo::setMoveOffsetX ( const int  n)
inline

Definition at line 251 of file beinginfo.h.

252  { mMoveOffsetX = n; }

References mMoveOffsetX.

◆ setMoveOffsetY()

void BeingInfo::setMoveOffsetY ( const int  n)
inline

Definition at line 257 of file beinginfo.h.

258  { mMoveOffsetY = n; }

References mMoveOffsetY.

◆ setName()

void BeingInfo::setName ( const std::string &  name)
inline

◆ setNameOffsetX()

void BeingInfo::setNameOffsetX ( const int  n)
inline

Definition at line 143 of file beinginfo.h.

144  { mNameOffsetX = n; }

References mNameOffsetX.

◆ setNameOffsetY()

void BeingInfo::setNameOffsetY ( const int  n)
inline

Definition at line 149 of file beinginfo.h.

150  { mNameOffsetY = n; }

References mNameOffsetY.

◆ setQuickActionEffectId()

void BeingInfo::setQuickActionEffectId ( const int  n)
inline

Definition at line 329 of file beinginfo.h.

330  { mQuickActionEffectId = n; }

References mQuickActionEffectId.

◆ setSitDirectionType()

void BeingInfo::setSitDirectionType ( const int  n)
inline

Definition at line 299 of file beinginfo.h.

300  { mSitDirectionType = n; }

References mSitDirectionType.

◆ setSitOffsetX()

void BeingInfo::setSitOffsetX ( const int  n)
inline

Definition at line 239 of file beinginfo.h.

240  { mSitOffsetX = n; }

References mSitOffsetX.

◆ setSitOffsetY()

void BeingInfo::setSitOffsetY ( const int  n)
inline

Definition at line 245 of file beinginfo.h.

246  { mSitOffsetY = n; }

References mSitOffsetY.

◆ setSortOffsetY()

void BeingInfo::setSortOffsetY ( const int  n)
inline

Definition at line 188 of file beinginfo.h.

189  { mSortOffsetY = n; }

References mSortOffsetY.

◆ setStartFollowDist()

void BeingInfo::setStartFollowDist ( const int  n)
inline

Definition at line 215 of file beinginfo.h.

216  { mStartFollowDist = n; }

References mStartFollowDist.

◆ setStaticMaxHP()

void BeingInfo::setStaticMaxHP ( const bool  n)
inline

◆ setString()

void BeingInfo::setString ( const int  idx,
const std::string &  value 
)
inline

Definition at line 343 of file beinginfo.h.

345  { mStrings[idx] = value; }

References mStrings.

Referenced by PETDB::loadXmlFile().

◆ setTargetCursorSize() [1/2]

void BeingInfo::setTargetCursorSize ( const std::string &  size)

Definition at line 131 of file beinginfo.cpp.

132 {
133  if (size == "small")
134  {
136  }
137  else if (size == "medium")
138  {
140  }
141  else if (size == "large")
142  {
144  }
145  else
146  {
147  logger->log("Unknown target cursor type \"%s\" for %s - using medium "
148  "sized one", size.c_str(), getName().c_str());
150  }
151 }

References getName(), TargetCursorSize::LARGE, Logger::log(), logger, TargetCursorSize::MEDIUM, EmoteDB::size(), and TargetCursorSize::SMALL.

◆ setTargetCursorSize() [2/2]

void BeingInfo::setTargetCursorSize ( const TargetCursorSizeT targetSize)
inline

Definition at line 77 of file beinginfo.h.

78  { mTargetCursorSize = targetSize; }

References mTargetCursorSize.

◆ setTargetOffsetX()

void BeingInfo::setTargetOffsetX ( const int  n)
inline

Definition at line 131 of file beinginfo.h.

132  { mTargetOffsetX = n; }

References mTargetOffsetX.

Referenced by AvatarDB::loadXmlFile().

◆ setTargetOffsetY()

void BeingInfo::setTargetOffsetY ( const int  n)
inline

Definition at line 137 of file beinginfo.h.

138  { mTargetOffsetY = n; }

References mTargetOffsetY.

Referenced by AvatarDB::loadXmlFile().

◆ setTargetSelection()

void BeingInfo::setTargetSelection ( const bool  n)
inline

Definition at line 179 of file beinginfo.h.

180  { mTargetSelection = n; }

References mTargetSelection.

Referenced by PETDB::loadXmlFile(), SkillUnitDb::loadXmlFile(), and NPCDB::loadXmlFile().

◆ setThinkTime()

void BeingInfo::setThinkTime ( const int  n)
inline

Definition at line 287 of file beinginfo.h.

288  { mThinkTime = n; }

References mThinkTime.

◆ setWalkSpeed()

void BeingInfo::setWalkSpeed ( const int  n)
inline

Definition at line 227 of file beinginfo.h.

228  { mWalkSpeed = n; }

References mWalkSpeed.

◆ setWarpDist()

void BeingInfo::setWarpDist ( const int  n)
inline

Definition at line 233 of file beinginfo.h.

234  { mWarpDist = n; }

References mWarpDist.

◆ setWidth()

void BeingInfo::setWidth ( const int  n)
inline

Definition at line 209 of file beinginfo.h.

210  { mWidth = n; }

References mWidth.

Referenced by AvatarDB::loadXmlFile().

Field Documentation

◆ empty

Attack * BeingInfo::empty
static
Initial value:
-1,
-1,
-1,
-1,
std::string(),
32.0F,
7.0F,
8.0F,
500)

Definition at line 56 of file beinginfo.h.

Referenced by clear(), getAttack(), and init().

◆ mAllowDelete

bool BeingInfo::mAllowDelete
private

Definition at line 404 of file beinginfo.h.

Referenced by getAllowDelete(), and setAllowDelete().

◆ mAllowEquipment

bool BeingInfo::mAllowEquipment
private

Definition at line 405 of file beinginfo.h.

Referenced by getAllowEquipment(), and setAllowEquipment().

◆ mAttackDirectionType

int BeingInfo::mAttackDirectionType
private

Definition at line 400 of file beinginfo.h.

Referenced by getAttackDirectionType(), and setAttackDirectionType().

◆ mAttackOffsetX

int BeingInfo::mAttackOffsetX
private

Definition at line 394 of file beinginfo.h.

Referenced by getAttackOffsetX(), and setAttackOffsetX().

◆ mAttackOffsetY

int BeingInfo::mAttackOffsetY
private

Definition at line 395 of file beinginfo.h.

Referenced by getAttackOffsetY(), and setAttackOffsetY().

◆ mAttacks

Attacks BeingInfo::mAttacks
private

Definition at line 365 of file beinginfo.h.

Referenced by addAttack(), getAttack(), and ~BeingInfo().

◆ mAvatarId

BeingTypeId BeingInfo::mAvatarId
private

Definition at line 381 of file beinginfo.h.

Referenced by getAvatarId(), and setAvatarId().

◆ mBlockType

BlockTypeT BeingInfo::mBlockType
private

Definition at line 370 of file beinginfo.h.

Referenced by getBlockType(), and setBlockType().

◆ mBlockWalkMask

unsigned char BeingInfo::mBlockWalkMask
private

Definition at line 369 of file beinginfo.h.

Referenced by getBlockWalkMask(), and setBlockWalkMask().

◆ mColors

const std::map<ItemColor, ItemColorData>* BeingInfo::mColors
private

Definition at line 371 of file beinginfo.h.

Referenced by getColor(), and setColorsList().

◆ mCurrency

std::string BeingInfo::mCurrency
private

Definition at line 368 of file beinginfo.h.

Referenced by getCurrency(), and setCurrency().

◆ mDeadDirectionType

int BeingInfo::mDeadDirectionType
private

Definition at line 399 of file beinginfo.h.

Referenced by getDeadDirectionType(), and setDeadDirectionType().

◆ mDeadOffsetX

int BeingInfo::mDeadOffsetX
private

Definition at line 392 of file beinginfo.h.

Referenced by getDeadOffsetX(), and setDeadOffsetX().

◆ mDeadOffsetY

int BeingInfo::mDeadOffsetY
private

Definition at line 393 of file beinginfo.h.

Referenced by getDeadOffsetY(), and setDeadOffsetY().

◆ mDeadSortOffsetY

int BeingInfo::mDeadSortOffsetY
private

Definition at line 380 of file beinginfo.h.

Referenced by getDeadSortOffsetY(), and setDeadSortOffsetY().

◆ mDirectionType

int BeingInfo::mDirectionType
private

Definition at line 397 of file beinginfo.h.

Referenced by getDirectionType(), and setDirectionType().

◆ mDisplay

SpriteDisplay BeingInfo::mDisplay
private

Definition at line 360 of file beinginfo.h.

Referenced by getDisplay(), setDisplay(), and ~BeingInfo().

◆ mFollowDist

int BeingInfo::mFollowDist
private

Definition at line 385 of file beinginfo.h.

Referenced by getFollowDist(), and setFollowDist().

◆ mHeight

int BeingInfo::mHeight
private

Definition at line 383 of file beinginfo.h.

Referenced by getHeight(), and setHeight().

◆ mHoverCursor

CursorT BeingInfo::mHoverCursor
private

Definition at line 363 of file beinginfo.h.

Referenced by getHoverCursor(), and setHoverCursor().

◆ mHpBarOffsetX

int BeingInfo::mHpBarOffsetX
private

Definition at line 376 of file beinginfo.h.

Referenced by getHpBarOffsetX(), and setHpBarOffsetX().

◆ mHpBarOffsetY

int BeingInfo::mHpBarOffsetY
private

Definition at line 377 of file beinginfo.h.

Referenced by getHpBarOffsetY(), and setHpBarOffsetY().

◆ mMaxHP

int BeingInfo::mMaxHP
private

Definition at line 378 of file beinginfo.h.

Referenced by getMaxHP(), and setMaxHP().

◆ mMenu

std::vector<BeingMenuItem> BeingInfo::mMenu
private

Definition at line 366 of file beinginfo.h.

Referenced by addMenu(), and getMenu().

◆ mMoveOffsetX

int BeingInfo::mMoveOffsetX
private

Definition at line 390 of file beinginfo.h.

Referenced by getMoveOffsetX(), and setMoveOffsetX().

◆ mMoveOffsetY

int BeingInfo::mMoveOffsetY
private

Definition at line 391 of file beinginfo.h.

Referenced by getMoveOffsetY(), and setMoveOffsetY().

◆ mName

std::string BeingInfo::mName
private

Definition at line 361 of file beinginfo.h.

Referenced by getName(), and setName().

◆ mNameOffsetX

int BeingInfo::mNameOffsetX
private

Definition at line 374 of file beinginfo.h.

Referenced by getNameOffsetX(), and setNameOffsetX().

◆ mNameOffsetY

int BeingInfo::mNameOffsetY
private

Definition at line 375 of file beinginfo.h.

Referenced by getNameOffsetY(), and setNameOffsetY().

◆ mQuickActionEffectId

int BeingInfo::mQuickActionEffectId
private

Definition at line 401 of file beinginfo.h.

Referenced by getQuickActionEffectId(), and setQuickActionEffectId().

◆ mSitDirectionType

int BeingInfo::mSitDirectionType
private

Definition at line 398 of file beinginfo.h.

Referenced by getSitDirectionType(), and setSitDirectionType().

◆ mSitOffsetX

int BeingInfo::mSitOffsetX
private

Definition at line 388 of file beinginfo.h.

Referenced by getSitOffsetX(), and setSitOffsetX().

◆ mSitOffsetY

int BeingInfo::mSitOffsetY
private

Definition at line 389 of file beinginfo.h.

Referenced by getSitOffsetY(), and setSitOffsetY().

◆ mSortOffsetY

int BeingInfo::mSortOffsetY
private

Definition at line 379 of file beinginfo.h.

Referenced by getSortOffsetY(), and setSortOffsetY().

◆ mSounds

ItemSoundEvents BeingInfo::mSounds
private

Definition at line 364 of file beinginfo.h.

Referenced by addSound(), getSound(), and ~BeingInfo().

◆ mStartFollowDist

int BeingInfo::mStartFollowDist
private

Definition at line 384 of file beinginfo.h.

Referenced by getStartFollowDist(), and setStartFollowDist().

◆ mStaticMaxHP

bool BeingInfo::mStaticMaxHP
private

Definition at line 402 of file beinginfo.h.

Referenced by isStaticMaxHP(), and setStaticMaxHP().

◆ mStrings

std::map<int, std::string> BeingInfo::mStrings
private

Definition at line 367 of file beinginfo.h.

Referenced by getString(), and setString().

◆ mTargetCursorSize

TargetCursorSizeT BeingInfo::mTargetCursorSize
private

Definition at line 362 of file beinginfo.h.

Referenced by getTargetCursorSize(), and setTargetCursorSize().

◆ mTargetOffsetX

int BeingInfo::mTargetOffsetX
private

Definition at line 372 of file beinginfo.h.

Referenced by getTargetOffsetX(), and setTargetOffsetX().

◆ mTargetOffsetY

int BeingInfo::mTargetOffsetY
private

Definition at line 373 of file beinginfo.h.

Referenced by getTargetOffsetY(), and setTargetOffsetY().

◆ mTargetSelection

bool BeingInfo::mTargetSelection
private

Definition at line 403 of file beinginfo.h.

Referenced by isTargetSelection(), and setTargetSelection().

◆ mThinkTime

int BeingInfo::mThinkTime
private

Definition at line 396 of file beinginfo.h.

Referenced by getThinkTime(), and setThinkTime().

◆ mWalkSpeed

int BeingInfo::mWalkSpeed
private

Definition at line 387 of file beinginfo.h.

Referenced by getWalkSpeed(), and setWalkSpeed().

◆ mWarpDist

int BeingInfo::mWarpDist
private

Definition at line 386 of file beinginfo.h.

Referenced by getWarpDist(), and setWarpDist().

◆ mWidth

int BeingInfo::mWidth
private

Definition at line 382 of file beinginfo.h.

Referenced by getWidth(), and setWidth().

◆ unknown

BeingInfo * BeingInfo::unknown = 0
static

The documentation for this class was generated from the following files:
BeingInfo::mHoverCursor
CursorT mHoverCursor
Definition: beinginfo.h:363
BlockType::NONE
@ NONE
Definition: blocktype.h:30
BeingInfo::setDisplay
void setDisplay(const SpriteDisplay &display)
Definition: beinginfo.cpp:126
BeingInfo::mDeadSortOffsetY
int mDeadSortOffsetY
Definition: beinginfo.h:380
SpriteAction::ATTACKRIDE
static const std::string ATTACKRIDE("attackride")
BeingInfo::mStaticMaxHP
bool mStaticMaxHP
Definition: beinginfo.h:402
Attack::mHitEffectId
int mHitEffectId
Definition: attack.h:35
TargetCursorSize::SMALL
@ SMALL
Definition: targetcursorsize.h:29
Attack::mCriticalHitEffectId
int mCriticalHitEffectId
Definition: attack.h:36
BeingInfo::mMaxHP
int mMaxHP
Definition: beinginfo.h:378
CAST_SIZE
#define CAST_SIZE
Definition: cast.h:33
Cursors::stringToCursor
CursorT stringToCursor(const std::string &name)
Definition: cursors.cpp:59
BeingInfo::mTargetOffsetY
int mTargetOffsetY
Definition: beinginfo.h:373
Cursor::CURSOR_POINTER
@ CURSOR_POINTER
Definition: cursor.h:28
BeingInfo::mDirectionType
int mDirectionType
Definition: beinginfo.h:397
BeingInfo::mColors
const std::map< ItemColor, ItemColorData > * mColors
Definition: beinginfo.h:371
BeingInfo::setTargetCursorSize
void setTargetCursorSize(const std::string &size)
Definition: beinginfo.cpp:131
BeingMenuItem
Definition: beingmenuitem.h:28
BeingInfo::mAllowDelete
bool mAllowDelete
Definition: beinginfo.h:404
SpriteAction::ATTACK
static const std::string ATTACK("attack")
SpriteDisplay::sprites
std::vector< SpriteReference * > sprites
Definition: spritedisplay.h:46
paths
Configuration paths
Definition: configuration.cpp:55
BeingInfo::mCurrency
std::string mCurrency
Definition: beinginfo.h:368
BeingInfo::mSitDirectionType
int mSitDirectionType
Definition: beinginfo.h:398
BeingInfo::mQuickActionEffectId
int mQuickActionEffectId
Definition: beinginfo.h:401
SoundInfoVect
std::vector< SoundInfo > SoundInfoVect
Definition: soundinfo.h:48
BlockMask::WATER
@ WATER
Definition: blockmask.h:32
BeingInfo::mBlockWalkMask
unsigned char mBlockWalkMask
Definition: beinginfo.h:369
BeingInfo::mSortOffsetY
int mSortOffsetY
Definition: beinginfo.h:379
BeingInfo::mSounds
ItemSoundEvents mSounds
Definition: beinginfo.h:364
BeingInfo::mSitOffsetY
int mSitOffsetY
Definition: beinginfo.h:389
delete2
#define delete2(var)
Definition: delete2.h:24
SpriteAction::ATTACKSKY
static const std::string ATTACKSKY("attacksky")
SkillType::Attack
@ Attack
Definition: skilltype.h:30
BeingInfo::mMenu
std::vector< BeingMenuItem > mMenu
Definition: beinginfo.h:366
logger
Logger * logger
Definition: logger.cpp:88
BeingInfo::empty
static Attack * empty
Definition: beinginfo.h:56
BeingInfo::mMoveOffsetX
int mMoveOffsetX
Definition: beinginfo.h:390
BlockMask::MONSTERWALL
@ MONSTERWALL
Definition: blockmask.h:36
BeingInfo::mSitOffsetX
int mSitOffsetX
Definition: beinginfo.h:388
BeingInfo::mWalkSpeed
int mWalkSpeed
Definition: beinginfo.h:387
Attack::mEffectId
int mEffectId
Definition: attack.h:34
BeingTypeId_zero
const BeingTypeId BeingTypeId_zero
Definition: beingtypeid.h:29
SpriteReference::Empty
static SpriteReference * Empty
Definition: spritereference.h:32
SoundInfo
Definition: soundinfo.h:33
BeingInfo::mAllowEquipment
bool mAllowEquipment
Definition: beinginfo.h:405
BeingInfo::mName
std::string mName
Definition: beinginfo.h:361
BeingInfo::getName
const std::string & getName() const
Definition: beinginfo.h:67
BeingInfo::mDeadOffsetX
int mDeadOffsetX
Definition: beinginfo.h:392
BlockMask::WALL
@ WALL
Definition: blockmask.h:30
BeingInfo::mAvatarId
BeingTypeId mAvatarId
Definition: beinginfo.h:381
BeingInfo::mThinkTime
int mThinkTime
Definition: beinginfo.h:396
BeingInfo::mDisplay
SpriteDisplay mDisplay
Definition: beinginfo.h:360
BeingInfo::mHpBarOffsetY
int mHpBarOffsetY
Definition: beinginfo.h:377
BeingInfo::mWarpDist
int mWarpDist
Definition: beinginfo.h:386
SpriteDisplay
Definition: spritedisplay.h:32
BeingInfo::mTargetOffsetX
int mTargetOffsetX
Definition: beinginfo.h:372
BeingInfo::mTargetCursorSize
TargetCursorSizeT mTargetCursorSize
Definition: beinginfo.h:362
Configuration::getIntValue
int getIntValue(const std::string &key) const
Definition: configuration.cpp:403
BeingInfo::mTargetSelection
bool mTargetSelection
Definition: beinginfo.h:403
TargetCursorSize::LARGE
@ LARGE
Definition: targetcursorsize.h:31
BeingInfo::mAttackDirectionType
int mAttackDirectionType
Definition: beinginfo.h:400
BeingInfo::mMoveOffsetY
int mMoveOffsetY
Definition: beinginfo.h:391
BeingInfo::mDeadOffsetY
int mDeadOffsetY
Definition: beinginfo.h:393
BeingInfo::mBlockType
BlockTypeT mBlockType
Definition: beinginfo.h:370
BeingInfo::mAttacks
Attacks mAttacks
Definition: beinginfo.h:365
delete_all
void delete_all(Container &c)
Definition: dtor.h:55
EmoteDB::size
int size()
Definition: emotedb.cpp:305
BeingInfo::mHeight
int mHeight
Definition: beinginfo.h:383
BlockMask::AIR
@ AIR
Definition: blockmask.h:31
TargetCursorSize::MEDIUM
@ MEDIUM
Definition: targetcursorsize.h:30
BeingInfo::setHoverCursor
void setHoverCursor(const std::string &name)
Definition: beinginfo.h:80
SpriteAction::ATTACKWATER
static const std::string ATTACKWATER("attackwater")
BeingInfo::mStartFollowDist
int mStartFollowDist
Definition: beinginfo.h:384
BeingInfo::mStrings
std::map< int, std::string > mStrings
Definition: beinginfo.h:367
Attack::mMissEffectId
int mMissEffectId
Definition: attack.h:37
BeingInfo::mAttackOffsetX
int mAttackOffsetX
Definition: beinginfo.h:394
BeingInfo::mFollowDist
int mFollowDist
Definition: beinginfo.h:385
BeingInfo::unknown
static BeingInfo * unknown
Definition: beinginfo.h:55
_
#define _(s)
Definition: gettext.h:34
BeingInfo::mNameOffsetY
int mNameOffsetY
Definition: beinginfo.h:375
BeingInfo::mAttackOffsetY
int mAttackOffsetY
Definition: beinginfo.h:395
ColorDB::getColorsList
const std::map< ItemColor, ItemColorData > * getColorsList(const std::string &name)
Definition: colordb.cpp:218
BeingInfo::mNameOffsetX
int mNameOffsetX
Definition: beinginfo.h:374
BeingInfo::mDeadDirectionType
int mDeadDirectionType
Definition: beinginfo.h:399
Logger::log
void log(const char *const log_text,...)
Definition: logger.cpp:268
BeingInfo::mWidth
int mWidth
Definition: beinginfo.h:382
BeingInfo::mHpBarOffsetX
int mHpBarOffsetX
Definition: beinginfo.h:376