summaryrefslogtreecommitdiff
path: root/src/resources/monsterinfo.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-22 19:45:03 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-22 19:45:56 +0100
commit0c43d04b438d41c277ae80402d4b4888db1a0b64 (patch)
tree3aaeb75ecd1bcbe85decedab5f1fa426fe0411e3 /src/resources/monsterinfo.h
parenta7f5eaeb7f643658d356533a608f0f18d85b6d32 (diff)
parent401802c1d7a1b3d659bdc53a45d9a6292fc1121e (diff)
downloadmana-client-0c43d04b438d41c277ae80402d4b4888db1a0b64.tar.gz
mana-client-0c43d04b438d41c277ae80402d4b4888db1a0b64.tar.bz2
mana-client-0c43d04b438d41c277ae80402d4b4888db1a0b64.tar.xz
mana-client-0c43d04b438d41c277ae80402d4b4888db1a0b64.zip
Merged the tmwserv client with the eAthena client
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
Diffstat (limited to 'src/resources/monsterinfo.h')
-rw-r--r--src/resources/monsterinfo.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h
index 359791fd..02574147 100644
--- a/src/resources/monsterinfo.h
+++ b/src/resources/monsterinfo.h
@@ -37,6 +37,12 @@ enum MonsterSoundEvent
MONSTER_EVENT_DIE
};
+struct MonsterAttack
+{
+ std::string particleEffect;
+ SpriteAction action;
+};
+
/**
* Holds information about a certain type of monster. This includes the name
* of the monster, the sprite to display and the sounds the monster makes.
@@ -56,16 +62,17 @@ class MonsterInfo
*/
~MonsterInfo();
- void setName(std::string name) { mName = name; }
+ void setName(const std::string &name) { mName = name; }
- void addSprite(std::string filename) { mSprites.push_back(filename); }
+ void addSprite(const std::string &filename)
+ { mSprites.push_back(filename); }
void setTargetCursorSize(Being::TargetCursorSize targetCursorSize)
{ mTargetCursorSize = targetCursorSize; }
- void addSound(MonsterSoundEvent event, std::string filename);
+ void addSound(MonsterSoundEvent event, const std::string &filename);
- void addParticleEffect(std::string filename);
+ void addParticleEffect(const std::string &filename);
const std::string& getName() const
{ return mName; }
@@ -76,22 +83,25 @@ class MonsterInfo
Being::TargetCursorSize getTargetCursorSize() const
{ return mTargetCursorSize; }
- std::string getSound(MonsterSoundEvent event) const;
+ const std::string &getSound(MonsterSoundEvent event) const;
+
+ void addMonsterAttack(int id,
+ const std::string &particleEffect,
+ SpriteAction action);
- std::string getAttackParticleEffect() const { return mAttackParticle; }
+ const std::string &getAttackParticleEffect(int attackType) const;
- void addAttackParticleEffect(const std::string &particleEffect)
- { mAttackParticle = particleEffect; }
+ SpriteAction getAttackAction(int attackType) const;
const std::list<std::string>& getParticleEffects() const
{ return mParticleEffects; }
private:
std::string mName;
- std::string mAttackParticle;
std::list<std::string> mSprites;
Being::TargetCursorSize mTargetCursorSize;
std::map<MonsterSoundEvent, std::vector<std::string>* > mSounds;
+ std::map<int, MonsterAttack*> mMonsterAttacks;
std::list<std::string> mParticleEffects;
};