mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
[Bug Fix] Players could become flagged as a Trader when they were not trading (#4553)
This commit is contained in:
parent
a49d1446b7
commit
7a841c11c5
@ -1945,6 +1945,7 @@ struct ServerOP_GuildMessage_Struct {
|
|||||||
struct TraderMessaging_Struct {
|
struct TraderMessaging_Struct {
|
||||||
uint32 action;
|
uint32 action;
|
||||||
uint32 zone_id;
|
uint32 zone_id;
|
||||||
|
uint32 instance_id;
|
||||||
uint32 trader_id;
|
uint32 trader_id;
|
||||||
uint32 entity_id;
|
uint32 entity_id;
|
||||||
char trader_name[64];
|
char trader_name[64];
|
||||||
|
|||||||
@ -2913,10 +2913,11 @@ void Client::SendBecomeTraderToWorld(Client *trader, BazaarTraderBarterActions a
|
|||||||
auto outapp = new ServerPacket(ServerOP_TraderMessaging, sizeof(TraderMessaging_Struct));
|
auto outapp = new ServerPacket(ServerOP_TraderMessaging, sizeof(TraderMessaging_Struct));
|
||||||
auto data = (TraderMessaging_Struct *) outapp->pBuffer;
|
auto data = (TraderMessaging_Struct *) outapp->pBuffer;
|
||||||
|
|
||||||
data->action = action;
|
data->action = action;
|
||||||
data->entity_id = trader->GetID();
|
data->entity_id = trader->GetID();
|
||||||
data->trader_id = trader->CharacterID();
|
data->trader_id = trader->CharacterID();
|
||||||
data->zone_id = trader->GetZoneID();
|
data->zone_id = trader->GetZoneID();
|
||||||
|
data->instance_id = trader->GetInstanceID();
|
||||||
strn0cpy(data->trader_name, trader->GetName(), sizeof(data->trader_name));
|
strn0cpy(data->trader_name, trader->GetName(), sizeof(data->trader_name));
|
||||||
|
|
||||||
worldserver.SendPacket(outapp);
|
worldserver.SendPacket(outapp);
|
||||||
|
|||||||
@ -3942,7 +3942,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
c.second->QueuePacket(outapp);
|
c.second->QueuePacket(outapp);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
}
|
}
|
||||||
if (zone && zone->GetZoneID() == Zones::BAZAAR) {
|
if (zone && zone->GetZoneID() == Zones::BAZAAR && in->instance_id == zone->GetInstanceID()) {
|
||||||
if (in->action == TraderOn) {
|
if (in->action == TraderOn) {
|
||||||
c.second->SendBecomeTrader(TraderOn, in->entity_id);
|
c.second->SendBecomeTrader(TraderOn, in->entity_id);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user