[Spells] Major update to cast restriction code and new spell field 'caster_requirement_id' (field220) implemented (#1508)

* Implemented spells_new table 'field220' as 'caster_requirement_id'

Implemented spells_new table 'field220' as 'caster_requirement_id'

* Update spell_effects.cpp

* updates to CastRestriction

enum using live description
updated entire function
missing and new types added
many fixes

* updates

* code fixes

* updates

* updates

* Update spdat.h

* typo fix
This commit is contained in:
KayenEQ
2021-08-31 01:41:20 -04:00
committed by GitHub
parent 5f3c054044
commit cb3f8daedd
7 changed files with 1242 additions and 292 deletions
+2 -1
View File
@@ -420,6 +420,7 @@ public:
inline float GetTargetRingZ() const { return m_TargetRing.z; }
inline bool HasEndurUpkeep() const { return endur_upkeep; }
inline void SetEndurUpkeep(bool val) { endur_upkeep = val; }
bool HasBuffWithSpellGroup(int spellgroup);
//Basic Stats/Inventory
virtual void SetLevel(uint8 in_level, bool command = false) { level = in_level; }
@@ -832,7 +833,7 @@ public:
int8 GetDecayEffectValue(uint16 spell_id, uint16 spelleffect);
int32 GetExtraSpellAmt(uint16 spell_id, int32 extra_spell_amt, int32 base_spell_dmg);
void MeleeLifeTap(int32 damage);
bool PassCastRestriction(bool UseCastRestriction = true, int16 value = 0, bool IsDamage = true);
bool PassCastRestriction(int value);
bool ImprovedTaunt();
bool TryRootFadeByDamage(int buffslot, Mob* attacker);
float GetSlowMitigation() const { return slow_mitigation; }