diff --git a/server/gameserver/ability.cc b/server/gameserver/ability.cc index 8a6f010e..7a4fff35 100644 --- a/server/gameserver/ability.cc +++ b/server/gameserver/ability.cc @@ -400,7 +400,38 @@ std::vector Ability::GMShowAttrs() } } } - return strings; + { + std::vector 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)