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

Outdated card0 checks #190

Open
cydh opened this issue Jun 19, 2018 · 2 comments
Open

Outdated card0 checks #190

cydh opened this issue Jun 19, 2018 · 2 comments
Assignees

Comments

@cydh
Copy link
Contributor

cydh commented Jun 19, 2018

Checking using card0 == 254, card0 == 255, card0 == -256 is outdated. rAthena changed the value years ago, and those values must be moved to config and make function/method if want to be checked.

What I think is in PR #194

@aries-delossantos
Copy link
Contributor

@cydh hi im not sure what the card0 checks are for but I've used the same checking for vending update
#193

@cydh
Copy link
Contributor Author

cydh commented Jun 20, 2018

card0 is identifier to check if the item is forged, creation (from brewing/cooking, getnameditem) or pet egg (flag for renamed)

#define CARD0_FORGE 0x00FF
#define CARD0_CREATE 0x00FE
#define CARD0_PET 0x0100

ur usages and current usages are for older rA (and other emu) before we implement UINT16_MAX for item ID

cydh added a commit to cydh/FluxCP that referenced this issue Jun 20, 2018
* Fixed rathena#190
* The card0 values are defined in config file (application.php) in `ItemSpecial`. By default, using rAthena's card0 values.
* The usage will be `Flux::itemIsSpecial($item)`. Returns `true` if item's card0 is special, `false` otherwise
* For control checking (ifs) for item is forged
  * `if ($item->card0 == $this->itemIsForged)`
  * `if ($item->card0 == $this->itemIsCreation)`
  * `if ($item->card0 == $this->itemIsPetEgg)`
cydh added a commit that referenced this issue Jul 10, 2018
* Added random option info in inventory, cart, and storage. If item has options, it'll show as [n Options] in default theme, collapsible.
* Random option feature can be disabled in application.php for backward compatibility
* Vending & buyingstore have item listing as default, listing by shop name is now in different page: vendors & buyers
* Recolor item price for vending & buyingstore
* Moved item bound message to label
* Added new library Flux/Item to reduce redundant codes after item fetching
* Fixes #190, renewed card0 special values and added into config in application.php for backward compatibility
@cydh cydh mentioned this issue Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: New Items
Development

Successfully merging a pull request may close this issue.

4 participants