1
This commit is contained in:
parent
1d3e478239
commit
c7cdf891e7
@ -708,6 +708,7 @@ std::vector<std::string> Ability::GMShowAttrs()
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
{
|
||||
std::vector<std::string> tmp_strings;
|
||||
int attr_id = 0;
|
||||
for (auto& tuple : attr_abs_) {
|
||||
list_head* head = &std::get<1>(tuple);
|
||||
@ -724,7 +725,30 @@ std::vector<std::string> Ability::GMShowAttrs()
|
||||
}
|
||||
if (i > 0) {
|
||||
data += "]";
|
||||
strings.push_back(data);
|
||||
tmp_strings.push_back(data);
|
||||
}
|
||||
++attr_id;
|
||||
}
|
||||
}
|
||||
{
|
||||
std::vector<std::string> tmp_strings;
|
||||
int attr_id = 0;
|
||||
for (auto& tuple : attr_rate_) {
|
||||
list_head* head = &std::get<1>(tuple);
|
||||
list_head* pos = nullptr;
|
||||
list_head* next = nullptr;
|
||||
std::string data = a8::Format("百分比 attr_id:%d value:%f [", {attr_id, std::get<0>(tuple)});
|
||||
int i = 0;
|
||||
list_for_each_safe(pos, next, head) {
|
||||
AttrRate* e = list_entry(pos,
|
||||
AttrRate,
|
||||
entry);
|
||||
data += "" + a8::XValue(e->value).GetString() + ",";
|
||||
++i;
|
||||
}
|
||||
if (i > 0) {
|
||||
data += "]";
|
||||
tmp_strings.push_back(data);
|
||||
}
|
||||
++attr_id;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user