Broadcast prohibitions.

Thanks Sahar.
This commit is contained in:
MobiusDev
2018-05-21 21:34:27 +00:00
parent eed47054fb
commit 29603cb853
25 changed files with 153 additions and 1 deletions

View File

@ -3618,6 +3618,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
protected void broadcastModifiedStats(List<Stats> stats)
{
if (!isSpawned())
{
return;
}
if ((stats == null) || stats.isEmpty())
{
return;

View File

@ -418,7 +418,7 @@ public class L2Npc extends L2Character
{
player.sendPacket(new ServerObjectInfo(this, player));
}
else
else if (isSpawned())
{
player.sendPacket(new AbstractNpcInfo.NpcInfo(this, player));
}

View File

@ -34,6 +34,13 @@ public class DropItem implements IClientOutgoingPacket
{
_item = item;
_charObjId = playerObjId;
// Future test.
if ((_item.getX() == 0) && (_item.getY() == 0))
{
LOGGER.warning("DropItem with x=0 and y=0.");
Thread.dumpStack(); // Why? Also check SpawnItem, just in case.
}
}
@Override

View File

@ -36,6 +36,13 @@ public final class SpawnItem implements IClientOutgoingPacket
_y = obj.getY();
_z = obj.getZ();
// Future test.
if ((_x == 0) && (_y == 0))
{
LOGGER.warning("SpawnItem with x=0 and y=0.");
Thread.dumpStack(); // Why? Also check DropItem, just in case.
}
if (obj instanceof L2ItemInstance)
{
final L2ItemInstance item = (L2ItemInstance) obj;