This commit is contained in:
aozhiwei 2024-01-09 10:51:25 +08:00
parent b00b313f21
commit a699c68ead

View File

@ -400,7 +400,38 @@ std::vector<std::string> Ability::GMShowAttrs()
}
}
}
return strings;
{
std::vector<std::string> tmp_strings;
int attr_id = 0;
for (auto& list : vattr_list_) {
list_head* head = &list;
list_head* pos = nullptr;
list_head* next = nullptr;
std::string data = a8::Format("attr_id:%d value:%f [", {attr_id, GetAttr(attr_id)});
int i = 0;
list_for_each_safe(pos, next, head) {
AttrAddition* e = list_entry(pos,
AttrAddition,
entry);
data += "" + a8::XValue(e->value).GetString() + ",";
++i;
}
if (i > 0) {
data += "]";
tmp_strings.push_back(data);
}
++attr_id;
}
strings.push_back("虚属性:");
if (tmp_strings.empty()) {
strings.push_back("");
} else {
for (auto& str : tmp_strings) {
strings.push_back(str);
}
}
}
return strings;
}
void Ability::IncSwitch(int type)