summaryrefslogtreecommitdiff
path: root/src/game-server/character.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/character.cpp')
-rw-r--r--src/game-server/character.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/game-server/character.cpp b/src/game-server/character.cpp
index 8831e501..a8d29625 100644
--- a/src/game-server/character.cpp
+++ b/src/game-server/character.cpp
@@ -89,13 +89,11 @@ CharacterComponent::CharacterComponent(Entity &entity, MessageIn &msg):
{
auto *beingComponent = entity.getComponent<BeingComponent>();
- const AttributeManager::AttributeScope &attributes =
- attributeManager->getAttributeScope(CharacterScope);
+ auto &attributeScope = attributeManager->getAttributeScope(CharacterScope);
LOG_DEBUG("Character creation: initialisation of "
- << attributes.size() << " attributes.");
- for (auto attributeScope : attributes)
- beingComponent->createAttribute(attributeScope.first,
- *attributeScope.second);
+ << attributeScope.size() << " attributes.");
+ for (auto &attributeIt : attributeScope)
+ beingComponent->createAttribute(attributeIt.first, attributeIt.second);
auto *actorComponent = entity.getComponent<ActorComponent>();
actorComponent->setWalkMask(Map::BLOCKMASK_WALL);
@@ -499,7 +497,7 @@ void CharacterComponent::levelup(Entity &entity)
}
AttribmodResponseCode CharacterComponent::useCharacterPoint(Entity &entity,
- size_t attribute)
+ int attribute)
{
auto *beingComponent = entity.getComponent<BeingComponent>();
@@ -517,7 +515,7 @@ AttribmodResponseCode CharacterComponent::useCharacterPoint(Entity &entity,
}
AttribmodResponseCode CharacterComponent::useCorrectionPoint(Entity &entity,
- size_t attribute)
+ int attribute)
{
auto *beingComponent = entity.getComponent<BeingComponent>();