Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Akkadius committed Oct 15, 2024
1 parent 5800cc2 commit c1c6516
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions zone/trading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,21 +881,14 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st
{"gold", trade->gp},
{"platinum", trade->pp}
};

std::vector<const EQ::ItemInstance *> list(items.begin(), items.end());
for (EQ::ItemInstance *inst: items) {
if (!inst || !inst->GetItem()) {
continue;
}

std::string item_id = fmt::format("{}", inst->GetItem()->ID);
handin[item_id] += inst->GetCharges();
}

std::vector<const EQ::ItemInstance *> list(items.begin(), items.end());
for (EQ::ItemInstance *inst: items) {
if (!inst || !inst->GetItem()) {
continue;
}
item_list.emplace_back(inst);
}

Expand Down

0 comments on commit c1c6516

Please sign in to comment.