diff --git a/server/gameserver/ability.cc b/server/gameserver/ability.cc index 7875a7f8..1cb15b88 100644 --- a/server/gameserver/ability.cc +++ b/server/gameserver/ability.cc @@ -708,6 +708,7 @@ std::vector Ability::GMShowAttrs() { std::vector strings; { + std::vector tmp_strings; int attr_id = 0; for (auto& tuple : attr_abs_) { list_head* head = &std::get<1>(tuple); @@ -724,7 +725,30 @@ std::vector Ability::GMShowAttrs() } if (i > 0) { data += "]"; - strings.push_back(data); + tmp_strings.push_back(data); + } + ++attr_id; + } + } + { + std::vector 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; }