添加被救援buff
This commit is contained in:
parent
364642ce46
commit
096d7a8086
@ -14,9 +14,10 @@ const int kTraceBuffId = 7011;
|
||||
const int kInMountainTopBuffId = 7014;
|
||||
const int kDownBuffId = 7015;
|
||||
const int kPoisioningBuffId = 7016;
|
||||
const int kRescueBuffId = 7017;
|
||||
const int kRescuerBuffId = 7017;
|
||||
const int kVertigoBuffId = 7018;
|
||||
const int kPeaceModeBuffId = 7019;
|
||||
const int kInRescueBuffId = 7020;
|
||||
const int kPullToWalkableBuffId = 8003;
|
||||
const int kDiveBuffId = 8054;
|
||||
const int kInvincibleBuffId = 1005;
|
||||
@ -68,7 +69,7 @@ enum BuffEffectType_e
|
||||
kBET_AddInventory = 42, //扩充库存
|
||||
kBET_Down = 43, //倒下
|
||||
kBET_Poisoning = 44, //中毒(毒圈中)
|
||||
kBET_Rescue = 45, //救援
|
||||
kBET_Rescuer = 45, //救人中(救人方)
|
||||
kBET_AddCarBuff = 46, //给载具加buff
|
||||
kBET_RemoveCarBuff = 47, //移除载具身上的buff
|
||||
kBET_BulletThrough = 48, //穿透
|
||||
@ -101,6 +102,7 @@ enum BuffEffectType_e
|
||||
kBET_ReverseMove = 74, //人物反向移动
|
||||
kBET_MachineGun = 75, //机枪
|
||||
kBET_HoldShield = 76, //手持盾牌
|
||||
kBET_InRescue = 77, //被救援中(被就方)
|
||||
|
||||
kBET_End
|
||||
};
|
||||
|
@ -1644,9 +1644,10 @@ void Creature::CancelAction()
|
||||
hum->CancelAction();
|
||||
}
|
||||
}
|
||||
RemoveBuffByEffectId(kBET_Rescuer);
|
||||
}
|
||||
if (action_type == AT_Rescue) {
|
||||
RemoveBuffById(kRescueBuffId);
|
||||
RemoveBuffByEffectId(kBET_InRescue);
|
||||
}
|
||||
ResetAction();
|
||||
}
|
||||
|
@ -1847,7 +1847,7 @@ void Human::UpdateAction()
|
||||
break;
|
||||
case AT_Rescue:
|
||||
{
|
||||
RemoveBuffById(kRescueBuffId);
|
||||
RemoveBuffByEffectId(kBET_InRescue);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -3166,6 +3166,7 @@ void Human::ProcUseItemAction()
|
||||
|
||||
void Human::ProcReliveAction()
|
||||
{
|
||||
RemoveBuffByEffectId(kBET_Rescuer);
|
||||
Entity* entity = room->GetEntityByUniId(action_target_id);
|
||||
if (!entity->IsEntityType(ET_Player)) {
|
||||
return;
|
||||
|
@ -594,7 +594,8 @@ void Player::HumanInteraction(Human* hum)
|
||||
if (hum->GetActionType() == AT_Rescue) {
|
||||
return;
|
||||
}
|
||||
TryAddBuff(this, kRescueBuffId);
|
||||
TryAddBuff(this, kRescuerBuffId);
|
||||
hum->TryAddBuff(this, kInRescueBuffId);
|
||||
int downed_relive_time = MetaMgr::Instance()->GetSysParamAsInt("downed_relive_time") * 1000;
|
||||
downed_relive_time -= GetAbility()->GetAttrAbs(kHAT_RescueTime);
|
||||
downed_relive_time = std::max(0, downed_relive_time);
|
||||
@ -939,7 +940,7 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
|
||||
std::vector<int> mons = std::vector<int>{hero_id};
|
||||
room->ShuaMon(GetPos(), mons, 100);
|
||||
} else if (cmd == "jiuyuan") {
|
||||
TryAddBuff(this, kRescueBuffId);
|
||||
TryAddBuff(this, kRescuerBuffId);
|
||||
int downed_relive_time = MetaMgr::Instance()->GetSysParamAsInt("downed_relive_time") * 1000;
|
||||
downed_relive_time -= GetAbility()->GetAttrAbs(kHAT_RescueTime);
|
||||
downed_relive_time = std::max(0, downed_relive_time);
|
||||
|
Loading…
x
Reference in New Issue
Block a user