mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Feature] Add RoF2 Bazaar Support (#4315)
* Add RoF2 Bazaar Support Enable RoF2 bazaar features * Add augments to Trader Items * Cleanup Cleanup of formatting and unused functions * Update PlayerProfile for correct char_id in trader transactions. Further cleanup. * Add parcel delivery price functionality Add parcel delivery price functionality via rules and new delivery cost struct. * Add RoF support for bazaar window outside of bazaar with parcel delivery * Further Testing and ActiveTransaction added Further testing and a few fixes and messages added. Add active transaction check to ensure two clients cannot purchase from the bazaar window at the same time * Cleanup and Formatting updates Cleanup and Formatting updates * Update database manifest for the trader table against default peq trader table * Logs and formatting * Update bazaarsearch to be content_db aware * Fix crash * Simplify search * Search fixes * Push up more search logging * More search fixes * Formatting * Update trader_repository.h * Add Rule for Bazaar Parcel Delivery Add a rule Bazaar:EnableParcelDelivery to enable/disable bazaar parcel delivery. Default is True. * Fix crash * Update Bazaar Search Adds/Tested bazaar search with move to content_db - race, class, money, number of returned items, stats, name, slot, level, traders, local traders, specific trader. Outstanding - type, more stats to add (heroic, etc) * Formatting * Push * Update bazaarsearch to include all stats that are available in RoF2 * Update BazaarSearch Updates the bazaar search for item types. They should be working as per RoF2+ types. * Formatting * Final updates to BazaarSearch Add search by augmentation slots available on the item. This enables all but Prestige, which I believe are not implemented yet. * Add Titanium functionality correct ItemType Search Add Titanium /trader /bazaar functionality. Added itemtype=armor bazaar search. It was missed in the search work * Close off for loops --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+25
-4
@@ -1864,19 +1864,19 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
LogInventory("Dest slot [{}] has item [{}] ([{}]) with [{}] charges in it", dst_slot_id, dst_inst->GetItem()->Name, dst_inst->GetItem()->ID, dst_inst->GetCharges());
|
||||
dstitemid = dst_inst->GetItem()->ID;
|
||||
}
|
||||
if (Trader && srcitemid>0){
|
||||
if (IsTrader() && srcitemid>0){
|
||||
EQ::ItemInstance* srcbag;
|
||||
EQ::ItemInstance* dstbag;
|
||||
uint32 srcbagid =0;
|
||||
uint32 dstbagid = 0;
|
||||
|
||||
if (src_slot_id >= EQ::invbag::GENERAL_BAGS_BEGIN && src_slot_id <= EQ::invbag::GENERAL_BAGS_END) {
|
||||
srcbag = m_inv.GetItem(((int)(src_slot_id / 10)) - 3);
|
||||
srcbag = m_inv.GetItem(EQ::InventoryProfile::CalcSlotId(src_slot_id));
|
||||
if (srcbag)
|
||||
srcbagid = srcbag->GetItem()->ID;
|
||||
}
|
||||
if (dst_slot_id >= EQ::invbag::GENERAL_BAGS_BEGIN && dst_slot_id <= EQ::invbag::GENERAL_BAGS_END) {
|
||||
dstbag = m_inv.GetItem(((int)(dst_slot_id / 10)) - 3);
|
||||
dstbag = m_inv.GetItem(EQ::InventoryProfile::CalcSlotId(dst_slot_id));
|
||||
if (dstbag)
|
||||
dstbagid = dstbag->GetItem()->ID;
|
||||
}
|
||||
@@ -1884,7 +1884,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
(dstbagid && dstbag->GetItem()->BagType == EQ::item::BagTypeTradersSatchel) ||
|
||||
(srcitemid && src_inst && src_inst->GetItem()->BagType == EQ::item::BagTypeTradersSatchel) ||
|
||||
(dstitemid && dst_inst && dst_inst->GetItem()->BagType == EQ::item::BagTypeTradersSatchel)) {
|
||||
Trader_EndTrader();
|
||||
TraderEndTrader();
|
||||
Message(Chat::Red,"You cannot move your Trader Satchels, or items inside them, while Trading.");
|
||||
}
|
||||
}
|
||||
@@ -2180,6 +2180,27 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
}
|
||||
|
||||
LogInventory("Moving entire item from slot [{}] to slot [{}]", src_slot_id, dst_slot_id);
|
||||
if (src_inst->IsStackable() &&
|
||||
dst_slot_id >= EQ::invbag::GENERAL_BAGS_BEGIN &&
|
||||
dst_slot_id <= EQ::invbag::GENERAL_BAGS_END
|
||||
) {
|
||||
EQ::ItemInstance *bag = nullptr;
|
||||
bag = m_inv.GetItem(EQ::InventoryProfile::CalcSlotId(dst_slot_id));
|
||||
if (bag) {
|
||||
if (bag->GetItem()->BagType == EQ::item::BagTypeTradersSatchel) {
|
||||
PutItemInInventory(dst_slot_id, *src_inst, true);
|
||||
//This resets the UF client to recognize the new serial item of the placed item
|
||||
//if it came from a stack without having to close the trader window and re-open.
|
||||
//It is not required for the RoF2 client.
|
||||
if (ClientVersion() < EQ::versions::ClientVersion::RoF2) {
|
||||
auto outapp = new EQApplicationPacket(OP_Trader, sizeof(TraderBuy_Struct));
|
||||
auto data = (TraderBuy_Struct *) outapp->pBuffer;
|
||||
data->action = BazaarBuyItem;
|
||||
FastQueuePacket(&outapp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (src_slot_id <= EQ::invslot::EQUIPMENT_END) {
|
||||
if(src_inst) {
|
||||
|
||||
Reference in New Issue
Block a user