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
|
||||
{
|
||||
|
@@ -101,7 +101,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
|
||||
{
|
||||
|
@@ -91,7 +91,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
|
||||
{
|
||||
|
@@ -98,7 +98,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
|
||||
{
|
||||
|
@@ -91,7 +91,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
|
||||
{
|
||||
|
@@ -21,58 +21,67 @@ package org.l2jmobius.gameserver.enums;
|
||||
*/
|
||||
public enum BroochJewel
|
||||
{
|
||||
RUBY_LV1(38855, 17814, 0.01, true),
|
||||
RUBY_LV2(38856, 17814, 0.035, true),
|
||||
RUBY_LV3(38857, 17815, 0.075, true),
|
||||
RUBY_LV4(38858, 17816, 0.125, true),
|
||||
RUBY_LV5(38859, 17817, 0.2, true),
|
||||
GREATER_RUBY_LV1(47688, 18715, 0.2, true),
|
||||
GREATER_RUBY_LV2(48771, 18715, 0.2, true),
|
||||
GREATER_RUBY_LV3(48772, 18715, 0.2, true),
|
||||
GREATER_RUBY_LV4(48773, 18715, 0.2, true),
|
||||
GREATER_RUBY_LV5(48774, 18715, 0.2, true),
|
||||
SUPERIOR_RUBY_LV1(81505, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV2(81506, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV3(81507, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV4(81508, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV5(81509, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV6(81510, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV7(81511, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV8(81512, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV9(81513, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV10(81514, 39658, 0.23, true),
|
||||
SAPPHIRE_LV1(38927, 17818, 0.01, false),
|
||||
SAPPHIRE_LV2(38928, 17818, 0.035, false),
|
||||
SAPPHIRE_LV3(38929, 17819, 0.075, false),
|
||||
SAPPHIRE_LV4(38930, 17820, 0.125, false),
|
||||
SAPPHIRE_LV5(38931, 17821, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV1(47689, 18718, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV2(48775, 18718, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV3(48776, 18718, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV4(48777, 18718, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV5(48778, 18718, 0.2, false),
|
||||
SUPERIOR_SAPPHIRE_LV1(81515, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV2(81516, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV3(81517, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV4(81518, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV5(81519, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV6(81520, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV7(81521, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV8(81522, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV9(81523, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV10(81524, 39660, 0.23, false);
|
||||
RUBY_LV1(38855, 17814, 1, 0.01, true, false),
|
||||
RUBY_LV2(38856, 17814, 1, 0.035, true, false),
|
||||
RUBY_LV3(38857, 17815, 1, 0.075, true, false),
|
||||
RUBY_LV4(38858, 17816, 1, 0.125, true, false),
|
||||
RUBY_LV5(38859, 17817, 1, 0.2, true, false),
|
||||
|
||||
GREATER_RUBY_LV1(47688, 18715, 1, 0.2, true, false),
|
||||
GREATER_RUBY_LV2(48771, 18715, 1, 0.2, true, false),
|
||||
GREATER_RUBY_LV3(48772, 18715, 1, 0.2, true, false),
|
||||
GREATER_RUBY_LV4(48773, 18715, 1, 0.2, true, false),
|
||||
GREATER_RUBY_LV5(48774, 18715, 1, 0.2, true, false),
|
||||
|
||||
SUPERIOR_RUBY_LV1(81505, 39658, 1, 0.23, true, false),
|
||||
SUPERIOR_RUBY_LV2(81506, 39658, 1, 0.23, true, false),
|
||||
SUPERIOR_RUBY_LV3(81507, 39658, 1, 0.23, true, false),
|
||||
SUPERIOR_RUBY_LV4(81508, 39658, 1, 0.23, true, false),
|
||||
SUPERIOR_RUBY_LV5(81509, 39658, 1, 0.23, true, false),
|
||||
SUPERIOR_RUBY_LV6(81510, 39658, 1, 0.23, true, false),
|
||||
SUPERIOR_RUBY_LV7(81511, 39658, 1, 0.23, true, false),
|
||||
SUPERIOR_RUBY_LV8(81512, 39658, 1, 0.23, true, false),
|
||||
SUPERIOR_RUBY_LV9(81513, 39658, 1, 0.23, true, false),
|
||||
SUPERIOR_RUBY_LV10(81514, 39658, 1, 0.23, true, false),
|
||||
|
||||
SAPPHIRE_LV1(38927, 17818, 1, 0.01, false, true),
|
||||
SAPPHIRE_LV2(38928, 17818, 1, 0.035, false, true),
|
||||
SAPPHIRE_LV3(38929, 17819, 1, 0.075, false, true),
|
||||
SAPPHIRE_LV4(38930, 17820, 1, 0.125, false, true),
|
||||
SAPPHIRE_LV5(38931, 17821, 1, 0.2, false, true),
|
||||
|
||||
GREATER_SAPPHIRE_LV1(47689, 18718, 1, 0.2, false, true),
|
||||
GREATER_SAPPHIRE_LV2(48775, 18718, 1, 0.2, false, true),
|
||||
GREATER_SAPPHIRE_LV3(48776, 18718, 1, 0.2, false, true),
|
||||
GREATER_SAPPHIRE_LV4(48777, 18718, 1, 0.2, false, true),
|
||||
GREATER_SAPPHIRE_LV5(48778, 18718, 1, 0.2, false, true),
|
||||
|
||||
SUPERIOR_SAPPHIRE_LV1(81515, 39660, 1, 0.23, false, true),
|
||||
SUPERIOR_SAPPHIRE_LV2(81516, 39660, 1, 0.23, false, true),
|
||||
SUPERIOR_SAPPHIRE_LV3(81517, 39660, 1, 0.23, false, true),
|
||||
SUPERIOR_SAPPHIRE_LV4(81518, 39660, 1, 0.23, false, true),
|
||||
SUPERIOR_SAPPHIRE_LV5(81519, 39660, 1, 0.23, false, true),
|
||||
SUPERIOR_SAPPHIRE_LV6(81520, 39660, 1, 0.23, false, true),
|
||||
SUPERIOR_SAPPHIRE_LV7(81521, 39660, 1, 0.23, false, true),
|
||||
SUPERIOR_SAPPHIRE_LV8(81522, 39660, 1, 0.23, false, true),
|
||||
SUPERIOR_SAPPHIRE_LV9(81523, 39660, 1, 0.23, false, true),
|
||||
SUPERIOR_SAPPHIRE_LV10(81524, 39660, 1, 0.23, false, true);
|
||||
|
||||
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()
|
||||
@@ -80,9 +89,14 @@ public enum BroochJewel
|
||||
return _itemId;
|
||||
}
|
||||
|
||||
public int getEffectId()
|
||||
public int getSkillId()
|
||||
{
|
||||
return _effectId;
|
||||
return _skillId;
|
||||
}
|
||||
|
||||
public int getSkillLevel()
|
||||
{
|
||||
return _skillLevel;
|
||||
}
|
||||
|
||||
public double getBonus()
|
||||
@@ -94,4 +108,9 @@ public enum BroochJewel
|
||||
{
|
||||
return _isRuby;
|
||||
}
|
||||
|
||||
public boolean isSapphire()
|
||||
{
|
||||
return _isSapphire;
|
||||
}
|
||||
}
|
||||
|
@@ -9095,7 +9095,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