Fix build and correct minor codestyle issue.

This commit is contained in:
QAston
2012-04-28 15:10:52 +02:00
parent b899f5fc94
commit b53485e053
2 changed files with 5 additions and 3 deletions

View File

@@ -626,8 +626,10 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask*
if (!target->isAllowedToLoot(creature))
dynamicFlags &= ~UNIT_DYNFLAG_LOOTABLE;
}
if(dynamicFlags & UNIT_DYNFLAG_TRACK_UNIT)
if (Unit const* unit = ToUnit())
// unit UNIT_DYNFLAG_TRACK_UNIT should only be sent to caster of SPELL_AURA_MOD_STALKED auras
if (Unit const* unit = ToUnit())
if (dynamicFlags & UNIT_DYNFLAG_TRACK_UNIT)
if (!unit->HasAuraTypeWithCaster(SPELL_AURA_MOD_STALKED, target->GetGUID()))
dynamicFlags &= ~UNIT_DYNFLAG_TRACK_UNIT;
*data << dynamicFlags;

View File

@@ -332,7 +332,7 @@ void SpellScript::SetExplTargetDest(WorldLocation& loc)
m_spell->m_targets.SetDst(loc);
}
Unit* SpellScript::GetExplTargetWorldObject()
WorldObject* SpellScript::GetExplTargetWorldObject()
{
return m_spell->m_targets.GetObjectTarget();
}