|
|
@ -1358,10 +1358,10 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
public static float getDexPenalty(Item armor) { |
|
|
|
public static float getDexPenalty(Item armor) { |
|
|
|
if (armor == null) |
|
|
|
if (armor == null) |
|
|
|
return 0f; |
|
|
|
return 0f; |
|
|
|
ItemBase ab = armor.getItemBase(); |
|
|
|
ItemTemplate ab = armor.template; |
|
|
|
if (ab == null) |
|
|
|
if (ab == null) |
|
|
|
return 0f; |
|
|
|
return 0f; |
|
|
|
return ab.getDexPenalty(); |
|
|
|
return ab.item_bulk_factor; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void InitializeSkillsOnLoad(PlayerCharacter pc) { |
|
|
|
public static void InitializeSkillsOnLoad(PlayerCharacter pc) { |
|
|
@ -2817,11 +2817,11 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
if (item == null) |
|
|
|
if (item == null) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
ItemBase ib = item.getItemBase(); |
|
|
|
ItemTemplate ib = item.template; |
|
|
|
if (ib != null) { |
|
|
|
if (ib != null) { |
|
|
|
|
|
|
|
|
|
|
|
if ((item.template.item_type.equals(ItemType.WEAPON)) |
|
|
|
if ((item.template.item_type.equals(ItemType.WEAPON)) |
|
|
|
&& (item.template.item_skill_used.equals(type) || ib.getMastery().equals(type))) |
|
|
|
&& (item.template.item_skill_used.equals(type) || ib.item_skill_mastery_used.equals(type))) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
return (item.template.item_type.equals(ItemType.ARMOR)) |
|
|
|
return (item.template.item_type.equals(ItemType.ARMOR)) |
|
|
@ -3769,17 +3769,17 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
ConcurrentHashMap<EquipSlotType, Item> equipped = this.charItemManager.getEquipped(); |
|
|
|
ConcurrentHashMap<EquipSlotType, Item> equipped = this.charItemManager.getEquipped(); |
|
|
|
Item off = equipped.get(EquipSlotType.LHELD); |
|
|
|
Item off = equipped.get(EquipSlotType.LHELD); |
|
|
|
Item main = equipped.get(EquipSlotType.RHELD); |
|
|
|
Item main = equipped.get(EquipSlotType.RHELD); |
|
|
|
ItemBase wbMain = null; |
|
|
|
ItemTemplate wbMain = null; |
|
|
|
ItemBase wbOff = null; |
|
|
|
ItemTemplate wbOff = null; |
|
|
|
if (main != null) |
|
|
|
if (main != null) |
|
|
|
wbMain = main.getItemBase(); |
|
|
|
wbMain = main.template; |
|
|
|
if (off != null) |
|
|
|
if (off != null) |
|
|
|
wbOff = off.getItemBase(); |
|
|
|
wbOff = off.template; |
|
|
|
|
|
|
|
|
|
|
|
//set block if block found
|
|
|
|
//set block if block found
|
|
|
|
this.bonuses.setBool(ModType.Block, SourceType.NONE, false); |
|
|
|
this.bonuses.setBool(ModType.Block, SourceType.NONE, false); |
|
|
|
if (this.baseClass != null && (this.baseClass.getObjectUUID() == 2500 || this.baseClass.getObjectUUID() == 2501)) |
|
|
|
if (this.baseClass != null && (this.baseClass.getObjectUUID() == 2500 || this.baseClass.getObjectUUID() == 2501)) |
|
|
|
if (off != null && off.getItemBase() != null && ItemTemplate.isShield(off)) |
|
|
|
if (off != null && off.template != null && ItemTemplate.isShield(off)) |
|
|
|
this.bonuses.setBool(ModType.Block, SourceType.NONE, true); |
|
|
|
this.bonuses.setBool(ModType.Block, SourceType.NONE, true); |
|
|
|
|
|
|
|
|
|
|
|
//set dodge if rogue
|
|
|
|
//set dodge if rogue
|
|
|
@ -3792,8 +3792,8 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
this.bonuses.setBool(ModType.Parry, SourceType.NONE, false); |
|
|
|
this.bonuses.setBool(ModType.Parry, SourceType.NONE, false); |
|
|
|
if ((this.baseClass != null && this.baseClass.getObjectUUID() == 2500) |
|
|
|
if ((this.baseClass != null && this.baseClass.getObjectUUID() == 2500) |
|
|
|
|| (this.promotionClass != null && this.promotionClass.getObjectUUID() == 2520)) |
|
|
|
|| (this.promotionClass != null && this.promotionClass.getObjectUUID() == 2520)) |
|
|
|
if (wbMain == null || wbMain.getRange() < MBServerStatics.RANGED_WEAPON_RANGE) |
|
|
|
if (wbMain == null || wbMain.item_weapon_max_range < MBServerStatics.RANGED_WEAPON_RANGE) |
|
|
|
if (wbOff == null || wbOff.getRange() < MBServerStatics.RANGED_WEAPON_RANGE) |
|
|
|
if (wbOff == null || wbOff.item_weapon_max_range < MBServerStatics.RANGED_WEAPON_RANGE) |
|
|
|
this.bonuses.setBool(ModType.Parry, SourceType.NONE, true); |
|
|
|
this.bonuses.setBool(ModType.Parry, SourceType.NONE, true); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|