NPC Class Reference

#include <npc.h>

Inheritance diagram for NPC:

Player Being

List of all members.


Detailed Description

Definition at line 30 of file npc.h.


Public Member Functions

 NPC (int id, int job, Map *map)
 ~NPC ()
void setName (const std::string &name)
 Set up mName to be the character's name.
void setGender (Gender gender)
 Sets the gender of this being.
void setSprite (int slot, int id, std::string color)
virtual Type getType () const
 Returns the type of the being.
void talk ()
virtual unsigned char getWalkMask () const
 Gets the way an NPC is blocked by other things on the map.

Static Public Attributes

static bool isTalking = false

Protected Member Functions

virtual Map::BlockType getBlockType () const
 Gets the way a monster blocks pathfinding for other objects.
void updateCoords ()
 Let the sub-classes react to a replacement.

Private Attributes

TextmName
 Name of character.

Constructor & Destructor Documentation

NPC::NPC ( int  id,
int  job,
Map map 
)

Definition at line 39 of file npc.cpp.

NPC::~NPC (  ) 

Definition at line 75 of file npc.cpp.


Member Function Documentation

void NPC::setName ( const std::string &  name  )  [virtual]

Set up mName to be the character's name.

Reimplemented from Player.

Definition at line 80 of file npc.cpp.

void NPC::setGender ( Gender  gender  )  [virtual]

Sets the gender of this being.

Reimplemented from Player.

Definition at line 93 of file npc.cpp.

void NPC::setSprite ( int  slot,
int  id,
std::string  color 
)

Definition at line 98 of file npc.cpp.

Being::Type NPC::getType (  )  const [virtual]

Returns the type of the being.

Reimplemented from Player.

Definition at line 104 of file npc.cpp.

void NPC::talk (  ) 

Definition at line 109 of file npc.cpp.

virtual unsigned char NPC::getWalkMask (  )  const [inline, virtual]

Gets the way an NPC is blocked by other things on the map.

Reimplemented from Player.

Definition at line 48 of file npc.h.

virtual Map::BlockType NPC::getBlockType (  )  const [inline, protected, virtual]

Gets the way a monster blocks pathfinding for other objects.

Reimplemented from Player.

Definition at line 57 of file npc.h.

void NPC::updateCoords (  )  [protected, virtual]

Let the sub-classes react to a replacement.

Reimplemented from Player.

Definition at line 119 of file npc.cpp.


Member Data Documentation

bool NPC::isTalking = false [static]

Definition at line 51 of file npc.h.

Text* NPC::mName [private]

Name of character.

Reimplemented from Player.

Definition at line 63 of file npc.h.


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

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5