1
This commit is contained in:
parent
e428043c6a
commit
2be0891faf
@ -84,23 +84,29 @@ public:
|
||||
void Transform(std::shared_ptr<a8::lisp::Value> parent_node, std::shared_ptr<a8::lisp::Value> node)
|
||||
{
|
||||
if (node->IsType(a8::lisp::ValueType::kSymbol)) {
|
||||
auto func_call_exprs = std::make_shared<a8::lisp::List::element_type>();
|
||||
|
||||
auto&& symbol = std::any_cast<a8::lisp::Symbol>(node->value);
|
||||
int idx = mt::SkillNumber::GetAttrIdxByName(symbol.name);
|
||||
if (idx < 0) {
|
||||
abort();
|
||||
}
|
||||
auto func_call_exprs = std::make_shared<a8::lisp::List::element_type>();
|
||||
{
|
||||
auto cproc = Find("!getSkillNumber");
|
||||
auto cproc = Find(symbol.name);
|
||||
if (!cproc) {
|
||||
abort();
|
||||
}
|
||||
if (!cproc->IsType(a8::lisp::ValueType::kCProc)) {
|
||||
abort();
|
||||
}
|
||||
func_call_exprs->push_back(cproc);
|
||||
func_call_exprs->push_back
|
||||
(std::make_shared<a8::lisp::Value>(a8::lisp::Atom(idx)));
|
||||
} else {
|
||||
{
|
||||
auto cproc = Find("!getSkillNumber");
|
||||
if (!cproc) {
|
||||
abort();
|
||||
}
|
||||
if (!cproc->IsType(a8::lisp::ValueType::kCProc)) {
|
||||
abort();
|
||||
}
|
||||
func_call_exprs->push_back(cproc);
|
||||
func_call_exprs->push_back
|
||||
(std::make_shared<a8::lisp::Value>(a8::lisp::Atom(idx)));
|
||||
}
|
||||
}
|
||||
if (parent_node &&
|
||||
parent_node->IsType(a8::lisp::ValueType::kList) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user