[10453] Fix disease consume part of 49020 and ranks

This commit is contained in:
Laise 2010-09-08 10:47:05 +03:00
parent 812383ac8c
commit 0cb6f7be0c
5 changed files with 22 additions and 4 deletions

View file

@ -4387,7 +4387,7 @@ void Unit::RemoveAurasDueToSpellByCancel(uint32 spellId)
}
}
void Unit::RemoveAurasWithDispelType( DispelType type )
void Unit::RemoveAurasWithDispelType( DispelType type, uint64 casterGUID )
{
// Create dispel mask by dispel type
uint32 dispelMask = GetDispellMask(type);
@ -4396,7 +4396,7 @@ void Unit::RemoveAurasWithDispelType( DispelType type )
for(SpellAuraHolderMap::iterator itr = auras.begin(); itr != auras.end(); )
{
SpellEntry const* spell = itr->second->GetSpellProto();
if( (1<<spell->Dispel) & dispelMask )
if( ((1<<spell->Dispel) & dispelMask) && (!casterGUID || casterGUID == itr->second->GetCasterGUID()))
{
// Dispel aura
RemoveAurasDueToSpell(spell->Id);