summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-21 21:25:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-21 21:25:47 +0300
commitc41fcc1f637e76e5ff671b223ce6c151af89e7d3 (patch)
treeae7afae3d8c30eff4569fc0c41fb8d0ef99ecd94 /src/being
parent8b6afd0d756b9fc66c9f4de3ef452c24f64c87d1 (diff)
downloadManaVerse-c41fcc1f637e76e5ff671b223ce6c151af89e7d3.tar.gz
ManaVerse-c41fcc1f637e76e5ff671b223ce6c151af89e7d3.tar.bz2
ManaVerse-c41fcc1f637e76e5ff671b223ce6c151af89e7d3.tar.xz
ManaVerse-c41fcc1f637e76e5ff671b223ce6c151af89e7d3.zip
move "change drop counter" option into gamemodifiers.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp34
-rw-r--r--src/being/localplayer.h11
2 files changed, 1 insertions, 44 deletions
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<signed char>(
- '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<signed>(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