This commit is contained in:
aozhiwei 2024-03-15 11:34:15 +08:00
parent ca97e53809
commit b2bb5abb78

View File

@ -220,6 +220,40 @@ public:
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result)); return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
}); });
RegisterCProc
(
"caster.get_pos_x",
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
{
double result = 0.0f;
if (context_.buff->GetCaster().Get()) {
result = context_.buff->GetCaster().Get()->GetPos().GetX();
}
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
});
RegisterCProc
(
"caster.get_pos_y",
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
{
double result = 0.0f;
if (context_.buff->GetCaster().Get()) {
result = context_.buff->GetCaster().Get()->GetPos().GetY();
}
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
});
RegisterCProc
(
"caster.get_pos_z",
[this] (const a8::lisp::List& params) -> std::shared_ptr<a8::lisp::Value>
{
double result = 0.0f;
if (context_.buff->GetCaster().Get()) {
result = context_.buff->GetCaster().Get()->GetPos().GetZ();
}
return std::make_shared<a8::lisp::Value>(a8::lisp::Atom(result));
});
RegisterCProc RegisterCProc
( (
"caster.get_skill_target_pos_x", "caster.get_skill_target_pos_x",