summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-21 13:00:00 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-21 13:00:00 +0300
commitcfffcc941898c4163e1bd62b8e514d3535511666 (patch)
treeb9889c95f521b81edaec32ac8b45fe859154ca3d /src/being
parentb02b4ce0b656a93fbcaa927b0ba289edfec6e22c (diff)
downloadplus-cfffcc941898c4163e1bd62b8e514d3535511666.tar.gz
plus-cfffcc941898c4163e1bd62b8e514d3535511666.tar.bz2
plus-cfffcc941898c4163e1bd62b8e514d3535511666.tar.xz
plus-cfffcc941898c4163e1bd62b8e514d3535511666.zip
move "change move to target type" option into gamemodifiers.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp62
-rw-r--r--src/being/localplayer.h9
2 files changed, 5 insertions, 66 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 956ff07eb..567834d48 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -120,7 +120,6 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) :
mPickUpType(config.getIntValue("pickUpType")),
mMagicAttackType(config.getIntValue("magicAttackType")),
mPvpAttackType(config.getIntValue("pvpAttackType")),
- mMoveToTargetType(config.getIntValue("moveToTargetType")),
mAttackType(config.getIntValue("attackType")),
mFollowMode(config.getIntValue("followMode")),
mImitationMode(config.getIntValue("imitationMode")),
@@ -1128,14 +1127,10 @@ void LocalPlayer::moveToTarget(int dist)
if (dist == -1)
{
- dist = mMoveToTargetType;
- if (mMoveToTargetType == 0)
+ dist = settings.moveToTargetType;
+ if (dist != 0)
{
- dist = 0;
- }
- else
- {
- switch (mMoveToTargetType)
+ switch (dist)
{
case 10:
dist = mAttackRange;
@@ -1150,7 +1145,6 @@ void LocalPlayer::moveToTarget(int dist)
dist = 2;
break;
default:
- dist = mMoveToTargetType;
break;
}
}
@@ -1269,52 +1263,6 @@ void LocalPlayer::changeMode(unsigned *restrict const var,
debugMsg(str.substr(4));
}
-static const unsigned moveToTargetTypeSize = 13;
-
-void LocalPlayer::changeMoveToTargetType(const bool forward)
-{
- changeMode(&mMoveToTargetType, moveToTargetTypeSize, "moveToTargetType",
- &LocalPlayer::getMoveToTargetTypeString, 0, true, forward);
-}
-
-static const char *const moveToTargetTypeStrings[] =
-{
- // TRANSLATORS: move to target type in status bar
- N_("(0) default moves to target"),
- // TRANSLATORS: move to target type in status bar
- N_("(1) moves to target in distance 1"),
- // TRANSLATORS: move to target type in status bar
- N_("(2) moves to target in distance 2"),
- // TRANSLATORS: move to target type in status bar
- N_("(3) moves to target in distance 3"),
- // TRANSLATORS: move to target type in status bar
- N_("(4) moves to target in distance 4"),
- // TRANSLATORS: move to target type in status bar
- N_("(5) moves to target in distance 5"),
- // TRANSLATORS: move to target type in status bar
- N_("(6) moves to target in distance 6"),
- // TRANSLATORS: move to target type in status bar
- N_("(7) moves to target in distance 7"),
- // TRANSLATORS: move to target type in status bar
- N_("(8) moves to target in distance 8"),
- // TRANSLATORS: move to target type in status bar
- N_("(9) moves to target in distance 9"),
- // TRANSLATORS: move to target type in status bar
- N_("(A) moves to target in attack range"),
- // TRANSLATORS: move to target type in status bar
- N_("(a) archer attack range"),
- // TRANSLATORS: move to target type in status bar
- N_("(B) moves to target in attack range - 1"),
- // TRANSLATORS: move to target type in status bar
- N_("(?) move to target")
-};
-
-std::string LocalPlayer::getMoveToTargetTypeString()
-{
- return gettext(getVarItem(&moveToTargetTypeStrings[0],
- mMoveToTargetType, moveToTargetTypeSize));
-}
-
static const unsigned followModeSize = 4;
void LocalPlayer::changeFollowMode(const bool forward)
@@ -3567,7 +3515,7 @@ void LocalPlayer::fixAttackTarget()
if (!mMap || !mTarget)
return;
- if (mMoveToTargetType == 7 || !mAttackType
+ if (settings.moveToTargetType == 7 || !mAttackType
|| !config.getBoolValue("autofixPos"))
{
return;
@@ -3664,7 +3612,7 @@ void LocalPlayer::resetYellowBar()
{
settings.moveType = 0;
settings.crazyMoveType = config.resetIntValue("crazyMoveType");
- mMoveToTargetType = config.resetIntValue("moveToTargetType");
+ settings.moveToTargetType = config.resetIntValue("moveToTargetType");
mFollowMode = config.resetIntValue("followMode");
mAttackWeaponType = config.resetIntValue("attackWeaponType");
mAttackType = config.resetIntValue("attackType");
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 319825e65..20a16c5c7 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -240,9 +240,6 @@ class LocalPlayer final : public Being,
int getPvpAttackType() const A_WARN_UNUSED
{ return mPvpAttackType; }
- int getMoveToTargetType() const A_WARN_UNUSED
- { return mMoveToTargetType; }
-
int getDisableGameModifiers() const A_WARN_UNUSED
{ return mDisableGameModifiers; }
@@ -250,8 +247,6 @@ class LocalPlayer final : public Being,
void tryPingRequest();
- void changeMoveToTargetType(const bool forward);
-
void switchGameModifiers();
void magicAttack() const;
@@ -444,8 +439,6 @@ class LocalPlayer final : public Being,
void setTestParticle(const std::string &fileName,
const bool updateHash = true);
- std::string getMoveToTargetTypeString();
-
std::string getFollowModeString();
std::string getAttackWeaponTypeString();
@@ -540,8 +533,6 @@ class LocalPlayer final : public Being,
unsigned int mMagicAttackType;
// pvp attack type
unsigned int mPvpAttackType;
- // type how move to target
- unsigned int mMoveToTargetType;
unsigned int mAttackType;
unsigned int mFollowMode;
unsigned int mImitationMode;