OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Functions | Variables
Spells.cpp File Reference
#include "Engine/Spells/Spells.h"
#include <cstring>
#include <algorithm>
#include <map>
#include <string>
#include "Engine/Party.h"
#include "Engine/Graphics/Indoor.h"
#include "Engine/Graphics/Overlays.h"
#include "Engine/Random/Random.h"
#include "Engine/Objects/Actor.h"
#include "Engine/Objects/ObjectList.h"
#include "Engine/Objects/SpriteObject.h"
#include "Engine/SpellFxRenderer.h"
#include "Engine/TurnEngine/TurnEngine.h"
#include "Engine/Spells/SpellEnumFunctions.h"
#include "Media/Audio/AudioPlayer.h"
#include "Utility/Math/TrigLut.h"
#include "Utility/String/Ascii.h"
#include "Utility/String/Split.h"
#include "Utility/String/Transformations.h"
#include "Utility/MapAccess.h"

Functions

void eventCastSpell (SpellId uSpellID, CharacterSkillMastery skillMastery, int skillLevel, Vec3f from, Vec3f to)
 
bool IsSpellQuickCastableOnShiftClick (SpellId uSpellID)
 
int CalcSpellDamage (SpellId uSpellID, int spellLevel, CharacterSkillMastery skillMastery, int currentHp)
 
void armageddonProgress ()
 

Variables

SpellFxRendererspell_fx_renderer = EngineIocContainer::ResolveSpellFxRenderer()
 
SpellStatspSpellStats = nullptr
 
const IndexedArray< SpriteId, SPELL_FIRST_WITH_SPRITE, SPELL_LAST_WITH_SPRITESpellSpriteMapping
 
IndexedArray< SpellData, SPELL_FIRST_REGULAR, SPELL_LAST_REGULARpSpellDatas
 
IndexedArray< std::array< struct SpellBookIconPos, 12 >, MAGIC_SCHOOL_FIRST, MAGIC_SCHOOL_LASTpIconPos
 
const IndexedArray< uint16_t, SPELL_FIRST_WITH_SPRITE, SPELL_LAST_WITH_SPRITESpellSoundIds
 

Function Documentation

◆ armageddonProgress()

void armageddonProgress ( )

◆ CalcSpellDamage()

int CalcSpellDamage ( SpellId  uSpellID,
int  spellLevel,
CharacterSkillMastery  skillMastery,
int  currentHp 
)
Original binary offset:
0x43AFE3

◆ eventCastSpell()

void eventCastSpell ( SpellId  uSpellID,
CharacterSkillMastery  skillMastery,
int  skillLevel,
Vec3f  from,
Vec3f  to 
)

Function for processing spells cast from game scripts.

◆ IsSpellQuickCastableOnShiftClick()

bool IsSpellQuickCastableOnShiftClick ( SpellId  uSpellID)
Original binary offset:
0x427769

Variable Documentation

◆ pIconPos

Initial value:
= {
{MAGIC_SCHOOL_FIRE, {{{0, 0}, {17, 13}, {115, 2}, {217, 15}, {299, 6}, {28, 125},
{130, 133}, {294, 114}, {11, 232}, {134, 233}, {237, 171}, {296, 231}}}},
{MAGIC_SCHOOL_AIR, {{{0, 0}, {19, 9}, {117, 3}, {206, 13}, {285, 7}, {16, 123},
{113, 101}, {201, 118}, {317, 110}, {11, 230}, {149, 236}, {296, 234}}}},
{MAGIC_SCHOOL_WATER, {{{0, 0}, {17, 9}, {140, 0}, {210, 34}, {293, 5}, {15, 98},
{78, 121}, {175, 136}, {301, 115}, {15, 226}, {154, 225}, {272, 220}}}},
{MAGIC_SCHOOL_EARTH, {{{0, 0}, {7, 9}, {156, 2}, {277, 9}, {11, 117}, {111, 82},
{180, 102}, {303, 108}, {10, 229}, {120, 221}, {201, 217}, {296, 225}}}},
{MAGIC_SCHOOL_SPIRIT, {{{0, 0}, {18, 8}, {89, 15}, {192, 14}, {292, 7}, {22, 129},
{125, 146}, {217, 136}, {305, 115}, {22, 226}, {174, 237}, {290, 231}}}},
{MAGIC_SCHOOL_MIND, {{{0, 0}, {18, 12}, {148, 9}, {292, 7}, {17, 122}, {121, 99},
{220, 87}, {293, 112}, {13, 236}, {128, 213}, {220, 223}, {315, 223}}}},
{MAGIC_SCHOOL_BODY, {{{0, 0}, {23, 14}, {127, 8}, {204, 0}, {306, 8}, {14, 115},
{122, 132}, {200, 116}, {293, 122}, {20, 228}, {154, 228}, {294, 239}}}},
{MAGIC_SCHOOL_LIGHT, {{{0, 0}, {19, 14}, {124, 10}, {283, 12}, {8, 105}, {113, 89},
{190, 82}, {298, 108}, {18, 181}, {101, 204}, {204, 203}, {285, 218}}}},
{MAGIC_SCHOOL_DARK, {{{0, 0}, {18, 17}, {110, 16}, {201, 15}, {307, 15}, {18, 148},
{125, 166}, {201, 123}, {275, 120}, {28, 235}, {217, 222}, {324, 216}}}}
}

◆ pSpellDatas

Description of spells.

                                            Mana Novice
                                            |   Mana Expert
                                            |   |   Mana Master
                                            |   |   |   Mana Grandmaster
                                            |   |   |   |     Recovery Novice
                                            |   |   |   |     |     Recovery Expert
                                            |   |   |   |     |     |     Recovery Master
                                            |   |   |   |     |     |     |     Recovery Grandmaster
                                            |   |   |   |     |     |     |     |   Base Damage
                                            |   |   |   |     |     |     |     |   |   Bonus Skill Damage
                                            |   |   |   |     |     |     |     |   |   |  Flags
                                            |   |   |   |     |     |     |     |   |   |  |  Required skill mastery
                                            |   |   |   |     |     |     |     |   |   |  |  |

◆ pSpellStats

SpellStats* pSpellStats = nullptr

◆ spell_fx_renderer

◆ SpellSoundIds

◆ SpellSpriteMapping

Original binary offset:
0x4E3ACC