Retail Agent of Chaos behavior.
This commit is contained in:
@@ -180,20 +180,32 @@ FeeDeleteDualClassSkills = 20000000
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Hardin (Agent of Chaos)
|
# Hardin (Agent of Chaos)
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
# NOTE: Base player class race remains the same.
|
||||||
|
|
||||||
# Enable classes from all races.
|
# Enable classes from all races.
|
||||||
# NOTE: Will change player race accordingly.
|
# Default: True
|
||||||
# Default: False
|
HardinEnableAllRaces = True
|
||||||
HardinEnableAllRaces = False
|
|
||||||
|
|
||||||
# Disable mage-fighter class differentiation.
|
# Disable mage-fighter class differentiation.
|
||||||
# Default: False
|
# Default: False
|
||||||
HardinEnableAllSpecs = False
|
HardinEnableAllSpecs = False
|
||||||
|
|
||||||
|
# Select classes from same Awaken group.
|
||||||
|
# Default: True
|
||||||
|
HardinSameAwakenGroup = True
|
||||||
|
|
||||||
|
# Retail limitations.
|
||||||
|
# -Only Dwarves can awaken into Tyrr Maestros.
|
||||||
|
# -Only Orcs can awaken into Iss Dominators.
|
||||||
|
# Default: True
|
||||||
|
HardinRetailLimitations = True
|
||||||
|
|
||||||
# Enable above checks for dual classes as well.
|
# Enable above checks for dual classes as well.
|
||||||
# Default: True
|
# Default: True
|
||||||
HardinEnableDualClassChecks = True
|
HardinEnableDualClassChecks = True
|
||||||
|
|
||||||
# Enable Hardin for Ertheia race characters.
|
# Enable Hardin for Ertheia race characters.
|
||||||
|
# Note: HardinSameAwakenGroup must be disabled.
|
||||||
# Default: False
|
# Default: False
|
||||||
HardinEnableErtheias = False
|
HardinEnableErtheias = False
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<html><body>Hardin:<br>
|
||||||
|
You are involved with the Olympiad.<br>
|
||||||
|
Leave.<br>
|
||||||
|
(Players involved with the current Olympiad games cannot use <font color="af9878">Chaos Essences</font>.)
|
||||||
|
</body></html>
|
||||||
@@ -27,6 +27,7 @@ import com.l2jmobius.gameserver.model.L2SkillLearn;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
||||||
@@ -86,6 +87,26 @@ public final class Hardin extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (Config.HARDIN_SAME_AWAKEN_GROUP)
|
||||||
|
{
|
||||||
|
final String original = c.toString().contains("_") ? c.toString().substring(0, c.toString().indexOf("_") - 1) : c.toString();
|
||||||
|
final String search = player.getClassId().toString().contains("_") ? player.getClassId().toString().substring(0, player.getClassId().toString().indexOf("_") - 1) : player.getClassId().toString();
|
||||||
|
if (!original.equals(search))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Config.HARDIN_RETAIL_LIMITATIONS)
|
||||||
|
{
|
||||||
|
if (c.equals(ClassId.TYRR_MAESTRO) && (player.getRace() != Race.DWARF))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (c.equals(ClassId.ISS_DOMINATOR) && (player.getRace() != Race.ORC))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
classes.append("<button value=\"");
|
classes.append("<button value=\"");
|
||||||
classes.append(ClassListData.getInstance().getClass(c.ordinal()).getClassName());
|
classes.append(ClassListData.getInstance().getClass(c.ordinal()).getClassName());
|
||||||
@@ -105,6 +126,11 @@ public final class Hardin extends AbstractNpcAI
|
|||||||
takeItems(player, player.isDualClassActive() ? CHAOS_ESSENCE_DUAL_CLASS : CHAOS_ESSENCE, 1);
|
takeItems(player, player.isDualClassActive() ? CHAOS_ESSENCE_DUAL_CLASS : CHAOS_ESSENCE, 1);
|
||||||
// Give item
|
// Give item
|
||||||
giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 1);
|
giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 1);
|
||||||
|
// Save original ClassId
|
||||||
|
if (!player.isDualClassActive() && (player.getOriginalClass() == null))
|
||||||
|
{
|
||||||
|
player.setOriginalClass(player.getClassId());
|
||||||
|
}
|
||||||
// Ertheias can only be female
|
// Ertheias can only be female
|
||||||
final ClassId newClass = ClassId.getClassId(Integer.parseInt(event.replace("try_", "")));
|
final ClassId newClass = ClassId.getClassId(Integer.parseInt(event.replace("try_", "")));
|
||||||
if ((newClass.getRace() == Race.ERTHEIA) && (player.getClassId().getRace() != Race.ERTHEIA) && !player.getAppearance().getSex())
|
if ((newClass.getRace() == Race.ERTHEIA) && (player.getClassId().getRace() != Race.ERTHEIA) && !player.getAppearance().getSex())
|
||||||
@@ -180,9 +206,9 @@ public final class Hardin extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
return "33870-no_summon.html";
|
return "33870-no_summon.html";
|
||||||
}
|
}
|
||||||
if (player.isInOlympiadMode())
|
if (player.isInOlympiadMode() || (Olympiad.getInstance().getCompetitionDone(player.getObjectId()) > 0))
|
||||||
{
|
{
|
||||||
return "33870-no.html";
|
return "33870-no_olympiad.html";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -367,6 +367,10 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
final L2PcInstance player = target.getActingPlayer();
|
final L2PcInstance player = target.getActingPlayer();
|
||||||
if ((ClassId.getClassId(classidval) != null) && (player.getClassId().getId() != classidval))
|
if ((ClassId.getClassId(classidval) != null) && (player.getClassId().getId() != classidval))
|
||||||
{
|
{
|
||||||
|
if (!player.isDualClassActive() && !player.isSubClassActive())
|
||||||
|
{
|
||||||
|
player.resetOriginalClass(); // revert agent of chaos changes
|
||||||
|
}
|
||||||
player.setClassId(classidval);
|
player.setClassId(classidval);
|
||||||
if (player.isSubClassActive())
|
if (player.isSubClassActive())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -775,6 +775,8 @@ public final class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
public static boolean HARDIN_ENABLE_ALL_RACES;
|
public static boolean HARDIN_ENABLE_ALL_RACES;
|
||||||
public static boolean HARDIN_ENABLE_ALL_SPECS;
|
public static boolean HARDIN_ENABLE_ALL_SPECS;
|
||||||
|
public static boolean HARDIN_SAME_AWAKEN_GROUP;
|
||||||
|
public static boolean HARDIN_RETAIL_LIMITATIONS;
|
||||||
public static boolean HARDIN_ENABLE_DUALCLASS_CHECKS;
|
public static boolean HARDIN_ENABLE_DUALCLASS_CHECKS;
|
||||||
public static boolean HARDIN_ENABLE_ERTHEIAS;
|
public static boolean HARDIN_ENABLE_ERTHEIAS;
|
||||||
|
|
||||||
@@ -1458,8 +1460,10 @@ public final class Config
|
|||||||
FEE_DELETE_SUBCLASS_SKILLS = Character.getInt("FeeDeleteSubClassSkills", 10000000);
|
FEE_DELETE_SUBCLASS_SKILLS = Character.getInt("FeeDeleteSubClassSkills", 10000000);
|
||||||
FEE_DELETE_DUALCLASS_SKILLS = Character.getInt("FeeDeleteDualClassSkills", 20000000);
|
FEE_DELETE_DUALCLASS_SKILLS = Character.getInt("FeeDeleteDualClassSkills", 20000000);
|
||||||
ENABLE_VITALITY = Character.getBoolean("EnableVitality", true);
|
ENABLE_VITALITY = Character.getBoolean("EnableVitality", true);
|
||||||
HARDIN_ENABLE_ALL_RACES = Character.getBoolean("HardinEnableAllRaces", false);
|
HARDIN_ENABLE_ALL_RACES = Character.getBoolean("HardinEnableAllRaces", true);
|
||||||
HARDIN_ENABLE_ALL_SPECS = Character.getBoolean("HardinEnableAllSpecs", false);
|
HARDIN_ENABLE_ALL_SPECS = Character.getBoolean("HardinEnableAllSpecs", false);
|
||||||
|
HARDIN_SAME_AWAKEN_GROUP = Character.getBoolean("HardinSameAwakenGroup", true);
|
||||||
|
HARDIN_RETAIL_LIMITATIONS = Character.getBoolean("HardinRetailLimitations", true);
|
||||||
HARDIN_ENABLE_DUALCLASS_CHECKS = Character.getBoolean("HardinEnableDualClassChecks", true);
|
HARDIN_ENABLE_DUALCLASS_CHECKS = Character.getBoolean("HardinEnableDualClassChecks", true);
|
||||||
HARDIN_ENABLE_ERTHEIAS = Character.getBoolean("HardinEnableErtheias", false);
|
HARDIN_ENABLE_ERTHEIAS = Character.getBoolean("HardinEnableErtheias", false);
|
||||||
STARTING_VITALITY_POINTS = Character.getInt("StartingVitalityPoints", 140000);
|
STARTING_VITALITY_POINTS = Character.getInt("StartingVitalityPoints", 140000);
|
||||||
|
|||||||
@@ -436,6 +436,8 @@ public final class L2PcInstance extends L2Playable
|
|||||||
/** The list of sub-classes this character has. */
|
/** The list of sub-classes this character has. */
|
||||||
private volatile Map<Integer, SubClass> _subClasses;
|
private volatile Map<Integer, SubClass> _subClasses;
|
||||||
|
|
||||||
|
private static final String ORIGINAL_CLASS_VAR = "OriginalClass";
|
||||||
|
|
||||||
private final PcAppearance _appearance;
|
private final PcAppearance _appearance;
|
||||||
|
|
||||||
/** The Experience of the L2PcInstance before the last Death Penalty */
|
/** The Experience of the L2PcInstance before the last Death Penalty */
|
||||||
@@ -1173,9 +1175,29 @@ public final class L2PcInstance extends L2Playable
|
|||||||
*/
|
*/
|
||||||
public final L2PcTemplate getBaseTemplate()
|
public final L2PcTemplate getBaseTemplate()
|
||||||
{
|
{
|
||||||
|
final ClassId originalClass = getOriginalClass();
|
||||||
|
if (originalClass != null)
|
||||||
|
{
|
||||||
|
return PlayerTemplateData.getInstance().getTemplate(originalClass.getId());
|
||||||
|
}
|
||||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass);
|
return PlayerTemplateData.getInstance().getTemplate(_baseClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ClassId getOriginalClass()
|
||||||
|
{
|
||||||
|
return getVariables().getEnum(ORIGINAL_CLASS_VAR, ClassId.class, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalClass(ClassId newClass)
|
||||||
|
{
|
||||||
|
getVariables().set(ORIGINAL_CLASS_VAR, newClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resetOriginalClass()
|
||||||
|
{
|
||||||
|
getVariables().remove(ORIGINAL_CLASS_VAR);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the L2PcTemplate link to the L2PcInstance.
|
* @return the L2PcTemplate link to the L2PcInstance.
|
||||||
*/
|
*/
|
||||||
@@ -2656,6 +2678,11 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (!isSubClassActive())
|
if (!isSubClassActive())
|
||||||
{
|
{
|
||||||
|
final ClassId originalClass = getOriginalClass();
|
||||||
|
if (originalClass != null)
|
||||||
|
{
|
||||||
|
return originalClass.getRace();
|
||||||
|
}
|
||||||
return getTemplate().getRace();
|
return getTemplate().getRace();
|
||||||
}
|
}
|
||||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass).getRace();
|
return PlayerTemplateData.getInstance().getTemplate(_baseClass).getRace();
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
|||||||
packet.writeC(_activeChar.isGM() ? 0x01 : 0x00);
|
packet.writeC(_activeChar.isGM() ? 0x01 : 0x00);
|
||||||
packet.writeC(_activeChar.getRace().ordinal());
|
packet.writeC(_activeChar.getRace().ordinal());
|
||||||
packet.writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00);
|
packet.writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00);
|
||||||
packet.writeD(ClassId.getClassId(_activeChar.getBaseClass()).getRootClassId().getId());
|
packet.writeD(ClassId.getClassId(_activeChar.getBaseTemplate().getClassId().getId()).getRootClassId().getId());
|
||||||
packet.writeD(_activeChar.getClassId().getId());
|
packet.writeD(_activeChar.getClassId().getId());
|
||||||
packet.writeC(_activeChar.getLevel());
|
packet.writeC(_activeChar.getLevel());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,20 +180,32 @@ FeeDeleteDualClassSkills = 20000000
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Hardin (Agent of Chaos)
|
# Hardin (Agent of Chaos)
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
# NOTE: Base player class race remains the same.
|
||||||
|
|
||||||
# Enable classes from all races.
|
# Enable classes from all races.
|
||||||
# NOTE: Will change player race accordingly.
|
# Default: True
|
||||||
# Default: False
|
HardinEnableAllRaces = True
|
||||||
HardinEnableAllRaces = False
|
|
||||||
|
|
||||||
# Disable mage-fighter class differentiation.
|
# Disable mage-fighter class differentiation.
|
||||||
# Default: False
|
# Default: False
|
||||||
HardinEnableAllSpecs = False
|
HardinEnableAllSpecs = False
|
||||||
|
|
||||||
|
# Select classes from same Awaken group.
|
||||||
|
# Default: True
|
||||||
|
HardinSameAwakenGroup = True
|
||||||
|
|
||||||
|
# Retail limitations.
|
||||||
|
# -Only Dwarves can awaken into Tyrr Maestros.
|
||||||
|
# -Only Orcs can awaken into Iss Dominators.
|
||||||
|
# Default: True
|
||||||
|
HardinRetailLimitations = True
|
||||||
|
|
||||||
# Enable above checks for dual classes as well.
|
# Enable above checks for dual classes as well.
|
||||||
# Default: True
|
# Default: True
|
||||||
HardinEnableDualClassChecks = True
|
HardinEnableDualClassChecks = True
|
||||||
|
|
||||||
# Enable Hardin for Ertheia race characters.
|
# Enable Hardin for Ertheia race characters.
|
||||||
|
# Note: HardinSameAwakenGroup must be disabled.
|
||||||
# Default: False
|
# Default: False
|
||||||
HardinEnableErtheias = False
|
HardinEnableErtheias = False
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<html><body>Hardin:<br>
|
||||||
|
You are involved with the Olympiad.<br>
|
||||||
|
Leave.<br>
|
||||||
|
(Players involved with the current Olympiad games cannot use <font color="af9878">Chaos Essences</font>.)
|
||||||
|
</body></html>
|
||||||
@@ -27,6 +27,7 @@ import com.l2jmobius.gameserver.model.L2SkillLearn;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
||||||
@@ -86,6 +87,26 @@ public final class Hardin extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (Config.HARDIN_SAME_AWAKEN_GROUP)
|
||||||
|
{
|
||||||
|
final String original = c.toString().contains("_") ? c.toString().substring(0, c.toString().indexOf("_") - 1) : c.toString();
|
||||||
|
final String search = player.getClassId().toString().contains("_") ? player.getClassId().toString().substring(0, player.getClassId().toString().indexOf("_") - 1) : player.getClassId().toString();
|
||||||
|
if (!original.equals(search))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Config.HARDIN_RETAIL_LIMITATIONS)
|
||||||
|
{
|
||||||
|
if (c.equals(ClassId.TYRR_MAESTRO) && (player.getRace() != Race.DWARF))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (c.equals(ClassId.ISS_DOMINATOR) && (player.getRace() != Race.ORC))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
classes.append("<button value=\"");
|
classes.append("<button value=\"");
|
||||||
classes.append(ClassListData.getInstance().getClass(c.ordinal()).getClassName());
|
classes.append(ClassListData.getInstance().getClass(c.ordinal()).getClassName());
|
||||||
@@ -105,6 +126,11 @@ public final class Hardin extends AbstractNpcAI
|
|||||||
takeItems(player, player.isDualClassActive() ? CHAOS_ESSENCE_DUAL_CLASS : CHAOS_ESSENCE, 1);
|
takeItems(player, player.isDualClassActive() ? CHAOS_ESSENCE_DUAL_CLASS : CHAOS_ESSENCE, 1);
|
||||||
// Give item
|
// Give item
|
||||||
giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 1);
|
giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 1);
|
||||||
|
// Save original ClassId
|
||||||
|
if (!player.isDualClassActive() && (player.getOriginalClass() == null))
|
||||||
|
{
|
||||||
|
player.setOriginalClass(player.getClassId());
|
||||||
|
}
|
||||||
// Ertheias can only be female
|
// Ertheias can only be female
|
||||||
final ClassId newClass = ClassId.getClassId(Integer.parseInt(event.replace("try_", "")));
|
final ClassId newClass = ClassId.getClassId(Integer.parseInt(event.replace("try_", "")));
|
||||||
if ((newClass.getRace() == Race.ERTHEIA) && (player.getClassId().getRace() != Race.ERTHEIA) && !player.getAppearance().getSex())
|
if ((newClass.getRace() == Race.ERTHEIA) && (player.getClassId().getRace() != Race.ERTHEIA) && !player.getAppearance().getSex())
|
||||||
@@ -180,9 +206,9 @@ public final class Hardin extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
return "33870-no_summon.html";
|
return "33870-no_summon.html";
|
||||||
}
|
}
|
||||||
if (player.isInOlympiadMode())
|
if (player.isInOlympiadMode() || (Olympiad.getInstance().getCompetitionDone(player.getObjectId()) > 0))
|
||||||
{
|
{
|
||||||
return "33870-no.html";
|
return "33870-no_olympiad.html";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -367,6 +367,10 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
final L2PcInstance player = target.getActingPlayer();
|
final L2PcInstance player = target.getActingPlayer();
|
||||||
if ((ClassId.getClassId(classidval) != null) && (player.getClassId().getId() != classidval))
|
if ((ClassId.getClassId(classidval) != null) && (player.getClassId().getId() != classidval))
|
||||||
{
|
{
|
||||||
|
if (!player.isDualClassActive() && !player.isSubClassActive())
|
||||||
|
{
|
||||||
|
player.resetOriginalClass(); // revert agent of chaos changes
|
||||||
|
}
|
||||||
player.setClassId(classidval);
|
player.setClassId(classidval);
|
||||||
if (player.isSubClassActive())
|
if (player.isSubClassActive())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -777,6 +777,8 @@ public final class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
public static boolean HARDIN_ENABLE_ALL_RACES;
|
public static boolean HARDIN_ENABLE_ALL_RACES;
|
||||||
public static boolean HARDIN_ENABLE_ALL_SPECS;
|
public static boolean HARDIN_ENABLE_ALL_SPECS;
|
||||||
|
public static boolean HARDIN_SAME_AWAKEN_GROUP;
|
||||||
|
public static boolean HARDIN_RETAIL_LIMITATIONS;
|
||||||
public static boolean HARDIN_ENABLE_DUALCLASS_CHECKS;
|
public static boolean HARDIN_ENABLE_DUALCLASS_CHECKS;
|
||||||
public static boolean HARDIN_ENABLE_ERTHEIAS;
|
public static boolean HARDIN_ENABLE_ERTHEIAS;
|
||||||
|
|
||||||
@@ -1460,8 +1462,10 @@ public final class Config
|
|||||||
FEE_DELETE_SUBCLASS_SKILLS = Character.getInt("FeeDeleteSubClassSkills", 10000000);
|
FEE_DELETE_SUBCLASS_SKILLS = Character.getInt("FeeDeleteSubClassSkills", 10000000);
|
||||||
FEE_DELETE_DUALCLASS_SKILLS = Character.getInt("FeeDeleteDualClassSkills", 20000000);
|
FEE_DELETE_DUALCLASS_SKILLS = Character.getInt("FeeDeleteDualClassSkills", 20000000);
|
||||||
ENABLE_VITALITY = Character.getBoolean("EnableVitality", true);
|
ENABLE_VITALITY = Character.getBoolean("EnableVitality", true);
|
||||||
HARDIN_ENABLE_ALL_RACES = Character.getBoolean("HardinEnableAllRaces", false);
|
HARDIN_ENABLE_ALL_RACES = Character.getBoolean("HardinEnableAllRaces", true);
|
||||||
HARDIN_ENABLE_ALL_SPECS = Character.getBoolean("HardinEnableAllSpecs", false);
|
HARDIN_ENABLE_ALL_SPECS = Character.getBoolean("HardinEnableAllSpecs", false);
|
||||||
|
HARDIN_SAME_AWAKEN_GROUP = Character.getBoolean("HardinSameAwakenGroup", true);
|
||||||
|
HARDIN_RETAIL_LIMITATIONS = Character.getBoolean("HardinRetailLimitations", true);
|
||||||
HARDIN_ENABLE_DUALCLASS_CHECKS = Character.getBoolean("HardinEnableDualClassChecks", true);
|
HARDIN_ENABLE_DUALCLASS_CHECKS = Character.getBoolean("HardinEnableDualClassChecks", true);
|
||||||
HARDIN_ENABLE_ERTHEIAS = Character.getBoolean("HardinEnableErtheias", false);
|
HARDIN_ENABLE_ERTHEIAS = Character.getBoolean("HardinEnableErtheias", false);
|
||||||
STARTING_VITALITY_POINTS = Character.getInt("StartingVitalityPoints", 140000);
|
STARTING_VITALITY_POINTS = Character.getInt("StartingVitalityPoints", 140000);
|
||||||
|
|||||||
@@ -436,6 +436,8 @@ public final class L2PcInstance extends L2Playable
|
|||||||
/** The list of sub-classes this character has. */
|
/** The list of sub-classes this character has. */
|
||||||
private volatile Map<Integer, SubClass> _subClasses;
|
private volatile Map<Integer, SubClass> _subClasses;
|
||||||
|
|
||||||
|
private static final String ORIGINAL_CLASS_VAR = "OriginalClass";
|
||||||
|
|
||||||
private final PcAppearance _appearance;
|
private final PcAppearance _appearance;
|
||||||
|
|
||||||
/** The Experience of the L2PcInstance before the last Death Penalty */
|
/** The Experience of the L2PcInstance before the last Death Penalty */
|
||||||
@@ -1173,9 +1175,29 @@ public final class L2PcInstance extends L2Playable
|
|||||||
*/
|
*/
|
||||||
public final L2PcTemplate getBaseTemplate()
|
public final L2PcTemplate getBaseTemplate()
|
||||||
{
|
{
|
||||||
|
final ClassId originalClass = getOriginalClass();
|
||||||
|
if (originalClass != null)
|
||||||
|
{
|
||||||
|
return PlayerTemplateData.getInstance().getTemplate(originalClass.getId());
|
||||||
|
}
|
||||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass);
|
return PlayerTemplateData.getInstance().getTemplate(_baseClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ClassId getOriginalClass()
|
||||||
|
{
|
||||||
|
return getVariables().getEnum(ORIGINAL_CLASS_VAR, ClassId.class, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalClass(ClassId newClass)
|
||||||
|
{
|
||||||
|
getVariables().set(ORIGINAL_CLASS_VAR, newClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resetOriginalClass()
|
||||||
|
{
|
||||||
|
getVariables().remove(ORIGINAL_CLASS_VAR);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the L2PcTemplate link to the L2PcInstance.
|
* @return the L2PcTemplate link to the L2PcInstance.
|
||||||
*/
|
*/
|
||||||
@@ -2656,6 +2678,11 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (!isSubClassActive())
|
if (!isSubClassActive())
|
||||||
{
|
{
|
||||||
|
final ClassId originalClass = getOriginalClass();
|
||||||
|
if (originalClass != null)
|
||||||
|
{
|
||||||
|
return originalClass.getRace();
|
||||||
|
}
|
||||||
return getTemplate().getRace();
|
return getTemplate().getRace();
|
||||||
}
|
}
|
||||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass).getRace();
|
return PlayerTemplateData.getInstance().getTemplate(_baseClass).getRace();
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
|||||||
packet.writeC(_activeChar.isGM() ? 0x01 : 0x00);
|
packet.writeC(_activeChar.isGM() ? 0x01 : 0x00);
|
||||||
packet.writeC(_activeChar.getRace().ordinal());
|
packet.writeC(_activeChar.getRace().ordinal());
|
||||||
packet.writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00);
|
packet.writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00);
|
||||||
packet.writeD(ClassId.getClassId(_activeChar.getBaseClass()).getRootClassId().getId());
|
packet.writeD(ClassId.getClassId(_activeChar.getBaseTemplate().getClassId().getId()).getRootClassId().getId());
|
||||||
packet.writeD(_activeChar.getClassId().getId());
|
packet.writeD(_activeChar.getClassId().getId());
|
||||||
packet.writeC(_activeChar.getLevel());
|
packet.writeC(_activeChar.getLevel());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,20 +180,32 @@ FeeDeleteDualClassSkills = 20000000
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Hardin (Agent of Chaos)
|
# Hardin (Agent of Chaos)
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
# NOTE: Base player class race remains the same.
|
||||||
|
|
||||||
# Enable classes from all races.
|
# Enable classes from all races.
|
||||||
# NOTE: Will change player race accordingly.
|
# Default: True
|
||||||
# Default: False
|
HardinEnableAllRaces = True
|
||||||
HardinEnableAllRaces = False
|
|
||||||
|
|
||||||
# Disable mage-fighter class differentiation.
|
# Disable mage-fighter class differentiation.
|
||||||
# Default: False
|
# Default: False
|
||||||
HardinEnableAllSpecs = False
|
HardinEnableAllSpecs = False
|
||||||
|
|
||||||
|
# Select classes from same Awaken group.
|
||||||
|
# Default: True
|
||||||
|
HardinSameAwakenGroup = True
|
||||||
|
|
||||||
|
# Retail limitations.
|
||||||
|
# -Only Dwarves can awaken into Tyrr Maestros.
|
||||||
|
# -Only Orcs can awaken into Iss Dominators.
|
||||||
|
# Default: True
|
||||||
|
HardinRetailLimitations = True
|
||||||
|
|
||||||
# Enable above checks for dual classes as well.
|
# Enable above checks for dual classes as well.
|
||||||
# Default: True
|
# Default: True
|
||||||
HardinEnableDualClassChecks = True
|
HardinEnableDualClassChecks = True
|
||||||
|
|
||||||
# Enable Hardin for Ertheia race characters.
|
# Enable Hardin for Ertheia race characters.
|
||||||
|
# Note: HardinSameAwakenGroup must be disabled.
|
||||||
# Default: False
|
# Default: False
|
||||||
HardinEnableErtheias = False
|
HardinEnableErtheias = False
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<html><body>Hardin:<br>
|
||||||
|
You are involved with the Olympiad.<br>
|
||||||
|
Leave.<br>
|
||||||
|
(Players involved with the current Olympiad games cannot use <font color="af9878">Chaos Essences</font>.)
|
||||||
|
</body></html>
|
||||||
@@ -27,6 +27,7 @@ import com.l2jmobius.gameserver.model.L2SkillLearn;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
|
||||||
@@ -86,6 +87,26 @@ public final class Hardin extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (Config.HARDIN_SAME_AWAKEN_GROUP)
|
||||||
|
{
|
||||||
|
final String original = c.toString().contains("_") ? c.toString().substring(0, c.toString().indexOf("_") - 1) : c.toString();
|
||||||
|
final String search = player.getClassId().toString().contains("_") ? player.getClassId().toString().substring(0, player.getClassId().toString().indexOf("_") - 1) : player.getClassId().toString();
|
||||||
|
if (!original.equals(search))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Config.HARDIN_RETAIL_LIMITATIONS)
|
||||||
|
{
|
||||||
|
if (c.equals(ClassId.TYRR_MAESTRO) && (player.getRace() != Race.DWARF))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (c.equals(ClassId.ISS_DOMINATOR) && (player.getRace() != Race.ORC))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
classes.append("<button value=\"");
|
classes.append("<button value=\"");
|
||||||
classes.append(ClassListData.getInstance().getClass(c.ordinal()).getClassName());
|
classes.append(ClassListData.getInstance().getClass(c.ordinal()).getClassName());
|
||||||
@@ -105,6 +126,11 @@ public final class Hardin extends AbstractNpcAI
|
|||||||
takeItems(player, player.isDualClassActive() ? CHAOS_ESSENCE_DUAL_CLASS : CHAOS_ESSENCE, 1);
|
takeItems(player, player.isDualClassActive() ? CHAOS_ESSENCE_DUAL_CLASS : CHAOS_ESSENCE, 1);
|
||||||
// Give item
|
// Give item
|
||||||
giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 1);
|
giveItems(player, player.isDualClassActive() ? CHAOS_POMANDER_DUAL_CLASS : CHAOS_POMANDER, 1);
|
||||||
|
// Save original ClassId
|
||||||
|
if (!player.isDualClassActive() && (player.getOriginalClass() == null))
|
||||||
|
{
|
||||||
|
player.setOriginalClass(player.getClassId());
|
||||||
|
}
|
||||||
// Ertheias can only be female
|
// Ertheias can only be female
|
||||||
final ClassId newClass = ClassId.getClassId(Integer.parseInt(event.replace("try_", "")));
|
final ClassId newClass = ClassId.getClassId(Integer.parseInt(event.replace("try_", "")));
|
||||||
if ((newClass.getRace() == Race.ERTHEIA) && (player.getClassId().getRace() != Race.ERTHEIA) && !player.getAppearance().getSex())
|
if ((newClass.getRace() == Race.ERTHEIA) && (player.getClassId().getRace() != Race.ERTHEIA) && !player.getAppearance().getSex())
|
||||||
@@ -180,9 +206,9 @@ public final class Hardin extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
return "33870-no_summon.html";
|
return "33870-no_summon.html";
|
||||||
}
|
}
|
||||||
if (player.isInOlympiadMode())
|
if (player.isInOlympiadMode() || (Olympiad.getInstance().getCompetitionDone(player.getObjectId()) > 0))
|
||||||
{
|
{
|
||||||
return "33870-no.html";
|
return "33870-no_olympiad.html";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -367,6 +367,10 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
final L2PcInstance player = target.getActingPlayer();
|
final L2PcInstance player = target.getActingPlayer();
|
||||||
if ((ClassId.getClassId(classidval) != null) && (player.getClassId().getId() != classidval))
|
if ((ClassId.getClassId(classidval) != null) && (player.getClassId().getId() != classidval))
|
||||||
{
|
{
|
||||||
|
if (!player.isDualClassActive() && !player.isSubClassActive())
|
||||||
|
{
|
||||||
|
player.resetOriginalClass(); // revert agent of chaos changes
|
||||||
|
}
|
||||||
player.setClassId(classidval);
|
player.setClassId(classidval);
|
||||||
if (player.isSubClassActive())
|
if (player.isSubClassActive())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -777,6 +777,8 @@ public final class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
public static boolean HARDIN_ENABLE_ALL_RACES;
|
public static boolean HARDIN_ENABLE_ALL_RACES;
|
||||||
public static boolean HARDIN_ENABLE_ALL_SPECS;
|
public static boolean HARDIN_ENABLE_ALL_SPECS;
|
||||||
|
public static boolean HARDIN_SAME_AWAKEN_GROUP;
|
||||||
|
public static boolean HARDIN_RETAIL_LIMITATIONS;
|
||||||
public static boolean HARDIN_ENABLE_DUALCLASS_CHECKS;
|
public static boolean HARDIN_ENABLE_DUALCLASS_CHECKS;
|
||||||
public static boolean HARDIN_ENABLE_ERTHEIAS;
|
public static boolean HARDIN_ENABLE_ERTHEIAS;
|
||||||
|
|
||||||
@@ -1460,8 +1462,10 @@ public final class Config
|
|||||||
FEE_DELETE_SUBCLASS_SKILLS = Character.getInt("FeeDeleteSubClassSkills", 10000000);
|
FEE_DELETE_SUBCLASS_SKILLS = Character.getInt("FeeDeleteSubClassSkills", 10000000);
|
||||||
FEE_DELETE_DUALCLASS_SKILLS = Character.getInt("FeeDeleteDualClassSkills", 20000000);
|
FEE_DELETE_DUALCLASS_SKILLS = Character.getInt("FeeDeleteDualClassSkills", 20000000);
|
||||||
ENABLE_VITALITY = Character.getBoolean("EnableVitality", true);
|
ENABLE_VITALITY = Character.getBoolean("EnableVitality", true);
|
||||||
HARDIN_ENABLE_ALL_RACES = Character.getBoolean("HardinEnableAllRaces", false);
|
HARDIN_ENABLE_ALL_RACES = Character.getBoolean("HardinEnableAllRaces", true);
|
||||||
HARDIN_ENABLE_ALL_SPECS = Character.getBoolean("HardinEnableAllSpecs", false);
|
HARDIN_ENABLE_ALL_SPECS = Character.getBoolean("HardinEnableAllSpecs", false);
|
||||||
|
HARDIN_SAME_AWAKEN_GROUP = Character.getBoolean("HardinSameAwakenGroup", true);
|
||||||
|
HARDIN_RETAIL_LIMITATIONS = Character.getBoolean("HardinRetailLimitations", true);
|
||||||
HARDIN_ENABLE_DUALCLASS_CHECKS = Character.getBoolean("HardinEnableDualClassChecks", true);
|
HARDIN_ENABLE_DUALCLASS_CHECKS = Character.getBoolean("HardinEnableDualClassChecks", true);
|
||||||
HARDIN_ENABLE_ERTHEIAS = Character.getBoolean("HardinEnableErtheias", false);
|
HARDIN_ENABLE_ERTHEIAS = Character.getBoolean("HardinEnableErtheias", false);
|
||||||
STARTING_VITALITY_POINTS = Character.getInt("StartingVitalityPoints", 140000);
|
STARTING_VITALITY_POINTS = Character.getInt("StartingVitalityPoints", 140000);
|
||||||
|
|||||||
@@ -437,6 +437,8 @@ public final class L2PcInstance extends L2Playable
|
|||||||
/** The list of sub-classes this character has. */
|
/** The list of sub-classes this character has. */
|
||||||
private volatile Map<Integer, SubClass> _subClasses;
|
private volatile Map<Integer, SubClass> _subClasses;
|
||||||
|
|
||||||
|
private static final String ORIGINAL_CLASS_VAR = "OriginalClass";
|
||||||
|
|
||||||
private final PcAppearance _appearance;
|
private final PcAppearance _appearance;
|
||||||
|
|
||||||
/** The Experience of the L2PcInstance before the last Death Penalty */
|
/** The Experience of the L2PcInstance before the last Death Penalty */
|
||||||
@@ -1174,9 +1176,29 @@ public final class L2PcInstance extends L2Playable
|
|||||||
*/
|
*/
|
||||||
public final L2PcTemplate getBaseTemplate()
|
public final L2PcTemplate getBaseTemplate()
|
||||||
{
|
{
|
||||||
|
final ClassId originalClass = getOriginalClass();
|
||||||
|
if (originalClass != null)
|
||||||
|
{
|
||||||
|
return PlayerTemplateData.getInstance().getTemplate(originalClass.getId());
|
||||||
|
}
|
||||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass);
|
return PlayerTemplateData.getInstance().getTemplate(_baseClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ClassId getOriginalClass()
|
||||||
|
{
|
||||||
|
return getVariables().getEnum(ORIGINAL_CLASS_VAR, ClassId.class, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalClass(ClassId newClass)
|
||||||
|
{
|
||||||
|
getVariables().set(ORIGINAL_CLASS_VAR, newClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resetOriginalClass()
|
||||||
|
{
|
||||||
|
getVariables().remove(ORIGINAL_CLASS_VAR);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the L2PcTemplate link to the L2PcInstance.
|
* @return the L2PcTemplate link to the L2PcInstance.
|
||||||
*/
|
*/
|
||||||
@@ -2657,6 +2679,11 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (!isSubClassActive())
|
if (!isSubClassActive())
|
||||||
{
|
{
|
||||||
|
final ClassId originalClass = getOriginalClass();
|
||||||
|
if (originalClass != null)
|
||||||
|
{
|
||||||
|
return originalClass.getRace();
|
||||||
|
}
|
||||||
return getTemplate().getRace();
|
return getTemplate().getRace();
|
||||||
}
|
}
|
||||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass).getRace();
|
return PlayerTemplateData.getInstance().getTemplate(_baseClass).getRace();
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
|||||||
packet.writeC(_activeChar.isGM() ? 0x01 : 0x00);
|
packet.writeC(_activeChar.isGM() ? 0x01 : 0x00);
|
||||||
packet.writeC(_activeChar.getRace().ordinal());
|
packet.writeC(_activeChar.getRace().ordinal());
|
||||||
packet.writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00);
|
packet.writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00);
|
||||||
packet.writeD(ClassId.getClassId(_activeChar.getBaseClass()).getRootClassId().getId());
|
packet.writeD(ClassId.getClassId(_activeChar.getBaseTemplate().getClassId().getId()).getRootClassId().getId());
|
||||||
packet.writeD(_activeChar.getClassId().getId());
|
packet.writeD(_activeChar.getClassId().getId());
|
||||||
packet.writeC(_activeChar.getLevel());
|
packet.writeC(_activeChar.getLevel());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
|||||||
packet.writeC(_activeChar.isGM() ? 0x01 : 0x00);
|
packet.writeC(_activeChar.isGM() ? 0x01 : 0x00);
|
||||||
packet.writeC(_activeChar.getRace().ordinal());
|
packet.writeC(_activeChar.getRace().ordinal());
|
||||||
packet.writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00);
|
packet.writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00);
|
||||||
packet.writeD(ClassId.getClassId(_activeChar.getBaseClass()).getRootClassId().getId());
|
packet.writeD(ClassId.getClassId(_activeChar.getBaseTemplate().getClassId().getId()).getRootClassId().getId());
|
||||||
packet.writeD(_activeChar.getClassId().getId());
|
packet.writeD(_activeChar.getClassId().getId());
|
||||||
packet.writeC(_activeChar.getLevel());
|
packet.writeC(_activeChar.getLevel());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user