From 1713f33dbd71b6378c8a4e58452fb16147f320d7 Mon Sep 17 00:00:00 2001 From: Majin Sniper Date: Fri, 20 Feb 2009 00:19:52 +0100 Subject: Added a pickup notification as particle effect. Also make a ui option to enable/disable this effect (default is off) and another option to disable the pickup notification in the chat log (default is on). --- src/localplayer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index b9654e63..ea05bd7e 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -587,6 +587,18 @@ void LocalPlayer::setXp(int xp) mXp = xp; } +void LocalPlayer::pickedUp(std::string item) +{ + if (mMap) + { + // Show pickup notification + particleEngine->addTextRiseFadeOutEffect(item, + gui->getInfoParticleFont (), + mPx + 16, mPy - 16, + 40, 220, 40, true); + } +} + bool LocalPlayer::withinAttackRange(Being *target) { int dist_x = abs(target->mX - mX); -- cgit v1.2.3-70-g09d2