public void CalcFightSoul()
{
int nSoul = this.GetBaseAttr().level; //等级基本战斗力-
//神等级
nSoul += this.GetBaseAttr().godlevel;
//强化等级取全套装备最低的强化等级为战斗力加成
//
int nStrongLv = 0;
bool bAddStrongLv = true;
//装备战斗力-------------------------------------------------------------
for (int i = NetMsg.MsgItemInfo.ITEMPOSITION_HELMET; i < NetMsg.MsgItemInfo.ITEMPOSITION_SHOES + 1; i++)
{
GameStruct.RoleItemInfo info = GetItemSystem().GetEquipByPostion((byte)i);
if (info != null)
{
//装备品质加成 良品:1 上品:2 精品:3 极品:4 上品神器:5 精品神器:6 极品神器:7
String sQuaity = info.itemid.ToString();
int quaity = Convert.ToInt32(sQuaity.Substring(sQuaity.Length - 1));
nSoul += quaity;
//-------------------------------------------------------------
//打洞- 打一个洞得一点战斗力
nSoul += info.GetGemCount();
//镶嵌的宝石类型 16.战斗力+1 17.战斗力+3 18.战斗力+5
for (byte j = 0; j < info.GetGemCount(); j++)
{
byte gemtype = info.GetGemType(j);
if (gemtype >= 16 && gemtype <= 18)
{
switch (gemtype)
{
case 16: { nSoul += 1; break; }
case 17: { nSoul += 3; break; }
case 18: { nSoul += 5; break; }
}
}
}
//取最低的套件中的强化等级
if (bAddStrongLv)
{
if (nStrongLv == 0)
{
nStrongLv = info.GetStrongLevel();
}
else if (nStrongLv > info.GetStrongLevel())
{
nStrongLv = info.GetStrongLevel();
}
}
//符合装备穿戴等级- +1点战斗力
if (EquipOperation.Instance().IsAccordWithEquip(this.GetBaseAttr().level,this.GetBaseAttr().profession, (byte)i, info))
{
nSoul++;
}
//accord with
}
else //有一个部位没有装备- 不加强化等级战斗力了
{
bAddStrongLv = false;
}
}
nSoul += nStrongLv;
//爵位 设立数量 册封条件 战斗力分享
//王/女王 3 捐献榜第1-3名 6
//公爵 12 捐献榜第4-15名 5
//侯爵 35 捐献榜第16-50名 4
//伯爵 不限 捐献金额>=2亿金币 3
//子爵 不限 捐献金额>=1亿金币 2
//勋爵 不限 捐献金额>=3千万金币 1
GUANGJUELEVEL gjlv = this.GetGuanJue();
switch (gjlv)
{
case GUANGJUELEVEL.KING:
case GUANGJUELEVEL.QUEEN: { nSoul += 6; break; }
case GUANGJUELEVEL.DUKE: { nSoul += 5; break; }
case GUANGJUELEVEL.MARQUIS: { nSoul += 4; break; }
case GUANGJUELEVEL.EARL: { nSoul += 3; break; }
case GUANGJUELEVEL.VISCOUNT: { nSoul += 2; break; }
case GUANGJUELEVEL.LORD: { nSoul += 1; break; }
}
//圣耀符文
GameStruct.RoleItemInfo item_info = GetItemSystem().GetEquipByPostion(NetMsg.MsgItemInfo.ITEMPOSTION_RUB_SHENGYAOFUWEN);
if (item_info != null)
{
nSoul += item_info.GetStrongLevel() * 2; //追加战斗力宝石- 强化等级+战斗力=最终战斗力
}
//加伤害与减伤害暂时不实现功能- 只加战斗力
//帝龙之泪
item_info = GetItemSystem().GetEquipByPostion(NetMsg.MsgItemInfo.ITEMPOSTION_RUB_DILONGZHILEI);
if (item_info != null)
{
nSoul += item_info.GetStrongLevel();
}
//曙光战魂
item_info = GetItemSystem().GetEquipByPostion(NetMsg.MsgItemInfo.ITEMPOSTION_RUB_SHUGUANGZHANHUN);
if (item_info != null)
{
nSoul += item_info.GetStrongLevel();
}
//幻兽星级-------------------------------------
nSoul += this.GetEudemonSystem().CalcFightSoul();
mnFightSoul = nSoul;
}