1
This commit is contained in:
parent
5f8db4ff04
commit
2b8063a97a
@ -28,7 +28,7 @@ void TurnOverBuff::Activate()
|
|||||||
glm::vec3 old_dir = owner->GetMoveDir();
|
glm::vec3 old_dir = owner->GetMoveDir();
|
||||||
Position old_pos = owner->GetPos();
|
Position old_pos = owner->GetPos();
|
||||||
float distance =
|
float distance =
|
||||||
owner->HasBuffEffect(kBET_Car) ? phase->param1.GetDouble() * 1.5 : phase->param1.GetDouble();
|
owner->HasBuffEffect(kBET_Car) ? phase->phase_param1.GetDouble() * 1.5 : phase->phase_param1.GetDouble();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
caster_.Get()->SendDebugMsg(a8::Format("ProTurnOver currTimes:%d last_pos:%d,%d curr_pos:%d,%d",
|
caster_.Get()->SendDebugMsg(a8::Format("ProTurnOver currTimes:%d last_pos:%d,%d curr_pos:%d,%d",
|
||||||
{
|
{
|
||||||
@ -43,7 +43,7 @@ void TurnOverBuff::Activate()
|
|||||||
owner->ForwardMove(distance);
|
owner->ForwardMove(distance);
|
||||||
Global::Instance()->verify_set_pos = 0;
|
Global::Instance()->verify_set_pos = 0;
|
||||||
owner->SetMoveDir(old_dir);
|
owner->SetMoveDir(old_dir);
|
||||||
if (phase->param2.GetInt() == 1) {
|
if (phase->phase_param2.GetInt() == 1) {
|
||||||
++owner->turn_over_times;
|
++owner->turn_over_times;
|
||||||
owner->last_turn_over_pos = old_pos;
|
owner->last_turn_over_pos = old_pos;
|
||||||
}
|
}
|
||||||
|
@ -2401,7 +2401,7 @@ void Creature::_UpdateSpecMove()
|
|||||||
!CurrentSkill()->meta->_phases.empty()) {
|
!CurrentSkill()->meta->_phases.empty()) {
|
||||||
std::set<Creature*> target_list;
|
std::set<Creature*> target_list;
|
||||||
float old_skill_distance = CurrentSkill()->meta->skill_distance();
|
float old_skill_distance = CurrentSkill()->meta->skill_distance();
|
||||||
CurrentSkill()->meta->SetSkillDistance(CurrentSkill()->meta->_phases[0].param1.GetDouble());
|
CurrentSkill()->meta->SetSkillDistance(CurrentSkill()->meta->_phases[0].phase_param1.GetDouble());
|
||||||
SelectSkillTargets(CurrentSkill(), GetPos(), target_list);
|
SelectSkillTargets(CurrentSkill(), GetPos(), target_list);
|
||||||
CurrentSkill()->meta->SetSkillDistance(old_skill_distance);
|
CurrentSkill()->meta->SetSkillDistance(old_skill_distance);
|
||||||
|
|
||||||
|
@ -40,39 +40,39 @@ namespace mt
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
auto field_desc = class_meta->GetFieldByName(a8::Format("phase%d_param1", {idx}));
|
auto field_desc = class_meta->GetFieldByName(a8::Format("phase%d_param1", {idx}));
|
||||||
phase.param1_str = *((std::string*)((char*)this + field_desc->offset));
|
phase.phase_param1_str = *((std::string*)((char*)this + field_desc->offset));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
auto field_desc = class_meta->GetFieldByName(a8::Format("phase%d_param2", {idx}));
|
auto field_desc = class_meta->GetFieldByName(a8::Format("phase%d_param2", {idx}));
|
||||||
phase.param2_str = *((std::string*)((char*)this + field_desc->offset));
|
phase.phase_param2_str = *((std::string*)((char*)this + field_desc->offset));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
auto field_desc = class_meta->GetFieldByName(a8::Format("phase%d_param3", {idx}));
|
auto field_desc = class_meta->GetFieldByName(a8::Format("phase%d_param3", {idx}));
|
||||||
phase.param3_str = *((std::string*)((char*)this + field_desc->offset));
|
phase.phase_param3_str = *((std::string*)((char*)this + field_desc->offset));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
phase.param1 = a8::XValue(phase.param1_str);
|
phase.phase_param1 = a8::XValue(phase.phase_param1_str);
|
||||||
phase.param2 = a8::XValue(phase.param2_str);
|
phase.phase_param2 = a8::XValue(phase.phase_param2_str);
|
||||||
phase.param3 = a8::XValue(phase.param3_str);
|
phase.phase_param3 = a8::XValue(phase.phase_param3_str);
|
||||||
{
|
{
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(phase.param1_str, strings, '|');
|
a8::Split(phase.phase_param1_str, strings, '|');
|
||||||
for (auto& str : strings) {
|
for (auto& str : strings) {
|
||||||
phase.param1_ints.push_back(a8::XValue(str));
|
phase.phase_param1_ints.push_back(a8::XValue(str));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(phase.param2_str, strings, '|');
|
a8::Split(phase.phase_param2_str, strings, '|');
|
||||||
for (auto& str : strings) {
|
for (auto& str : strings) {
|
||||||
phase.param2_ints.push_back(a8::XValue(str));
|
phase.phase_param2_ints.push_back(a8::XValue(str));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::vector<std::string> strings;
|
std::vector<std::string> strings;
|
||||||
a8::Split(phase.param3_str, strings, '|');
|
a8::Split(phase.phase_param3_str, strings, '|');
|
||||||
for (auto& str : strings) {
|
for (auto& str : strings) {
|
||||||
phase.param3_ints.push_back(a8::XValue(str));
|
phase.phase_param3_ints.push_back(a8::XValue(str));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (phase.func_id != kSkill_FuncNone) {
|
if (phase.func_id != kSkill_FuncNone) {
|
||||||
|
@ -11,17 +11,17 @@ namespace mt
|
|||||||
int phase_idx = 0;
|
int phase_idx = 0;
|
||||||
int time_offset = 0;
|
int time_offset = 0;
|
||||||
SkillFunc_e func_id = kSkill_FuncNone;
|
SkillFunc_e func_id = kSkill_FuncNone;
|
||||||
a8::XValue param1;
|
a8::XValue phase_param1;
|
||||||
a8::XValue param2;
|
a8::XValue phase_param2;
|
||||||
a8::XValue param3;
|
a8::XValue phase_param3;
|
||||||
|
|
||||||
std::string param1_str;
|
std::string phase_param1_str;
|
||||||
std::string param2_str;
|
std::string phase_param2_str;
|
||||||
std::string param3_str;
|
std::string phase_param3_str;
|
||||||
|
|
||||||
std::vector<int> param1_ints;
|
std::vector<int> phase_param1_ints;
|
||||||
std::vector<int> param2_ints;
|
std::vector<int> phase_param2_ints;
|
||||||
std::vector<int> param3_ints;
|
std::vector<int> phase_param3_ints;
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_ID_TABLE(Skill, mtb::Skill,
|
DECLARE_ID_TABLE(Skill, mtb::Skill,
|
||||||
|
@ -95,6 +95,14 @@ void SelfChecker::Init()
|
|||||||
SelfChecker::AddBuff(meta->buff_id());
|
SelfChecker::AddBuff(meta->buff_id());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mt::Skill::Traverse
|
||||||
|
(
|
||||||
|
[] (const mt::Skill* meta, bool& stop)
|
||||||
|
{
|
||||||
|
for (int buff_id : meta->_buff_list) {
|
||||||
|
SelfChecker::AddBuff(buff_id);
|
||||||
|
}
|
||||||
|
});
|
||||||
mt::Buff::Traverse
|
mt::Buff::Traverse
|
||||||
(
|
(
|
||||||
[] (const mt::Buff* meta, bool& stop)
|
[] (const mt::Buff* meta, bool& stop)
|
||||||
|
@ -538,7 +538,7 @@ void Skill::ProcSWZB()
|
|||||||
);
|
);
|
||||||
Entity* killer = owner->room->GetEntityByUniId(killer_id);
|
Entity* killer = owner->room->GetEntityByUniId(killer_id);
|
||||||
if (killer && killer != owner && !meta->_raw_phases.empty()) {
|
if (killer && killer != owner && !meta->_raw_phases.empty()) {
|
||||||
owner->over_delay_time = meta->_raw_phases.at(0).param1;
|
owner->over_delay_time = meta->_raw_phases.at(0).phase_param1;
|
||||||
owner->TryAddBuff(owner, 209016);
|
owner->TryAddBuff(owner, 209016);
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -983,7 +983,7 @@ void Skill::ProcShotPhase(const mt::SkillPhase* phase)
|
|||||||
|
|
||||||
void Skill::ProcSpecDirShotPhase(const mt::SkillPhase* phase)
|
void Skill::ProcSpecDirShotPhase(const mt::SkillPhase* phase)
|
||||||
{
|
{
|
||||||
const mt::Equip* weapon_meta = mt::Equip::GetById(phase->param1.GetInt());
|
const mt::Equip* weapon_meta = mt::Equip::GetById(phase->phase_param1.GetInt());
|
||||||
if (!weapon_meta) {
|
if (!weapon_meta) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1049,7 +1049,7 @@ void Skill::ProcSpecDirShotPhase(const mt::SkillPhase* phase)
|
|||||||
|
|
||||||
void Skill::ProcNormalShotPhase(const mt::SkillPhase* phase)
|
void Skill::ProcNormalShotPhase(const mt::SkillPhase* phase)
|
||||||
{
|
{
|
||||||
const mt::Equip* weapon_meta = mt::Equip::GetById(phase->param1.GetInt());
|
const mt::Equip* weapon_meta = mt::Equip::GetById(phase->phase_param1.GetInt());
|
||||||
if (!weapon_meta) {
|
if (!weapon_meta) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1091,9 +1091,9 @@ void Skill::ProcForthBackJumpPhase(const mt::SkillPhase* phase)
|
|||||||
glm::vec3 old_dir = owner->GetMoveDir();
|
glm::vec3 old_dir = owner->GetMoveDir();
|
||||||
Position old_pos = owner->GetPos();
|
Position old_pos = owner->GetPos();
|
||||||
|
|
||||||
int buff_id1 = phase->param3_ints.size() > 0 ? phase->param3_ints[0] : 0;
|
int buff_id1 = phase->phase_param3_ints.size() > 0 ? phase->phase_param3_ints[0] : 0;
|
||||||
int buff_id2 = phase->param3_ints.size() > 1 ? phase->param3_ints[1] : 0;
|
int buff_id2 = phase->phase_param3_ints.size() > 1 ? phase->phase_param3_ints[1] : 0;
|
||||||
int buff_id3 = phase->param3_ints.size() > 2 ? phase->param3_ints[2] : 0;
|
int buff_id3 = phase->phase_param3_ints.size() > 2 ? phase->phase_param3_ints[2] : 0;
|
||||||
const mt::Skill* skill_meta = meta;
|
const mt::Skill* skill_meta = meta;
|
||||||
owner->TryAddBuff(owner, buff_id1);
|
owner->TryAddBuff(owner, buff_id1);
|
||||||
int land_effect_buff_uniid = owner->TryAddBuffAndSetTime
|
int land_effect_buff_uniid = owner->TryAddBuffAndSetTime
|
||||||
|
Loading…
x
Reference in New Issue
Block a user