This commit is contained in:
aozhiwei 2021-08-05 09:43:47 +00:00
parent 232ecc1981
commit 2bf97f341f
3 changed files with 15 additions and 0 deletions

View File

@ -2565,3 +2565,15 @@ Hero* Creature::InternalSummonHero(MetaData::Player* hero_meta, a8::Vec2 dir, a8
} }
return nullptr; return nullptr;
} }
std::string Creature::DebugOutBuffList()
{
std::string data;
for (auto& itr : buff_list_) {
data += a8::Format("buffid:%d effect:%d\n",
{
});
}
return data;
}

View File

@ -211,6 +211,7 @@ class Creature : public MoveableEntity
void RefreshHP(); void RefreshHP();
void TraverseBuff(std::function<void (Buff*, bool&)> func); void TraverseBuff(std::function<void (Buff*, bool&)> func);
long long GetCollisionTimes() { return collision_times_; }; long long GetCollisionTimes() { return collision_times_; };
std::string DebugOutBuffList();
protected: protected:

View File

@ -1241,6 +1241,8 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
float abs_val = GetAbility()->GetAttrAbs(attr_id); float abs_val = GetAbility()->GetAttrAbs(attr_id);
float rate_val = GetAbility()->GetAttrRate(attr_id); float rate_val = GetAbility()->GetAttrRate(attr_id);
SendDebugMsg(a8::Format("attr_id:%d abs_val:%f rate_val:%f", {attr_id, abs_val, rate_val})); SendDebugMsg(a8::Format("attr_id:%d abs_val:%f rate_val:%f", {attr_id, abs_val, rate_val}));
} else if (cmd == "bufflist") {
SendDebugMsg(DebugOutBuffList());
} }
} }