[Commands] Add #setaltcurrency Command. (#1850)

* [Commands] Add #setaltcurrency Command.
- Add #setaltcurrency [Currency ID] [Amount] command to allow you to set a specific alternate currency to a value.
- Add Zone::GetCurrencyID() and Zone::GetCurrencyItemID() helper methods.
- Cleanup loops through zone->AlternateCurrencies.
- Utilize helper methods where necessary.
- Convert old methods parameters and return values from int to uint32 where necessary.

* Typo.
This commit is contained in:
Kinglykrab
2021-12-08 18:58:06 -05:00
committed by GitHub
parent 94166e0f95
commit 294e51fca7
12 changed files with 141 additions and 86 deletions
+3 -3
View File
@@ -3483,7 +3483,7 @@ XS(XS__getcurrencyitemid) {
dXSTARG;
int RETVAL;
int currency_id = (int) SvUV(ST(0));
uint32 currency_id = (uint32) SvUV(ST(0));
RETVAL = quest_manager.getcurrencyitemid(currency_id);
@@ -3499,8 +3499,8 @@ XS(XS__getcurrencyid) {
Perl_croak(aTHX_ "Usage: quest::getcurrencyid(uint32 item_id)");
dXSTARG;
int RETVAL;
uint32 item_id = (int) SvUV(ST(0));
uint32 RETVAL;
uint32 item_id = (uint32) SvUV(ST(0));
RETVAL = quest_manager.getcurrencyid(item_id);
XSprePUSH;