From 3a4250603ad45df1b2ec6f858b705f866fb09acb Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Tue, 10 Jun 2014 23:58:51 -0400 Subject: [PATCH] GetAugmentIDAt() Fix. --- zone/inventory.cpp | 2 +- zone/perl_client.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 5292dd1c0..0bba56d9e 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -671,7 +671,7 @@ uint32 Client::GetItemIDAt(int16 slot_id) { // Returns an augment's ID that's in an item (returns INVALID_ID if not found) // Pass in the slot ID of the item and which augslot you want to check (0-4) -uint32 Client::GetAugmentIDAt(int16 slot_id, uint8 augslot) { +int32 Client::GetAugmentIDAt(int16 slot_id, uint8 augslot) { const ItemInst* inst = m_inv[slot_id]; if (inst) if (inst->GetAugmentItemID(augslot)) diff --git a/zone/perl_client.cpp b/zone/perl_client.cpp index 0bab3cfb0..5f4be3cd8 100644 --- a/zone/perl_client.cpp +++ b/zone/perl_client.cpp @@ -2982,7 +2982,7 @@ XS(XS_Client_GetAugmentIDAt) Perl_croak(aTHX_ "Usage: Client::GetAugmentIDAt(THIS, slot_id, augslot)"); { Client * THIS; - uint32 RETVAL; + int32 RETVAL; dXSTARG; int16 slot_id = (int16)SvIV(ST(1)); int16 augslot = (uint8)SvIV(ST(2)); @@ -2997,7 +2997,7 @@ XS(XS_Client_GetAugmentIDAt) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetAugmentIDAt(slot_id, augslot); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); }