Addition of localisations for NPC name and titles.
This commit is contained in:
5
L2J_Mobius_6.0_Fafurion/dist/game/data/lang/el/NpcNameLocalisation.xml
vendored
Normal file
5
L2J_Mobius_6.0_Fafurion/dist/game/data/lang/el/NpcNameLocalisation.xml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/NpcNameLocalisation.xsd">
|
||||
<localisation id="20120" name="Λύκος" title="" />
|
||||
<localisation id="30080" name="Κλαρίσα" title="Τηλεμεταφορέας" />
|
||||
</list>
|
||||
@@ -38,6 +38,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;
|
||||
@@ -340,6 +341,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");
|
||||
|
||||
19
L2J_Mobius_6.0_Fafurion/dist/game/data/xsd/NpcNameLocalisation.xsd
vendored
Normal file
19
L2J_Mobius_6.0_Fafurion/dist/game/data/xsd/NpcNameLocalisation.xsd
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="list">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="localisation" maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute type="xs:int" name="id" use="required"/>
|
||||
<xs:attribute type="xs:string" name="name" use="required"/>
|
||||
<xs:attribute type="xs:string" name="title" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
Reference in New Issue
Block a user