This commit is contained in:
aozhiwei 2023-03-04 12:26:44 +08:00
parent e161c89e03
commit 7b6e5173e3
3 changed files with 5 additions and 3 deletions

View File

@ -43,6 +43,7 @@
#include "skillhelper.h" #include "skillhelper.h"
#include "mt/MetaMgr.h" #include "mt/MetaMgr.h"
#include "mt/Skill.h"
struct MsgNode struct MsgNode
{ {

View File

@ -13,7 +13,7 @@ public:
{ {
RegisterCProc RegisterCProc
( (
"getSkillNumber", "!getSkillNumber",
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value> [this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
{ {
double result = 0; double result = 0;
@ -21,6 +21,7 @@ public:
abort(); abort();
} }
result = context_.skill_meta->_number_meta->_float_speed; result = context_.skill_meta->_number_meta->_float_speed;
result =123;
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result)); return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
}); });
} }
@ -70,7 +71,7 @@ public:
} }
auto func_call_exprs = std::make_shared<a8::lisp::List::element_type>(); auto func_call_exprs = std::make_shared<a8::lisp::List::element_type>();
{ {
auto cproc = Find("getSkillNumber"); auto cproc = Find("!getSkillNumber");
if (!cproc) { if (!cproc) {
abort(); abort();
} }

2
third_party/a8 vendored

@ -1 +1 @@
Subproject commit 24625f05d1636709680b03de74b60d2b4736d7d5 Subproject commit c4610bed765a4b0fea47ef34dc9ecf8fbcaf3e68