Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 11 additions & 21 deletions cpp/src/server/game/Entities/Player/PlayerUpdates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ void Player::Update(uint32 p_time)

// Update cinematic location, if 500ms have passed and we're doing a
// cinematic now.
_cinematicMgr->m_cinematicDiff += p_time;
if (_cinematicMgr->m_cinematicCamera && _cinematicMgr->m_activeCinematicCameraId && GetMSTimeDiffToNow(_cinematicMgr->m_lastCinematicCheck) > CINEMATIC_UPDATEDIFF)
_cinematicMgr.m_cinematicDiff += p_time;
if (_cinematicMgr.m_cinematicCamera && _cinematicMgr.m_activeCinematicCameraId && GetMSTimeDiffToNow(_cinematicMgr.m_lastCinematicCheck) > CINEMATIC_UPDATEDIFF)
{
_cinematicMgr->m_lastCinematicCheck = getMSTime();
_cinematicMgr->UpdateCinematicLocation(p_time);
_cinematicMgr.m_lastCinematicCheck = getMSTime();
_cinematicMgr.UpdateCinematicLocation(p_time);
}

// used to implement delayed far teleports
Expand Down Expand Up @@ -401,7 +401,7 @@ void Player::Update(uint32 p_time)
{
m_hostileReferenceCheckTimer = 15000;
if (!GetMap()->IsDungeon())
getHostileRefMgr().deleteReferencesOutOfRange(
GetHostileRefMgr().deleteReferencesOutOfRange(
GetVisibilityRange());
}
else
Expand Down Expand Up @@ -1290,11 +1290,9 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea, bool force)

if (sWorld->getBoolConfig(CONFIG_WEATHER))
{
if (Weather* weather = WeatherMgr::FindWeather(zone->ID))
weather->SendWeatherUpdateToPlayer(this);
else if (!WeatherMgr::AddWeather(zone->ID))
// send fine weather packet to remove old zone's weather
WeatherMgr::SendFineWeatherUpdateToPlayer(this);
if (WeatherData const* weatherData = WeatherMgr::GetWeatherData(zone->ID))
if (Weather* weather = sWorld->FindWeather(zone->ID))
weather->SendWeatherUpdateToPlayer(this);
}

sScriptMgr->OnPlayerUpdateZone(this, newZone, newArea);
Expand Down Expand Up @@ -1602,17 +1600,9 @@ void Player::UpdateVisibilityForPlayer(bool mapChange)
m_seer = this;
}

Acore::VisibleNotifier notifierNoLarge(
*this, mapChange,
false); // visit only objects which are not large; default distance
Cell::VisitObjects(m_seer, notifierNoLarge,
GetSightRange() + VISIBILITY_INC_FOR_GOBJECTS);
notifierNoLarge.SendToSelf();

Acore::VisibleNotifier notifierLarge(
*this, mapChange, true); // visit only large objects; maximum distance
Cell::VisitObjects(m_seer, notifierLarge, GetSightRange());
notifierLarge.SendToSelf();
Acore::VisibleNotifier notifier(*this);
Cell::VisitObjects(m_seer, notifier, GetSightRange());
notifier.SendToSelf();

if (mapChange)
m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f, 0.0f);
Expand Down
2 changes: 1 addition & 1 deletion sql/world/EntryChecker_RUN_FIRST.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To run this script:
/*Check to see if entry 500000 and 500001 are free to add the creature templates for the Teleport Network*/
SELECT `entry`, `name`, `subname`, `faction`, `npcflag` FROM `acore_world`.`creature_template` WHERE `entry` IN (500000, 500001);
/*Check to see if GUIDs 500000000-500000019 are free to add the creature objects for the Teleport Network*/
SELECT `guid`, `id1`, `map`, `zoneId`, `areaId` FROM `acore_world`.`creature` WHERE `guid` BETWEEN 5000000 AND 5000019;
SELECT `guid`, `id`, `map`, `zoneId`, `areaId` FROM `acore_world`.`creature` WHERE `guid` BETWEEN 5000000 AND 5000019;
/*Check to see if entry 500000, 500001, and 500003 are free to add the broadcast text entries for the Teleport Network*/
SELECT `ID`, `LanguageID`, `MaleText`, `FemaleText` FROM `acore_world`.`broadcast_text` WHERE `ID` IN (500000, 500001, 500003);
/*Check to see if entry 500000, 500001, and 500003 are free to add the npc text entries for the Teleport Network*/
Expand Down
Loading