summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-03-09 20:41:27 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-03-09 20:41:27 +0000
commit4e2ced304a2013808b2481cceb7622848b073e5b (patch)
tree2cc2c6cbc3f6e17842919530d583f91256dc86e1 /src/resources
parent15014d358424bf5f74a2d9b7afd08692b591a448 (diff)
downloadmana-client-4e2ced304a2013808b2481cceb7622848b073e5b.tar.gz
mana-client-4e2ced304a2013808b2481cceb7622848b073e5b.tar.bz2
mana-client-4e2ced304a2013808b2481cceb7622848b073e5b.tar.xz
mana-client-4e2ced304a2013808b2481cceb7622848b073e5b.zip
Implemented possibility to rotate particle emitters. Implemented interpretation of the attacktype parameter of attack messages and visualize monster attacks other than id 1 with a particle effect. Prepared to get attack particle effects and animation types from the monster database.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/monsterinfo.cpp15
-rw-r--r--src/resources/monsterinfo.h8
2 files changed, 23 insertions, 0 deletions
diff --git a/src/resources/monsterinfo.cpp b/src/resources/monsterinfo.cpp
index 0a7e18dc..0ee08e42 100644
--- a/src/resources/monsterinfo.cpp
+++ b/src/resources/monsterinfo.cpp
@@ -70,3 +70,18 @@ MonsterInfo::getSound(MonsterSoundEvent event) const
return i->second->at(rand()%i->second->size());
}
}
+
+const std::string &
+MonsterInfo::getAttackParticleEffect(int attackType) const
+{
+ static std::string something("graphics/particles/attack.particle.xml");
+ static std::string nothing("");
+
+ if (attackType > 1) return something; else return nothing;
+}
+
+SpriteAction
+MonsterInfo::getAttackAction(int attackType) const
+{
+ return ACTION_ATTACK;
+}
diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h
index 3034f10e..3dd18c0f 100644
--- a/src/resources/monsterinfo.h
+++ b/src/resources/monsterinfo.h
@@ -83,6 +83,14 @@ class MonsterInfo
std::string
getSound(MonsterSoundEvent event) const;
+ const std::string &
+ getAttackParticleEffect(int attackType) const;
+
+ SpriteAction
+ getAttackAction(int attackType) const;
+
+
+
private:
std::string mName;
std::string mSprite;