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-08-28 18:32:11 +0000
commit566a6fb8d0fc35267b43721f7e1802ba3475af3d (patch)
treef5d3e09bda9e8e66be885b581f28cad4130ca645 /src/being.h
parentb506fe0ff8a2039167aa7c349087af4dd03e1921 (diff)
downloadmana-566a6fb8d0fc35267b43721f7e1802ba3475af3d.tar.gz
mana-566a6fb8d0fc35267b43721f7e1802ba3475af3d.tar.bz2
mana-566a6fb8d0fc35267b43721f7e1802ba3475af3d.tar.xz
mana-566a6fb8d0fc35267b43721f7e1802ba3475af3d.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.
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/being.h b/src/being.h
index 046f7b9a..c4f34503 100644
--- a/src/being.h
+++ b/src/being.h
@@ -365,6 +365,16 @@ class Being : public Sprite
void setEmote(Uint8 emotion, Uint8 emote_time) { mEmotion = emotion; mEmotionTime = emote_time; }
+ /**
+ * 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); }
+
const std::auto_ptr<Equipment> mEquipment;
protected:
@@ -378,6 +388,16 @@ class Being : public Sprite
*/
SpriteDirection getSpriteDirection() const;
+ /**
+ * 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);
+
Uint32 mId; /**< Unique sprite id */
Uint16 mWalkSpeed; /**< Walking speed */
Uint8 mDirection; /**< Facing direction */