mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Add Inventory methods to Perl.
- Add $client->GetInventory() to Perl. - Export Lua Inventory methods to Perl. - Add quest::createitem(item_id, charges, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six, attuned) to Perl so you can return a ItemInstance for testing purposes.
This commit is contained in:
@@ -7288,6 +7288,22 @@ XS(XS_Client_GetScribedSpells) {
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Client_GetInventory);
|
||||
XS(XS_Client_GetInventory) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Client::GetInventory(THIS)");
|
||||
{
|
||||
Client* THIS;
|
||||
EQ::InventoryProfile* RETVAL;
|
||||
VALIDATE_THIS_IS_CLIENT;
|
||||
RETVAL = &THIS->GetInv();
|
||||
ST(0) = sv_newmortal();
|
||||
sv_setref_pv(ST(0), "Inventory", (void *) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
@@ -7404,6 +7420,7 @@ XS(boot_Client) {
|
||||
newXSproto(strcpy(buf, "GetHunger"), XS_Client_GetHunger, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetInstanceID"), XS_Client_GetInstanceID, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetInstrumentMod"), XS_Client_GetInstrumentMod, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetInventory"), XS_Client_GetInventory, file, "$");
|
||||
newXSproto(strcpy(buf, "GetIP"), XS_Client_GetIP, file, "$");
|
||||
newXSproto(strcpy(buf, "GetItemAt"), XS_Client_GetItemAt, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetItemIDAt"), XS_Client_GetItemIDAt, file, "$$");
|
||||
|
||||
Reference in New Issue
Block a user