From 5ac249ed61f0b22502cc8acbf688f9382771b3a8 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 3 Apr 2018 13:48:00 +0000 Subject: [PATCH] Ability to use specific NpcStringId for quest name. --- .../l2jmobius/gameserver/model/quest/Quest.java | 14 +++++++++++++- .../l2jmobius/gameserver/model/quest/Quest.java | 14 +++++++++++++- .../l2jmobius/gameserver/model/quest/Quest.java | 14 +++++++++++++- .../l2jmobius/gameserver/model/quest/Quest.java | 14 +++++++++++++- .../l2jmobius/gameserver/model/quest/Quest.java | 14 +++++++++++++- .../l2jmobius/gameserver/model/quest/Quest.java | 14 +++++++++++++- 6 files changed, 78 insertions(+), 6 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/quest/Quest.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/quest/Quest.java index 1f7b6d4547..ad8ffadb7f 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/quest/Quest.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/quest/Quest.java @@ -70,6 +70,7 @@ import com.l2jmobius.gameserver.model.olympiad.CompetitionType; import com.l2jmobius.gameserver.model.olympiad.Participant; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; @@ -95,6 +96,7 @@ public class Quest extends AbstractScript implements IIdentifiable private final int _questId; private final byte _initialState = State.CREATED; private boolean _isCustom = false; + private NpcStringId _questNameNpcStringId; private int[] _questItemIds = null; @@ -180,7 +182,17 @@ public class Quest extends AbstractScript implements IIdentifiable */ public int getNpcStringId() { - return _questId > 10000 ? _questId - 5000 : _questId; + return _questNameNpcStringId != null ? _questNameNpcStringId.getId() / 100 : (_questId > 10000 ? _questId - 5000 : _questId); + } + + public NpcStringId getQuestNameNpcStringId() + { + return _questNameNpcStringId; + } + + public void setQuestNameNpcStringId(NpcStringId npcStringId) + { + _questNameNpcStringId = npcStringId; } /** diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/quest/Quest.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/quest/Quest.java index e4c151a8ec..8ca4a8f718 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/quest/Quest.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/quest/Quest.java @@ -71,6 +71,7 @@ import com.l2jmobius.gameserver.model.olympiad.CompetitionType; import com.l2jmobius.gameserver.model.olympiad.Participant; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; @@ -96,6 +97,7 @@ public class Quest extends AbstractScript implements IIdentifiable private final int _questId; private final byte _initialState = State.CREATED; private boolean _isCustom = false; + private NpcStringId _questNameNpcStringId; private int[] _questItemIds = null; @@ -182,7 +184,17 @@ public class Quest extends AbstractScript implements IIdentifiable */ public int getNpcStringId() { - return _questId > 10000 ? _questId - 5000 : _questId; + return _questNameNpcStringId != null ? _questNameNpcStringId.getId() / 100 : (_questId > 10000 ? _questId - 5000 : _questId); + } + + public NpcStringId getQuestNameNpcStringId() + { + return _questNameNpcStringId; + } + + public void setQuestNameNpcStringId(NpcStringId npcStringId) + { + _questNameNpcStringId = npcStringId; } /** diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/quest/Quest.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/quest/Quest.java index 622abfbe7f..15fe45858a 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/quest/Quest.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/quest/Quest.java @@ -72,6 +72,7 @@ import com.l2jmobius.gameserver.model.olympiad.CompetitionType; import com.l2jmobius.gameserver.model.olympiad.Participant; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; @@ -97,6 +98,7 @@ public class Quest extends AbstractScript implements IIdentifiable private final int _questId; private final byte _initialState = State.CREATED; private boolean _isCustom = false; + private NpcStringId _questNameNpcStringId; private int[] _questItemIds = null; @@ -183,7 +185,17 @@ public class Quest extends AbstractScript implements IIdentifiable */ public int getNpcStringId() { - return _questId > 10000 ? _questId - 5000 : _questId; + return _questNameNpcStringId != null ? _questNameNpcStringId.getId() / 100 : (_questId > 10000 ? _questId - 5000 : _questId); + } + + public NpcStringId getQuestNameNpcStringId() + { + return _questNameNpcStringId; + } + + public void setQuestNameNpcStringId(NpcStringId npcStringId) + { + _questNameNpcStringId = npcStringId; } /** diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/quest/Quest.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/quest/Quest.java index 63099321da..81de2219c8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/quest/Quest.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/quest/Quest.java @@ -73,6 +73,7 @@ import com.l2jmobius.gameserver.model.olympiad.Participant; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; @@ -98,6 +99,7 @@ public class Quest extends AbstractScript implements IIdentifiable private final int _questId; private final byte _initialState = State.CREATED; private boolean _isCustom = false; + private NpcStringId _questNameNpcStringId; private int[] _questItemIds = null; @@ -183,7 +185,17 @@ public class Quest extends AbstractScript implements IIdentifiable */ public int getNpcStringId() { - return _questId > 10000 ? _questId - 5000 : _questId; + return _questNameNpcStringId != null ? _questNameNpcStringId.getId() / 100 : (_questId > 10000 ? _questId - 5000 : _questId); + } + + public NpcStringId getQuestNameNpcStringId() + { + return _questNameNpcStringId; + } + + public void setQuestNameNpcStringId(NpcStringId npcStringId) + { + _questNameNpcStringId = npcStringId; } /** diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/quest/Quest.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/quest/Quest.java index 8f802007b8..2020c77c81 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/quest/Quest.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/quest/Quest.java @@ -71,6 +71,7 @@ import com.l2jmobius.gameserver.model.olympiad.CompetitionType; import com.l2jmobius.gameserver.model.olympiad.Participant; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; @@ -96,6 +97,7 @@ public class Quest extends AbstractScript implements IIdentifiable private final int _questId; private final byte _initialState = State.CREATED; private boolean _isCustom = false; + private NpcStringId _questNameNpcStringId; private int[] _questItemIds = null; @@ -182,7 +184,17 @@ public class Quest extends AbstractScript implements IIdentifiable */ public int getNpcStringId() { - return _questId > 10000 ? _questId - 5000 : _questId; + return _questNameNpcStringId != null ? _questNameNpcStringId.getId() / 100 : (_questId > 10000 ? _questId - 5000 : _questId); + } + + public NpcStringId getQuestNameNpcStringId() + { + return _questNameNpcStringId; + } + + public void setQuestNameNpcStringId(NpcStringId npcStringId) + { + _questNameNpcStringId = npcStringId; } /** diff --git a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/model/quest/Quest.java b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/model/quest/Quest.java index 8f802007b8..2020c77c81 100644 --- a/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/model/quest/Quest.java +++ b/L2J_Mobius_Classic_2.0_Zaken/java/com/l2jmobius/gameserver/model/quest/Quest.java @@ -71,6 +71,7 @@ import com.l2jmobius.gameserver.model.olympiad.CompetitionType; import com.l2jmobius.gameserver.model.olympiad.Participant; import com.l2jmobius.gameserver.model.skills.Skill; import com.l2jmobius.gameserver.model.zone.L2ZoneType; +import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList; import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; @@ -96,6 +97,7 @@ public class Quest extends AbstractScript implements IIdentifiable private final int _questId; private final byte _initialState = State.CREATED; private boolean _isCustom = false; + private NpcStringId _questNameNpcStringId; private int[] _questItemIds = null; @@ -182,7 +184,17 @@ public class Quest extends AbstractScript implements IIdentifiable */ public int getNpcStringId() { - return _questId > 10000 ? _questId - 5000 : _questId; + return _questNameNpcStringId != null ? _questNameNpcStringId.getId() / 100 : (_questId > 10000 ? _questId - 5000 : _questId); + } + + public NpcStringId getQuestNameNpcStringId() + { + return _questNameNpcStringId; + } + + public void setQuestNameNpcStringId(NpcStringId npcStringId) + { + _questNameNpcStringId = npcStringId; } /**