Added IsBuffSpell(spell_id). This will return true if the spell would end up having a duration, which will mean it would end up in one of the many buff windows on the client. This just makes sure the spell has a buffduration or buffdurationformula, which means the calculation will return a duration

Replaced all instances of CalcBuffDuration being used to determine if a spell was a buff with IsBuffSpell
Removed Mob::HasBuffIcon since it does the same thing IsBuffSpell does in a more convoluted way and had a rather missing leading name
Fixed issues that arose from the 10/03/2013 changes
This commit is contained in:
Michael Cook
2013-10-08 17:24:07 -04:00
parent 24308aec6c
commit 9a19a00bdc
8 changed files with 19 additions and 15 deletions
+2 -2
View File
@@ -2257,7 +2257,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
{
if(IsClient())
{
if(HasBuffIcon(caster, this, spell_id) == false)
if(!IsBuffSpell(spell_id))
{
CastToClient()->SetKnockBackExemption(true);
@@ -3497,7 +3497,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
{
if(spelltar->IsClient())
{
if(HasBuffIcon(this, spelltar, spell_id) == false)
if(!IsBuffSpell(spell_id))
{
spelltar->CastToClient()->SetKnockBackExemption(true);