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