1
This commit is contained in:
parent
5547c40f0d
commit
4ee804980b
@ -3,13 +3,94 @@
|
||||
#include "mt/GuideStep.h"
|
||||
|
||||
IMPL_TABLE(mt::GuideStep)
|
||||
std::vector<const mt::GuideStep*> mt::GuideStep::_steps;
|
||||
|
||||
namespace mt
|
||||
{
|
||||
|
||||
void GuideStep::Init1()
|
||||
{
|
||||
_int_param1 = a8::XValue(param1());
|
||||
std::vector<std::string> param_strs;
|
||||
{
|
||||
param_strs.push_back(param1());
|
||||
param_strs.push_back(param2());
|
||||
param_strs.push_back(param3());
|
||||
param_strs.push_back(param4());
|
||||
}
|
||||
switch (target()) {
|
||||
case MOVE_TARGET_GUIDE_STEP:
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(param1(), strings, ':');
|
||||
if (strings.size() != 3) {
|
||||
abort();
|
||||
}
|
||||
_params.push_back(std::make_tuple
|
||||
(
|
||||
0,
|
||||
glm::vec3(
|
||||
(float)a8::XValue(strings[0]).GetDouble(),
|
||||
(float)a8::XValue(strings[1]).GetDouble(),
|
||||
(float)a8::XValue(strings[2]).GetDouble()
|
||||
),
|
||||
0));
|
||||
}
|
||||
break;
|
||||
case MOVE_TARGET_AND_PICKUP_GUIDE_STEP:
|
||||
case KILL_ENEMY_GUIDE_STEP:
|
||||
{
|
||||
for (auto& str : param_strs) {
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(str, strings, ':');
|
||||
if (strings.size() != 5) {
|
||||
abort();
|
||||
}
|
||||
_params.push_back(std::make_tuple
|
||||
(
|
||||
a8::XValue(strings[0]).GetInt(),
|
||||
glm::vec3(
|
||||
(float)a8::XValue(strings[1]).GetDouble(),
|
||||
(float)a8::XValue(strings[2]).GetDouble(),
|
||||
(float)a8::XValue(strings[3]).GetDouble()
|
||||
),
|
||||
a8::XValue(strings[4]).GetInt()));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case USE_SKILL_AND_KILL_ENEMY_GUIDE_STEP:
|
||||
{
|
||||
for (size_t i = 1; i < param_strs.size(); ++i) {
|
||||
std::string str = param_strs[i];
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(str, strings, ':');
|
||||
if (strings.size() != 5) {
|
||||
abort();
|
||||
}
|
||||
_params.push_back(std::make_tuple
|
||||
(
|
||||
a8::XValue(strings[0]).GetInt(),
|
||||
glm::vec3(
|
||||
(float)a8::XValue(strings[1]).GetDouble(),
|
||||
(float)a8::XValue(strings[2]).GetDouble(),
|
||||
(float)a8::XValue(strings[3]).GetDouble()
|
||||
),
|
||||
a8::XValue(strings[4]).GetInt()));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case USE_SKILL_GUIDE_STEP:
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
abort();
|
||||
}
|
||||
break;
|
||||
}
|
||||
_steps.push_back(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,6 +19,11 @@ namespace mt
|
||||
|
||||
void Init1();
|
||||
|
||||
int _int_param1 = 0;
|
||||
std::vector<std::tuple<int, glm::vec3, int>> _params;
|
||||
|
||||
static std::vector<const mt::GuideStep*> _steps;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user