mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 17:19:56 +00:00
39 lines
1,000 B
C++
39 lines
1,000 B
C++
#ifndef COMPONENTS_AUTOCALC_AUTOCALCSPELL_H
|
|
#define COMPONENTS_AUTOCALC_AUTOCALCSPELL_H
|
|
|
|
#include <vector>
|
|
|
|
#include <components/esm/loadskil.hpp>
|
|
|
|
namespace ESM
|
|
{
|
|
struct Spell;
|
|
struct Race;
|
|
}
|
|
|
|
namespace AutoCalc
|
|
{
|
|
|
|
class StoreCommon;
|
|
|
|
/// Contains algorithm for calculating an NPC's spells based on stats
|
|
|
|
std::vector<std::string> autoCalcNpcSpells(const int* actorSkills,
|
|
const int* actorAttributes, const ESM::Race* race, StoreCommon *store);
|
|
|
|
// Helpers
|
|
|
|
bool attrSkillCheck (const ESM::Spell* spell,
|
|
const int* actorSkills, const int* actorAttributes, StoreCommon *store);
|
|
|
|
ESM::Skill::SkillEnum mapSchoolToSkill(int school);
|
|
|
|
void calcWeakestSchool(const ESM::Spell* spell,
|
|
const int* actorSkills, int& effectiveSchool, float& skillTerm, StoreCommon *store);
|
|
|
|
float calcAutoCastChance(const ESM::Spell* spell,
|
|
const int* actorSkills, const int* actorAttributes, int effectiveSchool, StoreCommon *store);
|
|
|
|
}
|
|
|
|
#endif // COMPONENTS_AUTOCALC_AUTOCALCSPELL_H
|