mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 21:41:29 +00:00
[Tasks] Let task reward find free bag slots (#2431)
This commit is contained in:
parent
5502ab8765
commit
b4e46c1f7e
@ -1008,7 +1008,7 @@ void ClientTaskState::RewardTask(Client *client, const TaskInformation *task_inf
|
|||||||
switch (task_information->reward_method) {
|
switch (task_information->reward_method) {
|
||||||
case METHODSINGLEID: {
|
case METHODSINGLEID: {
|
||||||
if (task_information->reward_id) {
|
if (task_information->reward_id) {
|
||||||
int16_t slot = client->GetInv().FindFreeSlot(true, true);
|
int16_t slot = client->GetInv().FindFreeSlot(false, true);
|
||||||
client->SummonItem(task_information->reward_id, -1, 0, 0, 0, 0, 0, 0, false, slot);
|
client->SummonItem(task_information->reward_id, -1, 0, 0, 0, 0, 0, 0, false, slot);
|
||||||
item_data = database.GetItem(task_information->reward_id);
|
item_data = database.GetItem(task_information->reward_id);
|
||||||
if (item_data) {
|
if (item_data) {
|
||||||
@ -1020,7 +1020,7 @@ void ClientTaskState::RewardTask(Client *client, const TaskInformation *task_inf
|
|||||||
case METHODLIST: {
|
case METHODLIST: {
|
||||||
reward_list = task_manager->m_goal_list_manager.GetListContents(task_information->reward_id);
|
reward_list = task_manager->m_goal_list_manager.GetListContents(task_information->reward_id);
|
||||||
for (int item_id : reward_list) {
|
for (int item_id : reward_list) {
|
||||||
int16_t slot = client->GetInv().FindFreeSlot(true, true);
|
int16_t slot = client->GetInv().FindFreeSlot(false, true);
|
||||||
client->SummonItem(item_id, -1, 0, 0, 0, 0, 0, 0, false, slot);
|
client->SummonItem(item_id, -1, 0, 0, 0, 0, 0, 0, false, slot);
|
||||||
item_data = database.GetItem(item_id);
|
item_data = database.GetItem(item_id);
|
||||||
if (item_data) {
|
if (item_data) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user