xoreos
0.0.5
|
#include <chargenchoices.h>
Public Member Functions | |
CharGenChoices () | |
~CharGenChoices () | |
void | applyChoices () |
void | reset () |
void | resetPackage () |
const Creature & | getCharacter () |
void | setGender (Gender gender) |
void | setRace (uint32 race) |
void | setPortrait (const Common::UString &portrait) |
void | setClass (uint32 classId) |
void | setAlign (uint8 goodness, uint8 lawfulness) |
void | setAbilities (std::vector< uint8 > abilities, std::vector< uint8 > racialAbilities) |
void | setPackage (uint8 package) |
void | setSkill (size_t skillIndex, uint8 rank) |
void | setNotUsedSkills (uint8 notUsedSkills) |
void | setFeat (uint32 feat) |
void | setSpellSchool (uint8 spellSchool) |
void | setDomains (uint8 domain1, uint8 domain2) |
void | setSpell (size_t spellLevel, uint16 spell) |
void | setSoundSet (uint32 soundSetID) |
void | useCharacter (Module *module) |
bool | hasFeat (uint32 featId) const |
bool | hasPrereqFeat (uint32 featId, bool isClassFeat) |
uint32 | getClass () const |
uint32 | getRace () const |
bool | getAlign (uint8 &goodness, uint8 &lawfulness) const |
uint8 | getAbility (Ability ability) const |
uint8 | getTotalAbility (Ability ability) const |
int8 | getAbilityModifier (Ability ability) |
void | getFeats (std::vector< uint32 > &feats) |
uint8 | getPackage () const |
uint8 | getSpellSchool () const |
void | getPrefFeats (std::vector< uint32 > &feats) |
uint8 | getPrefSpellSchool () |
void | getPrefSkills (std::vector< uint8 > &skills) |
void | getPrefDomains (uint8 &domain1, uint8 &domain2) |
void | getPrefSpells (std::vector< std::vector< uint16 > > &spells) |
uint8 | computeAvailSkillRank () |
void | getSkillItems (std::vector< SkillItem > &skills) |
void | getFeatItems (std::list< FeatItem > &feats, uint8 &normalFeats, uint8 &bonusFeats) |
Private Member Functions | |
void | init () |
Private Attributes | |
Creature * | _creature |
std::vector< std::vector< uint16 > > | _spells |
std::vector< uint32 > | _normalFeats |
std::vector< uint32 > | _racialFeats |
std::vector< uint32 > | _classFeats |
std::vector< uint8 > | _abilities |
std::vector< uint8 > | _racialAbilities |
std::vector< uint8 > | _skills |
uint32 | _classId |
uint32 | _soundSet |
uint8 | _goodness |
uint8 | _lawfulness |
uint8 | _package |
uint8 | _notUsedSkills |
uint8 | _spellSchool |
uint8 | _domain1 |
uint8 | _domain2 |
bool | _characterUsed |
Definition at line 69 of file chargenchoices.h.
Engines::NWN::CharGenChoices::CharGenChoices | ( | ) |
Definition at line 46 of file chargenchoices.cpp.
References _creature, and init().
Engines::NWN::CharGenChoices::~CharGenChoices | ( | ) |
Definition at line 52 of file chargenchoices.cpp.
References _characterUsed, and _creature.
void Engines::NWN::CharGenChoices::applyChoices | ( | ) |
Definition at line 72 of file chargenchoices.cpp.
References _abilities, _classFeats, _classId, _creature, _domain1, _domain2, _goodness, _lawfulness, _normalFeats, _racialAbilities, _racialFeats, _skills, _soundSet, _spells, _spellSchool, Engines::NWN::Creature::addEquippedItem(), Engines::NWN::Creature::changeClassLevel(), Engines::NWN::Creature::getRace(), Aurora::GFF3File::getTopLevel(), Aurora::kFileTypeUTI, Engines::NWN::Creature::setAbility(), Engines::NWN::Creature::setAppearance(), Engines::NWN::Creature::setColorHair(), Engines::NWN::Creature::setColorSkin(), Engines::NWN::Creature::setColorTatto1(), Engines::NWN::Creature::setColorTatto2(), Engines::NWN::Creature::setDomains(), Engines::NWN::Creature::setFeat(), Engines::NWN::Creature::setGoodEvil(), Engines::NWN::Creature::setHead(), Engines::NWN::Creature::setKnownSpell(), Engines::NWN::Creature::setLawChaos(), Engines::NWN::Creature::setPhenotype(), Engines::NWN::Creature::setSchool(), Engines::NWN::Creature::setSkillRank(), Engines::NWN::Creature::setSoundSet(), and UINT8_MAX.
Referenced by Engines::NWN::CharGenMenu::callbackActive().
uint8 Engines::NWN::CharGenChoices::computeAvailSkillRank | ( | ) |
Definition at line 560 of file chargenchoices.cpp.
References _classId, _creature, getAbilityModifier(), Engines::NWN::Creature::getHitDice(), Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), hasFeat(), Engines::NWN::kAbilityIntelligence, and TwoDAReg.
Referenced by Engines::NWN::CharSkills::createSkillsList().
Definition at line 455 of file chargenchoices.cpp.
References _abilities.
Referenced by hasPrereqFeat(), and Engines::NWN::CharAttributes::hide().
Definition at line 463 of file chargenchoices.cpp.
References getTotalAbility().
Referenced by computeAvailSkillRank(), and Engines::NWN::CharSpells::computeRemainingSpells().
Definition at line 445 of file chargenchoices.cpp.
References _goodness, and _lawfulness.
Referenced by Engines::NWN::CharAlignment::hide().
const Creature & Engines::NWN::CharGenChoices::getCharacter | ( | ) |
Definition at line 161 of file chargenchoices.cpp.
References _creature.
Referenced by Engines::NWN::CharPackage::callbackActive(), Engines::NWN::CharSpells::computeRemainingSpells(), Engines::NWN::CharRace::hide(), Engines::NWN::CharSex::hide(), Engines::NWN::CharPortrait::initPortraitList(), Engines::NWN::CharInfoVoice::initVoicesList(), Engines::NWN::CharSpells::makeSpellsList(), and Engines::NWN::CharPortrait::show().
uint32 Engines::NWN::CharGenChoices::getClass | ( | ) | const |
Definition at line 437 of file chargenchoices.cpp.
References _classId.
Referenced by Engines::NWN::CharPackage::callbackActive(), Engines::NWN::CharSpells::computeRemainingSpells(), Engines::NWN::CharPackage::createPackageList(), Engines::NWN::CharClass::hide(), Engines::NWN::CharSpells::makeSpellsList(), Engines::NWN::CharAlignment::setRecommend(), Engines::NWN::CharAttributes::setRecommend(), and Engines::NWN::CharAlignment::setRestrict().
void Engines::NWN::CharGenChoices::getFeatItems | ( | std::list< FeatItem > & | feats, |
uint8 & | normalFeats, | ||
uint8 & | bonusFeats | ||
) |
Definition at line 622 of file chargenchoices.cpp.
References _classId, _creature, Engines::NWN::FeatItem::description, Aurora::TwoDARow::empty(), Engines::NWN::FeatItem::featId, Engines::NWN::Creature::getHitDice(), Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), hasPrereqFeat(), Aurora::TwoDAFile::headerToColumn(), Engines::NWN::FeatItem::icon, Engines::NWN::FeatItem::isMasterFeat, Aurora::kFieldIDInvalid, Engines::NWN::FeatItem::list, Engines::NWN::FeatItem::masterFeat, Engines::NWN::FeatItem::name, TalkMan, and TwoDAReg.
Referenced by Engines::NWN::CharFeats::CharFeats(), and setPackage().
void Engines::NWN::CharGenChoices::getFeats | ( | std::vector< uint32 > & | feats | ) |
Definition at line 478 of file chargenchoices.cpp.
References _classFeats, and _racialFeats.
Referenced by Engines::NWN::CharFeats::makeKnownList().
uint8 Engines::NWN::CharGenChoices::getPackage | ( | ) | const |
Definition at line 470 of file chargenchoices.cpp.
References _package.
Definition at line 524 of file chargenchoices.cpp.
References _classId, _package, Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), TwoDAReg, and UINT8_MAX.
Referenced by setPackage(), and Engines::NWN::CharDomain::setRecommendedDomains().
void Engines::NWN::CharGenChoices::getPrefFeats | ( | std::vector< uint32 > & | feats | ) |
Definition at line 493 of file chargenchoices.cpp.
References _classId, _package, Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), hasFeat(), hasPrereqFeat(), TwoDAReg, and UINT8_MAX.
Referenced by setPackage(), and Engines::NWN::CharFeats::setRecommendedFeats().
void Engines::NWN::CharGenChoices::getPrefSkills | ( | std::vector< uint8 > & | skills | ) |
Definition at line 514 of file chargenchoices.cpp.
References _classId, _package, Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), TwoDAReg, and UINT8_MAX.
Referenced by setPackage(), and Engines::NWN::CharSkills::setRecommendedSkills().
void Engines::NWN::CharGenChoices::getPrefSpells | ( | std::vector< std::vector< uint16 > > & | spells | ) |
Definition at line 532 of file chargenchoices.cpp.
References _classId, _package, Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), TwoDAReg, and UINT8_MAX.
Referenced by setPackage(), and Engines::NWN::CharSpells::setRecommendedSpells().
uint8 Engines::NWN::CharGenChoices::getPrefSpellSchool | ( | ) |
Definition at line 483 of file chargenchoices.cpp.
References _classId, _package, Aurora::TwoDARow::empty(), Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), TwoDAReg, and UINT8_MAX.
Referenced by setPackage().
uint32 Engines::NWN::CharGenChoices::getRace | ( | ) | const |
Definition at line 441 of file chargenchoices.cpp.
References _creature, and Engines::NWN::Creature::getRace().
Referenced by Engines::NWN::CharAttributes::show().
void Engines::NWN::CharGenChoices::getSkillItems | ( | std::vector< SkillItem > & | skills | ) |
Definition at line 579 of file chargenchoices.cpp.
References _classId, _creature, Engines::NWN::Creature::getHitDice(), Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), Engines::NWN::SkillItem::help, Engines::NWN::SkillItem::icon, Engines::NWN::SkillItem::isClassSkill, Engines::NWN::SkillItem::maxRank, Engines::NWN::SkillItem::minRank, Engines::NWN::SkillItem::name, Engines::NWN::SkillItem::rank, Engines::NWN::SkillItem::skillID, TalkMan, and TwoDAReg.
Referenced by Engines::NWN::CharSkills::createSkillsList().
uint8 Engines::NWN::CharGenChoices::getSpellSchool | ( | ) | const |
Definition at line 474 of file chargenchoices.cpp.
References _spellSchool.
Referenced by Engines::NWN::CharSchool::hide(), and Engines::NWN::CharSpells::makeSpellsList().
Definition at line 459 of file chargenchoices.cpp.
References _abilities, and _racialAbilities.
Referenced by getAbilityModifier(), and Engines::NWN::CharSpells::makeSpellsList().
bool Engines::NWN::CharGenChoices::hasFeat | ( | uint32 | featId | ) | const |
Definition at line 335 of file chargenchoices.cpp.
References _classFeats, _creature, _normalFeats, _racialFeats, and Engines::NWN::Creature::hasFeat().
Referenced by computeAvailSkillRank(), getPrefFeats(), hasPrereqFeat(), and setClass().
bool Engines::NWN::CharGenChoices::hasPrereqFeat | ( | uint32 | featId, |
bool | isClassFeat | ||
) |
Definition at line 351 of file chargenchoices.cpp.
References _creature, _skills, Aurora::TwoDARow::empty(), getAbility(), Engines::NWN::Creature::getClassLevel(), Engines::NWN::Creature::getHitDice(), Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), hasFeat(), Engines::NWN::kAbilityCharisma, Engines::NWN::kAbilityConstitution, Engines::NWN::kAbilityDexterity, Engines::NWN::kAbilityIntelligence, Engines::NWN::kAbilityStrength, Engines::NWN::kAbilityWisdom, and TwoDAReg.
Referenced by getFeatItems(), and getPrefFeats().
|
private |
Definition at line 57 of file chargenchoices.cpp.
References _abilities, _classId, _goodness, _lawfulness, _notUsedSkills, _racialAbilities, _soundSet, and resetPackage().
Referenced by CharGenChoices(), and reset().
void Engines::NWN::CharGenChoices::reset | ( | ) |
Definition at line 135 of file chargenchoices.cpp.
References _classFeats, _creature, _racialFeats, init(), and resetPackage().
Referenced by Engines::NWN::CharGenMenu::reset().
void Engines::NWN::CharGenChoices::resetPackage | ( | ) |
Definition at line 147 of file chargenchoices.cpp.
References _domain1, _domain2, _normalFeats, _package, _skills, _spells, _spellSchool, and UINT8_MAX.
Referenced by init(), Engines::NWN::CharPackage::reset(), and reset().
void Engines::NWN::CharGenChoices::setAbilities | ( | std::vector< uint8 > | abilities, |
std::vector< uint8 > | racialAbilities | ||
) |
Definition at line 218 of file chargenchoices.cpp.
References _abilities, and _racialAbilities.
Referenced by Engines::NWN::CharAttributes::callbackActive().
Definition at line 213 of file chargenchoices.cpp.
References _goodness, and _lawfulness.
Referenced by Engines::NWN::CharAlignment::callbackActive(), and Engines::NWN::CharAlignment::reset().
void Engines::NWN::CharGenChoices::setClass | ( | uint32 | classId | ) |
Definition at line 193 of file chargenchoices.cpp.
References _classFeats, _classId, _creature, Engines::NWN::Creature::getHitDice(), Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), hasFeat(), and TwoDAReg.
Referenced by Engines::NWN::CharClass::callbackActive().
Definition at line 314 of file chargenchoices.cpp.
References _domain1, and _domain2.
Referenced by Engines::NWN::CharDomain::callbackActive(), and Engines::NWN::CharDomain::reset().
void Engines::NWN::CharGenChoices::setFeat | ( | uint32 | feat | ) |
Definition at line 306 of file chargenchoices.cpp.
References _normalFeats.
Referenced by Engines::NWN::CharFeats::callbackActive().
void Engines::NWN::CharGenChoices::setGender | ( | Gender | gender | ) |
Definition at line 165 of file chargenchoices.cpp.
References _creature, and Engines::NWN::Creature::setGender().
Referenced by Engines::NWN::CharSex::callbackActive().
void Engines::NWN::CharGenChoices::setNotUsedSkills | ( | uint8 | notUsedSkills | ) |
Definition at line 302 of file chargenchoices.cpp.
References _notUsedSkills.
Referenced by Engines::NWN::CharSkills::callbackActive(), and Engines::NWN::CharSkills::reset().
void Engines::NWN::CharGenChoices::setPackage | ( | uint8 | package | ) |
Definition at line 229 of file chargenchoices.cpp.
References _classId, _creature, _domain1, _domain2, _normalFeats, _package, _skills, _spells, Aurora::TwoDARow::empty(), getFeatItems(), Engines::NWN::Creature::getHitDice(), Aurora::TwoDARow::getInt(), getPrefDomains(), getPrefFeats(), getPrefSkills(), getPrefSpells(), getPrefSpellSchool(), Aurora::TwoDAFile::getRow(), Aurora::TwoDARow::getString(), setSpellSchool(), Engines::NWN::Creature::setStartingPackage(), TwoDAReg, and UINT8_MAX.
Referenced by Engines::NWN::CharPackage::callbackActive().
void Engines::NWN::CharGenChoices::setPortrait | ( | const Common::UString & | portrait | ) |
Definition at line 189 of file chargenchoices.cpp.
References _creature, and Engines::NWN::Creature::setPortrait().
Referenced by Engines::NWN::CharPortrait::callbackActive(), and Engines::NWN::CharPortrait::reset().
void Engines::NWN::CharGenChoices::setRace | ( | uint32 | race | ) |
Definition at line 169 of file chargenchoices.cpp.
References _creature, _racialFeats, Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), Engines::NWN::kRaceInvalid, Engines::NWN::Creature::setRace(), TwoDAReg, and warning().
Referenced by Engines::NWN::CharRace::callbackActive(), and Engines::NWN::CharRace::reset().
void Engines::NWN::CharGenChoices::setSkill | ( | size_t | skillIndex, |
uint8 | rank | ||
) |
Definition at line 298 of file chargenchoices.cpp.
References _skills.
Referenced by Engines::NWN::CharSkills::callbackActive(), and Engines::NWN::CharSkills::reset().
void Engines::NWN::CharGenChoices::setSoundSet | ( | uint32 | soundSetID | ) |
Definition at line 326 of file chargenchoices.cpp.
References _soundSet.
Referenced by Engines::NWN::CharInfoVoice::callbackActive().
void Engines::NWN::CharGenChoices::setSpell | ( | size_t | spellLevel, |
uint16 | spell | ||
) |
Definition at line 319 of file chargenchoices.cpp.
References _spells.
Referenced by Engines::NWN::CharSpells::callbackActive().
void Engines::NWN::CharGenChoices::setSpellSchool | ( | uint8 | spellSchool | ) |
Definition at line 310 of file chargenchoices.cpp.
References _spellSchool.
Referenced by Engines::NWN::CharSchool::callbackActive(), Engines::NWN::CharSchool::reset(), and setPackage().
void Engines::NWN::CharGenChoices::useCharacter | ( | Module * | module | ) |
Definition at line 330 of file chargenchoices.cpp.
References _characterUsed, _creature, and Engines::NWN::Module::usePC().
Referenced by Engines::NWN::CharGenMenu::callbackActive().
|
private |
Definition at line 123 of file chargenchoices.h.
Referenced by applyChoices(), getAbility(), getTotalAbility(), init(), and setAbilities().
|
private |
Definition at line 138 of file chargenchoices.h.
Referenced by useCharacter(), and ~CharGenChoices().
|
private |
Definition at line 122 of file chargenchoices.h.
Referenced by applyChoices(), getFeats(), hasFeat(), reset(), and setClass().
|
private |
Definition at line 127 of file chargenchoices.h.
Referenced by applyChoices(), computeAvailSkillRank(), getClass(), getFeatItems(), getPrefDomains(), getPrefFeats(), getPrefSkills(), getPrefSpells(), getPrefSpellSchool(), getSkillItems(), init(), setClass(), and setPackage().
|
private |
Definition at line 118 of file chargenchoices.h.
Referenced by applyChoices(), CharGenChoices(), computeAvailSkillRank(), getCharacter(), getFeatItems(), getRace(), getSkillItems(), hasFeat(), hasPrereqFeat(), reset(), setClass(), setGender(), setPackage(), setPortrait(), setRace(), useCharacter(), and ~CharGenChoices().
|
private |
Definition at line 134 of file chargenchoices.h.
Referenced by applyChoices(), resetPackage(), setDomains(), and setPackage().
|
private |
Definition at line 135 of file chargenchoices.h.
Referenced by applyChoices(), resetPackage(), setDomains(), and setPackage().
|
private |
Definition at line 129 of file chargenchoices.h.
Referenced by applyChoices(), getAlign(), init(), and setAlign().
|
private |
Definition at line 130 of file chargenchoices.h.
Referenced by applyChoices(), getAlign(), init(), and setAlign().
|
private |
Definition at line 120 of file chargenchoices.h.
Referenced by applyChoices(), hasFeat(), resetPackage(), setFeat(), and setPackage().
|
private |
Definition at line 132 of file chargenchoices.h.
Referenced by init(), and setNotUsedSkills().
|
private |
Definition at line 131 of file chargenchoices.h.
Referenced by getPackage(), getPrefDomains(), getPrefFeats(), getPrefSkills(), getPrefSpells(), getPrefSpellSchool(), resetPackage(), and setPackage().
|
private |
Definition at line 124 of file chargenchoices.h.
Referenced by applyChoices(), getTotalAbility(), init(), and setAbilities().
|
private |
Definition at line 121 of file chargenchoices.h.
Referenced by applyChoices(), getFeats(), hasFeat(), reset(), and setRace().
|
private |
Definition at line 125 of file chargenchoices.h.
Referenced by applyChoices(), hasPrereqFeat(), resetPackage(), setPackage(), and setSkill().
|
private |
Definition at line 128 of file chargenchoices.h.
Referenced by applyChoices(), init(), and setSoundSet().
|
private |
Definition at line 119 of file chargenchoices.h.
Referenced by applyChoices(), resetPackage(), setPackage(), and setSpell().
|
private |
Definition at line 133 of file chargenchoices.h.
Referenced by applyChoices(), getSpellSchool(), resetPackage(), and setSpellSchool().