summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-21 23:04:11 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-21 23:04:11 +0300
commitc544a5ebb53d51fa98392188d2b44dc6ec27c390 (patch)
tree030bef947a6a4a0b1c302b67013555f54834d49d /src/being/localplayer.cpp
parenteed7ef561a9d590d507255118132676f868b1bd3 (diff)
downloadmanaplus-c544a5ebb53d51fa98392188d2b44dc6ec27c390.tar.gz
manaplus-c544a5ebb53d51fa98392188d2b44dc6ec27c390.tar.bz2
manaplus-c544a5ebb53d51fa98392188d2b44dc6ec27c390.tar.xz
manaplus-c544a5ebb53d51fa98392188d2b44dc6ec27c390.zip
move "change attack type" option into gamemodifiers.
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp35
1 files changed, 2 insertions, 33 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 035697a73..84768e443 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),
- mMagicAttackType(config.getIntValue("magicAttackType")),
mPvpAttackType(config.getIntValue("pvpAttackType")),
mImitationMode(config.getIntValue("imitationMode")),
mLastTargetX(0),
@@ -1287,36 +1286,6 @@ std::string LocalPlayer::getMapDrawTypeString()
viewport->getMapDrawType(), debugPathSize));
}
-const unsigned magicAttackSize = 5;
-
-void LocalPlayer::switchMagicAttack(const bool forward)
-{
- changeMode(&mMagicAttackType, magicAttackSize, "magicAttackType",
- &LocalPlayer::getMagicAttackString, 0, true, forward);
-}
-
-static const char *const magicAttackStrings[] =
-{
- // TRANSLATORS: magic attack in status bar
- N_("(f) use #flar for magic attack"),
- // TRANSLATORS: magic attack in status bar
- N_("(c) use #chiza for magic attack"),
- // TRANSLATORS: magic attack in status bar
- N_("(I) use #ingrav for magic attack"),
- // TRANSLATORS: magic attack in status bar
- N_("(F) use #frillyar for magic attack"),
- // TRANSLATORS: magic attack in status bar
- N_("(U) use #upmarmu for magic attack"),
- // TRANSLATORS: magic attack in status bar
- N_("(?) magic attack")
-};
-
-std::string LocalPlayer::getMagicAttackString()
-{
- return gettext(getVarItem(&magicAttackStrings[0],
- mMagicAttackType, magicAttackSize));
-}
-
const unsigned pvpAttackSize = 4;
void LocalPlayer::switchPvpAttack(const bool forward)
@@ -2445,7 +2414,7 @@ void LocalPlayer::magicAttack() const
return;
}
- switch (mMagicAttackType)
+ switch (settings.magicAttackType)
{
// flar W00
case 0:
@@ -3463,7 +3432,7 @@ void LocalPlayer::resetYellowBar()
settings.followMode = config.resetIntValue("followMode");
settings.attackWeaponType = config.resetIntValue("attackWeaponType");
settings.attackType = config.resetIntValue("attackType");
- mMagicAttackType = config.resetIntValue("magicAttackType");
+ settings.magicAttackType = config.resetIntValue("magicAttackType");
mPvpAttackType = config.resetIntValue("pvpAttackType");
settings.quickDropCounter = config.resetIntValue("quickDropCounter");
settings.pickUpType = config.resetIntValue("pickUpType");