1
This commit is contained in:
parent
61a53afec3
commit
067cd9ee56
@ -199,40 +199,6 @@ void Ability::Clear()
|
||||
|
||||
}
|
||||
|
||||
void Ability::AddSpeedAddition(float rate)
|
||||
{
|
||||
speed_addition_rate_ += rate;
|
||||
++speed_addition_times_;
|
||||
}
|
||||
|
||||
void Ability::DelSpeedAddition(float rate)
|
||||
{
|
||||
speed_addition_rate_ -= rate;
|
||||
speed_addition_rate_ = std::max(0.0f, speed_addition_rate_);
|
||||
--speed_addition_times_;
|
||||
#ifdef DEBUG
|
||||
if (speed_addition_times_ < 0) {
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
float Ability::GetSpeedAddition()
|
||||
{
|
||||
return speed_addition_rate_;
|
||||
}
|
||||
|
||||
int Ability::GetSpeedAdditionTimes()
|
||||
{
|
||||
return speed_addition_times_;
|
||||
}
|
||||
|
||||
void Ability::AddDmgRuduce(float rate)
|
||||
{
|
||||
dmg_ruduce_rate_ += rate;
|
||||
++dmg_ruduce_times_;
|
||||
}
|
||||
|
||||
void Ability::DelDmgRuduce(float rate)
|
||||
{
|
||||
dmg_ruduce_rate_ -= rate;
|
||||
@ -409,28 +375,6 @@ int Ability::GetDisableUseSkillTimes()
|
||||
return disable_useskill_times_;
|
||||
}
|
||||
|
||||
void Ability::SetFixedSpeed(float speed)
|
||||
{
|
||||
fixed_speed_ = speed;
|
||||
++fixed_speed_times_;
|
||||
}
|
||||
|
||||
void Ability::UnSetFixedSpeed()
|
||||
{
|
||||
fixed_speed_ = 0.0f;
|
||||
fixed_speed_times_ = 0;
|
||||
}
|
||||
|
||||
int Ability::GetFixedSpeedTimes()
|
||||
{
|
||||
return fixed_speed_times_;
|
||||
}
|
||||
|
||||
float Ability::GetFixedSped()
|
||||
{
|
||||
return fixed_speed_;
|
||||
}
|
||||
|
||||
AttrAbsHandle Ability::AddAttrAbs(int attr_id, float value)
|
||||
{
|
||||
if (IsValidHumanAttr(attr_id)) {
|
||||
@ -660,3 +604,9 @@ float Ability::GetAttrRuduce(int attr_id)
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void Ability::AddDmgRuduce(float rate)
|
||||
{
|
||||
dmg_ruduce_rate_ += rate;
|
||||
++dmg_ruduce_times_;
|
||||
}
|
||||
|
@ -16,11 +16,6 @@ class Ability
|
||||
public:
|
||||
Ability(CreatureWeakPtr owner);
|
||||
|
||||
void AddSpeedAddition(float rate);
|
||||
void DelSpeedAddition(float rate);
|
||||
float GetSpeedAddition();
|
||||
int GetSpeedAdditionTimes();
|
||||
|
||||
void AddDmgRuduce(float rate);
|
||||
void DelDmgRuduce(float rate);
|
||||
float GetDmgRuduce();
|
||||
@ -53,11 +48,6 @@ class Ability
|
||||
void DecDisableUseSkillTimes();
|
||||
int GetDisableUseSkillTimes();
|
||||
|
||||
void SetFixedSpeed(float speed);
|
||||
void UnSetFixedSpeed();
|
||||
int GetFixedSpeedTimes();
|
||||
float GetFixedSped();
|
||||
|
||||
AttrAbsHandle AddAttrAbs(int attr_id, float value);
|
||||
void RemoveAttrAbs(AttrAbsHandle handle);
|
||||
AttrRateHandle AddAttrRate(int attr_id, float value);
|
||||
@ -89,9 +79,6 @@ private:
|
||||
std::array<std::tuple<float, list_head>, kHVAT_End - kHVAT_Begin> vattr_add_ = {};
|
||||
std::array<std::tuple<float, list_head>, kHVAT_End - kHVAT_Begin> vattr_dec_ = {};
|
||||
|
||||
int speed_addition_times_ = 0;
|
||||
float speed_addition_rate_ = 0;
|
||||
|
||||
int dmg_ruduce_times_ = 0;
|
||||
float dmg_ruduce_rate_ = 0;
|
||||
|
||||
@ -109,8 +96,5 @@ private:
|
||||
|
||||
std::map<int, int> immune_tags_;
|
||||
|
||||
int fixed_speed_times_ = 0.0f;
|
||||
float fixed_speed_ = 0.0f;
|
||||
|
||||
friend class PBUtils;
|
||||
};
|
||||
|
@ -52,12 +52,6 @@ void CallFuncBuff::Activate()
|
||||
ProcMarkTag();
|
||||
}
|
||||
break;
|
||||
case BuffCallFunc_e::kSpeedAddition:
|
||||
{
|
||||
hold_param2_ = meta->GetBuffParam2(this);
|
||||
owner->GetAbility()->AddSpeedAddition(hold_param2_);
|
||||
}
|
||||
break;
|
||||
case BuffCallFunc_e::kRemoveBuff:
|
||||
{
|
||||
ProcRemoveBuff();
|
||||
@ -69,12 +63,6 @@ void CallFuncBuff::Activate()
|
||||
ProcFlashMove();
|
||||
}
|
||||
break;
|
||||
case BuffCallFunc_e::kSetSpeed:
|
||||
{
|
||||
hold_param2_ = meta->GetBuffParam2(this);
|
||||
owner->GetAbility()->SetFixedSpeed(hold_param2_);
|
||||
}
|
||||
break;
|
||||
case BuffCallFunc_e::kAddEnergyShield:
|
||||
{
|
||||
hold_param2_ = meta->GetBuffParam2(this);
|
||||
@ -128,16 +116,6 @@ void CallFuncBuff::Deactivate()
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BuffCallFunc_e::kSpeedAddition:
|
||||
{
|
||||
owner->GetAbility()->DelSpeedAddition(hold_param2_);
|
||||
}
|
||||
break;
|
||||
case BuffCallFunc_e::kSetSpeed:
|
||||
{
|
||||
owner->GetAbility()->UnSetFixedSpeed();
|
||||
}
|
||||
break;
|
||||
case BuffCallFunc_e::kDmgRuduce:
|
||||
{
|
||||
owner->GetAbility()->DelDmgRuduce(hold_param2_);
|
||||
|
@ -7,10 +7,8 @@ A8_DECLARE_CLASS_ENUM(BuffCallFunc_e, int,
|
||||
kInternalRangeAddBuff = 3,
|
||||
kDecHp = 4,
|
||||
kMarkTag = 5,
|
||||
kSpeedAddition = 6,
|
||||
kRemoveBuff = 7,
|
||||
kFlashMove = 8,
|
||||
kSetSpeed = 9,
|
||||
kAddEnergyShield = 10,
|
||||
kAddHp = 11,
|
||||
kFlashMoveToPos = 12,
|
||||
|
@ -277,7 +277,11 @@ namespace mt
|
||||
|
||||
void Buff::Init2()
|
||||
{
|
||||
if (buff_effect() == 7 && _int_buff_param1 == 1) {
|
||||
if (buff_effect() == 7 &&
|
||||
(_int_buff_param1 == 2 ||
|
||||
_int_buff_param1 == 6 ||
|
||||
_int_buff_param1 == 9
|
||||
)) {
|
||||
abort();
|
||||
}
|
||||
switch (buff_effect()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user