mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-05 11:45:32 +00:00
Use an array instead of a map in spellSchoolToSkill()
This commit is contained in:
parent
4838cf7362
commit
a3cd3281fb
1 changed files with 4 additions and 4 deletions
|
@ -32,12 +32,12 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
ESM::Skill::SkillEnum spellSchoolToSkill(int school)
|
ESM::Skill::SkillEnum spellSchoolToSkill(int school)
|
||||||
{
|
{
|
||||||
static const std::map<int, ESM::Skill::SkillEnum> schoolSkillMap
|
static const std::array<ESM::Skill::SkillEnum, 6> schoolSkillArray
|
||||||
{
|
{
|
||||||
{0, ESM::Skill::Alteration}, {1, ESM::Skill::Conjuration}, {2, ESM::Skill::Destruction},
|
ESM::Skill::Alteration, ESM::Skill::Conjuration, ESM::Skill::Destruction,
|
||||||
{3, ESM::Skill::Illusion}, {4, ESM::Skill::Mysticism}, {5, ESM::Skill::Restoration}
|
ESM::Skill::Illusion, ESM::Skill::Mysticism, ESM::Skill::Restoration
|
||||||
};
|
};
|
||||||
return schoolSkillMap.at(school);
|
return schoolSkillArray.at(school);
|
||||||
}
|
}
|
||||||
|
|
||||||
float calcEffectCost(const ESM::ENAMstruct& effect, const ESM::MagicEffect* magicEffect)
|
float calcEffectCost(const ESM::ENAMstruct& effect, const ESM::MagicEffect* magicEffect)
|
||||||
|
|
Loading…
Reference in a new issue