1
This commit is contained in:
parent
5247c0f44e
commit
19dc2f68d2
@ -534,6 +534,7 @@ void Ability::RecalcAttrRuduce(int attr_id)
|
||||
}
|
||||
list_head* pos = nullptr;
|
||||
list_head* next = nullptr;
|
||||
bool inited = false;
|
||||
float new_val = 0.0f;
|
||||
list_for_each_safe(pos, next, head) {
|
||||
AttrRuduce* e = list_entry(pos,
|
||||
@ -547,7 +548,12 @@ void Ability::RecalcAttrRuduce(int attr_id)
|
||||
break;
|
||||
case kHVAT_Dmg:
|
||||
{
|
||||
new_val *= 1.0f - e->value;
|
||||
if (inited) {
|
||||
new_val *= 1.0f - e->value;
|
||||
} else {
|
||||
new_val = 1.0f - e->value;
|
||||
inited = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user