diff options
| author | megamage <none@none> | 2009-08-31 12:00:19 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-08-31 12:00:19 -0500 |
| commit | 6a50516174a266e8e73403871101399f6855a3d1 (patch) | |
| tree | 901f1e94cc5810e095ec61659def7687f88d2969 /src | |
| parent | 66793a1ce073e4815c9e8294a11dc311b5044071 (diff) | |
*Add an error log to find crash reason of m_spellModTakingSpell.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Player.cpp | 8 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index cfddb5e76ad..b1eb2ffb452 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1125,7 +1125,13 @@ void Player::Update( uint32 p_time ) // If this is set during update SetSpellModTakingSpell call is missing somewhere in the code // Having this would prevent more aura charges to be dropped, so let's crash - assert (!m_spellModTakingSpell); + //assert (!m_spellModTakingSpell); + if(m_spellModTakingSpell) + { + sLog.outCrash("Player has m_spellModTakingSpell %u during update!", m_spellModTakingSpell->m_spellInfo->Id); + assert(false); + m_spellModTakingSpell = NULL; + } //used to implement delayed far teleports SetCanDelayTeleport(true); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 4c06a3ff4e3..fd6665fe1f5 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4512,7 +4512,8 @@ void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log) data.append(log->attacker->GetPackGUID()); data << uint32(log->SpellID); data << uint32(log->damage); // damage amount - data << uint32(int32 (log->target->GetHealth()-log->damage ) >0 ? 0 : log->damage - log->target->GetHealth()); + int32 overkill = log->damage - log->target->GetHealth(); + data << uint32(overkill > 0 ? overkill : 0); //data << uint32(log->overkill); // overkill data << uint8 (log->schoolMask); // damage school data << uint32(log->absorb); // AbsorbedDamage |
