This commit is contained in:
aozhiwei 2024-01-09 13:20:34 +08:00
parent c8f6cd52ce
commit 398941c8aa
2 changed files with 3 additions and 3 deletions

View File

@ -227,7 +227,7 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
} }
} }
} else if (cmd == "add_attr") { } else if (cmd == "add_attr") {
if (cmds.size() > 4) { if (cmds.size() > 3) {
Creature* target = a8::XValue(cmds[1]).GetInt() <= 0 ? this : Creature* target = a8::XValue(cmds[1]).GetInt() <= 0 ? this :
room->GetCreatureByUniId(a8::XValue(cmds[1]).GetInt()); room->GetCreatureByUniId(a8::XValue(cmds[1]).GetInt());
int attr_id = a8::XValue(cmds[2]); 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") { } else if (cmd == "del_attr") {
if (cmds.size() > 4) { if (cmds.size() > 3) {
Creature* target = a8::XValue(cmds[1]).GetInt() <= 0 ? this : Creature* target = a8::XValue(cmds[1]).GetInt() <= 0 ? this :
room->GetCreatureByUniId(a8::XValue(cmds[1]).GetInt()); room->GetCreatureByUniId(a8::XValue(cmds[1]).GetInt());
int attr_id = a8::XValue(cmds[2]); int attr_id = a8::XValue(cmds[2]);

View File

@ -162,7 +162,7 @@ public:
float vHealthRateIn_Add = ability->GetAttr(kNHAT_vHealthRateIn); //buff或者养成的属性 float vHealthRateIn_Add = ability->GetAttr(kNHAT_vHealthRateIn); //buff或者养成的属性
vHealthRateIn = (1 + vHealthRateIn) * (1 + vHealthRateIn_Add) - 1; 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); (1 + vHealthRateSe) * (1 + vHealthRateIn);
} }