Improvements related to latest status change broadcast.

This commit is contained in:
MobiusDevelopment
2019-08-18 00:13:14 +00:00
parent a325c3f89c
commit 381308d9e0
24 changed files with 42 additions and 90 deletions

View File

@@ -10415,13 +10415,7 @@ public class PlayerInstance extends Playable
}
// send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{
sendInfo(player);
}
});
broadcastInfo();
}
@Override

View File

@@ -67,10 +67,7 @@ public class PeaceZone extends ZoneType
// Send player info to nearby players.
if (creature.isPlayer())
{
World.getInstance().forEachVisibleObject(creature, PlayerInstance.class, nearby ->
{
creature.sendInfo(nearby);
});
creature.broadcastInfo();
}
}
@@ -90,10 +87,7 @@ public class PeaceZone extends ZoneType
// Send player info to nearby players.
if (creature.isPlayer())
{
World.getInstance().forEachVisibleObject(creature, PlayerInstance.class, nearby ->
{
creature.sendInfo(nearby);
});
creature.broadcastInfo();
}
}

View File

@@ -156,7 +156,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert);
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.broadcastUserInfo();
// Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE)
@@ -417,6 +417,7 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true);
}
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills();