diff --git a/source/WorldServer/Commands/Commands.cpp b/source/WorldServer/Commands/Commands.cpp index e5eebb6..4a7525b 100644 --- a/source/WorldServer/Commands/Commands.cpp +++ b/source/WorldServer/Commands/Commands.cpp @@ -9964,6 +9964,15 @@ void Commands::Command_TradeAddItem(Client* client, Seperator* sep) int32 index = atoi(sep->arg[0]); item = client->GetPlayer()->GetPlayerItemList()->GetItemFromIndex(index); if (item) { + if(item->details.item_locked || item->details.equip_slot_id) { + client->SimpleMessage(CHANNEL_COLOR_RED, "You cannot trade an item currently in use."); + return; + } + else if(item->details.inv_slot_id == -3 || item->details.inv_slot_id == -4) { + client->SimpleMessage(CHANNEL_COLOR_RED, "You cannot trade an item in the bank."); + return; + } + int8 result = client->GetPlayer()->trade->AddItemToTrade(client->GetPlayer(), item, atoi(sep->arg[2]), atoi(sep->arg[1])); if (result == 1) client->SimpleMessage(CHANNEL_COLOR_YELLOW, "Item is already being traded."); diff --git a/source/WorldServer/client.cpp b/source/WorldServer/client.cpp index 8deaf0c..ae97db0 100644 --- a/source/WorldServer/client.cpp +++ b/source/WorldServer/client.cpp @@ -8136,6 +8136,10 @@ void Client::SellItem(int32 item_id, int16 quantity, int32 unique_id) { if (!item) item = player->item_list.GetItemFromID(item_id); if (item && master_item) { + if(item->details.inv_slot_id == -3 || item->details.inv_slot_id == -4) { + SimpleMessage(CHANNEL_COLOR_RED, "You cannot sell an item in the bank."); + return; + } if (item->details.item_locked || item->details.equip_slot_id) { SimpleMessage(CHANNEL_COLOR_RED, "You cannot sell the item in use.");