Show red icon in map when boss is in combat.
This commit is contained in:
@@ -561,6 +561,16 @@ public class DBSpawnManager
|
|||||||
return _spawns.containsKey(npcId);
|
return _spawns.containsKey(npcId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a specific NPC by id.
|
||||||
|
* @param id The id of the NPC.
|
||||||
|
* @return the Npc
|
||||||
|
*/
|
||||||
|
public Npc getNpc(int id)
|
||||||
|
{
|
||||||
|
return _npcs.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the npcs.
|
* Gets the npcs.
|
||||||
* @return the npcs
|
* @return the npcs
|
||||||
|
@@ -22,6 +22,7 @@ import java.util.Map;
|
|||||||
import org.l2jmobius.commons.network.PacketReader;
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
@@ -46,9 +47,17 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
||||||
if (status != 3)
|
if (status != 3)
|
||||||
|
{
|
||||||
|
final Npc npc = DBSpawnManager.getInstance().getNpc(bossId);
|
||||||
|
if ((npc != null) && npc.isInCombat())
|
||||||
|
{
|
||||||
|
_statuses.put(bossId, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_statuses.put(bossId, status);
|
_statuses.put(bossId, status);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
||||||
|
@@ -561,6 +561,16 @@ public class DBSpawnManager
|
|||||||
return _spawns.containsKey(npcId);
|
return _spawns.containsKey(npcId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a specific NPC by id.
|
||||||
|
* @param id The id of the NPC.
|
||||||
|
* @return the Npc
|
||||||
|
*/
|
||||||
|
public Npc getNpc(int id)
|
||||||
|
{
|
||||||
|
return _npcs.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the npcs.
|
* Gets the npcs.
|
||||||
* @return the npcs
|
* @return the npcs
|
||||||
|
@@ -22,6 +22,7 @@ import java.util.Map;
|
|||||||
import org.l2jmobius.commons.network.PacketReader;
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
@@ -46,9 +47,17 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
||||||
if (status != 3)
|
if (status != 3)
|
||||||
|
{
|
||||||
|
final Npc npc = DBSpawnManager.getInstance().getNpc(bossId);
|
||||||
|
if ((npc != null) && npc.isInCombat())
|
||||||
|
{
|
||||||
|
_statuses.put(bossId, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_statuses.put(bossId, status);
|
_statuses.put(bossId, status);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
||||||
|
@@ -561,6 +561,16 @@ public class DBSpawnManager
|
|||||||
return _spawns.containsKey(npcId);
|
return _spawns.containsKey(npcId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a specific NPC by id.
|
||||||
|
* @param id The id of the NPC.
|
||||||
|
* @return the Npc
|
||||||
|
*/
|
||||||
|
public Npc getNpc(int id)
|
||||||
|
{
|
||||||
|
return _npcs.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the npcs.
|
* Gets the npcs.
|
||||||
* @return the npcs
|
* @return the npcs
|
||||||
|
@@ -22,6 +22,7 @@ import java.util.Map;
|
|||||||
import org.l2jmobius.commons.network.PacketReader;
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
@@ -46,9 +47,17 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
||||||
if (status != 3)
|
if (status != 3)
|
||||||
|
{
|
||||||
|
final Npc npc = DBSpawnManager.getInstance().getNpc(bossId);
|
||||||
|
if ((npc != null) && npc.isInCombat())
|
||||||
|
{
|
||||||
|
_statuses.put(bossId, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_statuses.put(bossId, status);
|
_statuses.put(bossId, status);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
||||||
|
@@ -561,6 +561,16 @@ public class DBSpawnManager
|
|||||||
return _spawns.containsKey(npcId);
|
return _spawns.containsKey(npcId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a specific NPC by id.
|
||||||
|
* @param id The id of the NPC.
|
||||||
|
* @return the Npc
|
||||||
|
*/
|
||||||
|
public Npc getNpc(int id)
|
||||||
|
{
|
||||||
|
return _npcs.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the npcs.
|
* Gets the npcs.
|
||||||
* @return the npcs
|
* @return the npcs
|
||||||
|
@@ -22,6 +22,7 @@ import java.util.Map;
|
|||||||
import org.l2jmobius.commons.network.PacketReader;
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
@@ -46,9 +47,17 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
||||||
if (status != 3)
|
if (status != 3)
|
||||||
|
{
|
||||||
|
final Npc npc = DBSpawnManager.getInstance().getNpc(bossId);
|
||||||
|
if ((npc != null) && npc.isInCombat())
|
||||||
|
{
|
||||||
|
_statuses.put(bossId, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_statuses.put(bossId, status);
|
_statuses.put(bossId, status);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
||||||
|
@@ -561,6 +561,16 @@ public class DBSpawnManager
|
|||||||
return _spawns.containsKey(npcId);
|
return _spawns.containsKey(npcId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a specific NPC by id.
|
||||||
|
* @param id The id of the NPC.
|
||||||
|
* @return the Npc
|
||||||
|
*/
|
||||||
|
public Npc getNpc(int id)
|
||||||
|
{
|
||||||
|
return _npcs.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the npcs.
|
* Gets the npcs.
|
||||||
* @return the npcs
|
* @return the npcs
|
||||||
|
@@ -22,6 +22,7 @@ import java.util.Map;
|
|||||||
import org.l2jmobius.commons.network.PacketReader;
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
@@ -46,9 +47,17 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
||||||
if (status != 3)
|
if (status != 3)
|
||||||
|
{
|
||||||
|
final Npc npc = DBSpawnManager.getInstance().getNpc(bossId);
|
||||||
|
if ((npc != null) && npc.isInCombat())
|
||||||
|
{
|
||||||
|
_statuses.put(bossId, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_statuses.put(bossId, status);
|
_statuses.put(bossId, status);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
||||||
|
@@ -561,6 +561,16 @@ public class DBSpawnManager
|
|||||||
return _spawns.containsKey(npcId);
|
return _spawns.containsKey(npcId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a specific NPC by id.
|
||||||
|
* @param id The id of the NPC.
|
||||||
|
* @return the Npc
|
||||||
|
*/
|
||||||
|
public Npc getNpc(int id)
|
||||||
|
{
|
||||||
|
return _npcs.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the npcs.
|
* Gets the npcs.
|
||||||
* @return the npcs
|
* @return the npcs
|
||||||
|
@@ -22,6 +22,7 @@ import java.util.Map;
|
|||||||
import org.l2jmobius.commons.network.PacketReader;
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
@@ -46,9 +47,17 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
||||||
if (status != 3)
|
if (status != 3)
|
||||||
|
{
|
||||||
|
final Npc npc = DBSpawnManager.getInstance().getNpc(bossId);
|
||||||
|
if ((npc != null) && npc.isInCombat())
|
||||||
|
{
|
||||||
|
_statuses.put(bossId, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_statuses.put(bossId, status);
|
_statuses.put(bossId, status);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
||||||
|
@@ -561,6 +561,16 @@ public class DBSpawnManager
|
|||||||
return _spawns.containsKey(npcId);
|
return _spawns.containsKey(npcId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a specific NPC by id.
|
||||||
|
* @param id The id of the NPC.
|
||||||
|
* @return the Npc
|
||||||
|
*/
|
||||||
|
public Npc getNpc(int id)
|
||||||
|
{
|
||||||
|
return _npcs.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the npcs.
|
* Gets the npcs.
|
||||||
* @return the npcs
|
* @return the npcs
|
||||||
|
@@ -22,6 +22,7 @@ import java.util.Map;
|
|||||||
import org.l2jmobius.commons.network.PacketReader;
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
@@ -46,9 +47,17 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
||||||
if (status != 3)
|
if (status != 3)
|
||||||
|
{
|
||||||
|
final Npc npc = DBSpawnManager.getInstance().getNpc(bossId);
|
||||||
|
if ((npc != null) && npc.isInCombat())
|
||||||
|
{
|
||||||
|
_statuses.put(bossId, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_statuses.put(bossId, status);
|
_statuses.put(bossId, status);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
||||||
|
@@ -561,6 +561,16 @@ public class DBSpawnManager
|
|||||||
return _spawns.containsKey(npcId);
|
return _spawns.containsKey(npcId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a specific NPC by id.
|
||||||
|
* @param id The id of the NPC.
|
||||||
|
* @return the Npc
|
||||||
|
*/
|
||||||
|
public Npc getNpc(int id)
|
||||||
|
{
|
||||||
|
return _npcs.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the npcs.
|
* Gets the npcs.
|
||||||
* @return the npcs
|
* @return the npcs
|
||||||
|
@@ -22,6 +22,7 @@ import java.util.Map;
|
|||||||
import org.l2jmobius.commons.network.PacketReader;
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
import org.l2jmobius.gameserver.instancemanager.DBSpawnManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
import org.l2jmobius.gameserver.model.actor.instance.GrandBoss;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
@@ -46,9 +47,17 @@ public class RequestRaidBossSpawnInfo implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
final int status = DBSpawnManager.getInstance().getNpcStatusId(bossId).ordinal();
|
||||||
if (status != 3)
|
if (status != 3)
|
||||||
|
{
|
||||||
|
final Npc npc = DBSpawnManager.getInstance().getNpc(bossId);
|
||||||
|
if ((npc != null) && npc.isInCombat())
|
||||||
|
{
|
||||||
|
_statuses.put(bossId, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_statuses.put(bossId, status);
|
_statuses.put(bossId, status);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
// PacketLogger.warning("Could not find spawn info for boss " + bossId + ".");
|
||||||
|
Reference in New Issue
Block a user