1
This commit is contained in:
parent
a4cee4dfa2
commit
e5e2430047
@ -254,18 +254,22 @@ void Ability::RecalcAttrAddition(int attr_id)
|
||||
list_head* next = nullptr;
|
||||
float new_val = 0.0f;
|
||||
bool inited = false;
|
||||
list_for_each_safe(pos, next, head) {
|
||||
AttrAddition* e = list_entry(pos,
|
||||
AttrAddition,
|
||||
entry);
|
||||
if (IsMulCalc(attr_id)) {
|
||||
if (!inited) {
|
||||
new_val = 1;
|
||||
inited = true;
|
||||
if (attr_id == kHAT_vSpeedRateIn) {
|
||||
|
||||
} else {
|
||||
list_for_each_safe(pos, next, head) {
|
||||
AttrAddition* e = list_entry(pos,
|
||||
AttrAddition,
|
||||
entry);
|
||||
if (IsMulCalc(attr_id)) {
|
||||
if (!inited) {
|
||||
new_val = 1;
|
||||
inited = true;
|
||||
}
|
||||
new_val *= 1 + e->value;
|
||||
} else {
|
||||
new_val += e->value;
|
||||
}
|
||||
new_val *= 1 + e->value;
|
||||
} else {
|
||||
new_val += e->value;
|
||||
}
|
||||
}
|
||||
if (IsValidHumanAttr(attr_id)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user