Reuse active, non offensive, item skill cooldown on equip.
Thanks to Liamxroy.
This commit is contained in:
@@ -158,6 +158,16 @@ CalculateMagicSuccessBySkillMagicLevel = False
|
||||
# Default: 100
|
||||
BlowRateChanceLimit = 100
|
||||
|
||||
# Disables active, non offensive, item skills for a fixed time upon equip.
|
||||
# Use 0 to disable.
|
||||
# Default: 300000 (5 minutes).
|
||||
ItemEquipActiveSkillReuse = 300000
|
||||
|
||||
# Disables active, non offensive, armor set skills for a fixed time upon equip.
|
||||
# Use 0 to disable.
|
||||
# Default: 60000 (1 minute).
|
||||
ArmorSetEquipActiveSkillReuse = 60000
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Class, Sub-class and skill learning options
|
||||
|
||||
@@ -203,6 +203,8 @@ public class Config
|
||||
public static boolean MP_VAMPIRIC_ATTACK_WORKS_WITH_MELEE;
|
||||
public static boolean CALCULATE_MAGIC_SUCCESS_BY_SKILL_MAGIC_LEVEL;
|
||||
public static int BLOW_RATE_CHANCE_LIMIT;
|
||||
public static int ITEM_EQUIP_ACTIVE_SKILL_REUSE;
|
||||
public static int ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE;
|
||||
public static boolean LIFE_CRYSTAL_NEEDED;
|
||||
public static boolean DIVINE_SP_BOOK_NEEDED;
|
||||
public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
|
||||
@@ -1757,6 +1759,8 @@ public class Config
|
||||
MP_VAMPIRIC_ATTACK_WORKS_WITH_MELEE = characterConfig.getBoolean("MpVampiricAttackWorkWithMelee", false);
|
||||
CALCULATE_MAGIC_SUCCESS_BY_SKILL_MAGIC_LEVEL = characterConfig.getBoolean("CalculateMagicSuccessBySkillMagicLevel", false);
|
||||
BLOW_RATE_CHANCE_LIMIT = characterConfig.getInt("BlowRateChanceLimit", 100);
|
||||
ITEM_EQUIP_ACTIVE_SKILL_REUSE = characterConfig.getInt("ItemEquipActiveSkillReuse", 300000);
|
||||
ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE = characterConfig.getInt("ArmorSetEquipActiveSkillReuse", 60000);
|
||||
LIFE_CRYSTAL_NEEDED = characterConfig.getBoolean("LifeCrystalNeeded", true);
|
||||
DIVINE_SP_BOOK_NEEDED = characterConfig.getBoolean("DivineInspirationSpBookNeeded", true);
|
||||
ALT_GAME_SUBCLASS_WITHOUT_QUESTS = characterConfig.getBoolean("AltSubClassWithoutQuests", false);
|
||||
|
||||
@@ -621,6 +621,13 @@ public abstract class Inventory extends ItemContainer
|
||||
{
|
||||
addedSkills.put(skill.getId(), skill);
|
||||
}
|
||||
|
||||
// Active, non offensive, skills start with reuse on equip.
|
||||
if (skill.isActive() && !skill.isBad() && (Config.ITEM_EQUIP_ACTIVE_SKILL_REUSE > 0) && playable.getActingPlayer().hasEnteredWorld())
|
||||
{
|
||||
playable.addTimeStamp(skill, Config.ITEM_EQUIP_ACTIVE_SKILL_REUSE);
|
||||
updateTimestamp = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -704,14 +711,24 @@ public abstract class Inventory extends ItemContainer
|
||||
addedSkills.put(skill.getId(), skill);
|
||||
}
|
||||
|
||||
if (skill.isActive() && !playable.hasSkillReuse(skill.getReuseHashCode()))
|
||||
if (skill.isActive())
|
||||
{
|
||||
final int equipDelay = item.getEquipReuseDelay();
|
||||
if (equipDelay > 0)
|
||||
if (!playable.hasSkillReuse(skill.getReuseHashCode()))
|
||||
{
|
||||
playable.addTimeStamp(skill, equipDelay);
|
||||
playable.disableSkill(skill, equipDelay);
|
||||
final int equipDelay = item.getEquipReuseDelay();
|
||||
if (equipDelay > 0)
|
||||
{
|
||||
playable.addTimeStamp(skill, equipDelay);
|
||||
playable.disableSkill(skill, equipDelay);
|
||||
}
|
||||
}
|
||||
|
||||
// Active, non offensive, skills start with reuse on equip.
|
||||
if (!skill.isBad() && (Config.ITEM_EQUIP_ACTIVE_SKILL_REUSE > 0) && playable.getActingPlayer().hasEnteredWorld())
|
||||
{
|
||||
playable.addTimeStamp(skill, Config.ITEM_EQUIP_ACTIVE_SKILL_REUSE);
|
||||
}
|
||||
|
||||
updateTimestamp = true;
|
||||
}
|
||||
}
|
||||
@@ -771,6 +788,13 @@ public abstract class Inventory extends ItemContainer
|
||||
{
|
||||
addedSkills.put(skill.getId(), skill);
|
||||
}
|
||||
|
||||
// Active, non offensive, skills start with reuse on equip.
|
||||
if (skill.isActive() && !skill.isBad() && (Config.ITEM_EQUIP_ACTIVE_SKILL_REUSE > 0) && playable.getActingPlayer().hasEnteredWorld())
|
||||
{
|
||||
playable.addTimeStamp(skill, Config.ITEM_EQUIP_ACTIVE_SKILL_REUSE);
|
||||
updateTimestamp = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -918,9 +942,9 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
playable.addSkill(itemSkill);
|
||||
if (itemSkill.isActive() && (item != null))
|
||||
if (itemSkill.isActive())
|
||||
{
|
||||
if (!playable.hasSkillReuse(itemSkill.getReuseHashCode()))
|
||||
if ((item != null) && !playable.hasSkillReuse(itemSkill.getReuseHashCode()))
|
||||
{
|
||||
final int equipDelay = item.getEquipReuseDelay();
|
||||
if (equipDelay > 0)
|
||||
@@ -929,8 +953,16 @@ public abstract class Inventory extends ItemContainer
|
||||
playable.disableSkill(itemSkill, equipDelay);
|
||||
}
|
||||
}
|
||||
|
||||
// Active, non offensive, skills start with reuse on equip.
|
||||
if (!itemSkill.isBad() && (Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE > 0) && playable.getActingPlayer().hasEnteredWorld())
|
||||
{
|
||||
playable.addTimeStamp(itemSkill, Config.ARMOR_SET_EQUIP_ACTIVE_SKILL_REUSE);
|
||||
}
|
||||
|
||||
updateTimeStamp = true;
|
||||
}
|
||||
|
||||
update = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user