This commit is contained in:
aozhiwei 2024-01-15 17:20:31 +08:00
parent dd569315b2
commit c31c48ec48
2 changed files with 12 additions and 1 deletions

View File

@ -398,6 +398,15 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
&xtimer_attacher);
} else if (cmd == "fast_forward") {
room->GMFastForward();
} else if (cmd == "winexp" && cmds.size() >= 1) {
float exp = a8::XValue(cmds[1]).GetDouble();
if (exp > 0) {
WinExp(exp);
}
std::vector<std::string> strings = GetAbility()->GMShowAttrs();
for (auto& str : strings) {
SendDebugMsg("数值: " + str);
}
} else if (cmd == "findpath" && cmds.size() >= 3) {
float x = a8::XValue(cmds[1]).GetDouble();
float y = a8::XValue(cmds[2]).GetDouble();

View File

@ -641,7 +641,9 @@ void BattleDataContext::GetHeroLvQuality(long long& hero_uniid, int& hero_lv, in
quality = hero_dto->Get("quality", 0).GetInt();
}
}
hero_lv = owner_.Get()->GetHeroLevel();
if (owner_.Get()) {
hero_lv = owner_.Get()->GetHeroLevel();
}
}
void BattleDataContext::GetWeaponLvQuality(long long weapon_uniid, int& weapon_lv, int& quality)