-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
378 additions
and
377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 22 additions & 22 deletions
44
...SArena/src/Entities/AttributeModifier.cpp → OpenTESArena/src/Stats/AttributeModifier.cpp
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
#include <unordered_map> | ||
|
||
#include "AttributeModifier.h" | ||
#include "AttributeModifierName.h" | ||
|
||
// @todo: very old, replace this with ExeData. | ||
const std::unordered_map<AttributeModifierName, std::string> AttributeModifierDisplayNames = | ||
{ | ||
{ AttributeModifierName::MeleeDamage, "Melee Damage" }, | ||
{ AttributeModifierName::MagicDefense, "Magic Defense" }, | ||
{ AttributeModifierName::ToHit, "To Hit" }, | ||
{ AttributeModifierName::ToDefense, "To Defense" }, | ||
{ AttributeModifierName::HealthPerLevel, "Health Per Level" }, | ||
{ AttributeModifierName::HealModifier, "Heal Modifier" }, | ||
{ AttributeModifierName::Charisma, "Charisma" } | ||
}; | ||
|
||
const std::string &AttributeModifier::toString(AttributeModifierName modifierName) | ||
{ | ||
const std::string &displayName = AttributeModifierDisplayNames.at(modifierName); | ||
return displayName; | ||
} | ||
#include <unordered_map> | ||
|
||
#include "AttributeModifier.h" | ||
#include "AttributeModifierName.h" | ||
|
||
// @todo: very old, replace this with ExeData. | ||
const std::unordered_map<AttributeModifierName, std::string> AttributeModifierDisplayNames = | ||
{ | ||
{ AttributeModifierName::MeleeDamage, "Melee Damage" }, | ||
{ AttributeModifierName::MagicDefense, "Magic Defense" }, | ||
{ AttributeModifierName::ToHit, "To Hit" }, | ||
{ AttributeModifierName::ToDefense, "To Defense" }, | ||
{ AttributeModifierName::HealthPerLevel, "Health Per Level" }, | ||
{ AttributeModifierName::HealModifier, "Heal Modifier" }, | ||
{ AttributeModifierName::Charisma, "Charisma" } | ||
}; | ||
|
||
const std::string &AttributeModifier::toString(AttributeModifierName modifierName) | ||
{ | ||
const std::string &displayName = AttributeModifierDisplayNames.at(modifierName); | ||
return displayName; | ||
} |
32 changes: 16 additions & 16 deletions
32
...TESArena/src/Entities/AttributeModifier.h → OpenTESArena/src/Stats/AttributeModifier.h
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#ifndef ATTRIBUTE_MODIFIER_H | ||
#define ATTRIBUTE_MODIFIER_H | ||
|
||
#include <string> | ||
|
||
enum class AttributeModifierName; | ||
|
||
// This namespace is just for toString() purposes. Obtaining the modifier value is a | ||
// simple function, and can be done in the PrimaryAttribute class because it's the same | ||
// for all modifiers. | ||
namespace AttributeModifier | ||
{ | ||
const std::string &toString(AttributeModifierName modifierName); | ||
} | ||
|
||
#endif | ||
#ifndef ATTRIBUTE_MODIFIER_H | ||
#define ATTRIBUTE_MODIFIER_H | ||
|
||
#include <string> | ||
|
||
enum class AttributeModifierName; | ||
|
||
// This namespace is just for toString() purposes. Obtaining the modifier value is a | ||
// simple function, and can be done in the PrimaryAttribute class because it's the same | ||
// for all modifiers. | ||
namespace AttributeModifier | ||
{ | ||
const std::string &toString(AttributeModifierName modifierName); | ||
} | ||
|
||
#endif |
56 changes: 28 additions & 28 deletions
56
...rena/src/Entities/AttributeModifierName.h → ...ESArena/src/Stats/AttributeModifierName.h
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
#ifndef ATTRIBUTE_MODIFIER_NAME_H | ||
#define ATTRIBUTE_MODIFIER_NAME_H | ||
|
||
// A unique identifier for each [-5, 5] attribute modifier. | ||
// The new design will use tooltips on the attributes instead of showing them | ||
// directly with the other attributes. | ||
// Carry weight is not included because it's not a [-5, 5] value. | ||
enum class AttributeModifierName | ||
{ | ||
// Strength | ||
MeleeDamage, | ||
|
||
// Willpower | ||
MagicDefense, | ||
|
||
// Agility | ||
ToHit, | ||
ToDefense, | ||
|
||
// Endurance | ||
HealthPerLevel, | ||
HealModifier, | ||
|
||
// Personality | ||
Charisma | ||
}; | ||
|
||
#endif | ||
#ifndef ATTRIBUTE_MODIFIER_NAME_H | ||
#define ATTRIBUTE_MODIFIER_NAME_H | ||
|
||
// A unique identifier for each [-5, 5] attribute modifier. | ||
// The new design will use tooltips on the attributes instead of showing them | ||
// directly with the other attributes. | ||
// Carry weight is not included because it's not a [-5, 5] value. | ||
enum class AttributeModifierName | ||
{ | ||
// Strength | ||
MeleeDamage, | ||
|
||
// Willpower | ||
MagicDefense, | ||
|
||
// Agility | ||
ToHit, | ||
ToDefense, | ||
|
||
// Endurance | ||
HealthPerLevel, | ||
HealModifier, | ||
|
||
// Personality | ||
Charisma | ||
}; | ||
|
||
#endif |
Oops, something went wrong.