熊,死亡自爆时,不算真死。所以ko和结算要等到死亡爆炸结束后呈现,血为0时要播放自爆前的状态,后自爆。
This commit is contained in:
parent
60ca84b474
commit
e4d8ece610
@ -88,6 +88,7 @@ class Creature : public MoveableEntity
|
||||
bool playing_skill = false;
|
||||
int power_idx = -1;
|
||||
std::function<void(Buff*)> on_add_buff;
|
||||
int over_delay_time = 0;
|
||||
|
||||
Weapon second_weapon;
|
||||
a8::Vec2 context_pos;
|
||||
|
@ -18,6 +18,7 @@ struct HttpProxyRequest
|
||||
f8::AsyncHttpOnErrorFunc on_error;
|
||||
std::string url;
|
||||
a8::XObject url_params;
|
||||
long long add_tick = 0;
|
||||
};
|
||||
|
||||
static void _ProxyCallback(f8::JsonHttpRequest* request)
|
||||
@ -72,6 +73,7 @@ std::string HttpProxy::HttpGet(a8::XParams param,
|
||||
request->on_error = on_error;
|
||||
request->url = url;
|
||||
request->url_params = url_params;
|
||||
request->add_tick = a8::XGetTickCount();
|
||||
if (request_hash_.find(request->req_id) != request_hash_.end()) {
|
||||
abort();
|
||||
}
|
||||
@ -95,9 +97,11 @@ std::string HttpProxy::HttpGet(a8::XParams param,
|
||||
{
|
||||
HttpProxyRequest* req = HttpProxy::Instance()->GetRequest(param.sender.GetString());
|
||||
if (req) {
|
||||
long long cost_time = a8::XGetTickCount() - req->add_tick;
|
||||
#ifdef DEBUG
|
||||
a8::UdpLog::Instance()->Debug("ProxyHttpGet ok url:%s params:%s",
|
||||
a8::UdpLog::Instance()->Debug("ProxyHttpGet ok cost_time:%d url:%s params:%s",
|
||||
{
|
||||
cost_time,
|
||||
req->url,
|
||||
req->url_params.ToJsonStr(),
|
||||
});
|
||||
@ -108,8 +112,10 @@ std::string HttpProxy::HttpGet(a8::XParams param,
|
||||
{
|
||||
HttpProxyRequest* req = HttpProxy::Instance()->GetRequest(param.sender.GetString());
|
||||
if (req) {
|
||||
a8::UdpLog::Instance()->Warning("ProxyHttpGet error url:%s params:%s response:%s",
|
||||
long long cost_time = a8::XGetTickCount() - req->add_tick;
|
||||
a8::UdpLog::Instance()->Warning("ProxyHttpGet error cost_time:%d url:%s params:%s response:%s",
|
||||
{
|
||||
cost_time,
|
||||
req->url,
|
||||
req->url_params.ToJsonStr(),
|
||||
response
|
||||
|
@ -1894,8 +1894,25 @@ void Human::SendGameOver()
|
||||
} else {
|
||||
if (!sending_battlereport_) {
|
||||
sending_battlereport_ = true;
|
||||
if (over_delay_time > 0) {
|
||||
room->xtimer.AddDeadLineTimerAndAttach
|
||||
(over_delay_time / FRAME_RATE_MS,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Human* hum = (Human*)param.sender.GetUserData();
|
||||
hum->SendBattleReport();
|
||||
hum->over_delay_time = 0;
|
||||
},
|
||||
&xtimer_attacher.timer_list_,
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
});
|
||||
} else {
|
||||
SendBattleReport();
|
||||
}
|
||||
}
|
||||
if (!is_game_end_) {
|
||||
GameLog::Instance()->GameEnd((Player*)this);
|
||||
is_game_end_ = true;
|
||||
|
@ -516,6 +516,9 @@ void Skill::ProcSWZB()
|
||||
SkillHelper::GetSwzbEffect(meta),
|
||||
0
|
||||
);
|
||||
if (!meta->phases.empty()) {
|
||||
owner->over_delay_time = meta->phases.at(0).param1;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
{
|
||||
std::string dbg_msg = a8::Format
|
||||
|
Loading…
x
Reference in New Issue
Block a user