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

[Quest API] Add EVENT_ALT_CURRENCY_GAIN and EVENT_ALT_CURRENCY_LOSS to Perl/Lua #3734

Merged
merged 4 commits into from Dec 17, 2023

Conversation

Kinglykrab
Copy link
Contributor

@Kinglykrab Kinglykrab commented Dec 3, 2023

Perl

  • Add EVENT_ALT_CURRENCY_GAIN.
  • Add EVENT_ALT_CURRENCY_LOSS.
  • Export $currency_id, $amount, and $total.

Lua

  • Add event_alt_currency_gain.
  • Add event_alt_currency_loss.
  • Export e.currency_id, e.amount, and e.total.

Notes

  • Convert int8 method to bool is_scripted in Client::AddAlternateCurrencyValue.
  • Properly utilize is_scripted parameter in perl_client.cpp.
  • Allows operators to perform events on alternate currency gains/losses.

@joligario
Copy link
Contributor

joligario commented Dec 3, 2023

I think LOSS implies losing, where SPENT might be a better description? Just a recommendation, may be just pedantic, but perhaps EARNED/SPENT might be better?

Never used ALT Currency before. Can you also trade them?

@Kinglykrab
Copy link
Contributor Author

I think LOSS implies losing, where SPENT might be a better description? Just a recommendation, may be just pedantic, but perhaps EARNED/SPENT might be better?

Never used ALT Currency before. Can you also trade them?

Just following the naming convention we used for AA gain/loss and Currency gain/loss.

You can't trade the alternate currencies directly, only if you reclaim them as an item.

@Kinglykrab Kinglykrab changed the title [Quest API] Add EVENT_ALT_CURRENCY_GAIN and EVENT_ALT_CURRENCY_LOSS [Quest API] Add EVENT_ALT_CURRENCY_GAIN and EVENT_ALT_CURRENCY_LOSS to Perl/Lua Dec 5, 2023
- Add `EVENT_ALT_CURRENCY_GAIN`.
- Add `EVENT_ALT_CURRENCY_LOSS`.
- Export `$currency_id`, `$amount`, and `$total.

- Add `event_alt_currency_gain`.
- Add `event_alt_currency_loss`.
- Export `e.currency_id`, `e.amount`, and `e.total.

- Convert `int8 method` to `bool is_scripted` in `Client::AddAlternateCurrencyValue`.
- Properly utilize `is_scripted` parameter in `perl_client.cpp`.
- Allows operators to perform events on alternate currency gains/losses.
@Akkadius Akkadius force-pushed the quest_api/event_alt_currency_gain_loss branch from 211d8d1 to 8ba0520 Compare December 17, 2023 04:38
Copy link
Member

@Akkadius Akkadius left a comment

Choose a reason for hiding this comment

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

LGTM. Rebased for you and compiled locally

@Akkadius Akkadius merged commit 9739c1c into master Dec 17, 2023
0 of 2 checks passed
@Akkadius Akkadius deleted the quest_api/event_alt_currency_gain_loss branch December 17, 2023 04:40
@Akkadius Akkadius mentioned this pull request Dec 18, 2023
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.

None yet

3 participants