Addition of localisations for NPC name and titles.
This commit is contained in:
@@ -37,6 +37,7 @@ import org.l2jmobius.gameserver.data.xml.impl.FishingData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ItemCrystallizationData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.NpcNameLocalisationData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.OptionData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.PrimeShopData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.SayuneData;
|
||||
@@ -333,6 +334,7 @@ public class AdminReload implements IAdminCommandHandler
|
||||
SystemMessageId.loadLocalisations();
|
||||
NpcStringId.loadLocalisations();
|
||||
SendMessageLocalisationData.getInstance().load();
|
||||
NpcNameLocalisationData.getInstance().load();
|
||||
AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded Localisation data.");
|
||||
break;
|
||||
}
|
||||
|
@@ -19,9 +19,16 @@ package handlers.voicedcommandhandlers;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.NpcNameLocalisationData;
|
||||
import org.l2jmobius.gameserver.handler.IVoicedCommandHandler;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.DeleteObject;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
|
||||
public class Lang implements IVoicedCommandHandler
|
||||
{
|
||||
@@ -61,6 +68,18 @@ public class Lang implements IVoicedCommandHandler
|
||||
{
|
||||
msg.setFile(activeChar, "data/html/mods/Lang/Ok.htm");
|
||||
activeChar.sendPacket(msg);
|
||||
for (WorldObject obj : World.getInstance().getVisibleObjects())
|
||||
{
|
||||
if (obj.isNpc() && NpcNameLocalisationData.getInstance().hasLocalisation(obj.getId()))
|
||||
{
|
||||
activeChar.sendPacket(new DeleteObject(obj));
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
activeChar.sendPacket(new NpcInfo((Npc) obj));
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
activeChar.setTarget(null);
|
||||
return true;
|
||||
}
|
||||
msg.setFile(activeChar, "data/html/mods/Lang/Error.htm");
|
||||
|
Reference in New Issue
Block a user