Finally wrote the monster manager API

This commit is contained in:
Kayne Ruse
2015-05-08 23:17:35 +10:00
parent 07faf1b96b
commit 102ba18b7b
7 changed files with 98 additions and 7 deletions
+8 -2
View File
@@ -29,10 +29,16 @@ MonsterManager::~MonsterManager() {
UnloadAll();
}
int MonsterManager::Create(std::string s) {
//TODO: (1) MonsterManager::Create()
int MonsterManager::Create(std::string avatar, int scriptRef) {
//implicitly create the new
elementMap.emplace(counter, MonsterData(avatar, scriptRef));
//TODO: do various things like saving to the database
return counter++;
}
//TODO: (1) monster load, save
void MonsterManager::Unload(int uid) {
elementMap.erase(uid);
}