Core/Auras: Implemented new spell_area flag to allow skipping applying aura automatically when quest status changes

This commit is contained in:
Shauren
2018-04-28 14:09:01 +02:00
parent b9b661da08
commit 37f57ce6b9
2 changed files with 4 additions and 3 deletions

View File

@@ -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);
}

View File

@@ -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