[Bug Fix] Alleviate some lag with crosszone/worldwide spell casting. (#2016)

- Spell casting was using SpellFinished which casts the spell, and if the spell was a group spell each member of the group would cast it on all the other members, causing a chain reaction.
- This fix utilizes ApplySpellBuff(spell_id, duration) so that it only casts the spell on the target, as with the crosszone and worldwide methods you will be affecting your target based on identifiers regardless.
- This should alleviate some of the crosszone/worldwide casting crashes on larger servers such as Lazarus.
This commit is contained in:
Kinglykrab
2022-02-20 21:59:46 -05:00
committed by GitHub
parent 70eed67e08
commit d86544ff60
3 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -461,8 +461,8 @@ public:
void GetAppearenceEffects();
void ClearAppearenceEffects();
void SendSavedAppearenceEffects(Client *receiver);
void SetBuffDuration(int32 spell_id, int32 duration);
void ApplySpellBuff(int32 spell_id, int32 duration);
void SetBuffDuration(int32 spell_id, int32 duration = 0);
void ApplySpellBuff(int32 spell_id, int32 duration = 0);
int GetBuffStatValueBySpell(int32 spell_id, const char* stat_identifier);
int GetBuffStatValueBySlot(uint8 slot, const char* stat_identifier);