This commit is contained in:
aozhiwei 2021-07-12 09:11:57 +00:00
parent 81cd0f68c9
commit 25483eef74
3 changed files with 40 additions and 12 deletions

View File

@ -111,6 +111,12 @@ enum InventorySlot_e
IS_END
};
enum SkillType_e
{
kActiveSkill = 1,
kPassiveSkill = 2
};
enum BuffTriggerType_e
{
kBTT_UseSkill = 1, //技能释放时触发

View File

@ -749,12 +749,30 @@ namespace MetaData
}
}
}
}
void Skill::Init2()
{
int skill_id = i->skill_id();
if (!(i->skill_type() == kActiveSkill || i->skill_type() == kPassiveSkill)) {
abort();
}
#if 0
if (!(i->use_method() == 1 || i->use_method() == 2 || i->use_method() == 3)) {
abort();
}
#endif
{
for (int buff_id : buff_list) {
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
if (!buff_meta) {
abort();
}
if (i->skill_type() == kPassiveSkill) {
if (buff_meta->i->trigger_type() != kBTT_UseSkill) {
abort();
}
}
auto itr = trigger_type_buffs.find(buff_meta->i->trigger_type());
if (itr != trigger_type_buffs.end()) {
itr->second.insert(buff_meta);
@ -765,11 +783,6 @@ namespace MetaData
}
}
void Skill::Init2()
{
}
bool Skill::IsTurnOverSkill()
{
return !phases.empty() && phases[0].func_id == kSkill_TurnOver;
@ -948,7 +961,22 @@ namespace MetaData
void Buff::Init2()
{
switch (i->buff_effect()) {
case kBET_ChgAttr:
{
assert(int_param2 == 1 || int_param2 == 2);
if (int_param2 == 2) {
if (i->buff_param3().find('.') != std::string::npos) {
abort();
}
}
}
break;
default:
{
}
break;
}
}
bool Buff::EffectCanStack()

View File

@ -10,12 +10,6 @@ namespace cs
class MFSkill;
}
enum SkillType_e
{
kActiveSkill = 1,
kPassiveSkill = 2
};
struct xtimer_list;
class Creature;
class Skill