mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Even more fixes.
This commit is contained in:
parent
fdc20af337
commit
2015f21fa8
4 changed files with 27 additions and 21 deletions
|
|
@ -89,8 +89,9 @@ void WorldSession::HandleGMTicketCreateOpcode( WorldPacket & recv_data )
|
|||
recv_data >> ticketText;
|
||||
|
||||
recv_data.read_skip<uint32>(); // unk1, 0
|
||||
recv_data.read_skip<uint32>(); // unk2, 1
|
||||
recv_data.read_skip<uint8>(); // unk2, 1
|
||||
recv_data.read_skip<uint32>(); // unk3, 0
|
||||
recv_data.read_skip<uint32>(); // unk4, 0
|
||||
|
||||
sLog.outDebug("TicketCreate: map %u, x %f, y %f, z %f, text %s", map, x, y, z, ticketText.c_str());
|
||||
|
||||
|
|
|
|||
|
|
@ -6217,29 +6217,19 @@ void Player::UpdateArea(uint32 newArea)
|
|||
|
||||
void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
||||
{
|
||||
if(m_zoneUpdateId != newZone)
|
||||
SendInitWorldStates(newZone, newArea); // only if really enters to new zone, not just area change, works strange...
|
||||
|
||||
m_zoneUpdateId = newZone;
|
||||
m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL;
|
||||
|
||||
// zone changed, so area changed as well, update it
|
||||
UpdateArea(newArea);
|
||||
|
||||
AreaTableEntry const* zone = GetAreaEntryByAreaID(newZone);
|
||||
if(!zone)
|
||||
return;
|
||||
|
||||
if (sWorld.getConfig(CONFIG_WEATHER))
|
||||
if(m_zoneUpdateId != newZone)
|
||||
{
|
||||
Weather *wth = sWorld.FindWeather(zone->ID);
|
||||
if(wth)
|
||||
SendInitWorldStates(newZone, newArea); // only if really enters to new zone, not just area change, works strange...
|
||||
|
||||
if (sWorld.getConfig(CONFIG_WEATHER))
|
||||
{
|
||||
wth->SendWeatherUpdateToPlayer(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!sWorld.AddWeather(zone->ID))
|
||||
if(Weather *wth = sWorld.FindWeather(zone->ID))
|
||||
wth->SendWeatherUpdateToPlayer(this);
|
||||
else if(!sWorld.AddWeather(zone->ID))
|
||||
{
|
||||
// send fine weather packet to remove old zone's weather
|
||||
Weather::SendFineWeatherUpdateToPlayer(this);
|
||||
|
|
@ -6247,6 +6237,12 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
|||
}
|
||||
}
|
||||
|
||||
m_zoneUpdateId = newZone;
|
||||
m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL;
|
||||
|
||||
// zone changed, so area changed as well, update it
|
||||
UpdateArea(newArea);
|
||||
|
||||
// in PvP, any not controlled zone (except zone->team == 6, default case)
|
||||
// in PvE, only opposition team capital
|
||||
switch(zone->team)
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ bool Weather::ReGenerate()
|
|||
|
||||
void Weather::SendWeatherUpdateToPlayer(Player *player)
|
||||
{
|
||||
WorldPacket data( SMSG_WEATHER, (4+4+4) );
|
||||
WorldPacket data( SMSG_WEATHER, (4+4+1) );
|
||||
|
||||
data << uint32(GetWeatherState()) << (float)m_grade << uint8(0);
|
||||
player->GetSession()->SendPacket( &data );
|
||||
|
|
@ -194,7 +194,7 @@ void Weather::SendWeatherUpdateToPlayer(Player *player)
|
|||
|
||||
void Weather::SendFineWeatherUpdateToPlayer(Player *player)
|
||||
{
|
||||
WorldPacket data( SMSG_WEATHER, (4+4+4) );
|
||||
WorldPacket data( SMSG_WEATHER, (4+4+1) );
|
||||
|
||||
data << (uint32)WEATHER_STATE_FINE << (float)0.0f << uint8(0);
|
||||
player->GetSession()->SendPacket( &data );
|
||||
|
|
@ -215,7 +215,7 @@ bool Weather::UpdateWeather()
|
|||
|
||||
WeatherState state = GetWeatherState();
|
||||
|
||||
WorldPacket data( SMSG_WEATHER, (4+4+4) );
|
||||
WorldPacket data( SMSG_WEATHER, (4+4+1) );
|
||||
data << uint32(state) << (float)m_grade << uint8(0);
|
||||
player->SendMessageToSet( &data, true );
|
||||
|
||||
|
|
|
|||
|
|
@ -323,6 +323,15 @@ bool World::RemoveQueuedPlayer(WorldSession* sess)
|
|||
WorldSession* pop_sess = m_QueuedPlayer.front();
|
||||
pop_sess->SetInQueue(false);
|
||||
pop_sess->SendAuthWaitQue(0);
|
||||
pop_sess->SendAddonsInfo();
|
||||
|
||||
WorldPacket pkt(SMSG_CLIENTCACHE_VERSION, 4);
|
||||
pkt << uint32(sWorld.getConfig(CONFIG_CLIENTCACHE_VERSION));
|
||||
pop_sess->SendPacket(&pkt);
|
||||
|
||||
pop_sess->SendAccountDataTimes(GLOBAL_CACHE_MASK);
|
||||
pop_sess->SendTutorialsData();
|
||||
|
||||
m_QueuedPlayer.pop_front();
|
||||
|
||||
// update iter to point first queued socket or end() if queue is empty now
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue