Reduce checks for Baium info by moving it to clientpacket.
This commit is contained in:
		| @@ -34,6 +34,8 @@ import org.l2jmobius.gameserver.network.serverpackets.raidbossinfo.ExRaidBossSpa | ||||
|  */ | ||||
| public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses = new HashMap<>(); | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -69,7 +71,14 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| 			{ | ||||
| 				if (boss.isDead() || !boss.isSpawned()) | ||||
| 				{ | ||||
| 					_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					if ((bossId == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0)) | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.ALIVE); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					} | ||||
| 				} | ||||
| 				else if (boss.isInCombat()) | ||||
| 				{ | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.commons.network.PacketWriter; | ||||
| import org.l2jmobius.gameserver.enums.RaidBossStatus; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.network.OutgoingPackets; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  | ||||
| @@ -30,7 +29,6 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  */ | ||||
| public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses; | ||||
| 	 | ||||
| @@ -47,7 +45,7 @@ public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| 		for (Entry<Integer, RaidBossStatus> entry : _statuses.entrySet()) | ||||
| 		{ | ||||
| 			packet.writeD(entry.getKey()); | ||||
| 			packet.writeD((entry.getKey() == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0) ? 1 : entry.getValue().ordinal()); | ||||
| 			packet.writeD(entry.getValue().ordinal()); | ||||
| 			packet.writeD(0); | ||||
| 		} | ||||
| 		return true; | ||||
|   | ||||
| @@ -34,6 +34,8 @@ import org.l2jmobius.gameserver.network.serverpackets.raidbossinfo.ExRaidBossSpa | ||||
|  */ | ||||
| public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses = new HashMap<>(); | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -69,7 +71,14 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| 			{ | ||||
| 				if (boss.isDead() || !boss.isSpawned()) | ||||
| 				{ | ||||
| 					_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					if ((bossId == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0)) | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.ALIVE); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					} | ||||
| 				} | ||||
| 				else if (boss.isInCombat()) | ||||
| 				{ | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.commons.network.PacketWriter; | ||||
| import org.l2jmobius.gameserver.enums.RaidBossStatus; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.network.OutgoingPackets; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  | ||||
| @@ -30,7 +29,6 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  */ | ||||
| public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses; | ||||
| 	 | ||||
| @@ -47,7 +45,7 @@ public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| 		for (Entry<Integer, RaidBossStatus> entry : _statuses.entrySet()) | ||||
| 		{ | ||||
| 			packet.writeD(entry.getKey()); | ||||
| 			packet.writeD((entry.getKey() == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0) ? 1 : entry.getValue().ordinal()); | ||||
| 			packet.writeD(entry.getValue().ordinal()); | ||||
| 			packet.writeD(0); | ||||
| 		} | ||||
| 		return true; | ||||
|   | ||||
| @@ -34,6 +34,8 @@ import org.l2jmobius.gameserver.network.serverpackets.raidbossinfo.ExRaidBossSpa | ||||
|  */ | ||||
| public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses = new HashMap<>(); | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -69,7 +71,14 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| 			{ | ||||
| 				if (boss.isDead() || !boss.isSpawned()) | ||||
| 				{ | ||||
| 					_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					if ((bossId == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0)) | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.ALIVE); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					} | ||||
| 				} | ||||
| 				else if (boss.isInCombat()) | ||||
| 				{ | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.commons.network.PacketWriter; | ||||
| import org.l2jmobius.gameserver.enums.RaidBossStatus; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.network.OutgoingPackets; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  | ||||
| @@ -30,7 +29,6 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  */ | ||||
| public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses; | ||||
| 	 | ||||
| @@ -47,7 +45,7 @@ public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| 		for (Entry<Integer, RaidBossStatus> entry : _statuses.entrySet()) | ||||
| 		{ | ||||
| 			packet.writeD(entry.getKey()); | ||||
| 			packet.writeD((entry.getKey() == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0) ? 1 : entry.getValue().ordinal()); | ||||
| 			packet.writeD(entry.getValue().ordinal()); | ||||
| 			packet.writeD(0); | ||||
| 		} | ||||
| 		return true; | ||||
|   | ||||
| @@ -34,6 +34,8 @@ import org.l2jmobius.gameserver.network.serverpackets.raidbossinfo.ExRaidBossSpa | ||||
|  */ | ||||
| public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses = new HashMap<>(); | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -69,7 +71,14 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| 			{ | ||||
| 				if (boss.isDead() || !boss.isSpawned()) | ||||
| 				{ | ||||
| 					_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					if ((bossId == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0)) | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.ALIVE); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					} | ||||
| 				} | ||||
| 				else if (boss.isInCombat()) | ||||
| 				{ | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.commons.network.PacketWriter; | ||||
| import org.l2jmobius.gameserver.enums.RaidBossStatus; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.network.OutgoingPackets; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  | ||||
| @@ -30,7 +29,6 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  */ | ||||
| public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses; | ||||
| 	 | ||||
| @@ -47,7 +45,7 @@ public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| 		for (Entry<Integer, RaidBossStatus> entry : _statuses.entrySet()) | ||||
| 		{ | ||||
| 			packet.writeD(entry.getKey()); | ||||
| 			packet.writeD((entry.getKey() == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0) ? 1 : entry.getValue().ordinal()); | ||||
| 			packet.writeD(entry.getValue().ordinal()); | ||||
| 			packet.writeD(0); | ||||
| 		} | ||||
| 		return true; | ||||
|   | ||||
| @@ -34,6 +34,8 @@ import org.l2jmobius.gameserver.network.serverpackets.raidbossinfo.ExRaidBossSpa | ||||
|  */ | ||||
| public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses = new HashMap<>(); | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -69,7 +71,14 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| 			{ | ||||
| 				if (boss.isDead() || !boss.isSpawned()) | ||||
| 				{ | ||||
| 					_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					if ((bossId == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0)) | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.ALIVE); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					} | ||||
| 				} | ||||
| 				else if (boss.isInCombat()) | ||||
| 				{ | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.commons.network.PacketWriter; | ||||
| import org.l2jmobius.gameserver.enums.RaidBossStatus; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.network.OutgoingPackets; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  | ||||
| @@ -30,7 +29,6 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  */ | ||||
| public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses; | ||||
| 	 | ||||
| @@ -47,7 +45,7 @@ public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| 		for (Entry<Integer, RaidBossStatus> entry : _statuses.entrySet()) | ||||
| 		{ | ||||
| 			packet.writeD(entry.getKey()); | ||||
| 			packet.writeD((entry.getKey() == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0) ? 1 : entry.getValue().ordinal()); | ||||
| 			packet.writeD(entry.getValue().ordinal()); | ||||
| 			packet.writeD(0); | ||||
| 		} | ||||
| 		return true; | ||||
|   | ||||
| @@ -34,6 +34,8 @@ import org.l2jmobius.gameserver.network.serverpackets.raidbossinfo.ExRaidBossSpa | ||||
|  */ | ||||
| public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses = new HashMap<>(); | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -69,7 +71,14 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| 			{ | ||||
| 				if (boss.isDead() || !boss.isSpawned()) | ||||
| 				{ | ||||
| 					_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					if ((bossId == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0)) | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.ALIVE); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					} | ||||
| 				} | ||||
| 				else if (boss.isInCombat()) | ||||
| 				{ | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.commons.network.PacketWriter; | ||||
| import org.l2jmobius.gameserver.enums.RaidBossStatus; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.network.OutgoingPackets; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  | ||||
| @@ -30,7 +29,6 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  */ | ||||
| public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses; | ||||
| 	 | ||||
| @@ -47,7 +45,7 @@ public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| 		for (Entry<Integer, RaidBossStatus> entry : _statuses.entrySet()) | ||||
| 		{ | ||||
| 			packet.writeD(entry.getKey()); | ||||
| 			packet.writeD((entry.getKey() == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0) ? 1 : entry.getValue().ordinal()); | ||||
| 			packet.writeD(entry.getValue().ordinal()); | ||||
| 			packet.writeD(0); | ||||
| 		} | ||||
| 		return true; | ||||
|   | ||||
| @@ -34,6 +34,8 @@ import org.l2jmobius.gameserver.network.serverpackets.raidbossinfo.ExRaidBossSpa | ||||
|  */ | ||||
| public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses = new HashMap<>(); | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -69,7 +71,14 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| 			{ | ||||
| 				if (boss.isDead() || !boss.isSpawned()) | ||||
| 				{ | ||||
| 					_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					if ((bossId == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0)) | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.ALIVE); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					} | ||||
| 				} | ||||
| 				else if (boss.isInCombat()) | ||||
| 				{ | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.commons.network.PacketWriter; | ||||
| import org.l2jmobius.gameserver.enums.RaidBossStatus; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.network.OutgoingPackets; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  | ||||
| @@ -30,7 +29,6 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  */ | ||||
| public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses; | ||||
| 	 | ||||
| @@ -47,7 +45,7 @@ public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| 		for (Entry<Integer, RaidBossStatus> entry : _statuses.entrySet()) | ||||
| 		{ | ||||
| 			packet.writeD(entry.getKey()); | ||||
| 			packet.writeD((entry.getKey() == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0) ? 1 : entry.getValue().ordinal()); | ||||
| 			packet.writeD(entry.getValue().ordinal()); | ||||
| 			packet.writeD(0); | ||||
| 		} | ||||
| 		return true; | ||||
|   | ||||
| @@ -34,6 +34,8 @@ import org.l2jmobius.gameserver.network.serverpackets.raidbossinfo.ExRaidBossSpa | ||||
|  */ | ||||
| public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses = new HashMap<>(); | ||||
| 	 | ||||
| 	@Override | ||||
| @@ -69,7 +71,14 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket | ||||
| 			{ | ||||
| 				if (boss.isDead() || !boss.isSpawned()) | ||||
| 				{ | ||||
| 					_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					if ((bossId == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0)) | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.ALIVE); | ||||
| 					} | ||||
| 					else | ||||
| 					{ | ||||
| 						_statuses.put(bossId, RaidBossStatus.DEAD); | ||||
| 					} | ||||
| 				} | ||||
| 				else if (boss.isInCombat()) | ||||
| 				{ | ||||
|   | ||||
| @@ -21,7 +21,6 @@ import java.util.Map.Entry; | ||||
|  | ||||
| import org.l2jmobius.commons.network.PacketWriter; | ||||
| import org.l2jmobius.gameserver.enums.RaidBossStatus; | ||||
| import org.l2jmobius.gameserver.instancemanager.GrandBossManager; | ||||
| import org.l2jmobius.gameserver.network.OutgoingPackets; | ||||
| import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  | ||||
| @@ -30,7 +29,6 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; | ||||
|  */ | ||||
| public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| { | ||||
| 	private static final int BAIUM = 29020; | ||||
| 	 | ||||
| 	private final Map<Integer, RaidBossStatus> _statuses; | ||||
| 	 | ||||
| @@ -47,7 +45,7 @@ public class ExRaidBossSpawnInfo implements IClientOutgoingPacket | ||||
| 		for (Entry<Integer, RaidBossStatus> entry : _statuses.entrySet()) | ||||
| 		{ | ||||
| 			packet.writeD(entry.getKey()); | ||||
| 			packet.writeD((entry.getKey() == BAIUM) && (GrandBossManager.getInstance().getBossStatus(BAIUM) == 0) ? 1 : entry.getValue().ordinal()); | ||||
| 			packet.writeD(entry.getValue().ordinal()); | ||||
| 			packet.writeD(0); | ||||
| 		} | ||||
| 		return true; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment