mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +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);
|
||||
|
|
|
|||
|
|
@ -528,6 +528,11 @@ inline bool IsNeedCastSpellAtFormApply(SpellEntry const* spellInfo, ShapeshiftFo
|
|||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12529"
|
||||
#define REVISION_NR "12530"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue