mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
*Add some debug info to find crash bug caused by player Notify()
--HG-- branch : trunk
This commit is contained in:
@@ -73,6 +73,16 @@ PlayerVisibilityNotifier::Notify()
|
||||
|
||||
if( i_data.HasData() )
|
||||
{
|
||||
uint32 entry = 0, map;
|
||||
float x,y;
|
||||
if(!i_visibleNow.empty())
|
||||
{
|
||||
entry = (*i_visibleNow.begin())->GetEntry();
|
||||
map = (*i_visibleNow.begin())->GetMapId();
|
||||
x = (*i_visibleNow.begin())->GetPositionX();
|
||||
y = (*i_visibleNow.begin())->GetPositionY();
|
||||
}
|
||||
|
||||
// send create/outofrange packet to player (except player create updates that already sent using SendUpdateToPlayer)
|
||||
WorldPacket packet;
|
||||
i_data.BuildPacket(&packet);
|
||||
|
||||
@@ -592,7 +592,10 @@ void Map::RelocationNotify()
|
||||
if(unit->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Trinity::PlayerRelocationNotifier notifier(*((Player*)unit));
|
||||
if(((Player*)unit)->m_seer != unit)
|
||||
VisitAll(((Player*)unit)->m_seer->GetPositionX(), ((Player*)unit)->m_seer->GetPositionY(), World::GetMaxVisibleDistance() + dist, notifier);
|
||||
else
|
||||
VisitAll(((Player*)unit)->GetPositionX(), ((Player*)unit)->GetPositionY(), World::GetMaxVisibleDistance() + dist, notifier);
|
||||
notifier.Notify();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user