[c12530] Looks for passive auras that need to be recast. Like talent spell Feral Swiftness (id: 17002 and ranks), once you go inside a building and then outside again.

Contributor : Ebrithil

(based on commit [12383] - e9f2099)
This commit is contained in:
Maxxie 2013-02-27 20:41:18 +01:00 committed by Antz
parent 2294b41bf3
commit faea73ac9b
3 changed files with 17 additions and 1 deletions

View file

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