mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Auras: Implemented new spell_area flag to allow skipping applying aura automatically when quest status changes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user