diff --git a/zone/client.h b/zone/client.h index cadf9b583..718efbb6e 100644 --- a/zone/client.h +++ b/zone/client.h @@ -789,8 +789,8 @@ public: void SetTint(int16 slot_id, Color_Struct& color); void SetMaterial(int16 slot_id, uint32 item_id); void Undye(); - uint32 GetItemIDAt(int16 slot_id); - uint32 GetAugmentIDAt(int16 slot_id, uint8 augslot); + int32 GetItemIDAt(int16 slot_id); + int32 GetAugmentIDAt(int16 slot_id, uint8 augslot); bool PutItemInInventory(int16 slot_id, const ItemInst& inst, bool client_update = false); bool PushItemOnCursor(const ItemInst& inst, bool client_update = false); void DeleteItemInInventory(int16 slot_id, int8 quantity = 0, bool client_update = false, bool update_db = true); diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 969065fdb..9a815c6ca 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -659,7 +659,7 @@ void Client::DropInst(const ItemInst* inst) } // Returns a slot's item ID (returns INVALID_ID if not found) -uint32 Client::GetItemIDAt(int16 slot_id) { +int32 Client::GetItemIDAt(int16 slot_id) { const ItemInst* inst = m_inv[slot_id]; if (inst) return inst->GetItem()->ID; @@ -670,7 +670,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/mob.cpp b/zone/mob.cpp index 24b691e36..03e7bbdaa 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -3537,7 +3537,7 @@ void Mob::TrySympatheticProc(Mob *target, uint32 spell_id) } } -uint32 Mob::GetItemStat(uint32 itemid, const char *identifier) +int32 Mob::GetItemStat(uint32 itemid, const char *identifier) { const ItemInst* inst = database.CreateItem(itemid); if (!inst) diff --git a/zone/mob.h b/zone/mob.h index a0c8dbdc4..fe0919f7e 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -553,7 +553,7 @@ public: void Shout(const char *format, ...); void Emote(const char *format, ...); void QuestJournalledSay(Client *QuestInitiator, const char *str); - uint32 GetItemStat(uint32 itemid, const char *identifier); + int32 GetItemStat(uint32 itemid, const char *identifier); int16 CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, bool best_focus=false); uint8 IsFocusEffect(uint16 spellid, int effect_index, bool AA=false,uint32 aa_effect=0); diff --git a/zone/perl_client.cpp b/zone/perl_client.cpp index 0bab3cfb0..816956d86 100644 --- a/zone/perl_client.cpp +++ b/zone/perl_client.cpp @@ -2955,7 +2955,7 @@ XS(XS_Client_GetItemIDAt) Perl_croak(aTHX_ "Usage: Client::GetItemIDAt(THIS, slot_id)"); { Client * THIS; - uint32 RETVAL; + int32 RETVAL; dXSTARG; int16 slot_id = (int16)SvIV(ST(1)); @@ -2969,7 +2969,7 @@ XS(XS_Client_GetItemIDAt) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetItemIDAt(slot_id); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); } @@ -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); } diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index 86cf58981..14d84a70e 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -7298,7 +7298,7 @@ XS(XS_Mob_GetItemStat) Perl_croak(aTHX_ "Usage: Mob::GetItemStat(THIS, itemid, stat)"); { Mob * THIS; - uint32 RETVAL; + int32 RETVAL; uint32 itemid = (uint32)SvUV(ST(1)); Const_char * stat = (Const_char *)SvPV_nolen(ST(2)); dXSTARG; @@ -7313,7 +7313,7 @@ XS(XS_Mob_GetItemStat) Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); RETVAL = THIS->GetItemStat(itemid, stat); - XSprePUSH; PUSHu((UV)RETVAL); + XSprePUSH; PUSHi((IV)RETVAL); } XSRETURN(1); }