*Use SpellCastResult and finaly fix SPELL_CAST_OK value (255 custom value now). By VladimirMangos.
--HG-- branch : trunk
This commit is contained in:
1 parent
2453f22123
commit
3eba06e4ad
11 files changed
+220
-230
No files matched your search
+3
-3
@@ -7178,7 +7178,7 @@ void Player::ApplyEquipSpell(SpellEntry const* spellInfo, Item* item, bool apply
|
||||
if(apply)
|
||||
{
|
||||
// Cannot be used in this stance/form
|
||||
if(GetErrorAtShapeshiftedCast(spellInfo, m_form)!=0)
|
||||
if(GetErrorAtShapeshiftedCast(spellInfo, m_form) != SPELL_CAST_OK)
|
||||
return;
|
||||
|
||||
if(form_change) // check aura active state from other form
|
||||
@@ -7212,7 +7212,7 @@ void Player::ApplyEquipSpell(SpellEntry const* spellInfo, Item* item, bool apply
|
||||
if(form_change) // check aura compatibility
|
||||
{
|
||||
// Cannot be used in this stance/form
|
||||
if(GetErrorAtShapeshiftedCast(spellInfo, m_form)==0)
|
||||
if(GetErrorAtShapeshiftedCast(spellInfo, m_form)==SPELL_CAST_OK)
|
||||
return; // and remove only not compatible at form change
|
||||
}
|
||||
|
||||
@@ -19894,7 +19894,7 @@ void Player::UpdateAreaDependentAuras( uint32 newArea )
|
||||
for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
|
||||
{
|
||||
// use m_zoneUpdateId for speed: UpdateArea called from UpdateZone or instead UpdateZone in both cases m_zoneUpdateId up-to-date
|
||||
if(spellmgr.GetSpellAllowedInLocationError(iter->second->GetSpellProto(),GetMapId(),m_zoneUpdateId,newArea,this)!=0)
|
||||
if(spellmgr.GetSpellAllowedInLocationError(iter->second->GetSpellProto(),GetMapId(),m_zoneUpdateId,newArea,this) != SPELL_CAST_OK)
|
||||
RemoveAura(iter);
|
||||
else
|
||||
++iter;
|
||||
|
||||
Reference in new issue
Block a user