Fixed a npcs save

Fixed a spawns and npcs load
This commit is contained in:
BrunoDCC
2013-08-22 20:54:09 -03:00
parent 3b2d8a2b5e
commit 00729bbc2e
3 changed files with 12 additions and 7 deletions

View File

@@ -40,6 +40,7 @@ enum SpawnAttr : uint8
{
SpawnAttrRadius = 0,
SpawnAttrCenter = 1,
SpawnAttrNPC = 2,
};
class Spawn : public LuaObject
@@ -54,6 +55,9 @@ public:
void setCenterPos(const Position& pos) { m_attribs.set(SpawnAttrCenter, pos); }
Position getCenterPos() { return m_attribs.get<Position>(SpawnAttrCenter); }
void setNPC(bool n) { m_attribs.set(SpawnAttrNPC, n); }
bool getNPC() { return m_attribs.get<bool>(SpawnAttrNPC); }
void addCreature(const Position& placePos, const CreatureTypePtr& cType);
void removeCreature(const Position& pos);
void clear() { m_creatures.clear(); }