From 566a6fb8d0fc35267b43721f7e1802ba3475af3d Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 28 Aug 2008 18:32:11 +0000 Subject: 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. --- src/being.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/being.h') 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 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 */ -- cgit v1.2.3-70-g09d2