summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorLloyd Bryant <lloyd_bryant@netzero.net>2008-08-29 21:13:19 +0000
committerLloyd Bryant <lloyd_bryant@netzero.net>2008-08-29 21:13:19 +0000
commitc43c4cfc69133c1d1da4e89c3879b96d8edfa981 (patch)
tree3a15cf416c55fb30429ed77ad698fd17027ebd88 /src/resources
parentaf742ceb85512edd1d6883a5ea4f4188e64725be (diff)
downloadmana-client-c43c4cfc69133c1d1da4e89c3879b96d8edfa981.tar.gz
mana-client-c43c4cfc69133c1d1da4e89c3879b96d8edfa981.tar.bz2
mana-client-c43c4cfc69133c1d1da4e89c3879b96d8edfa981.tar.xz
mana-client-c43c4cfc69133c1d1da4e89c3879b96d8edfa981.zip
Committed complex (multi-sprite) monster patch - from TMW Mantis, by Jaxad0127
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/monsterdb.cpp4
-rw-r--r--src/resources/monsterinfo.cpp3
-rw-r--r--src/resources/monsterinfo.h8
3 files changed, 7 insertions, 8 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 04de0e7c..847b99fe 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -45,7 +45,7 @@ MonsterDB::load()
if (mLoaded)
return;
- mUnknown.setSprite("error.xml");
+ mUnknown.addSprite("error.xml");
mUnknown.setName("unnamed");
logger->log("Initializing monster database...");
@@ -96,7 +96,7 @@ MonsterDB::load()
{
if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite"))
{
- currentInfo->setSprite((const char*) spriteNode->xmlChildrenNode->content);
+ currentInfo->addSprite((const char*) spriteNode->xmlChildrenNode->content);
}
if (xmlStrEqual(spriteNode->name, BAD_CAST "sound"))
diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp
index 8238dc3e..e492ccd3 100644
--- a/src/resources/monsterinfo.cpp
+++ b/src/resources/monsterinfo.cpp
@@ -27,8 +27,7 @@
#include "../utils/dtor.h"
-MonsterInfo::MonsterInfo():
- mSprite("error.xml")
+MonsterInfo::MonsterInfo()
{
}
diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h
index d9d17510..2f690756 100644
--- a/src/resources/monsterinfo.h
+++ b/src/resources/monsterinfo.h
@@ -63,7 +63,7 @@ class MonsterInfo
setName(std::string name) { mName = name; }
void
- setSprite(std::string filename) { mSprite = filename; }
+ addSprite(std::string filename) { mSprites.push_back(filename); }
void
setTargetCursorSize(Being::TargetCursorSize targetCursorSize)
@@ -78,8 +78,8 @@ class MonsterInfo
const std::string&
getName() const { return mName; }
- const std::string&
- getSprite() const { return mSprite; }
+ const std::list<std::string>&
+ getSprites() const { return mSprites; }
Being::TargetCursorSize
getTargetCursorSize() const { return mTargetCursorSize; }
@@ -92,7 +92,7 @@ class MonsterInfo
private:
std::string mName;
- std::string mSprite;
+ std::list<std::string> mSprites;
Being::TargetCursorSize mTargetCursorSize;
std::map<MonsterSoundEvent, std::vector<std::string>* > mSounds;
std::list<std::string> mParticleEffects;