RaidBoss Kill and Spawn Announce
gameserver\instancemanager\RaidBossSpawnManager.java
find
- Code:
import net.sf.l2j.L2DatabaseFactory;
- Code:
import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.datatables.MapRegionTable;
- Code:
GmListTable.broadcastMessageToGMs("Spawning Raid Boss " + raidboss.getName());
- Code:
String nearestTown = MapRegionTable.getInstance().getClosestTownName(raidboss);
- Code:
Announcements.getInstance().announceToAll("RaidBoss: " + raidboss.getName() + " " + raidboss.getLevel() + "lvl has spawned near " + nearestTown + "!");
- Code:
_log.info("RaidBossSpawnManager: Updated " + boss.getName() + " respawn time to " + respawnTime);
- Code:
Announcements.getInstance().announceToAll("RaidBoss " + boss.getName() + " " + boss.getLevel() + "lvl was killed!");
If you want to show respawn date do this:
gameserver\util\Util.java
find- Code:
import java.util.Collection;
- Code:
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
- Code:
public static String formatDate(Date date, String format)
{
final DateFormat dateFormat = new SimpleDateFormat(format);
if (date != null)
return dateFormat.format(date);
return null;
}
public static String formatDate(long date, String format)
{
final DateFormat dateFormat = new SimpleDateFormat(format);
if (date > 0)
return dateFormat.format(date);
return null;
}
gameserver\instancemanager\RaidBossSpawnManager.java
find- Code:
import net.sf.l2j.util.Rnd;
- Code:
import net.sf.l2j.gameserver.util.Util;
- Code:
Announcements.getInstance().announceToAll("RaidBoss " + boss.getName() + " " + boss.getLevel() + "lvl was killed!");
- Code:
Announcements.getInstance().announceToAll("Respawn " + Util.formatDate(respawnTime, "d/MM/yyyy HH:mm"));
Tested with build 714.
Last edited by improvise on 14th February 2020, 08:40; edited 5 times in total