Fifth round of fixes

* Enumerated Villager spawning
This commit is contained in:
Tiger Wang
2013-10-11 20:57:22 +01:00
parent ee2df34d03
commit e2aaf202ab
3 changed files with 22 additions and 7 deletions
+2 -2
View File
@@ -8,9 +8,9 @@
cVillager::cVillager(int Type) :
cVillager::cVillager(eVillagerType VillagerType) :
super("Villager", 120, "", "", 0.6, 1.8),
m_Type(Type)
m_Type(VillagerType)
{
}
+13 -2
View File
@@ -13,12 +13,23 @@ class cVillager :
typedef cPassiveMonster super;
public:
cVillager(int Type);
enum eVillagerType
{
VILLAGER_TYPE_FARMER = 0,
VILLAGER_TYPE_LIBRARIAN = 1,
VILLAGER_TYPE_PRIEST = 2,
VILLAGER_TYPE_BLACKSMITH = 3,
VILLAGER_TYPE_BUTCHER = 4,
VILLAGER_TYPE_GENERIC = 5
} ;
cVillager(eVillagerType VillagerType);
CLASS_PROTODEF(cVillager);
virtual void DoTakeDamage(TakeDamageInfo & a_TDI) override;
int GetVilType(void) const { return m_Type; }
int GetVilType(void) const { return m_Type; }
private: