2015-06-25 03:32:22 +00:00
|
|
|
#ifndef COMPONENTS_AUTOCALC_AUTOCALCSPELL_H
|
|
|
|
#define COMPONENTS_AUTOCALC_AUTOCALCSPELL_H
|
2015-06-24 11:05:59 +00:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <components/esm/loadskil.hpp>
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
struct Spell;
|
|
|
|
struct Race;
|
|
|
|
}
|
|
|
|
|
2015-06-25 03:32:22 +00:00
|
|
|
namespace AutoCalc
|
2015-06-24 11:05:59 +00:00
|
|
|
{
|
|
|
|
|
2015-06-25 03:32:22 +00:00
|
|
|
class StoreCommon;
|
2015-06-24 11:05:59 +00:00
|
|
|
|
|
|
|
/// Contains algorithm for calculating an NPC's spells based on stats
|
|
|
|
|
|
|
|
std::vector<std::string> autoCalcNpcSpells(const int* actorSkills,
|
2015-06-25 03:32:22 +00:00
|
|
|
const int* actorAttributes, const ESM::Race* race, StoreCommon *store);
|
2015-06-24 11:05:59 +00:00
|
|
|
|
|
|
|
// Helpers
|
|
|
|
|
2015-06-25 03:32:22 +00:00
|
|
|
bool attrSkillCheck (const ESM::Spell* spell,
|
|
|
|
const int* actorSkills, const int* actorAttributes, StoreCommon *store);
|
2015-06-24 11:05:59 +00:00
|
|
|
|
|
|
|
ESM::Skill::SkillEnum mapSchoolToSkill(int school);
|
|
|
|
|
|
|
|
void calcWeakestSchool(const ESM::Spell* spell,
|
2015-06-25 03:32:22 +00:00
|
|
|
const int* actorSkills, int& effectiveSchool, float& skillTerm, StoreCommon *store);
|
2015-06-24 11:05:59 +00:00
|
|
|
|
|
|
|
float calcAutoCastChance(const ESM::Spell* spell,
|
2015-06-25 03:32:22 +00:00
|
|
|
const int* actorSkills, const int* actorAttributes, int effectiveSchool, StoreCommon *store);
|
2015-06-24 11:05:59 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-06-25 03:32:22 +00:00
|
|
|
#endif // COMPONENTS_AUTOCALC_AUTOCALCSPELL_H
|