mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Quest API] Implement eq.handin() and quest::handin() (#4718)
* [Quest API] Implement eq.handin() and quest::handin() * Fix MQ using new API style
This commit is contained in:
+10
-2
@@ -4351,6 +4351,10 @@ bool NPC::CheckHandin(
|
||||
h = m_hand_in;
|
||||
}
|
||||
|
||||
if (IsMultiQuestEnabled()) {
|
||||
LogNpcHandin("{} Multi-Quest hand-in enabled", log_handin_prefix);
|
||||
}
|
||||
|
||||
std::vector<std::pair<const std::map<std::string, uint32>&, Handin&>> datasets = {};
|
||||
|
||||
// if we've already started the hand-in process, we don't want to re-process the hand-in data
|
||||
@@ -4432,7 +4436,7 @@ bool NPC::CheckHandin(
|
||||
|
||||
// multi-quest
|
||||
if (IsMultiQuestEnabled()) {
|
||||
for (auto &h_item: h.items) {
|
||||
for (auto &h_item: m_hand_in.items) {
|
||||
for (const auto &r_item: r.items) {
|
||||
if (h_item.item_id == r_item.item_id && h_item.count == r_item.count) {
|
||||
h_item.is_multiquest_item = true;
|
||||
@@ -4777,7 +4781,11 @@ NPC::Handin NPC::ReturnHandinItems(Client *c)
|
||||
}
|
||||
|
||||
c->PushItemOnCursor(*i.item, true);
|
||||
LogNpcHandin("Hand-in failed, returning item [{}]", i.item->GetItem()->Name);
|
||||
LogNpcHandin(
|
||||
"Hand-in failed, returning item [{}] i.is_multiquest_item [{}]",
|
||||
i.item->GetItem()->Name,
|
||||
i.is_multiquest_item
|
||||
);
|
||||
|
||||
returned_handin = true;
|
||||
return true; // Mark this item for removal
|
||||
|
||||
Reference in New Issue
Block a user