mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
*Fix a bug that logging out while casting far sight causes crash.
--HG-- branch : trunk
This commit is contained in:
@@ -190,7 +190,7 @@ Deliverer::Visit(DynamicObjectMapType &m)
|
||||
{
|
||||
// Send packet back to the caster if the caster has vision of dynamic object
|
||||
Player* caster = (Player*)iter->getSource()->GetCaster();
|
||||
if (caster->GetUInt64Value(PLAYER_FARSIGHT) == iter->getSource()->GetGUID() &&
|
||||
if (caster && caster->GetUInt64Value(PLAYER_FARSIGHT) == iter->getSource()->GetGUID() &&
|
||||
(!i_dist || iter->getSource()->GetDistance(&i_source) <= i_dist))
|
||||
SendPacket(caster);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user