diff options
| -rw-r--r-- | src/game/Pet.cpp | 17 | 
1 files changed, 13 insertions, 4 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 8985d648cff..0c7e3970a94 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -1623,8 +1623,13 @@ void Pet::ToggleAutocast(uint32 spellid, bool apply)          if (i == m_autospells.size())          {              m_autospells.push_back(spellid); -            itr->second->active = ACT_ENABLED; -            itr->second->state = PETSPELL_CHANGED; + +            if(itr->second->active != ACT_ENABLED) +            { +                itr->second->active = ACT_ENABLED; +                if(itr->second->state != PETSPELL_NEW) +                    itr->second->state = PETSPELL_CHANGED; +            }          }      }      else @@ -1636,8 +1641,12 @@ void Pet::ToggleAutocast(uint32 spellid, bool apply)          if (i < m_autospells.size())          {              m_autospells.erase(itr2); -            itr->second->active = ACT_DISABLED; -            itr->second->state = PETSPELL_CHANGED; +            if(itr->second->active != ACT_DISABLED) +            { +                itr->second->active = ACT_DISABLED; +                if(itr->second->state != PETSPELL_NEW) +                    itr->second->state = PETSPELL_CHANGED; +            }          }      }  }  | 
