-
Notifications
You must be signed in to change notification settings - Fork 45
Improve event script item documentation #714
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
base: master
Are you sure you want to change the base?
Conversation
MokhaLeee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't oppose fixing incorrect EA instructions, but after all, these instructions are built-in functions of EA. Directly modifying the original definitions would cause discrepancies between EA scripts and decompiled event scripts. Therefore, I recommend append the defination rather than directly repalce it. For example, append a definition as #define GIVE_ITEM GIVEITEMTO at the end of this file.
|
It's a fair point -- I took a slightly different approach and added the backwards-compatible macros to |
|
We could do the reverse, and change the name in EA; I think that's better than preserving a wrong name, especially |
| CALL(EventScr_RemoveBGIfNeeded) | ||
| SVAL(EVT_SLOT_3, 0x1388) | ||
| GIVEITEMTOMAIN(CHAR_EVT_PLAYER_LEADER) | ||
| GiveMoney(5000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like here are typoes as it is all CAPITAL letters definition in header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, my fault, it is okay here.
|
I have no objection to the current plan. You guys can discuss this further as Cam propoesed new idea. |
|
For what it's worth, as a matter of terminology, the EA commands are not "built-in" in the sense that the phrase is normally used; |
This PR makes the following changes:
constants/items.henum for item-related valuesStanHash/DOC - EventDoc/EventCodes.mdGIVEITEMTO->GIVE_ITEMGIVEITEMTOMAIN->GIVE_MONEYGIVETOSLOT3->TAKE_MONEYGiveItemTo(pid, itemId)andGiveMoney(amt)