Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
[Tasks] Place task item rewards in free slots (EQEmu#2300)
Browse files Browse the repository at this point in the history
Live places item rewards into the first free inventory slot and only
places it on the cursor if inventory is full
  • Loading branch information
hgtw authored and catapultam-habeo committed Mar 27, 2023
1 parent 0ca3491 commit f5a4bec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zone/task_client_state.cpp
Expand Up @@ -1291,7 +1291,8 @@ void ClientTaskState::RewardTask(Client *client, TaskInformation *task_informati
switch (task_information->reward_method) {
case METHODSINGLEID: {
if (task_information->reward_id) {
client->SummonItem(task_information->reward_id);
int16_t slot = client->GetInv().FindFreeSlot(true, true);
client->SummonItem(task_information->reward_id, -1, 0, 0, 0, 0, 0, 0, false, slot);
item_data = database.GetItem(task_information->reward_id);
if (item_data) {
client->MessageString(Chat::Yellow, YOU_HAVE_BEEN_GIVEN, item_data->Name);
Expand All @@ -1302,7 +1303,8 @@ void ClientTaskState::RewardTask(Client *client, TaskInformation *task_informati
case METHODLIST: {
reward_list = task_manager->m_goal_list_manager.GetListContents(task_information->reward_id);
for (int item_id : reward_list) {
client->SummonItem(item_id);
int16_t slot = client->GetInv().FindFreeSlot(true, true);
client->SummonItem(item_id, -1, 0, 0, 0, 0, 0, 0, false, slot);
item_data = database.GetItem(item_id);
if (item_data) {
client->MessageString(Chat::Yellow, YOU_HAVE_BEEN_GIVEN, item_data->Name);
Expand Down

0 comments on commit f5a4bec

Please sign in to comment.