Brooch enum support for Sapphire and skill level.
Thanks to nasseka.
This commit is contained in:
@@ -126,7 +126,7 @@ public class BeastSoulShot implements IItemHandler
|
||||
// Visual effect change if player has equipped Ruby level 3 or higher
|
||||
if (activeOwner.getActiveRubyJewel() != null)
|
||||
{
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, activeOwner.getActiveRubyJewel().getEffectId(), 1, 0, 0), 600);
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, activeOwner.getActiveRubyJewel().getSkillId(), activeOwner.getActiveRubyJewel().getSkillLevel(), 0, 0), 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -143,7 +143,7 @@ public class BeastSoulShot implements IItemHandler
|
||||
// Visual effect change if player has equipped Ruby level 3 or higher
|
||||
if (activeOwner.getActiveRubyJewel() != null)
|
||||
{
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(s, s, activeOwner.getActiveRubyJewel().getEffectId(), 1, 0, 0), 600);
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(s, s, activeOwner.getActiveRubyJewel().getSkillId(), activeOwner.getActiveRubyJewel().getSkillLevel(), 0, 0), 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -127,7 +127,7 @@ public class BeastSpiritShot implements IItemHandler
|
||||
// Visual effect change if player has equipped Sapphire level 3 or higher
|
||||
if (activeOwner.getActiveShappireJewel() != null)
|
||||
{
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, activeOwner.getActiveShappireJewel().getEffectId(), 2, 0, 0), 600);
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, activeOwner.getActiveShappireJewel().getSkillId(), activeOwner.getActiveShappireJewel().getSkillLevel(), 0, 0), 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -144,7 +144,7 @@ public class BeastSpiritShot implements IItemHandler
|
||||
// Visual effect change if player has equipped Sapphire level 3 or higher
|
||||
if (activeOwner.getActiveShappireJewel() != null)
|
||||
{
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(s, s, activeOwner.getActiveShappireJewel().getEffectId(), 2, 0, 0), 600);
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(s, s, activeOwner.getActiveShappireJewel().getSkillId(), activeOwner.getActiveShappireJewel().getSkillLevel(), 0, 0), 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -112,7 +112,7 @@ public class BlessedSoulShots implements IItemHandler
|
||||
// Visual effect change if player has equipped Ruby level 3 or higher
|
||||
if (player.getActiveRubyJewel() != null)
|
||||
{
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, player.getActiveRubyJewel().getEffectId(), 1, 0, 0), 600);
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, player.getActiveRubyJewel().getSkillId(), player.getActiveRubyJewel().getSkillLevel(), 0, 0), 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -104,7 +104,7 @@ public class BlessedSpiritShot implements IItemHandler
|
||||
// Visual effect change if player has equipped Sapphire level 3 or higher
|
||||
if (player.getActiveShappireJewel() != null)
|
||||
{
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, player.getActiveShappireJewel().getEffectId(), 1, 0, 0), 600);
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, player.getActiveShappireJewel().getSkillId(), player.getActiveShappireJewel().getSkillLevel(), 0, 0), 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -109,7 +109,7 @@ public class SoulShots implements IItemHandler
|
||||
// Visual effect change if player has equipped Ruby level 3 or higher
|
||||
if (player.getActiveRubyJewel() != null)
|
||||
{
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, player.getActiveRubyJewel().getEffectId(), 1, 0, 0), 600);
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, player.getActiveRubyJewel().getSkillId(), player.getActiveRubyJewel().getSkillLevel(), 0, 0), 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -104,7 +104,7 @@ public class SpiritShot implements IItemHandler
|
||||
// Visual effect change if player has equipped Sapphire level 3 or higher
|
||||
if (player.getActiveShappireJewel() != null)
|
||||
{
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, player.getActiveShappireJewel().getEffectId(), 1, 0, 0), 600);
|
||||
Broadcast.toSelfAndKnownPlayersInRadius(player, new MagicSkillUse(player, player, player.getActiveShappireJewel().getSkillId(), player.getActiveShappireJewel().getSkillLevel(), 0, 0), 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -22,64 +22,68 @@ package org.l2jmobius.gameserver.enums;
|
||||
public enum BroochJewel
|
||||
{
|
||||
// Working effect
|
||||
RUBY_LV1(70451, 17817, 0.02, true),
|
||||
RUBY_LV2(70452, 17817, 0.03, true),
|
||||
RUBY_LV3(70453, 17817, 0.05, true),
|
||||
RUBY_LV4(70454, 17817, 0.08, true),
|
||||
RUBY_LV5(70455, 17817, 0.16, true),
|
||||
GREATER_RUBY_LV1(71368, 17817, 0.17, true), // + 1% p atk
|
||||
GREATER_RUBY_LV2(71369, 17817, 0.18, true), // + 2% p atk
|
||||
GREATER_RUBY_LV3(71370, 17817, 0.19, true), // + 3% p atk
|
||||
GREATER_RUBY_LV4(71371, 17817, 0.20, true), // + 5% p atk
|
||||
GREATER_RUBY_LV5(71372, 17817, 0.20, true), // + 7% p atk + crit. p. rate +10%
|
||||
RUBY_LV1(70451, 17817, 1, 0.02, true, false),
|
||||
RUBY_LV2(70452, 17817, 1, 0.03, true, false),
|
||||
RUBY_LV3(70453, 17817, 1, 0.05, true, false),
|
||||
RUBY_LV4(70454, 17817, 1, 0.08, true, false),
|
||||
RUBY_LV5(70455, 17817, 1, 0.16, true, false),
|
||||
GREATER_RUBY_LV1(71368, 17817, 1, 0.17, true, false), // + 1% p atk
|
||||
GREATER_RUBY_LV2(71369, 17817, 1, 0.18, true, false), // + 2% p atk
|
||||
GREATER_RUBY_LV3(71370, 17817, 1, 0.19, true, false), // + 3% p atk
|
||||
GREATER_RUBY_LV4(71371, 17817, 1, 0.20, true, false), // + 5% p atk
|
||||
GREATER_RUBY_LV5(71372, 17817, 1, 0.20, true, false), // + 7% p atk + crit. p. rate +10%
|
||||
|
||||
// Not show recharge effect - not used in classics maybe
|
||||
RUBY_LV1_2(90328, 59150, 0.02, true),
|
||||
RUBY_LV2_2(90329, 59150, 0.03, true),
|
||||
RUBY_LV3_2(90330, 59150, 0.05, true),
|
||||
RUBY_LV4_2(90331, 59150, 0.08, true),
|
||||
RUBY_LV5_2(90332, 59150, 0.16, true),
|
||||
GREATER_RUBY_LV1_2(91320, 59150, 0.17, true), // + 1% p atk
|
||||
GREATER_RUBY_LV2_2(91321, 59150, 0.18, true), // + 2% p atk
|
||||
GREATER_RUBY_LV3_2(91322, 59150, 0.19, true), // + 3% p atk
|
||||
GREATER_RUBY_LV4_2(91323, 59150, 0.20, true), // + 5% p atk
|
||||
GREATER_RUBY_LV5_2(91324, 59150, 0.20, true), // + 7% p atk + crit. p. rate +10%
|
||||
RUBY_LV1_2(90328, 59150, 1, 0.02, true, false),
|
||||
RUBY_LV2_2(90329, 59150, 1, 0.03, true, false),
|
||||
RUBY_LV3_2(90330, 59150, 1, 0.05, true, false),
|
||||
RUBY_LV4_2(90331, 59150, 1, 0.08, true, false),
|
||||
RUBY_LV5_2(90332, 59150, 1, 0.16, true, false),
|
||||
GREATER_RUBY_LV1_2(91320, 59150, 1, 0.17, true, false), // + 1% p atk
|
||||
GREATER_RUBY_LV2_2(91321, 59150, 1, 0.18, true, false), // + 2% p atk
|
||||
GREATER_RUBY_LV3_2(91322, 59150, 1, 0.19, true, false), // + 3% p atk
|
||||
GREATER_RUBY_LV4_2(91323, 59150, 1, 0.20, true, false), // + 5% p atk
|
||||
GREATER_RUBY_LV5_2(91324, 59150, 1, 0.20, true, false), // + 7% p atk + crit. p. rate +10%
|
||||
|
||||
// Working effect
|
||||
SHAPPHIRE_LV1(70456, 17821, 0.02, false),
|
||||
SHAPPHIRE_LV2(70457, 17821, 0.03, false),
|
||||
SHAPPHIRE_LV3(70458, 17821, 0.05, false),
|
||||
SHAPPHIRE_LV4(70459, 17821, 0.08, false),
|
||||
SHAPPHIRE_LV5(70460, 17821, 0.16, false),
|
||||
GREATER_SHAPPHIRE_LV1(71373, 17821, 00.17, false), // + 2 % m attack
|
||||
GREATER_SHAPPHIRE_LV2(71374, 17821, 00.18, false), // + 4 % m attack
|
||||
GREATER_SHAPPHIRE_LV3(71375, 17821, 00.19, false), // + 6 % m attack
|
||||
GREATER_SHAPPHIRE_LV4(71376, 17821, 00.20, false), // + 10 % m attack
|
||||
GREATER_SHAPPHIRE_LV5(71377, 17821, 00.20, false), // + 14 % m attack + crit. m. rate +10%
|
||||
SAPPHIRE_LV1(70456, 17821, 1, 0.02, false, true),
|
||||
SAPPHIRE_LV2(70457, 17821, 1, 0.03, false, true),
|
||||
SAPPHIRE_LV3(70458, 17821, 1, 0.05, false, true),
|
||||
SAPPHIRE_LV4(70459, 17821, 1, 0.08, false, true),
|
||||
SAPPHIRE_LV5(70460, 17821, 1, 0.16, false, true),
|
||||
GREATER_SAPPHIRE_LV1(71373, 17821, 1, 00.17, false, true), // + 2 % m attack
|
||||
GREATER_SAPPHIRE_LV2(71374, 17821, 1, 00.18, false, true), // + 4 % m attack
|
||||
GREATER_SAPPHIRE_LV3(71375, 17821, 1, 00.19, false, true), // + 6 % m attack
|
||||
GREATER_SAPPHIRE_LV4(71376, 17821, 1, 00.20, false, true), // + 10 % m attack
|
||||
GREATER_SAPPHIRE_LV5(71377, 17821, 1, 00.20, false, true), // + 14 % m attack + crit. m. rate +10%
|
||||
|
||||
// Not show recharge effect - not used in classics maybe
|
||||
SHAPPHIRE_LV1_2(90333, 59151, 0.02, false),
|
||||
SHAPPHIRE_LV2_2(90334, 59151, 0.03, false),
|
||||
SHAPPHIRE_LV3_2(90335, 59151, 0.05, false),
|
||||
SHAPPHIRE_LV4_2(90336, 59151, 0.08, false),
|
||||
SHAPPHIRE_LV5_2(90337, 59151, 0.16, false),
|
||||
GREATER_SHAPPHIRE_LV1_2(91325, 59151, 0.17, false), // + 2 % m attack
|
||||
GREATER_SHAPPHIRE_LV2_2(91326, 59151, 0.18, false), // + 4 % m attack
|
||||
GREATER_SHAPPHIRE_LV3_2(91327, 59151, 0.19, false), // + 6 % m attack
|
||||
GREATER_SHAPPHIRE_LV4_2(91328, 59151, 0.20, false), // + 10 % m attack
|
||||
GREATER_SHAPPHIRE_LV5_2(91329, 59151, 0.20, false);// + 14 % m attack + crit. m. ata +10%
|
||||
SAPPHIRE_LV1_2(90333, 59151, 1, 0.02, false, true),
|
||||
SAPPHIRE_LV2_2(90334, 59151, 1, 0.03, false, true),
|
||||
SAPPHIRE_LV3_2(90335, 59151, 1, 0.05, false, true),
|
||||
SAPPHIRE_LV4_2(90336, 59151, 1, 0.08, false, true),
|
||||
SAPPHIRE_LV5_2(90337, 59151, 1, 0.16, false, true),
|
||||
GREATER_SAPPHIRE_LV1_2(91325, 59151, 1, 0.17, false, true), // + 2 % m attack
|
||||
GREATER_SAPPHIRE_LV2_2(91326, 59151, 1, 0.18, false, true), // + 4 % m attack
|
||||
GREATER_SAPPHIRE_LV3_2(91327, 59151, 1, 0.19, false, true), // + 6 % m attack
|
||||
GREATER_SAPPHIRE_LV4_2(91328, 59151, 1, 0.20, false, true), // + 10 % m attack
|
||||
GREATER_SAPPHIRE_LV5_2(91329, 59151, 1, 0.20, false, true); // + 14 % m attack + crit. m. ata +10%
|
||||
|
||||
private int _itemId;
|
||||
private int _effectId;
|
||||
private int _skillId;
|
||||
private int _skillLevel;
|
||||
private double _bonus;
|
||||
private boolean _isRuby; // If not, it is sapphire.
|
||||
private boolean _isRuby;
|
||||
private boolean _isSapphire;
|
||||
|
||||
private BroochJewel(int itemId, int effectId, double bonus, boolean isRuby)
|
||||
private BroochJewel(int itemId, int skillId, int skillLevel, double bonus, boolean isRuby, boolean isSapphire)
|
||||
{
|
||||
_itemId = itemId;
|
||||
_effectId = effectId;
|
||||
_skillId = skillId;
|
||||
_skillLevel = skillLevel;
|
||||
_bonus = bonus;
|
||||
_isRuby = isRuby;
|
||||
_isSapphire = isSapphire;
|
||||
}
|
||||
|
||||
public int getItemId()
|
||||
@@ -87,9 +91,14 @@ public enum BroochJewel
|
||||
return _itemId;
|
||||
}
|
||||
|
||||
public int getEffectId()
|
||||
public int getSkillId()
|
||||
{
|
||||
return _effectId;
|
||||
return _skillId;
|
||||
}
|
||||
|
||||
public int getSkillLevel()
|
||||
{
|
||||
return _skillLevel;
|
||||
}
|
||||
|
||||
public double getBonus()
|
||||
@@ -101,4 +110,9 @@ public enum BroochJewel
|
||||
{
|
||||
return _isRuby;
|
||||
}
|
||||
|
||||
public boolean isSapphire()
|
||||
{
|
||||
return _isSapphire;
|
||||
}
|
||||
}
|
||||
|
@@ -8783,7 +8783,7 @@ public class Player extends Playable
|
||||
for (int i = broochJewels.length - 1; i > 0; i--)
|
||||
{
|
||||
final BroochJewel jewel = broochJewels[i];
|
||||
if (!jewel.isRuby() && _inventory.isItemEquipped(jewel.getItemId()))
|
||||
if (jewel.isSapphire() && _inventory.isItemEquipped(jewel.getItemId()))
|
||||
{
|
||||
setActiveShappireJewel(jewel);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user