summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-08-28 18:32:11 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-13 20:21:56 +0100
commit0a2fc4d340911b28b9dc6b3b23c69e9fe7729082 (patch)
treebddecd4581bb8591d0ac079a48eec3a66c411238 /src/being.h
parent5c4b6363d5065fb98a53b6981f5a590aaa37829b (diff)
downloadmana-0a2fc4d340911b28b9dc6b3b23c69e9fe7729082.tar.gz
mana-0a2fc4d340911b28b9dc6b3b23c69e9fe7729082.tar.bz2
mana-0a2fc4d340911b28b9dc6b3b23c69e9fe7729082.tar.xz
mana-0a2fc4d340911b28b9dc6b3b23c69e9fe7729082.zip
Added support for being effects through the eAthena levelup message, and check
whether the being exists before referencing it. Re-enabled proper MP bar display. Improved handling of a warp to the same map. (patch by Fate) (cherry picked from eAthena client, the part about the levelup message doesn't apply, and we now seem to have a second "effect manager"...) Conflicts: ChangeLog src/being.cpp src/being.h src/engine.cpp src/engine.h src/gui/ministatus.cpp src/net/beinghandler.cpp src/net/playerhandler.cpp src/net/protocol.h
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/being.h b/src/being.h
index 5e8cb2dc..9bf88d82 100644
--- a/src/being.h
+++ b/src/being.h
@@ -360,6 +360,15 @@ class Being : public Sprite
*/
const Path &getPath() const { return mPath; }
+ /**
+ * Triggers a visual effect, such as `level up'
+ *
+ * Only draws the visual effect, does not play sound effects
+ *
+ * \param effectId ID of the effect to trigger
+ */
+ virtual void
+ triggerEffect(int effectId) { internalTriggerEffect(effectId, false, true); }
static int getHairColorsNr(void);
@@ -379,6 +388,16 @@ class Being : public Sprite
virtual Map::BlockType getBlockType() const
{ return Map::BLOCKTYPE_NONE; }
+ /**
+ * Trigger visual effect, with components
+ *
+ * \param effectId ID of the effect to trigger
+ * \param sfx Whether to trigger sound effects
+ * \param gfx Whether to trigger graphical effects
+ */
+ void
+ internalTriggerEffect(int effectId, bool sfx, bool gfx);
+
Uint16 mId; /**< Unique being id */
Uint8 mSpriteDirection; /**< Facing direction */
Uint8 mDirection; /**< Walking direction */