Skip to content

Commit

Permalink
[10034] In case unknown triggered spell output more known info for lo…
Browse files Browse the repository at this point in the history
…cation problem.
  • Loading branch information
VladimirMangos committed Jun 6, 2010
1 parent 3a845b2 commit 3e9c977
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
30 changes: 24 additions & 6 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,10 @@ void Unit::CastSpell(Unit* Victim, uint32 spellId, bool triggered, Item *castIte

if(!spellInfo)
{
sLog.outError("CastSpell: unknown spell id %i by caster: %s", spellId, GetObjectGuid().GetString().c_str());
if (triggeredByAura)
sLog.outError("CastSpell: unknown spell id %i by caster: %s triggered by aura %u (eff %u)", spellId, GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex());
else
sLog.outError("CastSpell: unknown spell id %i by caster: %s", spellId, GetObjectGuid().GetString().c_str());
return;
}

Expand All @@ -1077,7 +1080,10 @@ void Unit::CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered,
{
if(!spellInfo)
{
sLog.outError("CastSpell: unknown spell by caster: %s", GetObjectGuid().GetString().c_str());
if (triggeredByAura)
sLog.outError("CastSpell: unknown spell by caster: %s triggered by aura %u (eff %u)", GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex());
else
sLog.outError("CastSpell: unknown spell by caster: %s", GetObjectGuid().GetString().c_str());
return;
}

Expand All @@ -1101,7 +1107,10 @@ void Unit::CastCustomSpell(Unit* Victim,uint32 spellId, int32 const* bp0, int32

if(!spellInfo)
{
sLog.outError("CastCustomSpell: unknown spell id %i by caster: %s", spellId, GetObjectGuid().GetString().c_str());
if (triggeredByAura)
sLog.outError("CastCustomSpell: unknown spell id %i by caster: %s triggered by aura %u (eff %u)", spellId, GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex());
else
sLog.outError("CastCustomSpell: unknown spell id %i by caster: %s", spellId, GetObjectGuid().GetString().c_str());
return;
}

Expand All @@ -1112,7 +1121,10 @@ void Unit::CastCustomSpell(Unit* Victim, SpellEntry const *spellInfo, int32 cons
{
if(!spellInfo)
{
sLog.outError("CastCustomSpell: unknown spell by caster: %s", GetObjectGuid().GetString().c_str());
if (triggeredByAura)
sLog.outError("CastCustomSpell: unknown spell by caster: %s triggered by aura %u (eff %u)", GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex());
else
sLog.outError("CastCustomSpell: unknown spell by caster: %s", GetObjectGuid().GetString().c_str());
return;
}

Expand Down Expand Up @@ -1146,7 +1158,10 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered,

if(!spellInfo)
{
sLog.outError("CastSpell(x,y,z): unknown spell id %i by caster: %s", spellId, GetObjectGuid().GetString().c_str());
if (triggeredByAura)
sLog.outError("CastSpell(x,y,z): unknown spell id %i by caster: %s triggered by aura %u (eff %u)", spellId, GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex());
else
sLog.outError("CastSpell(x,y,z): unknown spell id %i by caster: %s", spellId, GetObjectGuid().GetString().c_str());
return;
}

Expand All @@ -1158,7 +1173,10 @@ void Unit::CastSpell(float x, float y, float z, SpellEntry const *spellInfo, boo
{
if(!spellInfo)
{
sLog.outError("CastSpell(x,y,z): unknown spell by caster: %s", GetObjectGuid().GetString().c_str());
if (triggeredByAura)
sLog.outError("CastSpell(x,y,z): unknown spell by caster: %s triggered by aura %u (eff %u)", GetObjectGuid().GetString().c_str(), triggeredByAura->GetId(), triggeredByAura->GetEffIndex());
else
sLog.outError("CastSpell(x,y,z): unknown spell by caster: %s", GetObjectGuid().GetString().c_str());
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10033"
#define REVISION_NR "10034"
#endif // __REVISION_NR_H__

0 comments on commit 3e9c977

Please sign in to comment.