summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-21 23:33:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-21 23:33:48 +0300
commit90bfc776dc4975c523c4c35fb0778cd9b77dc164 (patch)
treed7fdd90433077b20d847ee39de8a05d33509fcd3 /src/being/localplayer.cpp
parentc544a5ebb53d51fa98392188d2b44dc6ec27c390 (diff)
downloadmanaverse-90bfc776dc4975c523c4c35fb0778cd9b77dc164.tar.gz
manaverse-90bfc776dc4975c523c4c35fb0778cd9b77dc164.tar.bz2
manaverse-90bfc776dc4975c523c4c35fb0778cd9b77dc164.tar.xz
manaverse-90bfc776dc4975c523c4c35fb0778cd9b77dc164.zip
move "change pvp attack type" option into gamemodifiers.
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 84768e443..baeb75146 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -115,7 +115,6 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) :
mGMLevel(0),
mCrazyMoveState(0),
mMoveState(0),
- mPvpAttackType(config.getIntValue("pvpAttackType")),
mImitationMode(config.getIntValue("imitationMode")),
mLastTargetX(0),
mLastTargetY(0),
@@ -1286,34 +1285,6 @@ std::string LocalPlayer::getMapDrawTypeString()
viewport->getMapDrawType(), debugPathSize));
}
-const unsigned pvpAttackSize = 4;
-
-void LocalPlayer::switchPvpAttack(const bool forward)
-{
- changeMode(&mPvpAttackType, pvpAttackSize, "pvpAttackType",
- &LocalPlayer::getPvpAttackString, 0, true, forward);
-}
-
-static const char *const pvpAttackStrings[] =
-{
- // TRANSLATORS: player attack type in status bar
- N_("(a) attack all players"),
- // TRANSLATORS: player attack type in status bar
- N_("(f) attack all except friends"),
- // TRANSLATORS: player attack type in status bar
- N_("(b) attack bad relations"),
- // TRANSLATORS: player attack type in status bar
- N_("(d) don't attack players"),
- // TRANSLATORS: player attack type in status bar
- N_("(?) pvp attack")
-};
-
-std::string LocalPlayer::getPvpAttackString()
-{
- return gettext(getVarItem(&pvpAttackStrings[0],
- mPvpAttackType, pvpAttackSize));
-}
-
const unsigned imitationModeSize = 2;
void LocalPlayer::changeImitationMode(const bool forward)
@@ -3433,7 +3404,7 @@ void LocalPlayer::resetYellowBar()
settings.attackWeaponType = config.resetIntValue("attackWeaponType");
settings.attackType = config.resetIntValue("attackType");
settings.magicAttackType = config.resetIntValue("magicAttackType");
- mPvpAttackType = config.resetIntValue("pvpAttackType");
+ settings.pvpAttackType = config.resetIntValue("pvpAttackType");
settings.quickDropCounter = config.resetIntValue("quickDropCounter");
settings.pickUpType = config.resetIntValue("pickUpType");
if (viewport)
@@ -3478,7 +3449,7 @@ bool LocalPlayer::checAttackPermissions(const Being *const target) const
if (!target)
return false;
- switch (mPvpAttackType)
+ switch (settings.pvpAttackType)
{
case 0:
return true;