1
This commit is contained in:
parent
084f8eb9a5
commit
bc585e9467
@ -407,7 +407,7 @@ void Creature::RecalcBuffAttr()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (buff.add_frameno == room->GetFrameNo() ||
|
if (buff.add_frameno == room->GetFrameNo() &&
|
||||||
attr_type == kHAT_MaxHp) {
|
attr_type == kHAT_MaxHp) {
|
||||||
need_refresh_hp = true;
|
need_refresh_hp = true;
|
||||||
}
|
}
|
||||||
@ -1186,9 +1186,6 @@ void Creature::StartAction(ActionType_e action_type,
|
|||||||
if (HasBuffEffect(kBET_Camouflage)) {
|
if (HasBuffEffect(kBET_Camouflage)) {
|
||||||
RemoveBuffByEffectId(kBET_Camouflage);
|
RemoveBuffByEffectId(kBET_Camouflage);
|
||||||
}
|
}
|
||||||
if (action_type == AT_Rescue) {
|
|
||||||
TryAddBuff(this, kRescueBuffId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Creature::CancelAction()
|
void Creature::CancelAction()
|
||||||
|
@ -781,6 +781,7 @@ void Player::HumanInteraction(Human* hum)
|
|||||||
if (hum->GetActionType() == AT_Rescue) {
|
if (hum->GetActionType() == AT_Rescue) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
hum->TryAddBuff(this, kRescueBuffId);
|
||||||
int downed_relive_time = MetaMgr::Instance()->GetSysParamAsInt("downed_relive_time") * 1000;
|
int downed_relive_time = MetaMgr::Instance()->GetSysParamAsInt("downed_relive_time") * 1000;
|
||||||
downed_relive_time -= GetAbility()->GetAttrAbs(kHAT_RescueTime);
|
downed_relive_time -= GetAbility()->GetAttrAbs(kHAT_RescueTime);
|
||||||
downed_relive_time = std::max(1000, downed_relive_time);
|
downed_relive_time = std::max(1000, downed_relive_time);
|
||||||
|
@ -213,12 +213,17 @@ void Trigger::TraverseCondBuffs(int cond, std::function<void (Buff*, bool&)> fun
|
|||||||
|
|
||||||
void Trigger::TriggeCondBuffAll(int cond)
|
void Trigger::TriggeCondBuffAll(int cond)
|
||||||
{
|
{
|
||||||
|
std::shared_ptr<Ability> old_context_ability = owner_->context_ability;
|
||||||
|
a8::Vec2 old_context_pos = owner_->context_pos;
|
||||||
|
owner_->context_pos = owner_->GetPos();
|
||||||
TraverseCondBuffs
|
TraverseCondBuffs
|
||||||
(cond,
|
(cond,
|
||||||
[this, cond] (Buff* buff, bool& stop)
|
[this, cond] (Buff* buff, bool& stop)
|
||||||
{
|
{
|
||||||
AddBuffs(cond, buff->meta->param4_int_list);
|
AddBuffs(cond, buff->meta->param4_int_list);
|
||||||
});
|
});
|
||||||
|
owner_->context_pos = old_context_pos;
|
||||||
|
owner_->context_ability = old_context_ability;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Trigger::ActiveBuff(MetaData::Buff* buff_meta)
|
void Trigger::ActiveBuff(MetaData::Buff* buff_meta)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user