This commit is contained in:
aozhiwei 2021-08-26 16:31:44 +08:00
parent 167d9b6fac
commit 9a3d356888

View File

@ -1398,17 +1398,17 @@ void Player::_CMWatchWar(f8::MsgHdr& hdr, const cs::CMWatchWar& msg)
} }
auto cb = auto cb =
[] (const a8::XParams& param) { [] (const a8::XParams& param) {
#if 0 Player* hum = (Player*)param.sender.GetUserData();
cs::SMWatchWar respmsg; cs::SMWatchWar respmsg;
Human* target = room->GetWatchWarTarget(this); Human* target = hum->room->GetWatchWarTarget(hum);
if (target) { if (target) {
SendNotifyMsg(respmsg); hum->SendNotifyMsg(respmsg);
hdr.hum->FollowTarget(target); hum->FollowTarget(target);
} else { } else {
respmsg.set_error_code(1); respmsg.set_error_code(1);
SendNotifyMsg(respmsg); hum->SendNotifyMsg(respmsg);
} }
#endif
}; };
watch_war_req_timer_ = room->xtimer.AddDeadLineTimerAndAttach watch_war_req_timer_ = room->xtimer.AddDeadLineTimerAndAttach
( (