mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Edit some uint32 to int32: GetAugmentIDAt, GetItemIDAt, GetItemStat
This commit is contained in:
parent
e2874b2cc6
commit
bce3b1b961
@ -789,8 +789,8 @@ public:
|
|||||||
void SetTint(int16 slot_id, Color_Struct& color);
|
void SetTint(int16 slot_id, Color_Struct& color);
|
||||||
void SetMaterial(int16 slot_id, uint32 item_id);
|
void SetMaterial(int16 slot_id, uint32 item_id);
|
||||||
void Undye();
|
void Undye();
|
||||||
uint32 GetItemIDAt(int16 slot_id);
|
int32 GetItemIDAt(int16 slot_id);
|
||||||
uint32 GetAugmentIDAt(int16 slot_id, uint8 augslot);
|
int32 GetAugmentIDAt(int16 slot_id, uint8 augslot);
|
||||||
bool PutItemInInventory(int16 slot_id, const ItemInst& inst, bool client_update = false);
|
bool PutItemInInventory(int16 slot_id, const ItemInst& inst, bool client_update = false);
|
||||||
bool PushItemOnCursor(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);
|
void DeleteItemInInventory(int16 slot_id, int8 quantity = 0, bool client_update = false, bool update_db = true);
|
||||||
|
|||||||
@ -659,7 +659,7 @@ void Client::DropInst(const ItemInst* inst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Returns a slot's item ID (returns INVALID_ID if not found)
|
// 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];
|
const ItemInst* inst = m_inv[slot_id];
|
||||||
if (inst)
|
if (inst)
|
||||||
return inst->GetItem()->ID;
|
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)
|
// 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)
|
// 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];
|
const ItemInst* inst = m_inv[slot_id];
|
||||||
if (inst)
|
if (inst)
|
||||||
if (inst->GetAugmentItemID(augslot))
|
if (inst->GetAugmentItemID(augslot))
|
||||||
|
|||||||
@ -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);
|
const ItemInst* inst = database.CreateItem(itemid);
|
||||||
if (!inst)
|
if (!inst)
|
||||||
|
|||||||
@ -553,7 +553,7 @@ public:
|
|||||||
void Shout(const char *format, ...);
|
void Shout(const char *format, ...);
|
||||||
void Emote(const char *format, ...);
|
void Emote(const char *format, ...);
|
||||||
void QuestJournalledSay(Client *QuestInitiator, const char *str);
|
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);
|
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);
|
uint8 IsFocusEffect(uint16 spellid, int effect_index, bool AA=false,uint32 aa_effect=0);
|
||||||
|
|||||||
@ -2955,7 +2955,7 @@ XS(XS_Client_GetItemIDAt)
|
|||||||
Perl_croak(aTHX_ "Usage: Client::GetItemIDAt(THIS, slot_id)");
|
Perl_croak(aTHX_ "Usage: Client::GetItemIDAt(THIS, slot_id)");
|
||||||
{
|
{
|
||||||
Client * THIS;
|
Client * THIS;
|
||||||
uint32 RETVAL;
|
int32 RETVAL;
|
||||||
dXSTARG;
|
dXSTARG;
|
||||||
int16 slot_id = (int16)SvIV(ST(1));
|
int16 slot_id = (int16)SvIV(ST(1));
|
||||||
|
|
||||||
@ -2969,7 +2969,7 @@ XS(XS_Client_GetItemIDAt)
|
|||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetItemIDAt(slot_id);
|
RETVAL = THIS->GetItemIDAt(slot_id);
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH; PUSHi((IV)RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
@ -2982,7 +2982,7 @@ XS(XS_Client_GetAugmentIDAt)
|
|||||||
Perl_croak(aTHX_ "Usage: Client::GetAugmentIDAt(THIS, slot_id, augslot)");
|
Perl_croak(aTHX_ "Usage: Client::GetAugmentIDAt(THIS, slot_id, augslot)");
|
||||||
{
|
{
|
||||||
Client * THIS;
|
Client * THIS;
|
||||||
uint32 RETVAL;
|
int32 RETVAL;
|
||||||
dXSTARG;
|
dXSTARG;
|
||||||
int16 slot_id = (int16)SvIV(ST(1));
|
int16 slot_id = (int16)SvIV(ST(1));
|
||||||
int16 augslot = (uint8)SvIV(ST(2));
|
int16 augslot = (uint8)SvIV(ST(2));
|
||||||
@ -2997,7 +2997,7 @@ XS(XS_Client_GetAugmentIDAt)
|
|||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetAugmentIDAt(slot_id, augslot);
|
RETVAL = THIS->GetAugmentIDAt(slot_id, augslot);
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH; PUSHi((IV)RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7298,7 +7298,7 @@ XS(XS_Mob_GetItemStat)
|
|||||||
Perl_croak(aTHX_ "Usage: Mob::GetItemStat(THIS, itemid, stat)");
|
Perl_croak(aTHX_ "Usage: Mob::GetItemStat(THIS, itemid, stat)");
|
||||||
{
|
{
|
||||||
Mob * THIS;
|
Mob * THIS;
|
||||||
uint32 RETVAL;
|
int32 RETVAL;
|
||||||
uint32 itemid = (uint32)SvUV(ST(1));
|
uint32 itemid = (uint32)SvUV(ST(1));
|
||||||
Const_char * stat = (Const_char *)SvPV_nolen(ST(2));
|
Const_char * stat = (Const_char *)SvPV_nolen(ST(2));
|
||||||
dXSTARG;
|
dXSTARG;
|
||||||
@ -7313,7 +7313,7 @@ XS(XS_Mob_GetItemStat)
|
|||||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
RETVAL = THIS->GetItemStat(itemid, stat);
|
RETVAL = THIS->GetItemStat(itemid, stat);
|
||||||
XSprePUSH; PUSHu((UV)RETVAL);
|
XSprePUSH; PUSHi((IV)RETVAL);
|
||||||
}
|
}
|
||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user