summaryrefslogtreecommitdiff
path: root/src/being
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
parenteed7ef561a9d590d507255118132676f868b1bd3 (diff)
downloadmanaverse-c544a5ebb53d51fa98392188d2b44dc6ec27c390.tar.gz
manaverse-c544a5ebb53d51fa98392188d2b44dc6ec27c390.tar.bz2
manaverse-c544a5ebb53d51fa98392188d2b44dc6ec27c390.tar.xz
manaverse-c544a5ebb53d51fa98392188d2b44dc6ec27c390.zip
move "change attack type" option into gamemodifiers.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp35
-rw-r--r--src/being/localplayer.h9
2 files changed, 2 insertions, 42 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");
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 835e85dbe..354339016 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -203,13 +203,8 @@ class LocalPlayer final : public Being,
void setCrazyMoveState(const unsigned int n)
{ mCrazyMoveState = n; }
- void switchMagicAttack(const bool forward);
-
void switchPvpAttack(const bool forward);
- int getMagicAttackType() const A_WARN_UNUSED
- { return mMagicAttackType; }
-
int getPvpAttackType() const A_WARN_UNUSED
{ return mPvpAttackType; }
@@ -414,8 +409,6 @@ class LocalPlayer final : public Being,
static std::string getMapDrawTypeString();
- std::string getMagicAttackString();
-
std::string getPvpAttackString();
std::string getImitationModeString();
@@ -486,8 +479,6 @@ class LocalPlayer final : public Being,
unsigned int mCrazyMoveState;
// move state. used if mMoveType == 2
unsigned int mMoveState;
- // magic attack type
- unsigned int mMagicAttackType;
// pvp attack type
unsigned int mPvpAttackType;
unsigned int mImitationMode;