mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Quest API] Add HasItemOnCorpse() to Perl/Lua (#3824)
# Perl - Add `$client->HasItemOnCorpse(item_id)`. # Lua - Add `client:HasItemOnCorpse(item_id)`. # Notes - Allows operators to see if a player has an item on any of their corpses. - May need to address having to allocate and deallocate memory for every corpse that could possibly exist for a player.
This commit is contained in:
+8
-7
@@ -4123,15 +4123,16 @@ uint32 ZoneDatabase::GetCharacterCorpseID(uint32 char_id, uint8 corpse) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 ZoneDatabase::GetCharacterCorpseItemAt(uint32 corpse_id, uint16 slotid) {
|
||||
Corpse* tmp = LoadCharacterCorpse(corpse_id);
|
||||
uint32 itemid = 0;
|
||||
uint32 ZoneDatabase::GetCharacterCorpseItemAt(uint32 corpse_id, uint16 slot_id) {
|
||||
Corpse* c = LoadCharacterCorpse(corpse_id);
|
||||
uint32 item_id = 0;
|
||||
|
||||
if (tmp) {
|
||||
itemid = tmp->GetWornItem(slotid);
|
||||
tmp->DepopPlayerCorpse();
|
||||
if (c) {
|
||||
item_id = c->GetWornItem(slot_id);
|
||||
c->DepopPlayerCorpse();
|
||||
}
|
||||
return itemid;
|
||||
|
||||
return item_id;
|
||||
}
|
||||
|
||||
bool ZoneDatabase::LoadCharacterCorpseData(uint32 corpse_id, CharacterCorpseEntry& corpse){
|
||||
|
||||
Reference in New Issue
Block a user