From b2eb8daa8c39bcfd5fbd3a76dbbc432b43c561a9 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 608c25b8..cbc2ec7a 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -589,6 +589,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