mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-07 13:12:24 +00:00
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:
commit
c90326f585
@ -14099,16 +14099,16 @@ void Client::Handle_OP_TradeRequest(const EQApplicationPacket *app)
|
|||||||
#else
|
#else
|
||||||
else if (tradee && (tradee->IsNPC() || tradee->IsBot())) {
|
else if (tradee && (tradee->IsNPC() || tradee->IsBot())) {
|
||||||
#endif
|
#endif
|
||||||
//npcs always accept
|
if (!tradee->IsEngaged()) {
|
||||||
trade->Start(msg->to_mob_id);
|
trade->Start(msg->to_mob_id);
|
||||||
|
EQApplicationPacket *outapp = new EQApplicationPacket(OP_TradeRequestAck, sizeof(TradeRequest_Struct));
|
||||||
auto outapp = new EQApplicationPacket(OP_TradeRequestAck, sizeof(TradeRequest_Struct));
|
TradeRequest_Struct *acc = (TradeRequest_Struct *) outapp->pBuffer;
|
||||||
TradeRequest_Struct* acc = (TradeRequest_Struct*)outapp->pBuffer;
|
acc->from_mob_id = msg->to_mob_id;
|
||||||
acc->from_mob_id = msg->to_mob_id;
|
acc->to_mob_id = msg->from_mob_id;
|
||||||
acc->to_mob_id = msg->from_mob_id;
|
FastQueuePacket(&outapp);
|
||||||
FastQueuePacket(&outapp);
|
safe_delete(outapp);
|
||||||
safe_delete(outapp);
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user