*Fix the bug that gouge/scatter shot interrupt self.
*Fix the bug that spams setspeed errors. *Clean up scripts to delete all lines which may cause crash by removing stealth aura. --HG-- branch : trunk
This commit is contained in:
1 parent
813b750b01
commit
c72bf6e8c4
27 files changed
+66
-271
No files matched your search
+11
-6
@@ -477,7 +477,7 @@ void Unit::RemoveSpellsCausingAura(AuraType auraType)
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveAurasWithInterruptFlags(uint32 flag)
|
||||
void Unit::RemoveAurasWithInterruptFlags(uint32 flag, uint32 except)
|
||||
{
|
||||
if(!(m_interruptMask & flag))
|
||||
return;
|
||||
@@ -494,7 +494,7 @@ void Unit::RemoveAurasWithInterruptFlags(uint32 flag)
|
||||
{
|
||||
if((*iter)->IsInUse())
|
||||
sLog.outError("Aura %u is trying to remove itself! Flag %u. May cause crash!", (*iter)->GetId(), flag);
|
||||
else
|
||||
else if(!except || (*iter)->GetId() != except)
|
||||
{
|
||||
RemoveAurasDueToSpell((*iter)->GetId());
|
||||
if (!m_interruptableAuras.empty())
|
||||
@@ -507,7 +507,9 @@ void Unit::RemoveAurasWithInterruptFlags(uint32 flag)
|
||||
|
||||
// interrupt channeled spell
|
||||
if(Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL])
|
||||
if(spell->getState() == SPELL_STATE_CASTING && (spell->m_spellInfo->ChannelInterruptFlags & flag))
|
||||
if(spell->getState() == SPELL_STATE_CASTING
|
||||
&& (spell->m_spellInfo->ChannelInterruptFlags & flag)
|
||||
&& spell->m_spellInfo->Id != except)
|
||||
InterruptNonMeleeSpells(false);
|
||||
}
|
||||
|
||||
@@ -919,7 +921,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||
|
||||
if (damagetype != NODAMAGE && damage)// && pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DAMAGE);
|
||||
pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DAMAGE, spellProto ? spellProto->Id : 0);
|
||||
pVictim->RemoveSpellbyDamageTaken(damage, spellProto ? spellProto->Id : 0);
|
||||
|
||||
/*const SpellEntry *se = i->second->GetSpellProto();
|
||||
@@ -9736,8 +9738,11 @@ void Unit::SetInCombatState(bool PvP)
|
||||
if(GetTypeId() == TYPEID_PLAYER && GetPetGUID())
|
||||
{
|
||||
if(Pet *pet = GetPet())
|
||||
for(int i = 0; i < MAX_MOVE_TYPE; ++i)
|
||||
pet->UpdateSpeed(UnitMoveType(i), true);
|
||||
{
|
||||
pet->UpdateSpeed(MOVE_RUN, true);
|
||||
pet->UpdateSpeed(MOVE_SWIM, true);
|
||||
pet->UpdateSpeed(MOVE_FLY, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user