aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/character.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/xeen/character.cpp')
-rw-r--r--engines/xeen/character.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index 77c01fe8fc..3776e51e5d 100644
--- a/engines/xeen/character.cpp
+++ b/engines/xeen/character.cpp
@@ -134,7 +134,7 @@ void Character::synchronize(Common::Serializer &s) {
}
// Synchronize spell list
- for (int i = 0; i < MAX_SPELLS_PER_CLASS; ++i)
+ for (int i = 0; i < CHAR_MAX_SPELLS; ++i)
s.syncAsByte(_spells[i]);
s.syncAsByte(_lloydMap);
s.syncAsByte(_lloydPosition.x);
@@ -1194,18 +1194,22 @@ bool Character::hasMissileWeapon() const {
return false;
}
-int Character::getClassCategory() const {
+SpellsCategory Character::getSpellsCategory() const {
switch (_class) {
+ case CLASS_PALADIN:
+ case CLASS_CLERIC:
+ return SPELLCAT_CLERICAL;
+
case CLASS_ARCHER:
case CLASS_SORCERER:
- return 1;
+ return SPELLCAT_WIZARDRY;
case CLASS_DRUID:
case CLASS_RANGER:
- return 2;
+ return SPELLCAT_DRUIDIC;
default:
- return 0;
+ return SPELLCAT_INVALID;
}
}