mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
Comment_Review
Updates based on comment review.
This commit is contained in:
+1
-2
@@ -314,7 +314,6 @@ public:
|
||||
void Trader_CustomerBrowsing(Client *Customer);
|
||||
|
||||
void TraderEndTrader();
|
||||
//void TraderPriceUpdate(const EQApplicationPacket *app);
|
||||
void TraderUpdateItem(const EQApplicationPacket *app);
|
||||
void SendBazaarDone(uint32 trader_id);
|
||||
void SendBulkBazaarTraders();
|
||||
@@ -351,7 +350,7 @@ public:
|
||||
void SendTraderPacket(Client* trader, uint32 Unknown72 = 51);
|
||||
void SendBuyerPacket(Client* Buyer);
|
||||
void SendBuyerToBarterWindow(Client* buyer, uint32 action);
|
||||
GetItems2_Struct* GetTraderItems();
|
||||
GetBazaarItems_Struct* GetTraderItems();
|
||||
void SendBazaarWelcome();
|
||||
void SendBarterWelcome();
|
||||
void DyeArmor(EQ::TintProfile* dye);
|
||||
|
||||
@@ -860,7 +860,7 @@ void Client::CompleteConnect()
|
||||
}
|
||||
|
||||
auto offline_transactions_trader = CharacterOfflineTransactionsRepository::GetWhere(
|
||||
database, fmt::format("`character_id` = '{}' AND `type` = '{}'", CharacterID(), TRADER_TRANSACTION)
|
||||
database, fmt::format("`character_id` = {} AND `type` = {}", CharacterID(), TRADER_TRANSACTION)
|
||||
);
|
||||
if (offline_transactions_trader.size() > 0) {
|
||||
Message(Chat::Yellow, "You sold the following items while in offline trader mode:");
|
||||
@@ -884,7 +884,7 @@ void Client::CompleteConnect()
|
||||
}
|
||||
|
||||
auto offline_transactions_buyer = CharacterOfflineTransactionsRepository::GetWhere(
|
||||
database, fmt::format("`character_id` = '{}' AND `type` = '{}'", CharacterID(), BUYER_TRANSACTION)
|
||||
database, fmt::format("`character_id` = {} AND `type` = {}", CharacterID(), BUYER_TRANSACTION)
|
||||
);
|
||||
if (offline_transactions_buyer.size() > 0) {
|
||||
Message(Chat::Yellow, "You bought the following items while in offline buyer mode:");
|
||||
@@ -903,7 +903,7 @@ void Client::CompleteConnect()
|
||||
}
|
||||
|
||||
CharacterOfflineTransactionsRepository::DeleteWhere(
|
||||
database, fmt::format("`character_id` = '{}' AND `type` = '{}'", CharacterID(), BUYER_TRANSACTION)
|
||||
database, fmt::format("`character_id` = {} AND `type` = {}", CharacterID(), BUYER_TRANSACTION)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -15506,7 +15506,6 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
//LogTradingDetail("Unknown size for OP_Trader: [{}]", app->size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -651,7 +651,6 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
|
||||
// put item into inventory
|
||||
if (to_slot == EQ::invslot::slotCursor) {
|
||||
PushItemOnCursor(*inst, true);
|
||||
//SendItemPacket(EQ::invslot::slotCursor, inst, ItemPacketLimbo);
|
||||
} else {
|
||||
PutItemInInventory(to_slot, *inst, true);
|
||||
}
|
||||
|
||||
@@ -416,6 +416,7 @@
|
||||
#define MAX_ACTIVE_TASKS 6010 //Sorry %3, you already have the maximum number of active tasks.
|
||||
#define TASK_REQUEST_COOLDOWN_TIMER 6011 //Sorry, %3, but you can't request another task for %4 minutes and %5 seconds.
|
||||
#define FORAGE_MASTERY 6012 //Your forage mastery has enabled you to find something else!
|
||||
#define BUYER 6056 //BUYER
|
||||
#define BUYER_WELCOME 6065 //There are %1 Buyers waiting to purchase your loot. Type /barter to search for them, or use /buyer to set up your own Buy Lines.
|
||||
#define BUYER_GREETING 6070 //%1 greets you, '%2'
|
||||
#define GUILD_BANK_CANNOT_DEPOSIT 6097 // Cannot deposit this item. Containers must be empty, and only one of each LORE and no NO TRADE or TEMPORARY items may be deposited.
|
||||
@@ -543,6 +544,7 @@
|
||||
#define GROUP_INVITEE_NOT_FOUND 12268 //You must target a player or use /invite <name> to invite someone to your group.
|
||||
#define GROUP_INVITEE_SELF 12270 //12270 You cannot invite yourself.
|
||||
#define ALREADY_IN_PARTY 12272 //That person is already in your party.
|
||||
#define TRADER 12315 //TRADER
|
||||
#define TALKING_TO_SELF 12323 //Talking to yourself again?
|
||||
#define SPLIT_NO_GROUP 12328 //You are not in a group! Keep it all.
|
||||
#define NO_LONGER_HIDDEN 12337 //You are no longer hidden.
|
||||
|
||||
+8
-16
@@ -1085,10 +1085,8 @@ EQ::ItemInstance *Client::FindTraderItemByUniqueID(std::string &unique_id)
|
||||
// we already have the parent bag and a contents iterator..why not just iterate the bag!??
|
||||
slot_id = EQ::InventoryProfile::CalcSlotId(i, x);
|
||||
item = GetInv().GetItem(slot_id);
|
||||
if (item) {
|
||||
if (item->GetUniqueID().compare(unique_id) == 0) {
|
||||
return item;
|
||||
}
|
||||
if (item && item->GetUniqueID().compare(unique_id) == 0) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1136,10 +1134,8 @@ std::vector<EQ::ItemInstance *> Client::FindTraderItemsByUniqueID(const char* un
|
||||
// we already have the parent bag and a contents iterator..why not just iterate the bag!??
|
||||
slot_id = EQ::InventoryProfile::CalcSlotId(i, x);
|
||||
item = GetInv().GetItem(slot_id);
|
||||
if (item) {
|
||||
if (item->GetUniqueID().compare(unique_id) == 0) {
|
||||
items.push_back(item);
|
||||
}
|
||||
if (item && item->GetUniqueID().compare(unique_id) == 0) {
|
||||
items.push_back(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1149,11 +1145,11 @@ std::vector<EQ::ItemInstance *> Client::FindTraderItemsByUniqueID(const char* un
|
||||
return items;
|
||||
}
|
||||
|
||||
GetItems2_Struct *Client::GetTraderItems()
|
||||
GetBazaarItems_Struct *Client::GetTraderItems()
|
||||
{
|
||||
const EQ::ItemInstance *item = nullptr;
|
||||
int16 slot_id = INVALID_INDEX;
|
||||
auto gis = new GetItems2_Struct{0};
|
||||
auto gis = new GetBazaarItems_Struct{0};
|
||||
uint8 ndx = 0;
|
||||
|
||||
for (int16 i = EQ::invslot::GENERAL_BEGIN; i <= EQ::invslot::GENERAL_END; i++) {
|
||||
@@ -1309,7 +1305,7 @@ void Client::FindAndNukeTraderItem(std::string &item_unique_id, int16 quantity,
|
||||
|
||||
std::vector<TraderRepository::Trader> delete_queue{};
|
||||
for (int i = 0; i < item_limit; i++) {
|
||||
if (test_slot && trader_items.at(i).item_unique_id.compare(item_unique_id) == 0) {
|
||||
if (test_slot && i < trader_items.size() && trader_items.at(i).item_unique_id.compare(item_unique_id) == 0) {
|
||||
delete_queue.push_back(trader_items.at(i));
|
||||
NukeTraderItem(
|
||||
slot_id,
|
||||
@@ -1322,7 +1318,7 @@ void Client::FindAndNukeTraderItem(std::string &item_unique_id, int16 quantity,
|
||||
);
|
||||
test_slot = false;
|
||||
}
|
||||
else if (trader_items.at(i).item_id > 0) {
|
||||
else if (i < trader_items.size() && trader_items.at(i).item_id > 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@@ -1766,10 +1762,6 @@ static void UpdateTraderCustomerPriceChanged(
|
||||
// RoF+ use Item IDs for now
|
||||
tdis->item_id = trader_items.at(i).item_id;
|
||||
}
|
||||
//FIX else {
|
||||
// tdis->item_id = trader_items.at(i).item_sn;
|
||||
// }
|
||||
//tdis->item_id = trader_items.at(i).item_sn;
|
||||
LogTrading("Telling customer to remove item [{}] with [{}] charges and S/N [{}]",
|
||||
item_id, charges, trader_items.at(i).item_unique_id);
|
||||
|
||||
|
||||
+2
-3
@@ -314,7 +314,7 @@ std::unique_ptr<EQ::ItemInstance> ZoneDatabase::LoadSingleTraderItem(uint32 char
|
||||
auto results = TraderRepository::GetWhere(
|
||||
database,
|
||||
fmt::format(
|
||||
"`character_id` = '{}' AND `item_unique_id` = '{}' ORDER BY slot_id",
|
||||
"`character_id` = {} AND `item_unique_id` = '{}' ORDER BY slot_id",
|
||||
character_id,
|
||||
unique_item_id
|
||||
)
|
||||
@@ -358,7 +358,6 @@ std::unique_ptr<EQ::ItemInstance> ZoneDatabase::LoadSingleTraderItem(uint32 char
|
||||
|
||||
inst->SetCharges(charges);
|
||||
inst->SetUniqueID(unique_item_id);
|
||||
//FIX inst->SetMerchantSlot(serial_number);
|
||||
inst->SetPrice(cost);
|
||||
|
||||
if (inst->IsStackable()) {
|
||||
@@ -383,7 +382,7 @@ void ZoneDatabase::UpdateTraderItemPrice(int character_id, uint32 item_id, uint3
|
||||
auto results = TraderRepository::DeleteWhere(
|
||||
database,
|
||||
fmt::format(
|
||||
"`character_id` = '{}' AND `item_id` = {}",
|
||||
"`character_id` = {} AND `item_id` = {}",
|
||||
character_id,
|
||||
item_id
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user