Removed pointless assignments before packet send.

This commit is contained in:
MobiusDevelopment
2020-01-30 23:02:45 +00:00
parent 5cd563c611
commit 845dea2551
505 changed files with 842 additions and 1792 deletions

View File

@@ -70,11 +70,7 @@ public class HandysBlockCheckerEvent extends AbstractNpcAI
if (HandysBlockCheckerManager.getInstance().addPlayerToArena(player, arena))
{
final ArenaParticipantsHolder holder = HandysBlockCheckerManager.getInstance().getHolder(arena);
final ExCubeGameTeamList tl = new ExCubeGameTeamList(holder.getRedPlayers(), holder.getBluePlayers(), arena);
player.sendPacket(tl);
player.sendPacket(new ExCubeGameTeamList(holder.getRedPlayers(), holder.getBluePlayers(), arena));
if ((holder.getBlueTeamSize() >= Config.MIN_BLOCK_CHECKER_TEAM_MEMBERS) && (holder.getRedTeamSize() >= Config.MIN_BLOCK_CHECKER_TEAM_MEMBERS))
{
holder.updateEvent();

View File

@@ -262,8 +262,7 @@ public class HallOfErosionAttack extends AbstractNpcAI
if ((party.getCommandChannel().getMembers().size() < Config.EROSION_ATTACK_MIN_PLAYERS) || (party.getCommandChannel().getMembers().size() > Config.EROSION_ATTACK_MAX_PLAYERS))// 18 27
{
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY);
party.getCommandChannel().broadcastPacket(sm);
party.getCommandChannel().broadcastPacket(new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY));
return false;
}

View File

@@ -264,8 +264,7 @@ public class HallOfErosionDefence extends AbstractNpcAI
if ((party.getCommandChannel().getMembers().size() < Config.EROSION_DEFENCE_MIN_PLAYERS) || (party.getCommandChannel().getMembers().size() > Config.EROSION_DEFENCE_MAX_PLAYERS))// 18 27
{
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY);
party.getCommandChannel().broadcastPacket(sm);
party.getCommandChannel().broadcastPacket(new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY));
return false;
}
@@ -571,8 +570,7 @@ public class HallOfErosionDefence extends AbstractNpcAI
{
soulwagonSpawned = true;
final Npc soul = addSpawn(25636, npc.getLocation(), world.getInstanceId());
final NpcSay cs = new NpcSay(soul.getObjectId(), ChatType.SHOUT, soul.getId(), NpcStringId.HA_HA_HA);
soul.broadcastPacket(cs);
soul.broadcastPacket(new NpcSay(soul.getObjectId(), ChatType.SHOUT, soul.getId(), NpcStringId.HA_HA_HA));
}
}

View File

@@ -259,8 +259,7 @@ public class HeartInfinityAttack extends AbstractNpcAI
}
if ((party.getCommandChannel().getMembers().size() < Config.HEART_ATTACK_MIN_PLAYERS) || (party.getCommandChannel().getMembers().size() > Config.HEART_ATTACK_MAX_PLAYERS))
{
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY);
party.getCommandChannel().broadcastPacket(sm);
party.getCommandChannel().broadcastPacket(new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY));
return false;
}
for (PlayerInstance partyMember : party.getCommandChannel().getMembers())
@@ -398,8 +397,7 @@ public class HeartInfinityAttack extends AbstractNpcAI
InstanceManager.getInstance().getInstance(world.getInstanceId()).getDoor(14240102).openMe();
broadCastPacket(world, new ExShowScreenMessage(NpcStringId.YOU_CAN_HEAR_THE_UNDEAD_OF_EKIMUS_RUSHING_TOWARD_YOU_S1_S2_IT_HAS_NOW_BEGUN, 2, 8000));
world.ekimus = addSpawn(EKIMUS, -179537, 208854, -15504, 16384, false, 0, false, world.getInstanceId());
final NpcSay cs = new NpcSay(world.ekimus.getObjectId(), ChatType.SHOUT, world.ekimus.getId(), NpcStringId.I_SHALL_ACCEPT_YOUR_CHALLENGE_S1_COME_AND_DIE_IN_THE_ARMS_OF_IMMORTALITY);
world.ekimus.broadcastPacket(cs);
world.ekimus.broadcastPacket(new NpcSay(world.ekimus.getObjectId(), ChatType.SHOUT, world.ekimus.getId(), NpcStringId.I_SHALL_ACCEPT_YOUR_CHALLENGE_S1_COME_AND_DIE_IN_THE_ARMS_OF_IMMORTALITY));
world.hounds.add(addSpawn(HOUND, -179224, 209624, -15504, 16384, false, 0, false, world.getInstanceId()));
world.hounds.add(addSpawn(HOUND, -179880, 209464, -15504, 16384, false, 0, false, world.getInstanceId()));
world.startTime = System.currentTimeMillis();

View File

@@ -279,8 +279,7 @@ public class HeartInfinityDefence extends AbstractNpcAI
}
if ((party.getCommandChannel().getMembers().size() < Config.HEART_DEFENCE_MIN_PLAYERS) || (party.getCommandChannel().getMembers().size() > Config.HEART_DEFENCE_MAX_PLAYERS))// 18 27
{
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY);
party.getCommandChannel().broadcastPacket(sm);
party.getCommandChannel().broadcastPacket(new SystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY));
return false;
}
for (PlayerInstance partyMember : party.getCommandChannel().getMembers())
@@ -609,8 +608,7 @@ public class HeartInfinityDefence extends AbstractNpcAI
}
else
{
final NpcSay cs = new NpcSay(preawakenedEchmus.getObjectId(), ChatType.SHOUT, preawakenedEchmus.getId(), NpcStringId.BRING_MORE_MORE_SOULS);
preawakenedEchmus.broadcastPacket(cs);
preawakenedEchmus.broadcastPacket(new NpcSay(preawakenedEchmus.getObjectId(), ChatType.SHOUT, preawakenedEchmus.getId(), NpcStringId.BRING_MORE_MORE_SOULS));
final ExShowScreenMessage message = new ExShowScreenMessage(NpcStringId.THE_SOUL_COFFIN_HAS_AWAKENED_EKIMUS_IF_S1_MORE_SOUL_COFFIN_S_ARE_CREATED_THE_DEFENSE_OF_THE_HEART_OF_IMMORTALITY_WILL_FAIL, 2, 8000);
message.addStringParameter(Integer.toString(maxCoffins - coffinsCreated));
broadCastPacket(world, message);

View File

@@ -1011,8 +1011,7 @@ public class SeedOfDestruction extends AbstractNpcAI
}
case 1:
{
final ExShowScreenMessage message1 = new ExShowScreenMessage(NpcStringId.THE_ENEMIES_HAVE_ATTACKED_EVERYONE_COME_OUT_AND_FIGHT_URGH, 5, 5000);
sendScreenMessage(world, message1);
sendScreenMessage(world, new ExShowScreenMessage(NpcStringId.THE_ENEMIES_HAVE_ATTACKED_EVERYONE_COME_OUT_AND_FIGHT_URGH, 5, 5000));
for (int i : ENTRANCE_ROOM_DOORS)
{
world.openDoor(i);
@@ -1029,8 +1028,7 @@ public class SeedOfDestruction extends AbstractNpcAI
}
case 4:
{
final ExShowScreenMessage message2 = new ExShowScreenMessage(NpcStringId.OBELISK_HAS_COLLAPSED_DON_T_LET_THE_ENEMIES_JUMP_AROUND_WILDLY_ANYMORE, 5, 5000);
sendScreenMessage(world, message2);
sendScreenMessage(world, new ExShowScreenMessage(NpcStringId.OBELISK_HAS_COLLAPSED_DON_T_LET_THE_ENEMIES_JUMP_AROUND_WILDLY_ANYMORE, 5, 5000));
for (int i : SQUARE_DOORS)
{
world.openDoor(i);
@@ -1047,8 +1045,7 @@ public class SeedOfDestruction extends AbstractNpcAI
spawn(world, SCOUTPASS_SPAWNS_UPPER, false, true);
spawn(world, SCOUTPASS_SPAWNS_GROUND, false, false);
spawn(world, PREFORT_SPAWNS, false, false);
final ExShowScreenMessage message3 = new ExShowScreenMessage(NpcStringId.ENEMIES_ARE_TRYING_TO_DESTROY_THE_FORTRESS_EVERYONE_DEFEND_THE_FORTRESS, 5, 5000);
sendScreenMessage(world, message3);
sendScreenMessage(world, new ExShowScreenMessage(NpcStringId.ENEMIES_ARE_TRYING_TO_DESTROY_THE_FORTRESS_EVERYONE_DEFEND_THE_FORTRESS, 5, 5000));
spawn(world, FORT_SPAWNS_UPPER, false, true);
spawn(world, FORT_SPAWNS_GROUND, false, false);
world.killedDevice = 0;
@@ -1177,8 +1174,7 @@ public class SeedOfDestruction extends AbstractNpcAI
{
if ((npc.getCurrentHp() < (npc.getMaxHp() / 2)) && (_numAtk < 1))
{
final ExShowScreenMessage message4 = new ExShowScreenMessage(NpcStringId.COME_OUT_WARRIORS_PROTECT_SEED_OF_DESTRUCTION, 5, 5000);
sendScreenMessage(world, message4);
sendScreenMessage(world, new ExShowScreenMessage(NpcStringId.COME_OUT_WARRIORS_PROTECT_SEED_OF_DESTRUCTION, 5, 5000));
world._tiat.doCast(SkillData.getInstance().getSkill(5818, 1));
world._tiat.doCast(SkillData.getInstance().getSkill(181, 1));
world.deviceSpawnedMobCount = 0;

View File

@@ -813,8 +813,7 @@ public class RainbowSpringsChateau extends ClanHallSiegeEngine
{
_usedTextPassages.put(message, new ArrayList<>());
final int objId = npc.getObjectId();
final NpcSay say = new NpcSay(objId, ChatType.NPC_SHOUT, npc.getId(), message);
npc.broadcastPacket(say);
npc.broadcastPacket(new NpcSay(objId, ChatType.NPC_SHOUT, npc.getId(), message));
}
}

View File

@@ -178,8 +178,7 @@ public class AdminEffects implements IAdminCommandHandler
final int intensity = Integer.parseInt(val1);
final String val2 = st.nextToken();
final int duration = Integer.parseInt(val2);
final Earthquake eq = new Earthquake(activeChar.getX(), activeChar.getY(), activeChar.getZ(), intensity, duration);
activeChar.broadcastPacket(eq);
activeChar.broadcastPacket(new Earthquake(activeChar.getX(), activeChar.getY(), activeChar.getZ(), intensity, duration));
}
catch (Exception e)
{

View File

@@ -214,9 +214,9 @@ public class AdminEventEngine implements IAdminCommandHandler
activeChar.sendMessage(GameEvent.startEventParticipation());
Broadcast.toAllOnlinePlayers(activeChar.getName() + " has started an event. You will find a participation NPC somewhere around you.");
final PlaySound _snd = new PlaySound(1, "B03_F", 0, 0, 0, 0, 0);
activeChar.sendPacket(_snd);
activeChar.broadcastPacket(_snd);
final PlaySound snd = new PlaySound(1, "B03_F", 0, 0, 0, 0, 0);
activeChar.sendPacket(snd);
activeChar.broadcastPacket(snd);
final NpcHtmlMessage adminReply = new NpcHtmlMessage();

View File

@@ -113,8 +113,7 @@ public class AdminGmChat implements IAdminCommandHandler
offset = 13;
}
text = command.substring(offset);
final CreatureSay cs = new CreatureSay(null, ChatType.ALLIANCE, activeChar.getName(), text);
AdminData.getInstance().broadcastToGMs(cs);
AdminData.getInstance().broadcastToGMs(new CreatureSay(null, ChatType.ALLIANCE, activeChar.getName(), text));
}
catch (StringIndexOutOfBoundsException e)
{

View File

@@ -131,8 +131,7 @@ public class RentPet implements IBypassHandler
}
player.mount(petId, 0, false);
final SetupGauge sg = new SetupGauge(player.getObjectId(), 3, time * 1000);
player.sendPacket(sg);
player.sendPacket(new SetupGauge(player.getObjectId(), 3, time * 1000));
player.startRentPet(time);
}

View File

@@ -43,8 +43,7 @@ public class ClanGate extends AbstractEffect
final Clan clan = info.getEffected().getActingPlayer().getClan();
if (clan != null)
{
final SystemMessage msg = new SystemMessage(SystemMessageId.COURT_MAGICIAN_THE_PORTAL_HAS_BEEN_CREATED);
clan.broadcastToOtherOnlineMembers(msg, info.getEffected().getActingPlayer());
clan.broadcastToOtherOnlineMembers(new SystemMessage(SystemMessageId.COURT_MAGICIAN_THE_PORTAL_HAS_BEEN_CREATED), info.getEffected().getActingPlayer());
}
}
}

View File

@@ -45,8 +45,7 @@ public class ChannelDelete implements IUserCommandHandler
{
final CommandChannel channel = player.getParty().getCommandChannel();
final SystemMessage sm = new SystemMessage(SystemMessageId.THE_COMMAND_CHANNEL_HAS_BEEN_DISBANDED);
channel.broadcastPacket(sm);
channel.broadcastPacket(new SystemMessage(SystemMessageId.THE_COMMAND_CHANNEL_HAS_BEEN_DISBANDED));
channel.disbandChannel();
return true;

View File

@@ -110,10 +110,8 @@ public class Unstuck implements IUserCommandHandler
player.setTarget(player);
player.disableAllSkills();
final MagicSkillUse msk = new MagicSkillUse(player, 1050, 1, unstuckTimer, 0);
Broadcast.toSelfAndKnownPlayersInRadius(player, msk, 900);
final SetupGauge sg = new SetupGauge(player.getObjectId(), 0, unstuckTimer);
player.sendPacket(sg);
Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, 1050, 1, unstuckTimer, 0), 900);
player.sendPacket(new SetupGauge(player.getObjectId(), 0, unstuckTimer));
// End SoE Animation section
// continue execution later

View File

@@ -463,10 +463,8 @@ public class Wedding implements IVoicedCommandHandler
activeChar.setTarget(activeChar);
activeChar.disableAllSkills();
final MagicSkillUse msk = new MagicSkillUse(activeChar, 1050, 1, teleportTimer, 0);
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, msk, 900);
final SetupGauge sg = new SetupGauge(activeChar.getObjectId(), 0, teleportTimer);
activeChar.sendPacket(sg);
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, 1050, 1, teleportTimer, 0), 900);
activeChar.sendPacket(new SetupGauge(activeChar.getObjectId(), 0, teleportTimer));
// End SoE Animation section
final EscapeFinalizer ef = new EscapeFinalizer(activeChar, partner.getLocation(), partner.isIn7sDungeon());

View File

@@ -147,7 +147,7 @@ public class Q00144_PailakaInjuredDragon extends Quest
HEAL_POTION
};
// @formatter:off
private static final Map<Integer, int[]> NOEXIT_ZONES = new HashMap<>();
private static final Map<Integer, int[]> NOEXIT_ZONES = new HashMap<>();
static
{
NOEXIT_ZONES.put(200001, new int[]{123167, -45743, -3023});

View File

@@ -350,8 +350,7 @@ public class RecipeController
_delay = (int) (Config.ALT_GAME_CREATION_SPEED * _player.getMReuseRate(_skill) * GameTimeController.TICKS_PER_SECOND * GameTimeController.MILLIS_IN_TICK);
// FIXME: please fix this packet to show crafting animation (somebody)
final MagicSkillUse msk = new MagicSkillUse(_player, _skillId, _skillLevel, _delay, 0);
_player.broadcastPacket(msk);
_player.broadcastPacket(new MagicSkillUse(_player, _skillId, _skillLevel, _delay, 0));
_player.sendPacket(new SetupGauge(_player.getObjectId(), 0, _delay));
ThreadPool.schedule(this, 100 + _delay);
@@ -482,7 +481,7 @@ public class RecipeController
if (_target == _player)
{
final SystemMessage sm = new SystemMessage(SystemMessageId.EQUIPPED_S1_S2); // you equipped ...
final SystemMessage sm = new SystemMessage(SystemMessageId.EQUIPPED_S1_S2);
sm.addLong(count);
sm.addItemName(item.getItemId());
_player.sendPacket(sm);

View File

@@ -789,8 +789,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;

View File

@@ -994,8 +994,7 @@ public class TerritoryWarManager implements Siegable
}
}
final SystemMessage sm = new SystemMessage(SystemMessageId.TERRITORY_WAR_HAS_BEGUN);
Broadcast.toAllOnlinePlayers(sm);
Broadcast.toAllOnlinePlayers(new SystemMessage(SystemMessageId.TERRITORY_WAR_HAS_BEGUN));
}
protected void endTerritoryWar()
@@ -1110,8 +1109,7 @@ public class TerritoryWarManager implements Siegable
// Change next TW date.
setNextTWDate();
final SystemMessage sm = new SystemMessage(SystemMessageId.TERRITORY_WAR_HAS_ENDED);
Broadcast.toAllOnlinePlayers(sm);
Broadcast.toAllOnlinePlayers(new SystemMessage(SystemMessageId.TERRITORY_WAR_HAS_ENDED));
}
public void setNextTWDate()

View File

@@ -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

View File

@@ -1233,8 +1233,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
sendPacket(SystemMessageId.YOUR_CROSSBOW_IS_PREPARING_TO_FIRE);
// Send a Server->Client packet SetupGauge
final SetupGauge sg = new SetupGauge(getObjectId(), SetupGauge.RED, sAtk + reuse);
sendPacket(sg);
sendPacket(new SetupGauge(getObjectId(), SetupGauge.RED, sAtk + reuse));
}
// Create a new hit task with Medium priority

View File

@@ -1759,7 +1759,6 @@ public class ClanHallManagerInstance extends MerchantInstance
{
return;
}
final AgitDecoInfo bl = new AgitDecoInfo(ch);
player.sendPacket(bl);
player.sendPacket(new AgitDecoInfo(ch));
}
}

View File

@@ -104,7 +104,6 @@ public class FestivalMonsterInstance extends MonsterInstance
final ItemInstance addedOfferings = partyLeader.getInventory().addItem("Sign", SevenSignsFestival.FESTIVAL_OFFERING_ID, _bonusMultiplier, partyLeader, this);
final InventoryUpdate iu = new InventoryUpdate();
if (addedOfferings.getCount() != _bonusMultiplier)
{
iu.addModifiedItem(addedOfferings);
@@ -113,7 +112,6 @@ public class FestivalMonsterInstance extends MonsterInstance
{
iu.addNewItem(addedOfferings);
}
partyLeader.sendPacket(iu);
super.doItemDrop(lastAttacker); // Normal drop

View File

@@ -3643,7 +3643,6 @@ public class PlayerInstance extends Playable
if (!Config.FORCE_INVENTORY_UPDATE)
{
final InventoryUpdate playerIU = new InventoryUpdate();
if ((oldItem.getCount() > 0) && (oldItem != newItem))
{
playerIU.addModifiedItem(oldItem);
@@ -3652,7 +3651,6 @@ public class PlayerInstance extends Playable
{
playerIU.addRemovedItem(oldItem);
}
sendPacket(playerIU);
}
else
@@ -3673,7 +3671,6 @@ public class PlayerInstance extends Playable
if (!Config.FORCE_INVENTORY_UPDATE)
{
final InventoryUpdate playerIU = new InventoryUpdate();
if (newItem.getCount() > count)
{
playerIU.addModifiedItem(newItem);
@@ -3682,7 +3679,6 @@ public class PlayerInstance extends Playable
{
playerIU.addNewItem(newItem);
}
targetPlayer.sendPacket(playerIU);
}
else
@@ -3698,7 +3694,6 @@ public class PlayerInstance extends Playable
else if (target instanceof PetInventory)
{
final PetInventoryUpdate petIU = new PetInventoryUpdate();
if (newItem.getCount() > count)
{
petIU.addModifiedItem(newItem);
@@ -3707,7 +3702,6 @@ public class PlayerInstance extends Playable
{
petIU.addNewItem(newItem);
}
((PetInventory) target).getOwner().sendPacket(petIU);
}
return newItem;
@@ -4775,8 +4769,7 @@ public class PlayerInstance extends Playable
if (_transformation != null)
{
// You already polymorphed and cannot polymorph again.
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
sendPacket(msg);
sendPacket(new SystemMessage(SystemMessageId.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN));
return;
}
@@ -12758,8 +12751,7 @@ public class PlayerInstance extends Playable
else if (_canFeed)
{
setCurrentFeed(getMaxFeed());
final SetupGauge sg = new SetupGauge(getObjectId(), 3, (_curFeed * 10000) / getFeedConsume(), (getMaxFeed() * 10000) / getFeedConsume());
sendPacket(sg);
sendPacket(new SetupGauge(getObjectId(), 3, (_curFeed * 10000) / getFeedConsume(), (getMaxFeed() * 10000) / getFeedConsume()));
if (!isDead())
{
_mountFeedTask = ThreadPool.scheduleAtFixedRate(new PetFeedTask(this), 10000, 10000);
@@ -12805,8 +12797,7 @@ public class PlayerInstance extends Playable
{
final boolean lastHungryState = isHungry();
_curFeed = num > getMaxFeed() ? getMaxFeed() : num;
final SetupGauge sg = new SetupGauge(getObjectId(), 3, (_curFeed * 10000) / getFeedConsume(), (getMaxFeed() * 10000) / getFeedConsume());
sendPacket(sg);
sendPacket(new SetupGauge(getObjectId(), 3, (_curFeed * 10000) / getFeedConsume(), (getMaxFeed() * 10000) / getFeedConsume()));
// broadcast move speed change when strider becomes hungry / full
if (lastHungryState != isHungry())
{

View File

@@ -231,10 +231,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();

View File

@@ -157,8 +157,7 @@ public class SepulcherNpcInstance extends Npc
// PlayerInstance on the _knownPlayer of the NpcInstance
// to display a social action of the NpcInstance on their
// client
final SocialAction sa = new SocialAction(getObjectId(), Rnd.get(8));
broadcastPacket(sa);
broadcastPacket(new SocialAction(getObjectId(), Rnd.get(8)));
doAction(player);
}

View File

@@ -106,8 +106,7 @@ public class CubicAction implements Runnable
if (useCubicCure)
{
// Smart Cubic debuff cancel is needed, no other skill is used in this activation period
final MagicSkillUse msu = new MagicSkillUse(_cubic.getOwner(), _cubic.getOwner(), CubicInstance.SKILL_CUBIC_CURE, 1, 0, 0);
_cubic.getOwner().broadcastPacket(msu);
_cubic.getOwner().broadcastPacket(new MagicSkillUse(_cubic.getOwner(), _cubic.getOwner(), CubicInstance.SKILL_CUBIC_CURE, 1, 0, 0));
// The cubic has done an action, increase the current count
_currentCount.incrementAndGet();

View File

@@ -828,7 +828,6 @@ public class TvTEvent
killerTeam.increasePoints();
final CreatureSay cs = new CreatureSay(killerPlayerInstance, ChatType.WHISPER, killerPlayerInstance.getName(), "I have killed " + killedPlayerInstance.getName() + "!");
for (PlayerInstance playerInstance : _teams[killerTeamId].getParticipatedPlayers().values())
{
if (playerInstance != null)

View File

@@ -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();

View File

@@ -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));
}
}
}

View File

@@ -97,8 +97,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);

View File

@@ -191,8 +191,7 @@ public class RequestDropItem implements IClientIncomingPacket
player.sendPacket(iu);
player.broadcastUserInfo();
final ItemList il = new ItemList(player, true);
player.sendPacket(il);
player.sendPacket(new ItemList(player, true));
}
final ItemInstance dropedItem = player.dropItem("Drop", _objectId, _count, _x, _y, _z, null, false, false);

View File

@@ -105,7 +105,6 @@ public class RequestExEnchantSkillInfoDetail implements IClientIncomingPacket
}
// send skill enchantment detail
final ExEnchantSkillInfoDetail esd = new ExEnchantSkillInfoDetail(_type, _skillId, _skillLvl, player);
player.sendPacket(esd);
player.sendPacket(new ExEnchantSkillInfoDetail(_type, _skillId, _skillLvl, player));
}
}

View File

@@ -198,8 +198,7 @@ public class RequestExEnchantSkillRouteChange implements IClientIncomingPacket
}
else
{
final SystemMessage sm = new SystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_SP_TO_ENCHANT_THAT_SKILL);
player.sendPacket(sm);
player.sendPacket(new SystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_SP_TO_ENCHANT_THAT_SKILL));
}
}
}

View File

@@ -181,8 +181,7 @@ public class RequestExEnchantSkillSafe implements IClientIncomingPacket
}
else
{
final SystemMessage sm = new SystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_SP_TO_ENCHANT_THAT_SKILL);
player.sendPacket(sm);
player.sendPacket(new SystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_SP_TO_ENCHANT_THAT_SKILL));
}
}
}

View File

@@ -36,8 +36,7 @@ public class RequestItemList implements IClientIncomingPacket
{
if ((client != null) && (client.getPlayer() != null) && !client.getPlayer().isInventoryDisabled())
{
final ItemList il = new ItemList(client.getPlayer(), true);
client.sendPacket(il);
client.sendPacket(new ItemList(client.getPlayer(), true));
}
}
}

View File

@@ -90,9 +90,7 @@ public class RequestPartyMatchConfig implements IClientIncomingPacket
PartyMatchWaitingList.getInstance().addPlayer(player);
// Send Room list
final ListPartyWating matchList = new ListPartyWating(player, _auto, _loc, _lvl);
player.sendPacket(matchList);
player.sendPacket(new ListPartyWating(player, _auto, _loc, _lvl));
}
}
}

View File

@@ -45,8 +45,7 @@ public class RequestPledgeMemberList implements IClientIncomingPacket
final Clan clan = player.getClan();
if (clan != null)
{
final PledgeShowMemberListAll pm = new PledgeShowMemberListAll(clan, player);
player.sendPacket(pm);
player.sendPacket(new PledgeShowMemberListAll(clan, player));
}
}
}

View File

@@ -34,7 +34,6 @@ public class RequestQuestList implements IClientIncomingPacket
@Override
public void run(GameClient client)
{
final QuestList ql = new QuestList(client.getPlayer());
client.sendPacket(ql);
client.sendPacket(new QuestList(client.getPlayer()));
}
}

View File

@@ -41,7 +41,6 @@ public class RequestRecipeItemMakeInfo implements IClientIncomingPacket
return;
}
final RecipeItemMakeInfo response = new RecipeItemMakeInfo(_id, player);
client.sendPacket(response);
client.sendPacket(new RecipeItemMakeInfo(_id, player));
}
}

View File

@@ -51,7 +51,6 @@ public class RequestSSQStatus implements IClientIncomingPacket
return;
}
final SSQStatus ssqs = new SSQStatus(player.getObjectId(), _page);
player.sendPacket(ssqs);
player.sendPacket(new SSQStatus(player.getObjectId(), _page));
}
}

View File

@@ -45,16 +45,14 @@ public class RequestSiegeAttackerList implements IClientIncomingPacket
final Castle castle = CastleManager.getInstance().getCastleById(_castleId);
if (castle != null)
{
final SiegeAttackerList sal = new SiegeAttackerList(castle);
client.sendPacket(sal);
client.sendPacket(new SiegeAttackerList(castle));
}
else
{
final SiegableHall hall = CHSiegeManager.getInstance().getSiegableHall(_castleId);
if (hall != null)
{
final SiegeAttackerList sal = new SiegeAttackerList(hall);
client.sendPacket(sal);
client.sendPacket(new SiegeAttackerList(hall));
}
}
}

View File

@@ -45,7 +45,6 @@ public class RequestSiegeDefenderList implements IClientIncomingPacket
{
return;
}
final SiegeDefenderList sdl = new SiegeDefenderList(castle);
client.sendPacket(sdl);
client.sendPacket(new SiegeDefenderList(castle));
}
}