summaryrefslogtreecommitdiff
path: root/src/game-server/attributemanager.h
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-08-23 19:19:27 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-08-26 22:56:48 +0200
commit61766a59ad152ab6c9a6f3fd318ed9256b573be9 (patch)
treeb1a3b383056f8c9673b654cf27db1dd65e5d858f /src/game-server/attributemanager.h
parent64837cfccc3039fdd25d2e34c5f81949d34e1c95 (diff)
downloadmanaserv-61766a59ad152ab6c9a6f3fd318ed9256b573be9.tar.gz
manaserv-61766a59ad152ab6c9a6f3fd318ed9256b573be9.tar.bz2
manaserv-61766a59ad152ab6c9a6f3fd318ed9256b573be9.tar.xz
manaserv-61766a59ad152ab6c9a6f3fd318ed9256b573be9.zip
Moved AttributeInfo into a seperate file
Diffstat (limited to 'src/game-server/attributemanager.h')
-rw-r--r--src/game-server/attributemanager.h55
1 files changed, 2 insertions, 53 deletions
diff --git a/src/game-server/attributemanager.h b/src/game-server/attributemanager.h
index c6782130..13dcf1fb 100644
--- a/src/game-server/attributemanager.h
+++ b/src/game-server/attributemanager.h
@@ -21,7 +21,6 @@
#ifndef ATTRIBUTEMANAGER_H
#define ATTRIBUTEMANAGER_H
-#include <limits>
#include <map>
#include <set>
#include <string>
@@ -30,6 +29,8 @@
#include "utils/string.h"
#include "utils/xml.h"
+class AttributeInfo;
+
enum ScopeType
{
BeingScope = 0,
@@ -40,37 +41,6 @@ enum ScopeType
};
/**
- * Stackable types.
- * @todo non-stackable malus layers
- */
-enum StackableType
-{
- Stackable,
- NonStackable,
- NonStackableBonus
-};
-
-/**
- * Attribute augmentation methods.
- */
-enum ModifierEffectType
-{
- Multiplicative,
- Additive
-};
-
-struct AttributeModifier
-{
- AttributeModifier(StackableType s, ModifierEffectType effect) :
- stackableType(s),
- effectType(effect)
- {}
-
- StackableType stackableType;
- ModifierEffectType effectType;
-};
-
-/**
* Identifies a modifier by the attribute id that it applies to and its layer
* index in the stack of modifiers for that attribute.
*/
@@ -91,27 +61,6 @@ struct ModifierLocation
class AttributeManager
{
public:
- struct AttributeInfo {
- AttributeInfo(int id, const std::string &name):
- id(id),
- name(name),
- minimum(std::numeric_limits<double>::min()),
- maximum(std::numeric_limits<double>::max()),
- modifiable(false)
- {}
-
- int id;
- std::string name;
-
- /** The minimum and maximum permitted attribute values. */
- double minimum;
- double maximum;
- /** Tells whether the base attribute is modifiable by the player */
- bool modifiable;
- /** Effect modifier type: stackability and modification type. */
- std::vector<AttributeModifier> modifiers;
- };
-
AttributeManager()
{}