Fixed probable bait location NPE.

This commit is contained in:
MobiusDevelopment
2020-11-01 14:45:20 +00:00
parent b61517956d
commit b6ec8029d4
17 changed files with 204 additions and 51 deletions

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -217,9 +217,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -217,9 +217,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -219,9 +219,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -220,9 +220,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -217,9 +217,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -219,9 +219,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -218,9 +218,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed

View File

@ -220,9 +220,18 @@ public class CharInfo implements IClientOutgoingPacket
packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed packet.writeC(_player.isFishing() ? 1 : 0); // Confirmed
final ILocational baitLocation = _player.getFishing().getBaitLocation(); final ILocational baitLocation = _player.getFishing().getBaitLocation();
packet.writeD(baitLocation.getX()); // Confirmed if (baitLocation != null)
packet.writeD(baitLocation.getY()); // Confirmed {
packet.writeD(baitLocation.getZ()); // Confirmed packet.writeD(baitLocation.getX()); // Confirmed
packet.writeD(baitLocation.getY()); // Confirmed
packet.writeD(baitLocation.getZ()); // Confirmed
}
else
{
packet.writeD(0);
packet.writeD(0);
packet.writeD(0);
}
packet.writeD(_player.getAppearance().getNameColor()); // Confirmed packet.writeD(_player.getAppearance().getNameColor()); // Confirmed