[0027] Prevent sending transport maps in player update object (will be replaced by a better fix later). Should fix the random teleports for this moment...

Fixed aura update (Fixes warrior/paladin client freeze on world login).
This commit is contained in:
Fabian 2012-08-09 01:48:59 +02:00 committed by Antz
parent eb3f94c24e
commit 3561a43fe1
5 changed files with 26 additions and 5 deletions

View file

@ -21,6 +21,6 @@
namespace AIRegistry
{
void Initialize(void) override;
void Initialize(void);
}
#endif

View file

@ -891,9 +891,7 @@ void Map::SendInitSelf(Player* player)
// attach to player data current transport data
if (Transport* transport = player->GetTransport())
{
transport->BuildCreateUpdateBlockForPlayer(&data, player);
}
// build data for self presence in world at own client (one time for map)
player->BuildCreateUpdateBlockForPlayer(&data, player);
@ -939,6 +937,11 @@ void Map::SendInitTransports(Player* player)
WorldPacket packet;
transData.BuildPacket(&packet);
// Prevent sending transport maps in player update object
if (packet.ReadUInt16() != player->GetMapId())
return;
player->GetSession()->SendPacket(&packet);
}
@ -962,6 +965,11 @@ void Map::SendRemoveTransports(Player* player)
WorldPacket packet;
transData.BuildPacket(&packet);
// Prevent sending transport maps in player update object
if (packet.ReadUInt16() != player->GetMapId())
return;
player->GetSession()->SendPacket(&packet);
}

View file

@ -9184,7 +9184,7 @@ void SpellAuraHolder::BuildUpdatePacket(WorldPacket& data) const
data << uint32(GetId());
uint8 auraFlags = GetAuraFlags();
data << uint8(auraFlags);
data << uint16(auraFlags);
data << uint8(GetAuraLevel());
uint32 stackCount = m_procCharges ? m_procCharges * m_stackAmount : m_stackAmount;

View file

@ -556,6 +556,11 @@ void Transport::UpdateForMap(Map const* targetMap)
BuildCreateUpdateBlockForPlayer(&transData, itr->getSource());
WorldPacket packet;
transData.BuildPacket(&packet);
// Prevent sending transport maps in player update object
if (packet.ReadUInt16() != itr->getSource()->GetMapId())
return;
itr->getSource()->SendDirectMessage(&packet);
}
}
@ -568,8 +573,16 @@ void Transport::UpdateForMap(Map const* targetMap)
transData.BuildPacket(&out_packet);
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
{
if (this != itr->getSource()->GetTransport())
{
// Prevent sending transport maps in player update object
if (out_packet.ReadUInt16() != itr->getSource()->GetMapId())
return;
itr->getSource()->SendDirectMessage(&out_packet);
}
}
}
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "0026"
#define REVISION_NR "0027"
#endif // __REVISION_NR_H__