Compare commits

..

2 Commits

Author SHA1 Message Date
Akkadius 5d69235a4c [Release] 23.3.4 2025-03-14 13:09:53 -05:00
Mitch Freeman e93785f885 [Fix] Add check for simultaneous direct vendor and parcel Trader/Buyer Purchase (#4778) 2025-03-13 22:30:00 -05:00
8 changed files with 56 additions and 6 deletions
+7
View File
@@ -1,3 +1,10 @@
## [23.3.4] 3/14/2025
### Fixes
* Add check for simultaneous direct vendor and parcel Trader/Buyer Purchase ([#4778](https://github.com/EQEmu/Server/pull/4778)) @neckkola 2025-03-14
* Fix for rare circumstance where NPC's would have 0 health on restore @Akkadius
## [23.3.3] 3/13/2025
### Database
+1 -1
View File
@@ -25,7 +25,7 @@
// Build variables
// these get injected during the build pipeline
#define CURRENT_VERSION "23.3.3-dev" // always append -dev to the current version for custom-builds
#define CURRENT_VERSION "23.3.4-dev" // always append -dev to the current version for custom-builds
#define LOGIN_VERSION "0.8.0"
#define COMPILE_DATE __DATE__
#define COMPILE_TIME __TIME__
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "eqemu-server",
"version": "23.3.3",
"version": "23.3.4",
"repository": {
"type": "git",
"url": "https://github.com/EQEmu/Server.git"
+2
View File
@@ -443,6 +443,8 @@ public:
int64 ValidateBuyLineCost(std::map<uint32, BuylineItemDetails_Struct>& item_map);
bool DoBarterBuyerChecks(BuyerLineSellItem_Struct& sell_line);
bool DoBarterSellerChecks(BuyerLineSellItem_Struct& sell_line);
void CancelBuyerTradeWindow();
void CancelTraderTradeWindow();
void FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho);
bool ShouldISpawnFor(Client *c) { return !GMHideMe(c) && !IsHoveringForRespawn(); }
+1 -1
View File
@@ -15463,7 +15463,7 @@ void Client::Handle_OP_TraderBuy(const EQApplicationPacket *app)
);
Message(
Chat::Yellow,
"Direct inventory delivey is not yet implemented. Please visit the vendor directly or purchase via parcel delivery."
"Direct inventory delivery is not yet implemented. Please visit the vendor directly or purchase via parcel delivery."
);
in->method = BazaarByDirectToInventory;
in->sub_action = Failed;
+22
View File
@@ -1894,6 +1894,13 @@ void Client::SellToBuyer(const EQApplicationPacket *app)
break;
}
if (sell_line.purchase_method == BarterInBazaar && buyer->IsThereACustomer()) {
auto customer = entity_list.GetClientByID(buyer->GetCustomerID());
if (customer) {
customer->CancelBuyerTradeWindow();
}
}
if (!DoBarterBuyerChecks(sell_line)) {
return;
};
@@ -3825,3 +3832,18 @@ bool Client::DoBarterSellerChecks(BuyerLineSellItem_Struct &sell_line)
return true;
}
void Client::CancelBuyerTradeWindow()
{
auto end_session = new EQApplicationPacket(OP_Barter, sizeof(BuyerRemoveItemFromMerchantWindow_Struct));
auto data = reinterpret_cast<BuyerRemoveItemFromMerchantWindow_Struct *>(end_session->pBuffer);
data->action = Barter_BuyerInspectBegin;
FastQueuePacket(&end_session);
}
void Client::CancelTraderTradeWindow()
{
auto end_session = new EQApplicationPacket(OP_ShopEnd);
FastQueuePacket(&end_session);
}
+13
View File
@@ -3786,6 +3786,13 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
return;
}
if (trader_pc->IsThereACustomer()) {
auto customer = entity_list.GetClientByID(trader_pc->GetCustomerID());
if (customer) {
customer->CancelTraderTradeWindow();
}
}
auto item_sn = Strings::ToUnsignedBigInt(in->trader_buy_struct.serial_number);
auto outapp = std::make_unique<EQApplicationPacket>(OP_Trader, sizeof(TraderBuy_Struct));
auto data = (TraderBuy_Struct *) outapp->pBuffer;
@@ -3981,6 +3988,12 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
worldserver.SendPacket(pack);
return;
}
if (buyer->IsThereACustomer()) {
auto customer = entity_list.GetClientByID(buyer->GetCustomerID());
if (customer) {
customer->CancelBuyerTradeWindow();
}
}
BuyerLineSellItem_Struct sell_line{};
sell_line.item_id = in->buy_item_id;
+9 -3
View File
@@ -312,9 +312,15 @@ inline std::vector<uint32_t> GetLootdropIds(const std::vector<ZoneStateSpawnsRep
inline void LoadNPCState(Zone *zone, NPC *n, ZoneStateSpawnsRepository::ZoneStateSpawns &s)
{
n->SetHP(s.hp);
n->SetMana(s.mana);
n->SetEndurance(s.endurance);
if (s.hp > 0) {
n->SetHP(s.hp);
}
if (s.mana > 0) {
n->SetMana(s.mana);
}
if (s.endurance > 0) {
n->SetEndurance(s.endurance);
}
if (s.grid) {
n->AssignWaypoints(s.grid, s.current_waypoint);