mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
*Fix a crash caused by farsight spells.
--HG-- branch : trunk
This commit is contained in:
@@ -514,11 +514,13 @@ ObjectAccessor::WorldObjectChangeAccumulator::Visit(DynamicObjectMapType &m)
|
||||
{
|
||||
for(DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
|
||||
{
|
||||
if (IS_PLAYER_GUID(iter->getSource()->GetCasterGUID()))
|
||||
uint64 guid = iter->getSource()->GetCasterGUID();
|
||||
if(IS_PLAYER_GUID(guid))
|
||||
{
|
||||
Player* caster = (Player*)iter->getSource()->GetCaster();
|
||||
if (caster->GetUInt64Value(PLAYER_FARSIGHT) == iter->getSource()->GetGUID())
|
||||
BuildPacket(caster);
|
||||
//Caster may be NULL if DynObj is in removelist
|
||||
if(Player *caster = FindPlayer(guid))
|
||||
if (caster->GetUInt64Value(PLAYER_FARSIGHT) == iter->getSource()->GetGUID())
|
||||
BuildPacket(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user