diff options
author | Shauren <shauren.trinity@gmail.com> | 2018-04-28 14:09:01 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-04-28 14:09:01 +0200 |
commit | 37f57ce6b9c548798e2c12e6d0514150ab3ad9da (patch) | |
tree | 515205e80750be69b5a2c6cefc92f4c7348b863f | |
parent | b9b661da08b22a5d070eff9d2032dfd993a8b009 (diff) |
Core/Auras: Implemented new spell_area flag to allow skipping applying aura automatically when quest status changes
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Spells/SpellMgr.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index d02a812bbb8..ff792ac82e1 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -16205,7 +16205,7 @@ void Player::SendQuestUpdate(uint32 questId) { if (itr->second->flags & SPELL_AREA_FLAG_AUTOREMOVE && !itr->second->IsFitToRequirements(this, zone, area)) RemoveAurasDueToSpell(itr->second->spellId); - else if (itr->second->flags & SPELL_AREA_FLAG_AUTOCAST) + else if (itr->second->flags & SPELL_AREA_FLAG_AUTOCAST && !(itr->second->flags & SPELL_AREA_FLAG_IGNORE_AUTOCAST_ON_QUEST_STATUS_CHANGE)) if (!HasAura(itr->second->spellId)) CastSpell(this, itr->second->spellId, true); } diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index db49b577c3c..1034f6b4333 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -452,8 +452,9 @@ typedef std::map<uint32, PetAura> SpellPetAuraMap; enum SpellAreaFlag { - SPELL_AREA_FLAG_AUTOCAST = 0x1, // if has autocast, spell is applied on enter - SPELL_AREA_FLAG_AUTOREMOVE = 0x2, // if has autoremove, spell is remove automatically inside zone/area (allways removed on leaving area or zone) + SPELL_AREA_FLAG_AUTOCAST = 0x1, // if has autocast, spell is applied on enter + SPELL_AREA_FLAG_AUTOREMOVE = 0x2, // if has autoremove, spell is remove automatically inside zone/area (always removed on leaving area or zone) + SPELL_AREA_FLAG_IGNORE_AUTOCAST_ON_QUEST_STATUS_CHANGE = 0x4, // if this flag is set then spell will not be applied automatically on quest status change }; struct TC_GAME_API SpellArea |