[Spells] Update to Charm target restriction code (#1666)

* charm target restrictions

* fixed

* Update spells.cpp

* Update spells.cpp

* Update spells.cpp

only send spell bar when we have to, avoid potential exploit.

* logs
This commit is contained in:
KayenEQ
2021-11-05 10:39:17 -04:00
committed by GitHub
parent 5874deeffc
commit 8c95323728
3 changed files with 45 additions and 21 deletions
+1
View File
@@ -846,6 +846,7 @@ public:
inline void SetSpellPowerDistanceMod(int16 value) { SpellPowerDistanceMod = value; };
int32 GetSpellStat(uint32 spell_id, const char *identifier, uint8 slot = 0);
bool HarmonySpellLevelCheck(int32 spell_id, Mob* target = nullptr);
bool PassCharmTargetRestriction(Mob *target);
bool CanFocusUseRandomEffectivenessByType(focusType type);
int GetFocusRandomEffectivenessValue(int focus_base, int focus_base2, bool best_focus = 0);
int GetHealRate() const { return itembonuses.HealRate + spellbonuses.HealRate + aabonuses.HealRate; }