被救人界面显示“救援中”提示信息
This commit is contained in:
parent
550b53fd3f
commit
b666fee0ee
@ -421,6 +421,14 @@ void Human::StartAction(ActionType_e action_type,
|
||||
|
||||
void Human::CancelAction()
|
||||
{
|
||||
if (action_type == AT_Relive) {
|
||||
Entity* entity = room->GetEntityByUniId(action_target_id);
|
||||
if (entity->entity_type != ET_Player) {
|
||||
Human* hum = (Human*)entity;
|
||||
a8::UnSetBitFlag(hum->status, HS_Rescue);
|
||||
hum->SyncAroundPlayers();
|
||||
}
|
||||
}
|
||||
ResetAction();
|
||||
}
|
||||
|
||||
@ -1278,6 +1286,12 @@ void Human::FillBodyState(::google::protobuf::RepeatedPtrField<::cs::MFBodyState
|
||||
state->set_left_time(std::max(0, skill_meta->i->last_time() * 1000 - passed_time));
|
||||
state->set_lasting_time(skill_meta->i->last_time() * 1000);
|
||||
}
|
||||
if (a8::HasBitFlag(status, HS_Rescue)) {
|
||||
cs::MFBodyState* state = states->Add();
|
||||
state->set_state_type(HS_Rescue);
|
||||
state->set_left_time(0);
|
||||
state->set_lasting_time(0);
|
||||
}
|
||||
}
|
||||
|
||||
void Human::SummonHero()
|
||||
|
@ -24,6 +24,7 @@ enum HumanStatus
|
||||
HS_RecoverHP = 8,
|
||||
HS_ReflectDamage = 9,
|
||||
HS_SummonHero = 10,
|
||||
HS_Rescue = 20,
|
||||
HS_End
|
||||
};
|
||||
|
||||
@ -74,6 +75,7 @@ class Human : public Entity
|
||||
long long dead_frameno = 0;
|
||||
long long join_frameno = 0;
|
||||
int status = 0;
|
||||
long long rescue_frameno = 0;
|
||||
|
||||
Weapon default_weapon;
|
||||
std::vector<Weapon> weapons;
|
||||
|
@ -301,6 +301,7 @@ void Player::UpdateAction()
|
||||
return;
|
||||
}
|
||||
Human* hum = (Human*)entity;
|
||||
a8::UnSetBitFlag(hum->status, HS_Rescue);
|
||||
if (!hum->dead && hum->downed) {
|
||||
hum->health = MetaMgr::Instance()->GetSysParamAsInt("downed_relive_recover_hp");
|
||||
hum->downed = false;
|
||||
@ -309,8 +310,8 @@ void Player::UpdateAction()
|
||||
hum->downed_timer = nullptr;
|
||||
}
|
||||
++hum->stats.rescue_member;
|
||||
hum->SyncAroundPlayers();
|
||||
}
|
||||
hum->SyncAroundPlayers();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -782,6 +783,8 @@ void Player::HumanInteraction(Human* hum)
|
||||
if (!hum->downed) {
|
||||
return;
|
||||
}
|
||||
a8::SetBitFlag(hum->status, HS_Rescue);
|
||||
hum->rescue_frameno = room->frame_no;
|
||||
StartAction(
|
||||
AT_Relive,
|
||||
MetaMgr::Instance()->GetSysParamAsInt("downed_relive_time") * 1000,
|
||||
|
@ -555,6 +555,7 @@ message MFBodyState
|
||||
9: 反伤
|
||||
10: 分身
|
||||
|
||||
20: 救援中
|
||||
*/
|
||||
optional int32 state_type = 1;
|
||||
optional float left_time = 2; //剩余时间(单位毫秒)
|
||||
|
Loading…
x
Reference in New Issue
Block a user