diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8f6426573..f97d9ba25 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -6202,6 +6202,17 @@ void Player::CheckAreaExploreAndOutdoor() SetRestType(REST_TYPE_NO); } } + // Check if we need to reaply outdoor only passive spells + const PlayerSpellMap& sp_list = GetSpellMap(); + for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr) + { + if (itr->second.state == PLAYERSPELL_REMOVED) + continue; + SpellEntry const* spellInfo = sSpellStore.LookupEntry(itr->first); + if (!spellInfo || !IsNeedCastSpellAtOutdoor(spellInfo) || HasAura(itr->first)) + continue; + CastSpell(this, itr->first, true, NULL); + } } else if (sWorld.getConfig(CONFIG_BOOL_VMAP_INDOOR_CHECK) && !isGameMaster()) RemoveAurasWithAttribute(SPELL_ATTR_OUTDOORS_ONLY); diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index a7f2599b7..b994220a3 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -527,6 +527,11 @@ inline bool IsNeedCastSpellAtFormApply(SpellEntry const* spellInfo, ShapeshiftFo // passive spells with SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT are already active without shapeshift, do no recast! return (shapeShift->Stances & (1<<(form-1)) && !(spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT)); } + +inline bool IsNeedCastSpellAtOutdoor(SpellEntry const* spellInfo) +{ + return (spellInfo->HasAttribute(SPELL_ATTR_OUTDOORS_ONLY) && spellInfo->HasAttribute(SPELL_ATTR_PASSIVE)); +} inline bool NeedsComboPoints(SpellEntry const* spellInfo) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index bf75c92d7..78968d54e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12529" + #define REVISION_NR "12530" #endif // __REVISION_NR_H__