I think I found code in C++ that handles the breaking invis on trade....except it seems to either be deprecated or I don't have the right code because there doesn't seem to be a definition for it anywhere in the class structure for "Client"
this is in "client_packet.cpp" in "EQEmuServer/zone/"
void Client::Handle_OP_TradeRequest(const EQApplicationPacket *app)
{
// Client requesting a trade session from an npc/client
// Trade session not started until OP_TradeRequestAck is sent
BreakInvis();
// Pass trade request on to recipient
TradeRequest_Struct* msg = (TradeRequest_Struct*) app->pBuffer;
Mob* tradee = entity_list.GetMob(msg->to_mob_id);
if (tradee && tradee->IsClient()) {
tradee->CastToClient()->QueuePacket(app);
}
#ifndef BOTS
else if (tradee && tradee->IsNPC()) {
#else
else if (tradee && (tradee->IsNPC() || tradee->IsBot())) {
#endif
//npcs always accept
trade->Start(msg->to_mob_id);
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;
}
However, BreakInvis() is not defined in the header or any of the parent classes. Wo
|