summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-04-03 13:35:18 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-04-04 16:28:11 +0200
commit3a05c2d4e4f2229516182ebceea880d227b65708 (patch)
treed3a93585e55f1cac9a188ee0bb73b77a1db820d0 /src/resources
parent31010d6d3ba6600860a9f6dd925ac3d8e3f2c830 (diff)
downloadMana-3a05c2d4e4f2229516182ebceea880d227b65708.tar.gz
Mana-3a05c2d4e4f2229516182ebceea880d227b65708.tar.bz2
Mana-3a05c2d4e4f2229516182ebceea880d227b65708.tar.xz
Mana-3a05c2d4e4f2229516182ebceea880d227b65708.zip
Synced specials to latest manaserv changes
Reviewed-by: bjorn.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/specialdb.cpp15
-rw-r--r--src/resources/specialdb.h9
2 files changed, 5 insertions, 19 deletions
diff --git a/src/resources/specialdb.cpp b/src/resources/specialdb.cpp
index 5dac2e6c..426a1143 100644
--- a/src/resources/specialdb.cpp
+++ b/src/resources/specialdb.cpp
@@ -34,14 +34,11 @@ namespace
SpecialInfo::TargetMode SpecialDB::targetModeFromString(const std::string& str)
{
- if (str=="self") return SpecialInfo::TARGET_SELF;
- else if (str=="friend") return SpecialInfo::TARGET_FRIEND;
- else if (str=="enemy") return SpecialInfo::TARGET_ENEMY;
- else if (str=="being") return SpecialInfo::TARGET_BEING;
+ if (str=="being") return SpecialInfo::TARGET_BEING;
else if (str=="point") return SpecialInfo::TARGET_POINT;
logger->log("SpecialDB: Warning, unknown target mode \"%s\"", str.c_str() );
- return SpecialInfo::TARGET_SELF;
+ return SpecialInfo::TARGET_BEING;
}
void SpecialDB::load()
@@ -80,13 +77,9 @@ void SpecialDB::load()
info->name = XML::getProperty(special, "name", "");
info->icon = XML::getProperty(special, "icon", "");
- info->isActive = XML::getBoolProperty(special, "active", false);
- info->targetMode = targetModeFromString(XML::getProperty(special, "target", "self"));
+ info->targetMode = targetModeFromString(XML::getProperty(special, "target", "being"));
- info->level = XML::getProperty(special, "level", -1);
- info->hasLevel = info->level > -1;
-
- info->hasRechargeBar = XML::getBoolProperty(special, "recharge", false);
+ info->rechargeable = XML::getBoolProperty(special, "rechargeable", true);
info->rechargeNeeded = 0;
info->rechargeCurrent = 0;
diff --git a/src/resources/specialdb.h b/src/resources/specialdb.h
index 5c105ed5..dc1c26b6 100644
--- a/src/resources/specialdb.h
+++ b/src/resources/specialdb.h
@@ -28,9 +28,6 @@ struct SpecialInfo
{
enum TargetMode
{
- TARGET_SELF, // no target selection
- TARGET_FRIEND, // target friendly being
- TARGET_ENEMY, // target hostile being
TARGET_BEING, // target any being
TARGET_POINT // target map location
};
@@ -39,13 +36,9 @@ struct SpecialInfo
std::string name; // displayed name of special
std::string icon; // filename of graphical icon
- bool isActive; // true when the special can be used
TargetMode targetMode; // target mode
- bool hasLevel; // true when the special has levels
- int level; // level of special when applicable
-
- bool hasRechargeBar; // true when the special has a recharge bar
+ bool rechargeable; // true when the special has a recharge bar
int rechargeNeeded; // maximum recharge when applicable
int rechargeCurrent; // current recharge when applicable
};