From c41fcc1f637e76e5ff671b223ce6c151af89e7d3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 21 Jul 2014 21:25:47 +0300 Subject: move "change drop counter" option into gamemodifiers. --- src/being/localplayer.cpp | 34 +--------------------------------- src/being/localplayer.h | 11 ----------- 2 files changed, 1 insertion(+), 44 deletions(-) (limited to 'src/being') diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index aaaf2e411..3e6051643 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -114,7 +114,6 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) : StatListener(), mGMLevel(0), mCrazyMoveState(0), - mQuickDropCounter(config.getIntValue("quickDropCounter")), mMoveState(0), mPickUpType(config.getIntValue("pickUpType")), mMagicAttackType(config.getIntValue("magicAttackType")), @@ -1260,37 +1259,6 @@ void LocalPlayer::changeMode(unsigned *restrict const var, debugMsg(str.substr(4)); } -const unsigned quickDropCounterSize = 31; - -void LocalPlayer::changeQuickDropCounter(const bool forward) -{ - changeMode(&mQuickDropCounter, quickDropCounterSize, "quickDropCounter", - &LocalPlayer::getQuickDropCounterString, 1, true, forward); -} - -std::string LocalPlayer::getQuickDropCounterString() -{ - if (mQuickDropCounter > 9) - { - return strprintf("(%c) drop counter %u", static_cast( - 'a' + mQuickDropCounter - 10), mQuickDropCounter); - } - else - { - return strprintf("(%u) drop counter %u", - mQuickDropCounter, mQuickDropCounter); - } -} - -void LocalPlayer::setQuickDropCounter(const int n) -{ - if (n < 1 || n >= static_cast(quickDropCounterSize)) - return; - mQuickDropCounter = n; - config.setValue("quickDropCounter", mQuickDropCounter); - UpdateStatusListener::distributeEvent(); -} - const unsigned pickUpTypeSize = 7; void LocalPlayer::changePickUpType(const bool forward) @@ -3531,7 +3499,7 @@ void LocalPlayer::resetYellowBar() settings.attackType = config.resetIntValue("attackType"); mMagicAttackType = config.resetIntValue("magicAttackType"); mPvpAttackType = config.resetIntValue("pvpAttackType"); - mQuickDropCounter = config.resetIntValue("quickDropCounter"); + settings.quickDropCounter = config.resetIntValue("quickDropCounter"); mPickUpType = config.resetIntValue("pickUpType"); if (viewport) { diff --git a/src/being/localplayer.h b/src/being/localplayer.h index 4225be4a0..8660efd87 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -196,13 +196,6 @@ class LocalPlayer final : public Being, int getPickUpType() const A_WARN_UNUSED { return mPickUpType; } - int getQuickDropCounter() const A_WARN_UNUSED - { return mQuickDropCounter; } - - void setQuickDropCounter(const int n); - - void changeQuickDropCounter(const bool forward); - unsigned int getMoveState() const A_WARN_UNUSED { return mMoveState; } @@ -424,8 +417,6 @@ class LocalPlayer final : public Being, void setTestParticle(const std::string &fileName, const bool updateHash = true); - std::string getQuickDropCounterString(); - std::string getPickUpTypeString(); static std::string getMapDrawTypeString(); @@ -500,8 +491,6 @@ class LocalPlayer final : public Being, // crazy move state unsigned int mCrazyMoveState; - // quick drop counter - unsigned int mQuickDropCounter; // move state. used if mMoveType == 2 unsigned int mMoveState; // pick up type 1x1, normal aka 2x1, forward aka 2x3, 3x3, 3x3 + 1 -- cgit v1.2.3-70-g09d2