void WorldSession::HandleCharterOffer( WorldPacket & recv_data ) { uint32 shit; uint64 item_guid, target_guid; Charter * pCharter; recv_data >> shit >> item_guid >> target_guid; if(!_player->IsInWorld()) return; Player * pTarget = _player->GetMapMgr()->GetPlayer((uint32)target_guid); pCharter = objmgr.GetCharterByItemGuid(item_guid); if( pCharter == NULL ) { SendNotification("Charter cannot be found."); return; } if(pTarget == 0 || pTarget->GetTeam() != _player->GetTeam() || pTarget == _player) { SendNotification("Target is of the wrong faction."); return; } if(!pTarget->CanSignCharter(pCharter, _player)) { SendNotification("Target player cannot sign your charter for one or more reasons."); return; } SendShowSignatures(pCharter, item_guid, pTarget); }
void WorldSession::HandleCharterOffer( WorldPacket & recv_data ) { uint32 shit; uint64 item_guid, target_guid; Charter * pCharter; recv_data >> shit >> item_guid >> target_guid; if(!_player->IsInWorld()) return; Player * pTarget = _player->GetMapMgr()->GetPlayer((uint32)target_guid); pCharter = objmgr.GetCharterByItemGuid(item_guid); if( !pCharter ) { SendNotification(_player->GetSession()->LocalizedWorldSrv(76)); return; } if(pTarget == 0 || pTarget->GetTeam() != _player->GetTeam() || pTarget == _player && !sWorld.interfaction_guild) { SendNotification(_player->GetSession()->LocalizedWorldSrv(77)); return; } if(!pTarget->CanSignCharter(pCharter, _player)) { SendNotification(_player->GetSession()->LocalizedWorldSrv(78)); return; } SendShowSignatures(pCharter, item_guid, pTarget); }
void WorldSession::HandleCharterShowSignatures(WorldPacket & recv_data) { Charter * pCharter; uint64 item_guid; recv_data >> item_guid; pCharter = objmgr.GetCharterByItemGuid(item_guid); if(pCharter) SendShowSignatures(pCharter, item_guid, _player); }