Core/PacketIO: Implemented CMSG_BUSY_TRADE and CMSG_IGNORE_TRADE
This commit is contained in:
1 parent
1c38edaae4
commit
a145c21495
4 files changed
+9
-14
No files matched your search
@@ -43,10 +43,12 @@ void WorldSession::SendTradeStatus(WorldPackets::Trade::TradeStatus& info)
|
||||
|
||||
void WorldSession::HandleIgnoreTradeOpcode(WorldPackets::Trade::IgnoreTrade& /*ignoreTrade*/)
|
||||
{
|
||||
_player->TradeCancel(true, TRADE_STATUS_IGNORE_YOU);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBusyTradeOpcode(WorldPackets::Trade::BusyTrade& /*busyTRade*/)
|
||||
{
|
||||
_player->TradeCancel(true, TRADE_STATUS_BUSY);
|
||||
}
|
||||
|
||||
void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
|
||||
@@ -549,13 +551,13 @@ void WorldSession::HandleBeginTradeOpcode(WorldPackets::Trade::BeginTrade& /*beg
|
||||
SendTradeStatus(info);
|
||||
}
|
||||
|
||||
void WorldSession::SendCancelTrade()
|
||||
void WorldSession::SendCancelTrade(TradeStatus status)
|
||||
{
|
||||
if (PlayerRecentlyLoggedOut() || PlayerLogout())
|
||||
return;
|
||||
|
||||
WorldPackets::Trade::TradeStatus info;
|
||||
info.Status = TRADE_STATUS_TRADE_CANCELED;
|
||||
info.Status = status;
|
||||
SendTradeStatus(info);
|
||||
}
|
||||
|
||||
@@ -650,13 +652,6 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPackets::Trade::InitiateTrade&
|
||||
return;
|
||||
}
|
||||
|
||||
if (pOther->GetSocial()->HasIgnore(GetPlayer()->GetGUID()))
|
||||
{
|
||||
info.Status = TRADE_STATUS_IGNORE_YOU;
|
||||
SendTradeStatus(info);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pOther->GetTeam() != _player->GetTeam() &&
|
||||
(!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_TRADE) &&
|
||||
!GetPlayer()->GetSession()->HasPermission(rbac::RBAC_PERM_ALLOW_TWO_SIDE_TRADE)))
|
||||
|
||||
Reference in new issue
Block a user