Mana
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | List of all members
BeingInfo Class Reference

Holds information about a certain type of monster. More...

#include <beinginfo.h>

Public Member Functions

 BeingInfo ()
 
 ~BeingInfo ()
 
void setTargetCursorSize (const std::string &size)
 
void setHoverCursor (const std::string &cursorName)
 
void addSound (SoundEvent event, const std::string &filename)
 
const std::string & getSound (SoundEvent event) const
 
void addAttack (int id, Attack attack)
 
const AttackgetAttack (int id) const
 

Public Attributes

std::string name
 
SpriteDisplay display
 
ActorSprite::TargetCursorSize targetCursorSize = ActorSprite::TC_MEDIUM
 
Cursor hoverCursor = Cursor::Pointer
 
unsigned char walkMask = Map::BLOCKMASK_ALL
 
Map::BlockType blockType = Map::BLOCKTYPE_CHARACTER
 
bool targetSelection = true
 

Static Public Attributes

static BeingInfoUnknown = createUnknownBeingInfo()
 

Private Attributes

std::map< SoundEvent, std::vector< std::string > > mSounds
 
std::map< int, AttackmAttacks
 

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 58 of file beinginfo.h.

Constructor & Destructor Documentation

◆ BeingInfo()

BeingInfo::BeingInfo ( )
default

◆ ~BeingInfo()

BeingInfo::~BeingInfo ( )
default

Member Function Documentation

◆ addAttack()

void BeingInfo::addAttack ( int  id,
Attack  attack 
)

Definition at line 121 of file beinginfo.cpp.

◆ addSound()

void BeingInfo::addSound ( SoundEvent  event,
const std::string &  filename 
)

Definition at line 93 of file beinginfo.cpp.

◆ getAttack()

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

Definition at line 107 of file beinginfo.cpp.

◆ getSound()

const std::string & BeingInfo::getSound ( SoundEvent  event) const

Definition at line 98 of file beinginfo.cpp.

◆ setHoverCursor()

void BeingInfo::setHoverCursor ( const std::string &  cursorName)

Definition at line 82 of file beinginfo.cpp.

◆ setTargetCursorSize()

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

Definition at line 71 of file beinginfo.cpp.

Member Data Documentation

◆ blockType

Map::BlockType BeingInfo::blockType = Map::BLOCKTYPE_CHARACTER

Definition at line 71 of file beinginfo.h.

◆ display

SpriteDisplay BeingInfo::display

Definition at line 67 of file beinginfo.h.

◆ hoverCursor

Cursor BeingInfo::hoverCursor = Cursor::Pointer

Definition at line 69 of file beinginfo.h.

◆ mAttacks

std::map<int, Attack> BeingInfo::mAttacks
private

Definition at line 85 of file beinginfo.h.

◆ mSounds

std::map<SoundEvent, std::vector<std::string> > BeingInfo::mSounds
private

Definition at line 84 of file beinginfo.h.

◆ name

std::string BeingInfo::name

Definition at line 66 of file beinginfo.h.

◆ targetCursorSize

Definition at line 68 of file beinginfo.h.

◆ targetSelection

bool BeingInfo::targetSelection = true

Definition at line 72 of file beinginfo.h.

◆ Unknown

BeingInfo * BeingInfo::Unknown = createUnknownBeingInfo()
static

Definition at line 61 of file beinginfo.h.

◆ walkMask

unsigned char BeingInfo::walkMask = Map::BLOCKMASK_ALL

Definition at line 70 of file beinginfo.h.


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