*Add debug log to trac reason of a crash in Spell::DoAllEffectOnTarget.
--HG-- branch : trunk
This commit is contained in:
@@ -16637,6 +16637,8 @@ void Unit::OutDebugInfo() const
|
||||
sLog.outString("GUID "UI64FMTD", entry %u, type %u, name %s", GetGUID(), GetEntry(), (uint32)GetTypeId(), GetName());
|
||||
sLog.outString("OwnerGUID "UI64FMTD", MinionGUID "UI64FMTD", CharmerGUID "UI64FMTD", CharmedGUID "UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID());
|
||||
sLog.outString("In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask);
|
||||
if (IsInWorld())
|
||||
sLog.outString("Mapid %u", GetMapId());
|
||||
|
||||
sLog.outStringInLine("Summon Slot: ");
|
||||
for (uint32 i = 0; i < MAX_SUMMON_SLOT; ++i)
|
||||
|
||||
@@ -1046,6 +1046,23 @@ void Spell::AddItemTarget(Item* pitem, uint32 effIndex)
|
||||
|
||||
void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
{
|
||||
// invalid pointer, log debug info to trac the reason
|
||||
if (target && target < ((TargetInfo*)1024))
|
||||
{
|
||||
sLog.outString("Spell::DoAllEffectOnTarget CRASH! - debug info:");
|
||||
sLog.outString("Caster:");
|
||||
m_caster->OutDebugInfo();
|
||||
if (m_targets.getUnitTarget())
|
||||
{
|
||||
sLog.outString("Unit target:");
|
||||
m_targets.getUnitTarget()->OutDebugInfo();
|
||||
}
|
||||
sLog.outString("SpellId: %d", m_spellInfo->Id);
|
||||
sLog.outString("SpellTargetMap:");
|
||||
for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
sLog.outStringInLine("guid:%u, effmask:%u, ", ihit->targetGUID, ihit->effectMask);
|
||||
ASSERT(false);
|
||||
}
|
||||
if (!target || target->processed)
|
||||
return;
|
||||
|
||||
@@ -5626,7 +5643,7 @@ SpellCastResult Spell::CheckCasterAuras() const
|
||||
else if (m_spellInfo->EffectApplyAuraName[i] == SPELL_AURA_DISPEL_IMMUNITY)
|
||||
dispel_immune |= GetDispellMask(DispelType(m_spellInfo->EffectMiscValue[i]));
|
||||
}
|
||||
//immune movement impairment and loss of control
|
||||
// immune movement impairment and loss of control
|
||||
if (m_spellInfo->Id == 42292 || m_spellInfo->Id == 59752)
|
||||
mechanic_immune = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user