mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 08:38:20 +00:00
[Quest API] Adds new methods to NPCs and Corpses (#1510)
- Add $npc->HasItem(item_id) to Perl. - Add $npc->CountItem(item_id) to Perl. - Add $npc->GetItemIDBySlot(loot_slot) to Perl. - Add $npc->GetFirstSlotByItemID(item_id) to Perl. - Add $corpse->HasItem(item_id) to Perl. - Add $corpse->CountItem(item_id) to Perl. - Add $corpse->GetItemIDBySlot(loot_slot) to Perl. - Add $corpse->GetFirstSlotByItemID(item_id) to Perl. - Add npc:HasItem(item_id) to Lua. - Add npc:CountItem(item_id) to Lua. - Add npc:GetItemIDBySlot(loot_slot) to Lua. - Add npc:GetFirstSlotByItemID(item_id) to Lua. - Add corpse:HasItem(item_id) to Lua. - Add corpse:CountItem(item_id) to Lua. - Add corpse:GetItemIDBySlot(loot_slot) to Lua. - Add corpse:GetFirstSlotByItemID(item_id) to Lua. These methods will allow server operators to view the loot a current has in a slot, the first slot found by item ID, count the item by ID, and see if the NPC has the item. With that functionality you could build a custom loot system and modify loot more dynamically.
This commit is contained in:
@@ -54,6 +54,10 @@ public:
|
||||
uint32 GetGold();
|
||||
uint32 GetPlatinum();
|
||||
void AddLooter(Lua_Mob who);
|
||||
bool HasItem(uint32 item_id);
|
||||
uint16 CountItem(uint32 item_id);
|
||||
uint32 GetItemIDBySlot(uint16 loot_slot);
|
||||
uint16 GetFirstSlotByItemID(uint32 item_id);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user