Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GetReactState to CreatureMethods and GetKnownTaxiNodes, SetKnownTaxiNodes to PlayerMethods #260

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Aldori15
Copy link

@Aldori15 Aldori15 commented Feb 14, 2025

We have the ability to SetReactState, but we don't have to ability to GetReactState.

@Aldori15
Copy link
Author

Also added GetKnownTaxiNodes and SetKnownTaxiNodes to PlayerMethods.

All 3 functions have been tested by me and are currently in use in a couple of scripts utilizing Eluna.

@Aldori15 Aldori15 changed the title Add GetReactState to CreatureMethods Add GetReactState to CreatureMethods and GetKnownTaxiNodes, SetKnownTaxiNodes to PlayerMethods Feb 17, 2025
@Aldori15 Aldori15 requested a review from 55Honey February 17, 2025 17:17
Copy link
Author

@Aldori15 Aldori15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for merging it in. It says it was merged into master but I'm not seeing it in the list of recent commits. It looks like the "merge branch 'master' into master went into the fork instead of the repo here. Is that something I did wrong, or there anything else I need to do?

Side note: still a rookie when it comes to these, so I do apologize. I'll make sure any future commits get added into a separate branch so that way it's not pulling straight from master.

@55Honey
Copy link

55Honey commented Feb 20, 2025

I've merged recent changes FROM master into this PR to see if the build is ok. The PR wasn't merged into master yet, but i plan to when the build is green.

@55Honey
Copy link

55Honey commented Feb 23, 2025

The LuaJit build keeps failing here.

@Aldori15
Copy link
Author

Is there anything I need to do?

@55Honey
Copy link

55Honey commented Feb 24, 2025

In LuaJIT, the luaL_len function, which is typically used to get the length of a table, does not exist.
LuaJIT is designed to be lightweight and more performance-focused, so certain functions from the standard Lua API (such as luaL_len) are not available in LuaJIT.
In standard Lua, luaL_len is defined in the lauxlib.h header and is used to get the length of a table (as in luaL_len(L, index)).
In LuaJIT, you should use lua_objlen instead of luaL_len to obtain the length of a table.

Looks like this requires an #IFDEF block.

lua_rawlen is mapped to lua_objlen

#define lua_rawlen(L, idx) \
    lua_objlen(L, idx)
@Aldori15
Copy link
Author

Aldori15 commented Feb 24, 2025

Can you try now with the newest commit?

image

Test code and Debug print showing retrieval of the table:
image

image

@Aldori15
Copy link
Author

Looks like it is green now :)

@Aldori15
Copy link
Author

Aldori15 commented Mar 8, 2025

Let me know if anything else is needed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants