This commit is contained in:
aozhiwei 2024-01-05 18:41:40 +08:00
parent caecb36d9c
commit 25975d66da

View File

@ -115,6 +115,7 @@ Ability::Ability(CreatureWeakPtr owner)
std::get<0>(tuple) = 0.0f;
INIT_LIST_HEAD(&std::get<1>(tuple));
}
owner_ = owner;
}
Ability::~Ability()
@ -686,17 +687,17 @@ void Ability::GMClearGrowAttr(int type)
std::vector<std::string> Ability::GMShowAttrs()
{
std::vector<std::string> strings;
strings.push_back(a8::Format("curr_hp:%f max_hp:%f atk:%f def:%f block:%f crit:%f",
{
owner_.Get()->GetHP(),
owner_.Get()->GetNetData()->GetMaxHP(),
owner_.Get()->GetNetData()->GetAttack(),
owner_.Get()->GetNetData()->GetDef(),
owner_.Get()->GetNetData()->GetBlock(),
owner_.Get()->GetNetData()->GetCrit(),
}));
{
std::vector<std::string> tmp_strings;
tmp_strings.push_back(a8::Format("curr_hp:%f max_hp:%f atk:%f def:%f block:%f crit:%f",
{
owner_.Get()->GetHP(),
owner_.Get()->GetNetData()->GetMaxHP(),
owner_.Get()->GetNetData()->GetAttack(),
owner_.Get()->GetNetData()->GetDef(),
owner_.Get()->GetNetData()->GetBlock(),
owner_.Get()->GetNetData()->GetCrit(),
}));
int attr_id = 0;
for (auto& tuple : attr_abs_) {
list_head* head = &std::get<1>(tuple);