[Quest API] Add AddPlatinum(), GetCarriedPlatinum() and TakePlatinum() to Perl/Lua. (#2079)

* [Quest API] Add AddPlatinum(), GetCarriedPlatinum() and TakePlatinum() to Perl/Lua.
- Allows for easier NPC interactions.
- GetCarriedPlatinum() adds together all currencies in inventory based on conversion amounts so it works easily with removals/checks.
- Add $client->AddPlatinum(platinum, update_client) to Perl.
- Add $client->GetCarriedPlatinum() to Perl.
- Add $client->TakePlatinum(platinum, update_client) to Perl.
- Add client:AddPlatinum(platinum, update_client) to Lua.
- Add client:GetCarriedPlatinum() to Lua.
- Add client:TakePlatinum(platinum, update_client) to Lua.

* Formatting.
This commit is contained in:
Kinglykrab
2022-04-30 10:57:05 -04:00
committed by GitHub
parent b1311780a7
commit 1b7c12297d
8 changed files with 293 additions and 145 deletions
+3 -3
View File
@@ -3652,12 +3652,12 @@ void Client::Handle_OP_Begging(const EQApplicationPacket *app)
if (CurrentSkill < 50)
{
brs->Result = 4; // Copper
AddMoneyToPP(brs->Amount, false);
AddMoneyToPP(brs->Amount);
}
else
{
brs->Result = 3; // Silver
AddMoneyToPP(brs->Amount * 10, false);
AddMoneyToPP(brs->Amount * 10);
}
}
@@ -13295,7 +13295,7 @@ void Client::Handle_OP_ShopPlayerSell(const EQApplicationPacket *app)
}
}
AddMoneyToPP(price, false);
AddMoneyToPP(price);
if (inst->IsStackable() || inst->IsCharged())
{