1
This commit is contained in:
parent
16eca7d05e
commit
c8f6cd52ce
@ -225,6 +225,11 @@ void Ability::RecalcAttrAddition(int attr_id)
|
|||||||
} else if (IsValidHumanVirtualAttr(attr_id)) {
|
} else if (IsValidHumanVirtualAttr(attr_id)) {
|
||||||
std::get<0>(vattr_add_[attr_id - kHVAT_Begin]) = new_val;
|
std::get<0>(vattr_add_[attr_id - kHVAT_Begin]) = new_val;
|
||||||
}
|
}
|
||||||
|
owner_.Get()->GetNetData()->RecalcMaxHP();
|
||||||
|
owner_.Get()->GetNetData()->RecalcAttack();
|
||||||
|
owner_.Get()->GetNetData()->RecalcDef();
|
||||||
|
owner_.Get()->GetNetData()->RecalcBlock();
|
||||||
|
owner_.Get()->GetNetData()->RecalcCrit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ability::RecalcAttrRuduce(int attr_id)
|
void Ability::RecalcAttrRuduce(int attr_id)
|
||||||
@ -275,6 +280,11 @@ void Ability::RecalcAttrRuduce(int attr_id)
|
|||||||
} else if (IsValidHumanVirtualAttr(attr_id)) {
|
} else if (IsValidHumanVirtualAttr(attr_id)) {
|
||||||
std::get<0>(vattr_dec_[attr_id - kHVAT_Begin]) = new_val;
|
std::get<0>(vattr_dec_[attr_id - kHVAT_Begin]) = new_val;
|
||||||
}
|
}
|
||||||
|
owner_.Get()->GetNetData()->RecalcMaxHP();
|
||||||
|
owner_.Get()->GetNetData()->RecalcAttack();
|
||||||
|
owner_.Get()->GetNetData()->RecalcDef();
|
||||||
|
owner_.Get()->GetNetData()->RecalcBlock();
|
||||||
|
owner_.Get()->GetNetData()->RecalcCrit();
|
||||||
}
|
}
|
||||||
|
|
||||||
float Ability::GetAttrAddition(int attr_id)
|
float Ability::GetAttrAddition(int attr_id)
|
||||||
|
@ -234,6 +234,10 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
|||||||
float value = a8::XValue(cmds[3]).GetDouble();
|
float value = a8::XValue(cmds[3]).GetDouble();
|
||||||
if (target) {
|
if (target) {
|
||||||
target->GetAbility()->AddAttr(attr_id, value);
|
target->GetAbility()->AddAttr(attr_id, value);
|
||||||
|
std::vector<std::string> strings = target->GetAbility()->GMShowAttrs();
|
||||||
|
for (auto& str : strings) {
|
||||||
|
SendDebugMsg("数值: " + str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (cmd == "del_attr") {
|
} else if (cmd == "del_attr") {
|
||||||
@ -244,6 +248,10 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
|||||||
int idx = a8::XValue(cmds[3]);
|
int idx = a8::XValue(cmds[3]);
|
||||||
if (target) {
|
if (target) {
|
||||||
target->GetAbility()->GMDelAttr(attr_id, idx);
|
target->GetAbility()->GMDelAttr(attr_id, idx);
|
||||||
|
std::vector<std::string> strings = target->GetAbility()->GMShowAttrs();
|
||||||
|
for (auto& str : strings) {
|
||||||
|
SendDebugMsg("数值: " + str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (cmd == "clear_attr") {
|
} else if (cmd == "clear_attr") {
|
||||||
@ -252,6 +260,10 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
|||||||
room->GetCreatureByUniId(a8::XValue(cmds[1]).GetInt());
|
room->GetCreatureByUniId(a8::XValue(cmds[1]).GetInt());
|
||||||
if (target) {
|
if (target) {
|
||||||
target->GetAbility()->GMClearAttr();
|
target->GetAbility()->GMClearAttr();
|
||||||
|
std::vector<std::string> strings = target->GetAbility()->GMShowAttrs();
|
||||||
|
for (auto& str : strings) {
|
||||||
|
SendDebugMsg("数值: " + str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (cmd == "show_attrs") {
|
} else if (cmd == "show_attrs") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user