1
This commit is contained in:
parent
81cd0f68c9
commit
25483eef74
@ -111,6 +111,12 @@ enum InventorySlot_e
|
|||||||
IS_END
|
IS_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum SkillType_e
|
||||||
|
{
|
||||||
|
kActiveSkill = 1,
|
||||||
|
kPassiveSkill = 2
|
||||||
|
};
|
||||||
|
|
||||||
enum BuffTriggerType_e
|
enum BuffTriggerType_e
|
||||||
{
|
{
|
||||||
kBTT_UseSkill = 1, //技能释放时触发
|
kBTT_UseSkill = 1, //技能释放时触发
|
||||||
|
@ -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) {
|
for (int buff_id : buff_list) {
|
||||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
||||||
if (!buff_meta) {
|
if (!buff_meta) {
|
||||||
abort();
|
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());
|
auto itr = trigger_type_buffs.find(buff_meta->i->trigger_type());
|
||||||
if (itr != trigger_type_buffs.end()) {
|
if (itr != trigger_type_buffs.end()) {
|
||||||
itr->second.insert(buff_meta);
|
itr->second.insert(buff_meta);
|
||||||
@ -765,11 +783,6 @@ namespace MetaData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Skill::Init2()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Skill::IsTurnOverSkill()
|
bool Skill::IsTurnOverSkill()
|
||||||
{
|
{
|
||||||
return !phases.empty() && phases[0].func_id == kSkill_TurnOver;
|
return !phases.empty() && phases[0].func_id == kSkill_TurnOver;
|
||||||
@ -948,7 +961,22 @@ namespace MetaData
|
|||||||
|
|
||||||
void Buff::Init2()
|
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()
|
bool Buff::EffectCanStack()
|
||||||
|
@ -10,12 +10,6 @@ namespace cs
|
|||||||
class MFSkill;
|
class MFSkill;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SkillType_e
|
|
||||||
{
|
|
||||||
kActiveSkill = 1,
|
|
||||||
kPassiveSkill = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
struct xtimer_list;
|
struct xtimer_list;
|
||||||
class Creature;
|
class Creature;
|
||||||
class Skill
|
class Skill
|
||||||
|
Loading…
x
Reference in New Issue
Block a user