mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9727] Build equiped item data only for item's owner
This is must decrease amount of data send to network at player enter to visibility radius for another player. (based on SilverIce's repo commit 8c60a80) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
49f6a53187
commit
234e241284
2 changed files with 8 additions and 9 deletions
|
|
@ -3913,16 +3913,15 @@ void Player::InitVisibleBits()
|
|||
|
||||
void Player::BuildCreateUpdateBlockForPlayer( UpdateData *data, Player *target ) const
|
||||
{
|
||||
for(int i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
{
|
||||
if(m_items[i] == NULL)
|
||||
continue;
|
||||
|
||||
m_items[i]->BuildCreateUpdateBlockForPlayer( data, target );
|
||||
}
|
||||
|
||||
if(target == this)
|
||||
{
|
||||
for(int i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
{
|
||||
if(m_items[i] == NULL)
|
||||
continue;
|
||||
|
||||
m_items[i]->BuildCreateUpdateBlockForPlayer( data, target );
|
||||
}
|
||||
for(int i = INVENTORY_SLOT_BAG_START; i < BANK_SLOT_BAG_END; ++i)
|
||||
{
|
||||
if(m_items[i] == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue