mirror of
https://github.com/mangosfour/server.git
synced 2025-12-23 16:37:03 +00:00
[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:
parent
2294b41bf3
commit
faea73ac9b
3 changed files with 17 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue