mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[7440] Use server-side only zone info. Optimize related calles in case zone and subzone use.
This in some cases make some zones not explorable if it not have server side data in current maps but not allow cheating with zone set from client.
This commit is contained in:
parent
071a0317f0
commit
329fb3f9d1
15 changed files with 103 additions and 56 deletions
|
|
@ -433,11 +433,12 @@ void WorldSession::HandleBinderActivateOpcode( WorldPacket & recv_data )
|
|||
void WorldSession::SendBindPoint(Creature *npc)
|
||||
{
|
||||
uint32 bindspell = 3286;
|
||||
uint32 zone_id = _player->GetZoneId();
|
||||
|
||||
// update sql homebind
|
||||
CharacterDatabase.PExecute("UPDATE character_homebind SET map = '%u', zone = '%u', position_x = '%f', position_y = '%f', position_z = '%f' WHERE guid = '%u'", _player->GetMapId(), _player->GetZoneId(), _player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), _player->GetGUIDLow());
|
||||
CharacterDatabase.PExecute("UPDATE character_homebind SET map = '%u', zone = '%u', position_x = '%f', position_y = '%f', position_z = '%f' WHERE guid = '%u'", _player->GetMapId(), zone_id, _player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), _player->GetGUIDLow());
|
||||
_player->m_homebindMapId = _player->GetMapId();
|
||||
_player->m_homebindZoneId = _player->GetZoneId();
|
||||
_player->m_homebindZoneId = zone_id;
|
||||
_player->m_homebindX = _player->GetPositionX();
|
||||
_player->m_homebindY = _player->GetPositionY();
|
||||
_player->m_homebindZ = _player->GetPositionZ();
|
||||
|
|
@ -456,19 +457,19 @@ void WorldSession::SendBindPoint(Creature *npc)
|
|||
data << float(_player->GetPositionY());
|
||||
data << float(_player->GetPositionZ());
|
||||
data << uint32(_player->GetMapId());
|
||||
data << uint32(_player->GetZoneId());
|
||||
data << uint32(zone_id);
|
||||
SendPacket( &data );
|
||||
|
||||
DEBUG_LOG("New Home Position X is %f",_player->GetPositionX());
|
||||
DEBUG_LOG("New Home Position Y is %f",_player->GetPositionY());
|
||||
DEBUG_LOG("New Home Position Z is %f",_player->GetPositionZ());
|
||||
DEBUG_LOG("New Home MapId is %u",_player->GetMapId());
|
||||
DEBUG_LOG("New Home ZoneId is %u",_player->GetZoneId());
|
||||
DEBUG_LOG("New Home ZoneId is %u",zone_id);
|
||||
|
||||
// zone update
|
||||
data.Initialize( SMSG_PLAYERBOUND, 8+4 );
|
||||
data << uint64(_player->GetGUID());
|
||||
data << uint32(_player->GetZoneId());
|
||||
data << uint32(zone_id);
|
||||
SendPacket( &data );
|
||||
|
||||
_player->PlayerTalkClass->CloseGossip();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue