This commit is contained in:
aozhiwei 2023-03-13 15:11:17 +08:00
parent 48157321db
commit 9805565612
4 changed files with 10 additions and 14 deletions

View File

@ -358,7 +358,6 @@ void Buff::Activate()
{
const mt::Buff* buff_meta = meta;
switch (meta->buff_effect()) {
case kBET_ChgAttr:
case kBET_Car:
case kBET_CrazyMode:
{

View File

@ -598,8 +598,7 @@ void Creature::RecalcBuffAttr()
ability_->Clear();
bool need_refresh_hp = false;
for (auto& buff : buff_list_) {
if (buff->meta->buff_effect() == kBET_ChgAttr ||
buff->meta->buff_effect() == kBET_Car ||
if (buff->meta->buff_effect() == kBET_Car ||
buff->meta->buff_effect() == kBET_CrazyMode) {
int attr_type = (int)buff->meta->_buff_param1;
int calc_type = (int)buff->meta->_buff_param2;

View File

@ -251,16 +251,6 @@ namespace mt
void Buff::Init2()
{
switch (buff_effect()) {
case kBET_ChgAttr:
{
assert(_int_buff_param2 == 1 || _int_buff_param2 == 2);
if (_int_buff_param2 == 2) {
if (buff_param3().find('.') != std::string::npos) {
A8_ABORT();
}
}
}
break;
case kBET_SummonHero:
{
for (auto& info : _hero_infos) {

View File

@ -20,7 +20,8 @@ A8_DECLARE_CLASS_ENUM(SkillNumberLispField_e, int,
range2,
range3,
time,
cd
cd,
number
);
namespace mt
@ -181,6 +182,11 @@ namespace mt
return _float_cd;
}
break;
case SkillNumberLispField_e::number:
{
return number();
}
break;
default:
{
abort();
@ -217,6 +223,8 @@ namespace mt
return (int)SkillNumberLispField_e::time;
} else if (name == "${skillNumber.cd}") {
return (int)SkillNumberLispField_e::cd;
} else if (name == "${skillNumber.number}") {
return (int)SkillNumberLispField_e::number;
}
return -1;
}