Fixed enchant bonus display on user info.

This commit is contained in:
MobiusDev
2017-08-24 12:31:33 +00:00
parent 9305a5d07d
commit 9168f1ea57
8 changed files with 128 additions and 32 deletions

View File

@@ -189,6 +189,10 @@ public interface IStatsFunction
break;
}
}
if (value == 0) // 1-3
{
value += ((2 * blessedBonus * enchant) + (4 * blessedBonus * overEnchant));
}
break;
}
case S:
@@ -266,6 +270,10 @@ public interface IStatsFunction
break;
}
}
if (value == 0) // 1-3
{
value += ((5 * blessedBonus * enchant) + (10 * blessedBonus * overEnchant));
}
break;
}
case S:
@@ -360,6 +368,10 @@ public interface IStatsFunction
break;
}
}
if (value == 0) // 1-3
{
value += ((12 * blessedBonus * enchant) + (24 * blessedBonus * overEnchant));
}
}
else
{
@@ -409,6 +421,10 @@ public interface IStatsFunction
break;
}
}
if (value == 0) // 1-3
{
value += ((7 * blessedBonus * enchant) + (14 * blessedBonus * overEnchant));
}
}
}
else
@@ -459,6 +475,10 @@ public interface IStatsFunction
break;
}
}
if (value == 0) // 1-3
{
value += ((6 * blessedBonus * enchant) + (12 * blessedBonus * overEnchant));
}
}
break;
}

View File

@@ -230,17 +230,21 @@ public final class RequestEnchantItem implements IClientIncomingPacket
}
}
if (item.isArmor() && item.isEquipped())
if (item.isEquipped())
{
it.forEachSkill(ItemSkillType.ON_ENCHANT, holder ->
if (item.isArmor())
{
// add skills bestowed from +4 armor
if (item.getEnchantLevel() >= holder.getValue())
it.forEachSkill(ItemSkillType.ON_ENCHANT, holder ->
{
activeChar.addSkill(holder.getSkill(), false);
activeChar.sendSkillList();
}
});
// add skills bestowed from +4 armor
if (item.getEnchantLevel() >= holder.getValue())
{
activeChar.addSkill(holder.getSkill(), false);
activeChar.sendSkillList();
}
});
}
activeChar.broadcastUserInfo(); // update user info
}
break;
}