yup its done, but there are some little problems about the bp that still exist, some characters have higher bp in game and lower bp in console command @bpp
THe steed bp was not added
problem solved here is the fixed
Code:
public UInt16 BattlePowerCalc(Entity e)
{
UInt16 BP = e.Level;
if (e == null) return 0;
if (e.Owner == null) return 0;
foreach (IConquerItem i in e.Owner.Equipment.Objects)
{
if (!Owner.AlternateEquipment)
{
if (i == null) continue;
if (i.Position < 20)
{
if (i.Position != ConquerItem.Bottle &&
i.Position != ConquerItem.Garment && i.Position != ConquerItem.RightWeaponAccessory && i.Position != ConquerItem.LeftWeaponAccessory && i.Position != ConquerItem.SteedArmor)
{
Byte Multiplier = 1;
if (i.Position == ConquerItem.RightWeapon && i.IsTwoHander())
{
Multiplier = 2;
IConquerItem left = e.Owner.Equipment.TryGetItem(ConquerItem.LeftWeapon);
if (left != null)
{
Multiplier = 1;
}
}
Byte quality = (Byte)(i.ID % 10);
if (quality >= 6)
{
BP += (Byte)((quality - 5) * Multiplier);
}
if (i.SocketOne != 0)
{
BP += (Byte)(1 * Multiplier);
if ((Byte)i.SocketOne % 10 == 3)
BP += (Byte)(1 * Multiplier);
if (i.SocketTwo != 0)
{
BP += (Byte)(1 * Multiplier);
if ((Byte)i.SocketTwo % 10 == 3)
BP += (Byte)(1 * Multiplier);
}
}
BP += (Byte)(i.Plus * Multiplier);
}
}
}
else
{
if (i == null) continue;
if (i.Position > 9)
{
if (i.Position != ConquerItem.AltBottle &&
i.Position != ConquerItem.AltGarment && i.Position != ConquerItem.RightWeaponAccessory && i.Position != ConquerItem.LeftWeaponAccessory && i.Position != ConquerItem.SteedArmor)
{
Byte Multiplier = 1;
if (i.Position == ConquerItem.AltRightHand && i.IsTwoHander())
{
Multiplier = 2;
IConquerItem left = e.Owner.Equipment.TryGetItem(ConquerItem.AltLeftHand);
if (left != null)
{
Multiplier = 1;
}
}
Byte quality = (Byte)(i.ID % 10);
if (quality >= 6)
{
BP += (Byte)((quality - 5) * Multiplier);
}
if (i.SocketOne != 0)
{
BP += (Byte)(1 * Multiplier);
if ((Byte)i.SocketOne % 10 == 3)
BP += (Byte)(1 * Multiplier);
if (i.SocketTwo != 0)
{
BP += (Byte)(1 * Multiplier);
if ((Byte)i.SocketTwo % 10 == 3)
BP += (Byte)(1 * Multiplier);
}
}
BP += (Byte)(i.Plus * Multiplier);
}
}
}
}
BP += (Byte)e.NobilityRank;
BP += (Byte)(e.Reborn * 5);
BP += (Byte)GuildSharedBp;
BP += (Byte)ClanSharedBp;
return BP;
}