mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Add Inventory methods to Perl.
- Add $client->GetInventory() to Perl. - Export Lua Inventory methods to Perl. - Add quest::createitem(item_id, charges, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six, attuned) to Perl so you can return a ItemInstance for testing purposes.
This commit is contained in:
@@ -4129,6 +4129,15 @@ Mob *QuestManager::GetOwner() const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
EQ::InventoryProfile *QuestManager::GetInventory() const {
|
||||
if(!quests_running_.empty()) {
|
||||
running_quest e = quests_running_.top();
|
||||
return &e.initiator->GetInv();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
EQ::ItemInstance *QuestManager::GetQuestItem() const {
|
||||
if(!quests_running_.empty()) {
|
||||
running_quest e = quests_running_.top();
|
||||
@@ -4218,3 +4227,10 @@ void QuestManager::UpdateZoneHeader(std::string type, std::string value) {
|
||||
entity_list.QueueClients(0, outapp);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
EQ::ItemInstance *QuestManager::CreateItem(uint32 item_id, int16 charges, uint32 augment_one, uint32 augment_two, uint32 augment_three, uint32 augment_four, uint32 augment_five, uint32 augment_six, bool attuned) const {
|
||||
if (database.GetItem(item_id)) {
|
||||
return database.CreateItem(item_id, charges, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six, attuned);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user