This commit is contained in:
aozhiwei 2021-04-06 19:15:29 +08:00
parent 3242244c2c
commit 7cd76949bf
5 changed files with 53 additions and 3 deletions

View File

@ -157,8 +157,9 @@ enum BuffEffectType_e
kBET_Hide = 32, //隐身 kBET_Hide = 32, //隐身
kBET_CrazyMode = 33, //暴走模式 kBET_CrazyMode = 33, //暴走模式
kBET_ShockWave = 34, //冲击波 kBET_ShockWave = 34, //冲击波
//kBET_Sprint = 35, //冲刺 kBET_Sprint = 35, //冲刺
kBET_SummonObstacle = 36, //召唤物件 kBET_SummonObstacle = 36, //召唤物件
kBET_FlashMove = 37, //瞬间移动
kBET_ThroughWall = 50, //穿墙 kBET_ThroughWall = 50, //穿墙
kBET_Driver = 51, //驾驶中 kBET_Driver = 51, //驾驶中
@ -368,6 +369,12 @@ enum GameChannel_e
kTouTiaoChannelId = 6006 kTouTiaoChannelId = 6006
}; };
enum PostBuffAction_e
{
kRemoveBuffByIdAction = 1,
kRemoveBuffByEffectAction = 2
};
const char* const PROJ_NAME_FMT = "game%d_gameserver"; const char* const PROJ_NAME_FMT = "game%d_gameserver";
const char* const PROJ_ROOT_FMT = "/data/logs/%s"; const char* const PROJ_ROOT_FMT = "/data/logs/%s";

View File

@ -665,13 +665,11 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
if (skill) { if (skill) {
MetaData::SkillPhase* phase = GetCurrSkillPhase(); MetaData::SkillPhase* phase = GetCurrSkillPhase();
if (phase && phase->time_offset >= skill->GetPassedTime()) { if (phase && phase->time_offset >= skill->GetPassedTime()) {
a8::Vec2 old_move_dir = move_dir;
if (HasBuffEffect(kBET_Car)) { if (HasBuffEffect(kBET_Car)) {
_UpdateMove(phase->param1.GetDouble() * 1.5); _UpdateMove(phase->param1.GetDouble() * 1.5);
} else { } else {
_UpdateMove(phase->param1); _UpdateMove(phase->param1);
} }
move_dir = old_move_dir;
} }
} }
} }
@ -853,6 +851,16 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
SummonObstacle(buff->meta->param1, GetPos()); SummonObstacle(buff->meta->param1, GetPos());
} }
break; break;
case kBET_Sprint:
{
}
break;
case kBET_FlashMove:
{
}
break;
default: default:
{ {
} }

View File

@ -521,6 +521,39 @@ namespace MetaData
immune_buffeffect.insert(a8::XValue(str)); immune_buffeffect.insert(a8::XValue(str));
} }
} }
{
std::vector<std::string> strings;
a8::Split(i->buff_param2(), strings, ':');
for (auto& str : strings) {
param2_int_list.push_back(a8::XValue(str).GetInt());
}
}
{
std::vector<std::string> strings;
a8::Split(i->post_remove_action(), strings, '|');
for (auto& str : strings) {
std::vector<std::string> strings2;
a8::Split(str, strings2, ':');
if (strings2.size() > 2) {
std::vector<std::string> strings3;
a8::Split(strings2[1], strings3, ';');
if (strings2[0] == "remove_buff_by_id" ||
strings2[0] == "remove_buff_by_effect") {
auto& action = a8::FastAppend(post_remove_action);
if (strings2[0] == "remove_buff_by_id") {
std::get<0>(action) = kRemoveBuffByIdAction;
} else if (strings2[0] == "remove_buff_by_effect") {
std::get<0>(action) = kRemoveBuffByEffectAction;
}
for (auto& str3 : strings3) {
if (!str3.empty()) {
std::get<1>(action).push_back(a8::XValue(str3));
}
}
}
}
}
}
} }
bool Buff::EffectCanStack() bool Buff::EffectCanStack()

View File

@ -170,6 +170,7 @@ namespace MetaData
float param3 = 0.0f; float param3 = 0.0f;
float param4 = 0.0f; float param4 = 0.0f;
std::vector<int> param2_int_list; std::vector<int> param2_int_list;
std::vector<std::tuple<int, std::vector<int>>> post_remove_action;
std::set<int> immune_buffeffect; std::set<int> immune_buffeffect;
}; };

View File

@ -205,6 +205,7 @@ message Buff
required float duration_time = 10; required float duration_time = 10;
optional float buff_valueup = 11; optional float buff_valueup = 11;
required string immune_buffeffect_list = 12; required string immune_buffeffect_list = 12;
optional string post_remove_action = 13;
} }
message Drop message Drop