remove wrong handlers
This commit is contained in:
@@ -2385,69 +2385,3 @@ void WorldSession::HandleNeighborhoodCancelInvitationAlt(WorldPackets::Neighborh
|
||||
response.InviteeGuid = neighborhoodCancelInvitationAlt.InviteeGuid;
|
||||
SendPacket(response.Write());
|
||||
}
|
||||
|
||||
void WorldSession::HandleNeighborhoodInviteNotificationAck(WorldPackets::Neighborhood::NeighborhoodInviteNotificationAck const& neighborhoodInviteNotificationAck)
|
||||
{
|
||||
Player* player = GetPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
TC_LOG_DEBUG("housing", "CMSG_NEIGHBORHOOD_INVITE_NOTIFICATION_ACK Player: {} NeighborhoodGuid: {}",
|
||||
player->GetGUID().ToString(), neighborhoodInviteNotificationAck.NeighborhoodGuid.ToString());
|
||||
|
||||
// Acknowledgment only ? no response needed
|
||||
// The client is confirming it received the invite notification
|
||||
}
|
||||
|
||||
void WorldSession::HandleNeighborhoodOfferOwnershipResponse(WorldPackets::Neighborhood::NeighborhoodOfferOwnershipResponsePacket const& neighborhoodOfferOwnershipResponse)
|
||||
{
|
||||
Player* player = GetPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
TC_LOG_DEBUG("housing", "CMSG_NEIGHBORHOOD_OFFER_OWNERSHIP_RESPONSE Player: {} NeighborhoodGuid: {} Accept: {}",
|
||||
player->GetGUID().ToString(), neighborhoodOfferOwnershipResponse.NeighborhoodGuid.ToString(),
|
||||
neighborhoodOfferOwnershipResponse.Accept);
|
||||
|
||||
Neighborhood* neighborhood = sNeighborhoodMgr.ResolveNeighborhood(
|
||||
neighborhoodOfferOwnershipResponse.NeighborhoodGuid, player);
|
||||
|
||||
WorldPackets::Neighborhood::NeighborhoodOfferOwnershipResponse response;
|
||||
|
||||
if (!neighborhood)
|
||||
{
|
||||
response.Result = static_cast<uint8>(HOUSING_RESULT_NEIGHBORHOOD_NOT_FOUND);
|
||||
SendPacket(response.Write());
|
||||
return;
|
||||
}
|
||||
|
||||
if (neighborhoodOfferOwnershipResponse.Accept)
|
||||
{
|
||||
HousingResult result = neighborhood->AcceptOwnershipTransfer(player->GetGUID());
|
||||
response.Result = static_cast<uint8>(result);
|
||||
|
||||
if (result == HOUSING_RESULT_SUCCESS)
|
||||
{
|
||||
// Broadcast roster update ? role change for both old owner and new owner
|
||||
WorldPackets::Neighborhood::NeighborhoodRosterResidentUpdate rosterUpdate;
|
||||
rosterUpdate.Residents.push_back({ player->GetGUID(), 1 /*RoleChanged*/, true /*owner = privileged*/ });
|
||||
neighborhood->BroadcastPacket(rosterUpdate.Write());
|
||||
|
||||
// Refresh NeighborhoodMirrorData (OwnerGUID + Managers changed)
|
||||
neighborhood->RefreshMirrorDataForOnlineMembers();
|
||||
|
||||
TC_LOG_INFO("housing", "CMSG_NEIGHBORHOOD_OFFER_OWNERSHIP_RESPONSE: Player {} accepted ownership of neighborhood {}",
|
||||
player->GetGUID().ToString(), neighborhood->GetGuid().ToString());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HousingResult result = neighborhood->RejectOwnershipTransfer(player->GetGUID());
|
||||
response.Result = static_cast<uint8>(result);
|
||||
|
||||
TC_LOG_INFO("housing", "CMSG_NEIGHBORHOOD_OFFER_OWNERSHIP_RESPONSE: Player {} rejected ownership of neighborhood {}",
|
||||
player->GetGUID().ToString(), neighborhood->GetGuid().ToString());
|
||||
}
|
||||
|
||||
SendPacket(response.Write());
|
||||
}
|
||||
|
||||
@@ -1911,8 +1911,6 @@ class TC_GAME_API WorldSession
|
||||
|
||||
// Phase 7 Neighborhood handlers
|
||||
void HandleNeighborhoodCancelInvitationAlt(WorldPackets::Neighborhood::NeighborhoodCancelInvitationAlt const& neighborhoodCancelInvitationAlt);
|
||||
void HandleNeighborhoodInviteNotificationAck(WorldPackets::Neighborhood::NeighborhoodInviteNotificationAck const& neighborhoodInviteNotificationAck);
|
||||
void HandleNeighborhoodOfferOwnershipResponse(WorldPackets::Neighborhood::NeighborhoodOfferOwnershipResponsePacket const& neighborhoodOfferOwnershipResponse);
|
||||
|
||||
void HandleNeighborhoodInitiativeServiceStatusCheck(WorldPackets::Neighborhood::NeighborhoodInitiativeServiceStatusCheck const& packet);
|
||||
void HandleGetAvailableInitiativeRequest(WorldPackets::Neighborhood::GetAvailableInitiativeRequest const& getAvailableInitiativeRequest);
|
||||
|
||||
Reference in New Issue
Block a user