diff --git a/server/gameserver/commands.cc b/server/gameserver/commands.cc index 15ccee94..9bafd81b 100644 --- a/server/gameserver/commands.cc +++ b/server/gameserver/commands.cc @@ -227,7 +227,7 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) } } } else if (cmd == "add_attr") { - if (cmds.size() > 4) { + if (cmds.size() > 3) { Creature* target = a8::XValue(cmds[1]).GetInt() <= 0 ? this : room->GetCreatureByUniId(a8::XValue(cmds[1]).GetInt()); int attr_id = a8::XValue(cmds[2]); @@ -241,7 +241,7 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) } } } else if (cmd == "del_attr") { - if (cmds.size() > 4) { + if (cmds.size() > 3) { Creature* target = a8::XValue(cmds[1]).GetInt() <= 0 ? this : room->GetCreatureByUniId(a8::XValue(cmds[1]).GetInt()); int attr_id = a8::XValue(cmds[2]); diff --git a/server/gameserver/netdata.cc b/server/gameserver/netdata.cc index 71df953d..a08a8d50 100644 --- a/server/gameserver/netdata.cc +++ b/server/gameserver/netdata.cc @@ -162,7 +162,7 @@ public: float vHealthRateIn_Add = ability->GetAttr(kNHAT_vHealthRateIn); //buff或者养成的属性 vHealthRateIn = (1 + vHealthRateIn) * (1 + vHealthRateIn_Add) - 1; - hp_ = (hero_meta->GetBasicMeta()->vOrigHealth() * (1 + pHealth / hero_meta->GetBasicMeta()->pBaseHealth() + vHealthAm)) * + hp_ = (hero_meta->GetBasicMeta()->vOrigHealth() * (1 + pHealth / hero_meta->GetBasicMeta()->pBaseHealth()) + vHealthAm) * (1 + vHealthRateSe) * (1 + vHealthRateIn); }