1
This commit is contained in:
parent
cf0eb2a392
commit
8dcc7f6bc5
@ -9,7 +9,57 @@ namespace mt
|
||||
|
||||
void GraspBuff::Init1()
|
||||
{
|
||||
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(graspbuff_trigger(), strings, '|');
|
||||
if (strings.size() > 2) {
|
||||
abort();
|
||||
}
|
||||
if (strings.empty()) {
|
||||
abort();
|
||||
}
|
||||
std::vector<std::string> strings2;
|
||||
a8::Split(strings[0], strings2, ',');
|
||||
int type = a8::XValue(strings2[0]);
|
||||
switch ((GraspBuffTrigger_e)type) {
|
||||
case GraspBuffTrigger_e::kHit:
|
||||
{
|
||||
_trigger_type = type;
|
||||
}
|
||||
break;
|
||||
case GraspBuffTrigger_e::kKill:
|
||||
{
|
||||
_trigger_type = type;
|
||||
}
|
||||
break;
|
||||
case GraspBuffTrigger_e::kTakeOn:
|
||||
{
|
||||
_trigger_type = type;
|
||||
}
|
||||
break;
|
||||
case GraspBuffTrigger_e::kCond:
|
||||
{
|
||||
_trigger_type = type;
|
||||
_trigger_subtype = a8::XValue(strings2.at(1));
|
||||
if (_trigger_subtype != (int)GraspBuffTriggerCond_e::kImprint) {
|
||||
abort();
|
||||
}
|
||||
_trigger_cond.push_back(a8::XValue(strings2.at(2)));
|
||||
_trigger_cond.push_back(a8::XValue(strings.at(1)));
|
||||
}
|
||||
break;
|
||||
case GraspBuffTrigger_e::kHitAndEnd:
|
||||
{
|
||||
_trigger_type = type;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
abort();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GraspBuff::Init2()
|
||||
|
@ -14,6 +14,9 @@ namespace mt
|
||||
void Init1();
|
||||
void Init2();
|
||||
|
||||
int _trigger_type = 0;
|
||||
int _trigger_subtype = 0;
|
||||
std::vector<int> _trigger_cond;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user