Removed pointless assignments before packet send.
This commit is contained in:
@@ -667,8 +667,7 @@ public abstract class AbstractAI implements Ctrl
|
||||
protected void clientNotifyDead()
|
||||
{
|
||||
// Send a Server->Client packet Die to the actor and all PlayerInstance in its _knownPlayers
|
||||
final Die msg = new Die(_actor);
|
||||
_actor.broadcastPacket(msg);
|
||||
_actor.broadcastPacket(new Die(_actor));
|
||||
|
||||
// Init AI
|
||||
_intention = AI_INTENTION_IDLE;
|
||||
|
@@ -41,8 +41,7 @@ public class PcCafePointsManager
|
||||
|
||||
if (player.getPcCafePoints() >= Config.PC_CAFE_MAX_POINTS)
|
||||
{
|
||||
final SystemMessage message = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_THE_MAXIMUM_NUMBER_OF_PA_POINTS);
|
||||
player.sendPacket(message);
|
||||
player.sendPacket(new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_THE_MAXIMUM_NUMBER_OF_PA_POINTS));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -260,9 +260,9 @@ public class CursedWeapon implements INamable
|
||||
_item.setDropTime(0); // Prevent item from being removed by ItemsAutoDestroy
|
||||
|
||||
// RedSky and Earthquake
|
||||
final ExRedSky packet = new ExRedSky(10);
|
||||
final ExRedSky rs = new ExRedSky(10);
|
||||
final Earthquake eq = new Earthquake(player.getX(), player.getY(), player.getZ(), 14, 3);
|
||||
Broadcast.toAllOnlinePlayers(packet);
|
||||
Broadcast.toAllOnlinePlayers(rs);
|
||||
Broadcast.toAllOnlinePlayers(eq);
|
||||
}
|
||||
else
|
||||
|
@@ -1817,8 +1817,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
_lastCompassZone = ExSetCompassZoneCode.ALTEREDZONE;
|
||||
final ExSetCompassZoneCode cz = new ExSetCompassZoneCode(ExSetCompassZoneCode.ALTEREDZONE);
|
||||
sendPacket(cz);
|
||||
sendPacket(new ExSetCompassZoneCode(ExSetCompassZoneCode.ALTEREDZONE));
|
||||
}
|
||||
else if (isInsideZone(ZoneId.SIEGE))
|
||||
{
|
||||
@@ -1827,8 +1826,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
_lastCompassZone = ExSetCompassZoneCode.SIEGEWARZONE2;
|
||||
final ExSetCompassZoneCode cz = new ExSetCompassZoneCode(ExSetCompassZoneCode.SIEGEWARZONE2);
|
||||
sendPacket(cz);
|
||||
sendPacket(new ExSetCompassZoneCode(ExSetCompassZoneCode.SIEGEWARZONE2));
|
||||
}
|
||||
else if (isInsideZone(ZoneId.PVP))
|
||||
{
|
||||
@@ -1837,8 +1835,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
_lastCompassZone = ExSetCompassZoneCode.PVPZONE;
|
||||
final ExSetCompassZoneCode cz = new ExSetCompassZoneCode(ExSetCompassZoneCode.PVPZONE);
|
||||
sendPacket(cz);
|
||||
sendPacket(new ExSetCompassZoneCode(ExSetCompassZoneCode.PVPZONE));
|
||||
}
|
||||
else if (isInsideZone(ZoneId.PEACE))
|
||||
{
|
||||
@@ -1847,8 +1844,7 @@ public class PlayerInstance extends Playable
|
||||
return;
|
||||
}
|
||||
_lastCompassZone = ExSetCompassZoneCode.PEACEZONE;
|
||||
final ExSetCompassZoneCode cz = new ExSetCompassZoneCode(ExSetCompassZoneCode.PEACEZONE);
|
||||
sendPacket(cz);
|
||||
sendPacket(new ExSetCompassZoneCode(ExSetCompassZoneCode.PEACEZONE));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1861,8 +1857,7 @@ public class PlayerInstance extends Playable
|
||||
updatePvPStatus();
|
||||
}
|
||||
_lastCompassZone = ExSetCompassZoneCode.GENERALZONE;
|
||||
final ExSetCompassZoneCode cz = new ExSetCompassZoneCode(ExSetCompassZoneCode.GENERALZONE);
|
||||
sendPacket(cz);
|
||||
sendPacket(new ExSetCompassZoneCode(ExSetCompassZoneCode.GENERALZONE));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4377,8 +4372,7 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
|
||||
// Send a Server->Client packet StopMove to this PlayerInstance
|
||||
final StopMove sm = new StopMove(this);
|
||||
sendPacket(sm);
|
||||
sendPacket(new StopMove(this));
|
||||
|
||||
SystemMessage smsg = null;
|
||||
synchronized (target)
|
||||
@@ -10443,7 +10437,6 @@ public class PlayerInstance extends Playable
|
||||
if (!_snoopListener.isEmpty())
|
||||
{
|
||||
final Snoop sn = new Snoop(getObjectId(), getName(), type, name, text);
|
||||
|
||||
for (PlayerInstance pci : _snoopListener)
|
||||
{
|
||||
if (pci != null)
|
||||
@@ -11744,8 +11737,7 @@ public class PlayerInstance extends Playable
|
||||
else if (_canFeed)
|
||||
{
|
||||
setCurrentFeed(getMaxFeed());
|
||||
final SetupGauge sg = new SetupGauge(3, (_curFeed * 10000) / getFeedConsume(), (getMaxFeed() * 10000) / getFeedConsume());
|
||||
sendPacket(sg);
|
||||
sendPacket(new SetupGauge(3, (_curFeed * 10000) / getFeedConsume(), (getMaxFeed() * 10000) / getFeedConsume()));
|
||||
if (!isDead())
|
||||
{
|
||||
_mountFeedTask = ThreadPool.scheduleAtFixedRate(new PetFeedTask(this), 10000, 10000);
|
||||
@@ -11804,8 +11796,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
final boolean lastHungryState = isHungry();
|
||||
_curFeed = num > getMaxFeed() ? getMaxFeed() : num;
|
||||
final SetupGauge sg = new SetupGauge(3, (_curFeed * 10000) / getFeedConsume(), (getMaxFeed() * 10000) / getFeedConsume());
|
||||
sendPacket(sg);
|
||||
sendPacket(new SetupGauge(3, (_curFeed * 10000) / getFeedConsume(), (getMaxFeed() * 10000) / getFeedConsume()));
|
||||
// broadcast move speed change when strider becomes hungry / full
|
||||
if (lastHungryState != isHungry())
|
||||
{
|
||||
|
@@ -246,10 +246,8 @@ public class RaceManagerInstance extends Npc
|
||||
if (_state == STARTING_RACE)
|
||||
{
|
||||
// state++;
|
||||
final PlaySound sRace = new PlaySound(1, "S_Race", 0, 0, 0, 0, 0);
|
||||
broadcast(sRace);
|
||||
final PlaySound sRace2 = new PlaySound(0, "ItemSound2.race_start", 1, 121209259, 12125, 182487, -3559);
|
||||
broadcast(sRace2);
|
||||
broadcast(new PlaySound(1, "S_Race", 0, 0, 0, 0, 0));
|
||||
broadcast(new PlaySound(0, "ItemSound2.race_start", 1, 121209259, 12125, 182487, -3559));
|
||||
_packet = new MonRaceInfo(_codes[1][0], _codes[1][1], race.getMonsters(), race.getSpeeds());
|
||||
sendMonsterInfo();
|
||||
|
||||
|
@@ -78,8 +78,7 @@ public class CommandChannelMatchingRoom extends MatchingRoom
|
||||
p.sendPacket(new ExMPCCRoomMember(player, this));
|
||||
});
|
||||
|
||||
final SystemMessage sm = new SystemMessage(kicked ? SystemMessageId.YOU_WERE_EXPELLED_FROM_THE_COMMAND_CHANNEL_MATCHING_ROOM : SystemMessageId.YOU_EXITED_FROM_THE_COMMAND_CHANNEL_MATCHING_ROOM);
|
||||
player.sendPacket(sm);
|
||||
player.sendPacket(new SystemMessage(kicked ? SystemMessageId.YOU_WERE_EXPELLED_FROM_THE_COMMAND_CHANNEL_MATCHING_ROOM : SystemMessageId.YOU_EXITED_FROM_THE_COMMAND_CHANNEL_MATCHING_ROOM));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -84,8 +84,7 @@ public class PartyMatchingRoom extends MatchingRoom
|
||||
p.sendPacket(SystemMessageId.THE_LEADER_OF_THE_PARTY_ROOM_HAS_CHANGED);
|
||||
});
|
||||
|
||||
final SystemMessage sm2 = new SystemMessage(kicked ? SystemMessageId.YOU_HAVE_BEEN_OUSTED_FROM_THE_PARTY_ROOM : SystemMessageId.YOU_HAVE_EXITED_THE_PARTY_ROOM);
|
||||
player.sendPacket(sm2);
|
||||
player.sendPacket(new SystemMessage(kicked ? SystemMessageId.YOU_HAVE_BEEN_OUSTED_FROM_THE_PARTY_ROOM : SystemMessageId.YOU_HAVE_EXITED_THE_PARTY_ROOM));
|
||||
player.sendPacket(ExClosePartyRoom.STATIC_PACKET);
|
||||
}
|
||||
|
||||
|
@@ -194,8 +194,7 @@ public abstract class VoteSystem implements Runnable
|
||||
|
||||
private void announce(String msg)
|
||||
{
|
||||
final CreatureSay cs = new CreatureSay(null, ChatType.CRITICAL_ANNOUNCE, "", msg);
|
||||
Broadcast.toAllOnlinePlayers(cs);
|
||||
Broadcast.toAllOnlinePlayers(new CreatureSay(null, ChatType.CRITICAL_ANNOUNCE, "", msg));
|
||||
}
|
||||
|
||||
public abstract int getVotes();
|
||||
|
@@ -56,8 +56,7 @@ public class CannotMoveAnymoreInVehicle implements IClientIncomingPacket
|
||||
{
|
||||
player.setInVehiclePosition(new Location(_x, _y, _z));
|
||||
player.setHeading(_heading);
|
||||
final StopMoveInVehicle msg = new StopMoveInVehicle(player, _boatId);
|
||||
player.broadcastPacket(msg);
|
||||
player.broadcastPacket(new StopMoveInVehicle(player, _boatId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -67,7 +67,6 @@ public class RequestRecipeBookDestroy implements IClientIncomingPacket
|
||||
player.unregisterRecipeList(_recipeID);
|
||||
|
||||
// Send the new recipe book.
|
||||
final RecipeBookItemList response = new RecipeBookItemList(player, rp.isDwarvenRecipe());
|
||||
player.sendPacket(response);
|
||||
player.sendPacket(new RecipeBookItemList(player, rp.isDwarvenRecipe()));
|
||||
}
|
||||
}
|
@@ -61,7 +61,6 @@ public class RequestRecipeBookOpen implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
final RecipeBookItemList response = new RecipeBookItemList(player, _isDwarvenCraft);
|
||||
player.sendPacket(response);
|
||||
player.sendPacket(new RecipeBookItemList(player, _isDwarvenCraft));
|
||||
}
|
||||
}
|
||||
|
@@ -107,8 +107,7 @@ public class RequestAnswerFriendInvite implements IClientIncomingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_FAILED_TO_ADD_A_FRIEND_TO_YOUR_FRIENDS_LIST);
|
||||
requestor.sendPacket(msg);
|
||||
requestor.sendPacket(new SystemMessage(SystemMessageId.YOU_HAVE_FAILED_TO_ADD_A_FRIEND_TO_YOUR_FRIENDS_LIST));
|
||||
}
|
||||
|
||||
player.setActiveRequester(null);
|
||||
|
Reference in New Issue
Block a user