Merge pull request #933 from fryguy503/no_trade_combat

Mobs will not trade anymore if they are currently in combat.
This commit is contained in:
Michael Cook (mackal)
2019-11-18 21:59:24 -05:00
committed by GitHub
+4 -4
View File
@@ -14099,16 +14099,16 @@ void Client::Handle_OP_TradeRequest(const EQApplicationPacket *app)
#else
else if (tradee && (tradee->IsNPC() || tradee->IsBot())) {
#endif
//npcs always accept
if (!tradee->IsEngaged()) {
trade->Start(msg->to_mob_id);
auto outapp = new EQApplicationPacket(OP_TradeRequestAck, sizeof(TradeRequest_Struct));
TradeRequest_Struct* acc = (TradeRequest_Struct*)outapp->pBuffer;
EQApplicationPacket *outapp = new EQApplicationPacket(OP_TradeRequestAck, sizeof(TradeRequest_Struct));
TradeRequest_Struct *acc = (TradeRequest_Struct *) outapp->pBuffer;
acc->from_mob_id = msg->to_mob_id;
acc->to_mob_id = msg->from_mob_id;
FastQueuePacket(&outapp);
safe_delete(outapp);
}
}
return;
}