Merge branch 'master' into questXPHook

This commit is contained in:
郑佩茹
2022-03-13 16:37:06 -06:00
74 changed files with 1851 additions and 1006 deletions
@@ -64,7 +64,7 @@ void SmartWaypointMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -136,7 +136,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 SmartAI scripts. DB table `smart_scripts` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 SmartAI scripts. DB table `smart_scripts` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2455,7 +2455,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
if (sAchievementCriteriaStore.GetNumRows() == 0)
{
LOG_INFO("server.loading", ">> Loaded 0 achievement criteria.");
LOG_WARN("server.loading", ">> Loaded 0 achievement criteria.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2604,7 +2604,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
if (sAchievementStore.GetNumRows() == 0)
{
LOG_INFO("server.loading", ">> Loaded 0 achievement references.");
LOG_WARN("server.loading", ">> Loaded 0 achievement references.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2635,7 +2635,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2776,7 +2776,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 completed achievements. DB table `character_achievement` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 completed achievements. DB table `character_achievement` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2818,7 +2818,7 @@ void AchievementGlobalMgr::LoadRewards()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2939,7 +2939,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 achievement reward locale strings. DB table `achievement_reward_locale` is empty");
LOG_WARN("server.loading", ">> Loaded 0 achievement reward locale strings. DB table `achievement_reward_locale` is empty");
LOG_INFO("server.loading", " ");
return;
}
+1 -1
View File
@@ -42,7 +42,7 @@ namespace AddonMgr
QueryResult result = CharacterDatabase.Query("SELECT name, crc FROM addons");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 known addons. DB table `addons` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 known addons. DB table `addons` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -493,7 +493,7 @@ void AuctionHouseMgr::LoadAuctionItems()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -538,7 +538,7 @@ void AuctionHouseMgr::LoadAuctions()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -157,7 +157,7 @@ void ArenaTeamMgr::LoadArenaTeams()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 arena teams. DB table `arena_team` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 arena teams. DB table `arena_team` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -663,7 +663,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -662,10 +662,7 @@ enum BG_AV_CreaturePlace
AV_CPLACE_TRIGGER18 = 319,
AV_CPLACE_TRIGGER19 = 320,
AV_CPLACE_MAX = 321,
AV_CPLACE_A_BOSS = 381,
AV_CPLACE_H_BOSS = 445
AV_CPLACE_MAX = 321
};
//x, y, z, o
+2 -2
View File
@@ -56,7 +56,7 @@ void ChannelMgr::LoadChannels()
QueryResult result = CharacterDatabase.Query("SELECT channelId, name, team, announce, ownership, password FROM channels ORDER BY channelId ASC");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 channels. DB table `channels` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 channels. DB table `channels` is empty.");
return;
}
@@ -171,7 +171,7 @@ void ChannelMgr::LoadChannelRights()
QueryResult result = CharacterDatabase.Query("SELECT name, flags, speakdelay, joinmessage, delaymessage, moderators FROM channels_rights");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 Channel Rights!");
LOG_WARN("server.loading", ">> Loaded 0 Channel Rights!");
LOG_INFO("server.loading", " ");
return;
}
+1 -1
View File
@@ -935,7 +935,7 @@ void ConditionMgr::LoadConditions(bool isReload)
if (!result)
{
LOG_ERROR("server.loading", ">> Loaded 0 conditions. DB table `conditions` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 conditions. DB table `conditions` is empty!");
return;
}
+1 -1
View File
@@ -63,7 +63,7 @@ namespace DisableMgr
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 disables. DB table `disables` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 disables. DB table `disables` is empty!");
LOG_INFO("server.loading", " ");
return;
}
-272
View File
@@ -25,8 +25,6 @@
#include "SpellMgr.h"
#include "TransportMgr.h"
#include "World.h"
#include <fstream>
#include <iostream>
#include <map>
typedef std::map<uint16, uint32> AreaFlagByAreaID;
@@ -190,8 +188,6 @@ DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore(WMOAreaTableEntryfmt);
DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore(WorldMapAreaEntryfmt);
DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore(WorldMapOverlayEntryfmt);
std::unordered_map<uint32, FlyByCameraCollection> sFlyByCameraStore;
typedef std::list<std::string> StoreProblemList;
uint32 DBCFileCount = 0;
@@ -635,278 +631,10 @@ void LoadDBCStores(const std::string& dataPath)
exit(1);
}
LoadM2Cameras(dataPath);
LOG_INFO("server.loading", ">> Initialized {} data stores in {} ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}
// Convert the geomoetry from a spline value, to an actual WoW XYZ
G3D::Vector3 TranslateLocation(G3D::Vector4 const* DBCPosition, G3D::Vector3 const* basePosition, G3D::Vector3 const* splineVector)
{
G3D::Vector3 work;
float x = basePosition->x + splineVector->x;
float y = basePosition->y + splineVector->y;
float z = basePosition->z + splineVector->z;
float const distance = std::sqrt((x * x) + (y * y));
float angle = std::atan2(x, y) - DBCPosition->w;
if (angle < 0)
{
angle += 2 * float(M_PI);
}
work.x = DBCPosition->x + (distance * std::sin(angle));
work.y = DBCPosition->y + (distance * cos(angle));
work.z = DBCPosition->z + z;
return work;
}
// Number of cameras not used. Multiple cameras never used in 3.3.5
bool readCamera(M2Camera const* cam, uint32 buffSize, M2Header const* header, CinematicCameraEntry const* dbcentry)
{
char const* buffer = reinterpret_cast<char const*>(header);
FlyByCameraCollection cameras;
FlyByCameraCollection targetcam;
G3D::Vector4 DBCData;
DBCData.x = dbcentry->base_x;
DBCData.y = dbcentry->base_y;
DBCData.z = dbcentry->base_z;
DBCData.w = dbcentry->base_o;
// Read target locations, only so that we can calculate orientation
for (uint32 k = 0; k < cam->target_positions.timestamps.number; ++k)
{
// Extract Target positions
if (cam->target_positions.timestamps.offset_elements + sizeof(M2Array) > buffSize)
{
return false;
}
M2Array const* targTsArray = reinterpret_cast<M2Array const*>(buffer + cam->target_positions.timestamps.offset_elements);
if (targTsArray->offset_elements + sizeof(uint32) > buffSize || cam->target_positions.values.offset_elements + sizeof(M2Array) > buffSize)
{
return false;
}
uint32 const* targTimestamps = reinterpret_cast<uint32 const*>(buffer + targTsArray->offset_elements);
M2Array const* targArray = reinterpret_cast<M2Array const*>(buffer + cam->target_positions.values.offset_elements);
if (targArray->offset_elements + sizeof(M2SplineKey<G3D::Vector3>) > buffSize)
{
return false;
}
M2SplineKey<G3D::Vector3> const* targPositions = reinterpret_cast<M2SplineKey<G3D::Vector3> const*>(buffer + targArray->offset_elements);
// Read the data for this set
uint32 currPos = targArray->offset_elements;
for (uint32 i = 0; i < targTsArray->number; ++i)
{
if (currPos + sizeof(M2SplineKey<G3D::Vector3>) > buffSize)
{
return false;
}
// Translate co-ordinates
G3D::Vector3 newPos = TranslateLocation(&DBCData, &cam->target_position_base, &targPositions->p0);
// Add to vector
FlyByCamera thisCam;
thisCam.timeStamp = targTimestamps[i];
thisCam.locations.x = newPos.x;
thisCam.locations.y = newPos.y;
thisCam.locations.z = newPos.z;
thisCam.locations.w = 0.0f;
targetcam.push_back(thisCam);
targPositions++;
currPos += sizeof(M2SplineKey<G3D::Vector3>);
}
}
// Read camera positions and timestamps (translating first position of 3 only, we don't need to translate the whole spline)
for (uint32 k = 0; k < cam->positions.timestamps.number; ++k)
{
// Extract Camera positions for this set
if (cam->positions.timestamps.offset_elements + sizeof(M2Array) > buffSize)
{
return false;
}
M2Array const* posTsArray = reinterpret_cast<M2Array const*>(buffer + cam->positions.timestamps.offset_elements);
if (posTsArray->offset_elements + sizeof(uint32) > buffSize || cam->positions.values.offset_elements + sizeof(M2Array) > buffSize)
{
return false;
}
uint32 const* posTimestamps = reinterpret_cast<uint32 const*>(buffer + posTsArray->offset_elements);
M2Array const* posArray = reinterpret_cast<M2Array const*>(buffer + cam->positions.values.offset_elements);
if (posArray->offset_elements + sizeof(M2SplineKey<G3D::Vector3>) > buffSize)
{
return false;
}
M2SplineKey<G3D::Vector3> const* positions = reinterpret_cast<M2SplineKey<G3D::Vector3> const*>(buffer + posArray->offset_elements);
// Read the data for this set
uint32 currPos = posArray->offset_elements;
for (uint32 i = 0; i < posTsArray->number; ++i)
{
if (currPos + sizeof(M2SplineKey<G3D::Vector3>) > buffSize)
{
return false;
}
// Translate co-ordinates
G3D::Vector3 newPos = TranslateLocation(&DBCData, &cam->position_base, &positions->p0);
// Add to vector
FlyByCamera thisCam;
thisCam.timeStamp = posTimestamps[i];
thisCam.locations.x = newPos.x;
thisCam.locations.y = newPos.y;
thisCam.locations.z = newPos.z;
if (targetcam.size() > 0)
{
// Find the target camera before and after this camera
FlyByCamera lastTarget;
FlyByCamera nextTarget;
// Pre-load first item
lastTarget = targetcam[0];
nextTarget = targetcam[0];
for (uint32 j = 0; j < targetcam.size(); ++j)
{
nextTarget = targetcam[j];
if (targetcam[j].timeStamp > posTimestamps[i])
{
break;
}
lastTarget = targetcam[j];
}
float x = lastTarget.locations.x;
float y = lastTarget.locations.y;
// float z = lastTarget.locations.z;
// Now, the timestamps for target cam and position can be different. So, if they differ we interpolate
if (lastTarget.timeStamp != posTimestamps[i])
{
uint32 timeDiffTarget = nextTarget.timeStamp - lastTarget.timeStamp;
uint32 timeDiffThis = posTimestamps[i] - lastTarget.timeStamp;
float xDiff = nextTarget.locations.x - lastTarget.locations.x;
float yDiff = nextTarget.locations.y - lastTarget.locations.y;
// float zDiff = nextTarget.locations.z - lastTarget.locations.z;
x = lastTarget.locations.x + (xDiff * (float(timeDiffThis) / float(timeDiffTarget)));
y = lastTarget.locations.y + (yDiff * (float(timeDiffThis) / float(timeDiffTarget)));
// z = lastTarget.locations.z + (zDiff * (float(timeDiffThis) / float(timeDiffTarget)));
}
float xDiff = x - thisCam.locations.x;
float yDiff = y - thisCam.locations.y;
thisCam.locations.w = std::atan2(yDiff, xDiff);
if (thisCam.locations.w < 0)
{
thisCam.locations.w += 2 * float(M_PI);
}
}
cameras.push_back(thisCam);
positions++;
currPos += sizeof(M2SplineKey<G3D::Vector3>);
}
}
sFlyByCameraStore[dbcentry->id] = cameras;
return true;
}
void LoadM2Cameras(const std::string& dataPath)
{
sFlyByCameraStore.clear();
LOG_INFO("server.loading", ">> Loading Cinematic Camera files");
uint32 oldMSTime = getMSTime();
for (uint32 i = 0; i < sCinematicCameraStore.GetNumRows(); ++i)
{
if (CinematicCameraEntry const* dbcentry = sCinematicCameraStore.LookupEntry(i))
{
std::string filename = dataPath.c_str();
filename.append(dbcentry->filename);
// Replace slashes
size_t loc = filename.find("\\");
while (loc != std::string::npos)
{
filename.replace(loc, 1, "/");
loc = filename.find("\\");
}
// Replace mdx to .m2
loc = filename.find(".mdx");
if (loc != std::string::npos)
{
filename.replace(loc, 4, ".m2");
}
std::ifstream m2file(filename.c_str(), std::ios::in | std::ios::binary);
if (!m2file.is_open())
{
continue;
}
// Get file size
m2file.seekg(0, std::ios::end);
std::streamoff const fileSize = m2file.tellg();
// Reject if not at least the size of the header
if (static_cast<uint32>(fileSize) < sizeof(M2Header))
{
LOG_ERROR("dbc", "Camera file {} is damaged. File is smaller than header size", filename);
m2file.close();
continue;
}
// Read 4 bytes (signature)
m2file.seekg(0, std::ios::beg);
char fileCheck[5];
m2file.read(fileCheck, 4);
fileCheck[4] = 0;
// Check file has correct magic (MD20)
if (strcmp(fileCheck, "MD20"))
{
LOG_ERROR("dbc", "Camera file {} is damaged. File identifier not found", filename);
m2file.close();
continue;
}
// Now we have a good file, read it all into a vector of char's, then close the file.
std::vector<char> buffer(fileSize);
m2file.seekg(0, std::ios::beg);
if (!m2file.read(buffer.data(), fileSize))
{
m2file.close();
continue;
}
m2file.close();
// Read header
M2Header const* header = reinterpret_cast<M2Header const*>(buffer.data());
if (header->ofsCameras + sizeof(M2Camera) > static_cast<uint32>(fileSize))
{
LOG_ERROR("dbc", "Camera file {} is damaged. Camera references position beyond file end", filename);
continue;
}
// Get camera(s) - Main header, then dump them.
M2Camera const* cam = reinterpret_cast<M2Camera const*>(buffer.data() + header->ofsCameras);
if (!readCamera(cam, fileSize, header, dbcentry))
{
LOG_ERROR("dbc", "Camera file {} is damaged. Camera references position beyond file end", filename);
}
}
}
LOG_INFO("server.loading", ">> Loaded {} cinematic waypoint sets in {} ms", (uint32)sFlyByCameraStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
SimpleFactionsList const* GetFactionTeamList(uint32 faction)
{
FactionTeamMap::const_iterator itr = sFactionTeamMap.find(faction);
-3
View File
@@ -26,7 +26,6 @@
#include <unordered_set>
typedef std::list<uint32> SimpleFactionsList;
typedef std::vector<FlyByCamera> FlyByCameraCollection;
SimpleFactionsList const* GetFactionTeamList(uint32 faction);
@@ -183,9 +182,7 @@ extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
extern DBCStorage <WMOAreaTableEntry> sWMOAreaTableStore;
//extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
extern std::unordered_map<uint32, FlyByCameraCollection> sFlyByCameraStore;
void LoadDBCStores(const std::string& dataPath);
void LoadM2Cameras(const std::string& dataPath);
#endif
+259
View File
@@ -0,0 +1,259 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "DBCStores.h"
#include "Common.h"
#include "Containers.h"
#include "Log.h"
#include "M2Structure.h"
#include "M2Stores.h"
#include "World.h"
#include <boost/filesystem/path.hpp>
#include <fstream>
#include <iostream>
#include <iomanip>
typedef std::vector<FlyByCamera> FlyByCameraCollection;
std::unordered_map<uint32, FlyByCameraCollection> sFlyByCameraStore;
// Convert the geomoetry from a spline value, to an actual WoW XYZ
G3D::Vector3 TranslateLocation(G3D::Vector4 const* DBCPosition, G3D::Vector3 const* basePosition, G3D::Vector3 const* splineVector)
{
G3D::Vector3 work;
float x = basePosition->x + splineVector->x;
float y = basePosition->y + splineVector->y;
float z = basePosition->z + splineVector->z;
float const distance = std::sqrt((x * x) + (y * y));
float angle = std::atan2(x, y) - DBCPosition->w;
if (angle < 0)
angle += 2 * float(M_PI);
work.x = DBCPosition->x + (distance * sin(angle));
work.y = DBCPosition->y + (distance * cos(angle));
work.z = DBCPosition->z + z;
return work;
}
// Number of cameras not used. Multiple cameras never used in 3.3.5
bool readCamera(M2Camera const* cam, uint32 buffSize, M2Header const* header, CinematicCameraEntry const* dbcentry)
{
char const* buffer = reinterpret_cast<char const*>(header);
FlyByCameraCollection cameras;
FlyByCameraCollection targetcam;
G3D::Vector4 DBCData;
DBCData.x = dbcentry->Origin.X;
DBCData.y = dbcentry->Origin.Y;
DBCData.z = dbcentry->Origin.Z;
DBCData.w = dbcentry->OriginFacing;
// Read target locations, only so that we can calculate orientation
for (uint32 k = 0; k < cam->target_positions.timestamps.number; ++k)
{
// Extract Target positions
if (cam->target_positions.timestamps.offset_elements + sizeof(M2Array) > buffSize)
return false;
M2Array const* targTsArray = reinterpret_cast<M2Array const*>(buffer + cam->target_positions.timestamps.offset_elements);
if (targTsArray->offset_elements + sizeof(uint32) > buffSize || cam->target_positions.values.offset_elements + sizeof(M2Array) > buffSize)
return false;
uint32 const* targTimestamps = reinterpret_cast<uint32 const*>(buffer + targTsArray->offset_elements);
M2Array const* targArray = reinterpret_cast<M2Array const*>(buffer + cam->target_positions.values.offset_elements);
if (targArray->offset_elements + sizeof(M2SplineKey<G3D::Vector3>) > buffSize)
return false;
M2SplineKey<G3D::Vector3> const* targPositions = reinterpret_cast<M2SplineKey<G3D::Vector3> const*>(buffer + targArray->offset_elements);
// Read the data for this set
uint32 currPos = targArray->offset_elements;
for (uint32 i = 0; i < targTsArray->number; ++i)
{
if (currPos + sizeof(M2SplineKey<G3D::Vector3>) > buffSize)
return false;
// Translate co-ordinates
G3D::Vector3 newPos = TranslateLocation(&DBCData, &cam->target_position_base, &targPositions->p0);
// Add to vector
FlyByCamera thisCam;
thisCam.timeStamp = targTimestamps[i];
thisCam.locations.Relocate(newPos.x, newPos.y, newPos.z, 0.0f);
targetcam.push_back(thisCam);
targPositions++;
currPos += sizeof(M2SplineKey<G3D::Vector3>);
}
}
// Read camera positions and timestamps (translating first position of 3 only, we don't need to translate the whole spline)
for (uint32 k = 0; k < cam->positions.timestamps.number; ++k)
{
// Extract Camera positions for this set
if (cam->positions.timestamps.offset_elements + sizeof(M2Array) > buffSize)
return false;
M2Array const* posTsArray = reinterpret_cast<M2Array const*>(buffer + cam->positions.timestamps.offset_elements);
if (posTsArray->offset_elements + sizeof(uint32) > buffSize || cam->positions.values.offset_elements + sizeof(M2Array) > buffSize)
return false;
uint32 const* posTimestamps = reinterpret_cast<uint32 const*>(buffer + posTsArray->offset_elements);
M2Array const* posArray = reinterpret_cast<M2Array const*>(buffer + cam->positions.values.offset_elements);
if (posArray->offset_elements + sizeof(M2SplineKey<G3D::Vector3>) > buffSize)
return false;
M2SplineKey<G3D::Vector3> const* positions = reinterpret_cast<M2SplineKey<G3D::Vector3> const*>(buffer + posArray->offset_elements);
// Read the data for this set
uint32 currPos = posArray->offset_elements;
for (uint32 i = 0; i < posTsArray->number; ++i)
{
if (currPos + sizeof(M2SplineKey<G3D::Vector3>) > buffSize)
return false;
// Translate co-ordinates
G3D::Vector3 newPos = TranslateLocation(&DBCData, &cam->position_base, &positions->p0);
// Add to vector
FlyByCamera thisCam;
thisCam.timeStamp = posTimestamps[i];
thisCam.locations.Relocate(newPos.x, newPos.y, newPos.z);
if (targetcam.size() > 0)
{
// Find the target camera before and after this camera
FlyByCamera lastTarget;
FlyByCamera nextTarget;
// Pre-load first item
lastTarget = targetcam[0];
nextTarget = targetcam[0];
for (uint32 j = 0; j < targetcam.size(); ++j)
{
nextTarget = targetcam[j];
if (targetcam[j].timeStamp > posTimestamps[i])
break;
lastTarget = targetcam[j];
}
float x, y, z;
lastTarget.locations.GetPosition(x, y, z);
// Now, the timestamps for target cam and position can be different. So, if they differ we interpolate
if (lastTarget.timeStamp != posTimestamps[i])
{
uint32 timeDiffTarget = nextTarget.timeStamp - lastTarget.timeStamp;
uint32 timeDiffThis = posTimestamps[i] - lastTarget.timeStamp;
float xDiff = nextTarget.locations.GetPositionX() - lastTarget.locations.GetPositionX();
float yDiff = nextTarget.locations.GetPositionY() - lastTarget.locations.GetPositionY();
x = lastTarget.locations.GetPositionX() + (xDiff * (float(timeDiffThis) / float(timeDiffTarget)));
y = lastTarget.locations.GetPositionY() + (yDiff * (float(timeDiffThis) / float(timeDiffTarget)));
}
float xDiff = x - thisCam.locations.GetPositionX();
float yDiff = y - thisCam.locations.GetPositionY();
thisCam.locations.SetOrientation(std::atan2(yDiff, xDiff));
}
cameras.push_back(thisCam);
positions++;
currPos += sizeof(M2SplineKey<G3D::Vector3>);
}
}
sFlyByCameraStore[dbcentry->ID] = cameras;
return true;
}
void LoadM2Cameras(std::string const& dataPath)
{
sFlyByCameraStore.clear();
LOG_INFO("server.loading", ">> Loading Cinematic Camera files");
uint32 oldMSTime = getMSTime();
for (CinematicCameraEntry const* dbcentry : sCinematicCameraStore)
{
std::string filenameWork = dataPath;
filenameWork.append(dbcentry->Model);
// Replace slashes (always to forward slash, because boost!)
std::replace(filenameWork.begin(), filenameWork.end(), '\\', '/');
boost::filesystem::path filename = filenameWork;
// Convert to native format
filename.make_preferred();
// Replace mdx to .m2
filename.replace_extension("m2");
std::ifstream m2file(filename.string().c_str(), std::ios::in | std::ios::binary);
if (!m2file.is_open())
continue;
// Get file size
m2file.seekg(0, std::ios::end);
std::streamoff fileSize = m2file.tellg();
// Reject if not at least the size of the header
if (static_cast<uint32>(fileSize) < sizeof(M2Header))
{
LOG_ERROR("server.loading", "Camera file %s is damaged. File is smaller than header size", filename.string().c_str());
m2file.close();
continue;
}
// Read 4 bytes (signature)
m2file.seekg(0, std::ios::beg);
char fileCheck[5];
m2file.read(fileCheck, 4);
fileCheck[4] = 0;
// Check file has correct magic (MD20)
if (strcmp(fileCheck, "MD20"))
{
LOG_ERROR("server.loading", "Camera file %s is damaged. File identifier not found", filename.string().c_str());
m2file.close();
continue;
}
// Now we have a good file, read it all into a vector of char's, then close the file.
std::vector<char> buffer(fileSize);
m2file.seekg(0, std::ios::beg);
if (!m2file.read(buffer.data(), fileSize))
{
m2file.close();
continue;
}
m2file.close();
// Read header
M2Header const* header = reinterpret_cast<M2Header const*>(buffer.data());
if (header->ofsCameras + sizeof(M2Camera) > static_cast<uint32>(fileSize))
{
LOG_ERROR("server.loading", "Camera file %s is damaged. Camera references position beyond file end", filename.string().c_str());
continue;
}
// Get camera(s) - Main header, then dump them.
M2Camera const* cam = reinterpret_cast<M2Camera const*>(buffer.data() + header->ofsCameras);
if (!readCamera(cam, fileSize, header, dbcentry))
LOG_ERROR("server.loading", "Camera file %s is damaged. Camera references position beyond file end", filename.string().c_str());
}
LOG_INFO("server.loading", ">> Loaded %u cinematic waypoint sets in %u ms", (uint32)sFlyByCameraStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
std::vector<FlyByCamera> const* GetFlyByCameras(uint32 cinematicCameraId)
{
return Acore::Containers::MapGetValuePtr(sFlyByCameraStore, cinematicCameraId);
}
+35
View File
@@ -0,0 +1,35 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ACORE_M2STORES_H
#define ACORE_M2STORES_H
#include "Define.h"
#include "Position.h"
#include <vector>
struct FlyByCamera
{
uint32 timeStamp;
Position locations;
};
AC_GAME_API void LoadM2Cameras(std::string const& dataPath);
AC_GAME_API std::vector<FlyByCamera> const* GetFlyByCameras(uint32 cinematicCameraId);
#endif
+133
View File
@@ -0,0 +1,133 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ACORE_M2STRUCTURE_H
#define ACORE_M2STRUCTURE_H
#include <G3D/Vector3.h>
#include <G3D/AABox.h>
// Structures for M2 file. Source: https://wowdev.wiki
#pragma pack(push, 1)
template<typename T>
struct M2SplineKey
{
T p0;
T p1;
T p2;
};
struct M2Header
{
char Magic[4]; // "MD20"
uint32 Version; // The version of the format.
uint32 lName; // Length of the model's name including the trailing \0
uint32 ofsName; // Offset to the name, it seems like models can get reloaded by this name.should be unique, i guess.
uint32 GlobalModelFlags; // 0x0001: tilt x, 0x0002: tilt y, 0x0008: add 2 fields in header, 0x0020: load .phys data (MoP+), 0x0080: has _lod .skin files (MoP?+), 0x0100: is camera related.
uint32 nGlobalSequences;
uint32 ofsGlobalSequences; // A list of timestamps.
uint32 nAnimations;
uint32 ofsAnimations; // Information about the animations in the model.
uint32 nAnimationLookup;
uint32 ofsAnimationLookup; // Mapping of global IDs to the entries in the Animation sequences block.
uint32 nBones; // MAX_BONES = 0x100
uint32 ofsBones; // Information about the bones in this model.
uint32 nKeyBoneLookup;
uint32 ofsKeyBoneLookup; // Lookup table for key skeletal bones.
uint32 nVertices;
uint32 ofsVertices; // Vertices of the model.
uint32 nViews; // Views (LOD) are now in .skins.
uint32 nSubmeshAnimations;
uint32 ofsSubmeshAnimations; // Submesh color and alpha animations definitions.
uint32 nTextures;
uint32 ofsTextures; // Textures of this model.
uint32 nTransparency;
uint32 ofsTransparency; // Transparency of textures.
uint32 nUVAnimation;
uint32 ofsUVAnimation;
uint32 nTexReplace;
uint32 ofsTexReplace; // Replaceable Textures.
uint32 nRenderFlags;
uint32 ofsRenderFlags; // Blending modes / render flags.
uint32 nBoneLookupTable;
uint32 ofsBoneLookupTable; // A bone lookup table.
uint32 nTexLookup;
uint32 ofsTexLookup; // The same for textures.
uint32 nTexUnits; // possibly removed with cata?!
uint32 ofsTexUnits; // And texture units. Somewhere they have to be too.
uint32 nTransLookup;
uint32 ofsTransLookup; // Everything needs its lookup. Here are the transparencies.
uint32 nUVAnimLookup;
uint32 ofsUVAnimLookup;
G3D::AABox BoundingBox; // min/max( [1].z, 2.0277779f ) - 0.16f seems to be the maximum camera height
float BoundingSphereRadius;
G3D::AABox CollisionBox;
float CollisionSphereRadius;
uint32 nBoundingTriangles;
uint32 ofsBoundingTriangles; // Our bounding volumes. Similar structure like in the old ofsViews.
uint32 nBoundingVertices;
uint32 ofsBoundingVertices;
uint32 nBoundingNormals;
uint32 ofsBoundingNormals;
uint32 nAttachments;
uint32 ofsAttachments; // Attachments are for weapons etc.
uint32 nAttachLookup;
uint32 ofsAttachLookup; // Of course with a lookup.
uint32 nEvents;
uint32 ofsEvents; // Used for playing sounds when dying and a lot else.
uint32 nLights;
uint32 ofsLights; // Lights are mainly used in loginscreens but in wands and some doodads too.
uint32 nCameras; // Format of Cameras changed with version 271!
uint32 ofsCameras; // The cameras are present in most models for having a model in the Character-Tab.
uint32 nCameraLookup;
uint32 ofsCameraLookup; // And lookup-time again.
uint32 nRibbonEmitters;
uint32 ofsRibbonEmitters; // Things swirling around. See the CoT-entrance for light-trails.
uint32 nParticleEmitters;
uint32 ofsParticleEmitters; // Spells and weapons, doodads and loginscreens use them. Blood dripping of a blade? Particles.
uint32 nBlendMaps; // This has to deal with blending. Exists IFF (flags & 0x8) != 0. When set, textures blending is overriden by the associated array. See M2/WotLK#Blend_mode_overrides
uint32 ofsBlendMaps; // Same as above. Points to an array of uint16 of nBlendMaps entries -- From WoD information.};
};
struct M2Array
{
uint32_t number;
uint32 offset_elements;
};
struct M2Track
{
uint16_t interpolation_type;
uint16_t global_sequence;
M2Array timestamps;
M2Array values;
};
struct M2Camera
{
uint32_t type; // 0: portrait, 1: characterinfo; -1: else (flyby etc.); referenced backwards in the lookup table.
float fov; // No radians, no degrees. Multiply by 35 to get degrees.
float far_clip;
float near_clip;
M2Track positions; // How the camera's position moves. Should be 3*3 floats.
G3D::Vector3 position_base;
M2Track target_positions; // How the target moves. Should be 3*3 floats.
G3D::Vector3 target_position_base;
M2Track rolldata; // The camera can have some roll-effect. Its 0 to 2*Pi.
};
#pragma pack(pop)
#endif
@@ -86,7 +86,7 @@ void FormationMgr::LoadCreatureFormations()
QueryResult result = WorldDatabase.Query("SELECT leaderGUID, memberGUID, dist, angle, groupAI, point_1, point_2 FROM creature_formations ORDER BY leaderGUID");
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -73,7 +73,7 @@ void LoadRandomEnchantmentsTable()
}
else
{
LOG_ERROR("sql.sql", ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");
LOG_INFO("server.loading", " ");
}
}
+2 -2
View File
@@ -1621,7 +1621,7 @@ float WorldObject::GetGridActivationRange() const
{
if (ToPlayer())
{
if (ToPlayer()->IsOnCinematic())
if (ToPlayer()->GetCinematicMgr()->IsOnCinematic())
{
return DEFAULT_VISIBILITY_INSTANCE;
}
@@ -1688,7 +1688,7 @@ float WorldObject::GetSightRange(WorldObject const* target) const
{
return MAX_VISIBILITY_DISTANCE;
}
else if (ToPlayer()->IsOnCinematic())
else if (ToPlayer()->GetCinematicMgr()->IsOnCinematic())
{
return DEFAULT_VISIBILITY_INSTANCE;
}
@@ -0,0 +1,170 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CinematicMgr.h"
#include "Map.h"
#include "M2Stores.h"
#include "MotionMaster.h"
#include "Player.h"
#include "TemporarySummon.h"
CinematicMgr::CinematicMgr(Player* playerref)
{
player = playerref;
m_cinematicDiff = 0;
m_lastCinematicCheck = 0;
m_activeCinematicCameraId = 0;
m_cinematicLength = 0;
m_cinematicCamera = nullptr;
m_remoteSightPosition = Position(0.0f, 0.0f, 0.0f);
m_CinematicObject = nullptr;
}
CinematicMgr::~CinematicMgr()
{
if (m_cinematicCamera && m_activeCinematicCameraId)
EndCinematic();
}
void CinematicMgr::BeginCinematic()
{
// Sanity check for active camera set
if (m_activeCinematicCameraId == 0)
return;
if (std::vector<FlyByCamera> const* flyByCameras = GetFlyByCameras(m_activeCinematicCameraId))
{
// Initialize diff, and set camera
m_cinematicDiff = 0;
m_cinematicCamera = flyByCameras;
auto camitr = m_cinematicCamera->begin();
if (camitr != m_cinematicCamera->end())
{
Position const& pos = camitr->locations;
if (!pos.IsPositionValid())
return;
player->GetMap()->LoadGrid(pos.GetPositionX(), pos.GetPositionY());
m_CinematicObject = player->SummonCreature(VISUAL_WAYPOINT, pos.m_positionX, pos.m_positionY, pos.m_positionZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 120000);
if (m_CinematicObject)
{
m_CinematicObject->setActive(true);
player->SetViewpoint(m_CinematicObject, true);
}
// Get cinematic length
m_cinematicLength = flyByCameras->back().timeStamp;
}
}
}
void CinematicMgr::EndCinematic()
{
if (m_activeCinematicCameraId == 0)
return;
m_cinematicDiff = 0;
m_cinematicCamera = nullptr;
m_activeCinematicCameraId = 0;
if (m_CinematicObject)
{
if (WorldObject* vpObject = player->GetViewpoint())
if (vpObject == m_CinematicObject)
player->SetViewpoint(m_CinematicObject, false);
m_CinematicObject->AddObjectToRemoveList();
}
}
void CinematicMgr::UpdateCinematicLocation(uint32 /*diff*/)
{
if (m_activeCinematicCameraId == 0 || !m_cinematicCamera || m_cinematicCamera->size() == 0)
return;
Position lastPosition;
uint32 lastTimestamp = 0;
Position nextPosition;
uint32 nextTimestamp = 0;
// Obtain direction of travel
for (FlyByCamera cam : *m_cinematicCamera)
{
if (cam.timeStamp > m_cinematicDiff)
{
nextPosition.Relocate(cam.locations);
nextTimestamp = cam.timeStamp;
break;
}
lastPosition.Relocate(cam.locations);
lastTimestamp = cam.timeStamp;
}
float angle = lastPosition.GetAbsoluteAngle(&nextPosition);
angle -= lastPosition.GetOrientation();
if (angle < 0)
angle += 2 * float(M_PI);
// Look for position around 2 second ahead of us.
int32 workDiff = m_cinematicDiff;
// Modify result based on camera direction (Humans for example, have the camera point behind)
workDiff += static_cast<int32>(float(CINEMATIC_LOOKAHEAD) * cos(angle));
// Get an iterator to the last entry in the cameras, to make sure we don't go beyond the end
auto endItr = m_cinematicCamera->rbegin();
if (endItr != m_cinematicCamera->rend() && workDiff > static_cast<int32>(endItr->timeStamp))
workDiff = endItr->timeStamp;
// Never try to go back in time before the start of cinematic!
if (workDiff < 0)
workDiff = m_cinematicDiff;
// Obtain the previous and next waypoint based on timestamp
for (FlyByCamera cam : *m_cinematicCamera)
{
if (static_cast<int32>(cam.timeStamp) >= workDiff)
{
nextPosition.Relocate(cam.locations);
nextTimestamp = cam.timeStamp;
break;
}
lastPosition.Relocate(cam.locations);
lastTimestamp = cam.timeStamp;
}
// Never try to go beyond the end of the cinematic
if (workDiff > static_cast<int32>(nextTimestamp))
workDiff = static_cast<int32>(nextTimestamp);
// Interpolate the position for this moment in time (or the adjusted moment in time)
uint32 timeDiff = nextTimestamp - lastTimestamp;
uint32 interDiff = workDiff - lastTimestamp;
float xDiff = nextPosition.m_positionX - lastPosition.m_positionX;
float yDiff = nextPosition.m_positionY - lastPosition.m_positionY;
float zDiff = nextPosition.m_positionZ - lastPosition.m_positionZ;
Position interPosition(lastPosition.m_positionX + (xDiff * (float(interDiff) / float(timeDiff))), lastPosition.m_positionY +
(yDiff * (float(interDiff) / float(timeDiff))), lastPosition.m_positionZ + (zDiff * (float(interDiff) / float(timeDiff))));
// Advance (at speed) to this position. The remote sight object is used
// to send update information to player in cinematic
if (m_CinematicObject && interPosition.IsPositionValid())
m_CinematicObject->MonsterMoveWithSpeed(interPosition.m_positionX, interPosition.m_positionY, interPosition.m_positionZ, 500.0f);
// If we never received an end packet 10 seconds after the final timestamp then force an end
if (m_cinematicDiff > m_cinematicLength + 10 * IN_MILLISECONDS)
EndCinematic();
}
@@ -0,0 +1,59 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CinematicMgr_h__
#define CinematicMgr_h__
#include "Define.h"
#include "Object.h"
constexpr auto CINEMATIC_UPDATEDIFF = 500;
constexpr auto CINEMATIC_LOOKAHEAD = 2000;
class Player;
struct FlyByCamera;
class AC_GAME_API CinematicMgr
{
friend class Player;
public:
explicit CinematicMgr(Player* playerref);
~CinematicMgr();
// Cinematic camera data and remote sight functions
uint32 GetActiveCinematicCamera() const { return m_activeCinematicCameraId; }
void SetActiveCinematicCamera(uint32 cinematicCameraId = 0) { m_activeCinematicCameraId = cinematicCameraId; }
bool IsOnCinematic() const { return (m_cinematicCamera != nullptr); }
void BeginCinematic();
void EndCinematic();
void UpdateCinematicLocation(uint32 diff);
private:
// Remote location information
Player* player;
protected:
uint32 m_cinematicDiff;
uint32 m_lastCinematicCheck;
uint32 m_activeCinematicCameraId;
uint32 m_cinematicLength;
std::vector<FlyByCamera> const* m_cinematicCamera;
Position m_remoteSightPosition;
TempSummon* m_CinematicObject;
};
#endif
+4 -59
View File
@@ -383,12 +383,7 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
_activeCheats = CHEAT_NONE;
m_cinematicDiff = 0;
m_lastCinematicCheck = 0;
m_activeCinematicCameraId = 0;
m_cinematicCamera = nullptr;
m_remoteSightPosition = Position(0.0f, 0.0f, 0.0f);
m_CinematicObject = nullptr;
_cinematicMgr = new CinematicMgr(this);
m_achievementMgr = new AchievementMgr(this);
m_reputationMgr = new ReputationMgr(this);
@@ -5574,14 +5569,14 @@ void Player::SendDirectMessage(WorldPacket const* data) const
m_session->SendPacket(data);
}
void Player::SendCinematicStart(uint32 CinematicSequenceId)
void Player::SendCinematicStart(uint32 CinematicSequenceId) const
{
WorldPacket data(SMSG_TRIGGER_CINEMATIC, 4);
data << uint32(CinematicSequenceId);
SendDirectMessage(&data);
if (const CinematicSequencesEntry* sequence = sCinematicSequencesStore.LookupEntry(CinematicSequenceId))
if (CinematicSequencesEntry const* sequence = sCinematicSequencesStore.LookupEntry(CinematicSequenceId))
{
SetActiveCinematicCamera(sequence->cinematicCamera);
_cinematicMgr->SetActiveCinematicCamera(sequence->cinematicCamera);
}
}
@@ -15498,56 +15493,6 @@ bool Player::SetFeatherFall(bool apply, bool packetOnly /*= false*/)
return true;
}
void Player::BeginCinematic()
{
// Sanity check for active camera set
if (m_activeCinematicCameraId == 0)
{
return;
}
auto itr = sFlyByCameraStore.find(m_activeCinematicCameraId);
if (itr != sFlyByCameraStore.end())
{
// Initialize diff, and set camera
m_cinematicDiff = 0;
m_cinematicCamera = &itr->second;
auto camitr = m_cinematicCamera->begin();
if (camitr != m_cinematicCamera->end())
{
Position pos(camitr->locations.x, camitr->locations.y, camitr->locations.z, camitr->locations.w);
if (!pos.IsPositionValid())
{
return;
}
m_mapRef->LoadGrid(camitr->locations.x, camitr->locations.y);
m_CinematicObject = SummonCreature(VISUAL_WAYPOINT, pos.m_positionX, pos.m_positionY, pos.m_positionZ, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000);
if (m_CinematicObject)
{
m_CinematicObject->setActive(true);
SetViewpoint(m_CinematicObject, true);
}
}
}
}
void Player::EndCinematic()
{
m_cinematicDiff = 0;
m_cinematicCamera = nullptr;
m_activeCinematicCameraId = 0;
if (m_CinematicObject)
{
if (m_seer && m_seer == m_CinematicObject)
{
SetViewpoint(m_CinematicObject, false);
}
m_CinematicObject->AddObjectToRemoveList();
}
}
Guild* Player::GetGuild() const
{
uint32 guildId = GetGuildId();
+7 -20
View File
@@ -21,6 +21,7 @@
#include "ArenaTeam.h"
#include "Battleground.h"
#include "CharacterCache.h"
#include "CinematicMgr.h"
#include "DBCStores.h"
#include "DatabaseEnvFwd.h"
#include "GroupReference.h"
@@ -1036,6 +1037,7 @@ struct EntryPointData
class Player : public Unit, public GridObject<Player>
{
friend class WorldSession;
friend class CinematicMgr;
friend void Item::AddToUpdateQueueOf(Player* player);
friend void Item::RemoveFromUpdateQueueOf(Player* player);
public:
@@ -1326,6 +1328,8 @@ public:
[[nodiscard]] TradeData* GetTradeData() const { return m_trade; }
void TradeCancel(bool sendback);
CinematicMgr* GetCinematicMgr() const { return _cinematicMgr; }
void UpdateEnchantTime(uint32 time);
void UpdateSoulboundTradeItems();
void AddTradeableItem(Item* item);
@@ -2368,7 +2372,7 @@ public:
[[nodiscard]] bool IsPetNeedBeTemporaryUnsummoned() const { return GetSession()->PlayerLogout() || !IsInWorld() || !IsAlive() || IsMounted()/*+in flight*/ || GetVehicle() || IsBeingTeleported(); }
bool CanResummonPet(uint32 spellid);
void SendCinematicStart(uint32 CinematicSequenceId);
void SendCinematicStart(uint32 CinematicSequenceId) const;
void SendMovieStart(uint32 MovieId);
uint32 DoRandomRoll(uint32 minimum, uint32 maximum);
@@ -2561,17 +2565,6 @@ public:
static std::unordered_map<int, bgZoneRef> bgZoneIdToFillWorldStates; // zoneId -> FillInitialWorldStates
// Cinematic camera data and remote sight functions
[[nodiscard]] uint32 GetActiveCinematicCamera() const { return m_activeCinematicCameraId; }
void SetActiveCinematicCamera(uint32 cinematicCameraId = 0) { m_activeCinematicCameraId = cinematicCameraId; }
[[nodiscard]] bool IsOnCinematic() const { return (m_cinematicCamera != nullptr); }
void BeginCinematic();
void EndCinematic();
void UpdateCinematicLocation(uint32 diff);
std::string GetMapAreaAndZoneString();
std::string GetCoordsMapAreaAndZoneString();
void SetFarSightDistance(float radius);
void ResetFarSightDistance();
[[nodiscard]] Optional<float> GetFarSightDistance() const;
@@ -2866,6 +2859,8 @@ private:
Item* _StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool update);
Item* _LoadItem(CharacterDatabaseTransaction trans, uint32 zoneId, uint32 timeDiff, Field* fields);
CinematicMgr* _cinematicMgr;
typedef GuidSet RefundableItemsSet;
RefundableItemsSet m_refundableItems;
void SendRefundInfo(Item* item);
@@ -2931,14 +2926,6 @@ private:
uint32 m_flightSpellActivated;
// Remote location information
uint32 m_cinematicDiff;
uint32 m_lastCinematicCheck;
uint32 m_activeCinematicCameraId;
FlyByCameraCollection* m_cinematicCamera;
Position m_remoteSightPosition;
Creature* m_CinematicObject;
WorldLocation _corpseLocation;
Optional<float> _farSightDistance = { };
@@ -47,9 +47,6 @@
// Zone Interval should be 1 second
constexpr auto ZONE_UPDATE_INTERVAL = 1000;
constexpr auto CINEMATIC_UPDATEDIFF = 500;
constexpr auto CINEMATIC_LOOKAHEAD = 2000;
void Player::Update(uint32 p_time)
{
if (!IsInWorld())
@@ -70,12 +67,11 @@ void Player::Update(uint32 p_time)
// Update cinematic location, if 500ms have passed and we're doing a
// cinematic now.
m_cinematicDiff += p_time;
if (m_cinematicCamera && m_activeCinematicCameraId &&
GetMSTimeDiffToNow(m_lastCinematicCheck) > CINEMATIC_UPDATEDIFF)
_cinematicMgr->m_cinematicDiff += p_time;
if (_cinematicMgr->m_cinematicCamera && _cinematicMgr->m_activeCinematicCameraId && GetMSTimeDiffToNow(_cinematicMgr->m_lastCinematicCheck) > CINEMATIC_UPDATEDIFF)
{
m_lastCinematicCheck = getMSTime();
UpdateCinematicLocation(p_time);
_cinematicMgr->m_lastCinematicCheck = getMSTime();
_cinematicMgr->UpdateCinematicLocation(p_time);
}
// used to implement delayed far teleports
@@ -1508,107 +1504,6 @@ void Player::UpdatePotionCooldown(Spell* spell)
SetLastPotionId(0);
}
void Player::UpdateCinematicLocation(uint32 /*diff*/)
{
Position lastPosition;
uint32 lastTimestamp = 0;
Position nextPosition;
uint32 nextTimestamp = 0;
if (m_cinematicCamera->size() == 0)
{
return;
}
// Obtain direction of travel
for (FlyByCamera cam : *m_cinematicCamera)
{
if (cam.timeStamp > m_cinematicDiff)
{
nextPosition = Position(cam.locations.x, cam.locations.y,
cam.locations.z, cam.locations.w);
nextTimestamp = cam.timeStamp;
break;
}
lastPosition = Position(cam.locations.x, cam.locations.y,
cam.locations.z, cam.locations.w);
lastTimestamp = cam.timeStamp;
}
float angle = lastPosition.GetAngle(&nextPosition);
angle -= lastPosition.GetOrientation();
if (angle < 0)
{
angle += 2 * float(M_PI);
}
// Look for position around 2 second ahead of us.
int32 workDiff = m_cinematicDiff;
// Modify result based on camera direction (Humans for example, have the
// camera point behind)
workDiff += static_cast<int32>(float(CINEMATIC_LOOKAHEAD) * cos(angle));
// Get an iterator to the last entry in the cameras, to make sure we don't
// go beyond the end
FlyByCameraCollection::const_reverse_iterator endItr =
m_cinematicCamera->rbegin();
if (endItr != m_cinematicCamera->rend() &&
workDiff > static_cast<int32>(endItr->timeStamp))
{
workDiff = endItr->timeStamp;
}
// Never try to go back in time before the start of cinematic!
if (workDiff < 0)
{
workDiff = m_cinematicDiff;
}
// Obtain the previous and next waypoint based on timestamp
for (FlyByCamera cam : *m_cinematicCamera)
{
if (static_cast<int32>(cam.timeStamp) >= workDiff)
{
nextPosition = Position(cam.locations.x, cam.locations.y,
cam.locations.z, cam.locations.w);
nextTimestamp = cam.timeStamp;
break;
}
lastPosition = Position(cam.locations.x, cam.locations.y,
cam.locations.z, cam.locations.w);
lastTimestamp = cam.timeStamp;
}
// Never try to go beyond the end of the cinematic
if (workDiff > static_cast<int32>(nextTimestamp))
{
workDiff = static_cast<int32>(nextTimestamp);
}
// Interpolate the position for this moment in time (or the adjusted moment
// in time)
uint32 timeDiff = nextTimestamp - lastTimestamp;
uint32 interDiff = workDiff - lastTimestamp;
float xDiff = nextPosition.m_positionX - lastPosition.m_positionX;
float yDiff = nextPosition.m_positionY - lastPosition.m_positionY;
float zDiff = nextPosition.m_positionZ - lastPosition.m_positionZ;
Position interPosition(lastPosition.m_positionX +
(xDiff * (float(interDiff) / float(timeDiff))),
lastPosition.m_positionY +
(yDiff * (float(interDiff) / float(timeDiff))),
lastPosition.m_positionZ +
(zDiff * (float(interDiff) / float(timeDiff))));
// Advance (at speed) to this position. The remote sight object is used
// to send update information to player in cinematic
if (m_CinematicObject && interPosition.IsPositionValid())
{
m_CinematicObject->MonsterMoveWithSpeed(
interPosition.m_positionX, interPosition.m_positionY,
interPosition.m_positionZ, 200.0f);
}
}
template void Player::UpdateVisibilityOf(Player* target, UpdateData& data,
std::vector<Unit*>& visibleNow);
template void Player::UpdateVisibilityOf(Creature* target, UpdateData& data,
+17 -17
View File
@@ -246,7 +246,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
mGameEvent.clear();
LOG_ERROR("sql.sql", ">> Loaded 0 game events. DB table `game_event` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 game events. DB table `game_event` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -314,7 +314,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -359,7 +359,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT eventEntry, prerequisite_event FROM game_event_prerequisite");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -410,7 +410,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
LOG_WARN("server.loading", ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
LOG_INFO("server.loading", " ");
}
else
@@ -458,7 +458,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -507,7 +507,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -566,7 +566,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -606,7 +606,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -646,7 +646,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -688,7 +688,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -729,7 +729,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -776,7 +776,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -815,7 +815,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -861,7 +861,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -926,7 +926,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 battleground holidays in game events. DB table `game_event_battleground_holiday` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 battleground holidays in game events. DB table `game_event_battleground_holiday` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -964,7 +964,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -1012,7 +1012,7 @@ void GameEventMgr::LoadHolidayDates()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 holiday dates. DB table `holiday_dates` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 holiday dates. DB table `holiday_dates` is empty.");
return;
}
+76 -76
View File
@@ -497,7 +497,7 @@ void ObjectMgr::LoadCreatureTemplates()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature template definitions. DB table `creature_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creature template definitions. DB table `creature_template` is empty.");
return;
}
@@ -663,7 +663,7 @@ void ObjectMgr::LoadCreatureTemplateResistances()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature template resistance definitions. DB table `creature_template_resistance` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creature template resistance definitions. DB table `creature_template_resistance` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -709,7 +709,7 @@ void ObjectMgr::LoadCreatureTemplateSpells()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature template spell definitions. DB table `creature_template_spell` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creature template spell definitions. DB table `creature_template_spell` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -755,7 +755,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1235,7 +1235,7 @@ void ObjectMgr::LoadCreatureAddons()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1336,7 +1336,7 @@ void ObjectMgr::LoadGameObjectAddons()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 gameobject addon definitions. DB table `gameobject_addon` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 gameobject addon definitions. DB table `gameobject_addon` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1446,7 +1446,7 @@ void ObjectMgr::LoadEquipmentTemplates()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -1535,7 +1535,7 @@ void ObjectMgr::LoadCreatureMovementOverrides()
"LEFT JOIN creature_template_movement AS ctm ON ctm.CreatureId = c.id1");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature movement overrides. DB table `creature_movement_override` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 creature movement overrides. DB table `creature_movement_override` is empty!");
return;
}
@@ -1660,7 +1660,7 @@ void ObjectMgr::LoadCreatureModelInfo()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1718,7 +1718,7 @@ void ObjectMgr::LoadLinkedRespawn()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 linked respawns. DB table `linked_respawn` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 linked respawns. DB table `linked_respawn` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1949,7 +1949,7 @@ void ObjectMgr::LoadTempSummons()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 temp summons. DB table `creature_summon_groups` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 temp summons. DB table `creature_summon_groups` is empty.");
return;
}
@@ -2042,7 +2042,7 @@ void ObjectMgr::LoadCreatures()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 creatures. DB table `creature` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creatures. DB table `creature` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2367,7 +2367,7 @@ void ObjectMgr::LoadGameobjects()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 gameobjects. DB table `gameobject` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 gameobjects. DB table `gameobject` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2617,7 +2617,7 @@ void ObjectMgr::LoadItemTemplates()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 item templates. DB table `item_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 item templates. DB table `item_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -3223,7 +3223,7 @@ void ObjectMgr::LoadItemSetNames()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 item set names. DB table `item_set_names` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 item set names. DB table `item_set_names` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -3295,7 +3295,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 vehicle template accessories. DB table `vehicle_template_accessory` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 vehicle template accessories. DB table `vehicle_template_accessory` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -3351,7 +3351,7 @@ void ObjectMgr::LoadVehicleAccessories()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 Vehicle Accessories in {} ms", GetMSTimeDiffToNow(oldMSTime));
LOG_WARN("server.loading", ">> Loaded 0 Vehicle Accessories in {} ms", GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
return;
}
@@ -3391,7 +3391,7 @@ void ObjectMgr::LoadPetLevelInfo()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 level pet stats definitions. DB table `pet_levelstats` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 level pet stats definitions. DB table `pet_levelstats` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -3532,7 +3532,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_INFO("server.loading", " ");
LOG_ERROR("sql.sql", ">> Loaded 0 player create definitions. DB table `playercreateinfo` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 player create definitions. DB table `playercreateinfo` is empty.");
exit(1);
}
else
@@ -3618,7 +3618,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -3689,7 +3689,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_ERROR("server.loading", ">> Loaded 0 player create skills. DB table `playercreateinfo_skills` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 player create skills. DB table `playercreateinfo_skills` is empty.");
}
else
{
@@ -3763,7 +3763,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 player create spells. DB table `playercreateinfo_spell_custom` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 player create spells. DB table `playercreateinfo_spell_custom` is empty.");
}
else
{
@@ -3821,7 +3821,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_ERROR("server.loading", ">> Loaded 0 player create cast spells. DB table `playercreateinfo_cast_spell` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 player create cast spells. DB table `playercreateinfo_cast_spell` is empty.");
}
else
{
@@ -3879,7 +3879,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 player create actions. DB table `playercreateinfo_action` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 player create actions. DB table `playercreateinfo_action` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -4007,7 +4007,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 level stats definitions. DB table `player_levelstats` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 level stats definitions. DB table `player_levelstats` is empty.");
LOG_INFO("server.loading", " ");
exit(1);
}
@@ -4120,7 +4120,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 xp for level definitions. DB table `player_xp_for_level` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 xp for level definitions. DB table `player_xp_for_level` is empty.");
LOG_INFO("server.loading", " ");
exit(1);
}
@@ -4310,7 +4310,7 @@ void ObjectMgr::LoadQuests()
" FROM quest_template");
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 quests definitions. DB table `quest_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quests definitions. DB table `quest_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -4352,7 +4352,7 @@ void ObjectMgr::LoadQuests()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 quest details. DB table `quest_details` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest details. DB table `quest_details` is empty.");
}
else
{
@@ -4375,7 +4375,7 @@ void ObjectMgr::LoadQuests()
if (!result)
{
LOG_ERROR("server.loading", ">> Loaded 0 quest request items. DB table `quest_request_items` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest request items. DB table `quest_request_items` is empty.");
}
else
{
@@ -4398,7 +4398,7 @@ void ObjectMgr::LoadQuests()
if (!result)
{
LOG_ERROR("server.loading", ">> Loaded 0 quest reward emotes. DB table `quest_offer_reward` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest reward emotes. DB table `quest_offer_reward` is empty.");
}
else
{
@@ -4423,7 +4423,7 @@ void ObjectMgr::LoadQuests()
if (!result)
{
LOG_ERROR("server.loading", ">> Loaded 0 quest template addons. DB table `quest_template_addon` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest template addons. DB table `quest_template_addon` is empty.");
}
else
{
@@ -5079,7 +5079,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 script definitions. DB table `{}` is empty!", tableName);
LOG_WARN("server.loading", ">> Loaded 0 script definitions. DB table `{}` is empty!", tableName);
LOG_INFO("server.loading", " ");
return;
}
@@ -5477,7 +5477,7 @@ void ObjectMgr::LoadSpellScriptNames()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell script names. DB table `spell_script_names` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 spell script names. DB table `spell_script_names` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -5606,7 +5606,7 @@ void ObjectMgr::LoadPageTexts()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 page texts. DB table `page_text` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 page texts. DB table `page_text` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -5685,7 +5685,7 @@ void ObjectMgr::LoadInstanceTemplate()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 instance templates. DB table `page_text` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 instance templates. DB table `page_text` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -5735,7 +5735,7 @@ void ObjectMgr::LoadInstanceEncounters()
QueryResult result = WorldDatabase.Query("SELECT entry, creditType, creditEntry, lastEncounterDungeon FROM instance_encounters");
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 instance encounters, table is empty!");
LOG_WARN("server.loading", ">> Loaded 0 instance encounters, table is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -5837,7 +5837,7 @@ void ObjectMgr::LoadGossipText()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 npc texts, table is empty!");
LOG_WARN("server.loading", ">> Loaded 0 npc texts, table is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -6064,7 +6064,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -6136,7 +6136,7 @@ void ObjectMgr::LoadQuestGreetings()
QueryResult result = WorldDatabase.Query("SELECT ID, Type, GreetEmoteType, GreetEmoteDelay, Greeting FROM quest_greeting");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 quest greetings. DB table `quest_greeting` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest greetings. DB table `quest_greeting` is empty.");
return;
}
@@ -6191,7 +6191,7 @@ void ObjectMgr::LoadQuestGreetingsLocales()
QueryResult result = WorldDatabase.Query("SELECT ID, Type, Locale, Greeting FROM quest_greeting_locale");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 quest_greeting locales. DB table `quest_greeting_locale` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest_greeting locales. DB table `quest_greeting_locale` is empty.");
return;
}
@@ -6306,7 +6306,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -6344,7 +6344,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -6485,7 +6485,7 @@ void ObjectMgr::LoadAreaTriggers()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 area trigger definitions. DB table `areatrigger` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 area trigger definitions. DB table `areatrigger` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -6536,7 +6536,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -6622,7 +6622,7 @@ void ObjectMgr::LoadAccessRequirements()
QueryResult access_template_result = WorldDatabase.Query("SELECT id, map_id, difficulty, min_level, max_level, min_avg_item_level FROM dungeon_access_template");
if (!access_template_result)
{
LOG_INFO("server.loading", ">> Loaded 0 access requirement definitions. DB table `dungeon_access_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 access requirement definitions. DB table `dungeon_access_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -7008,7 +7008,7 @@ void ObjectMgr::LoadGameObjectTemplate()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -7188,7 +7188,7 @@ void ObjectMgr::LoadGameObjectTemplateAddons()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 gameobject template addon definitions. DB table `gameobject_template_addon` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 gameobject template addon definitions. DB table `gameobject_template_addon` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -7251,7 +7251,7 @@ void ObjectMgr::LoadExplorationBaseXP()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 BaseXP definitions. DB table `exploration_basexp` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 BaseXP definitions. DB table `exploration_basexp` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -7291,7 +7291,7 @@ void ObjectMgr::LoadPetNames()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -7459,7 +7459,7 @@ void ObjectMgr::LoadReputationOnKill()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -7640,7 +7640,7 @@ void ObjectMgr::LoadPointsOfInterest()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -7688,7 +7688,7 @@ void ObjectMgr::LoadQuestPOI()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -7761,7 +7761,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 spellclick spells. DB table `npc_spellclick_spells` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spellclick spells. DB table `npc_spellclick_spells` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -7850,7 +7850,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const&
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 quest relations from `{}`, table is empty.", table);
LOG_WARN("server.loading", ">> Loaded 0 quest relations from `{}`, table is empty.", table);
LOG_INFO("server.loading", " ");
return;
}
@@ -7949,7 +7949,7 @@ void ObjectMgr::LoadReservedPlayersNames()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -8170,7 +8170,7 @@ void ObjectMgr::LoadGameObjectForQuests()
if (sObjectMgr->GetGameObjectTemplates()->empty())
{
LOG_INFO("server.loading", ">> Loaded 0 GameObjects for quests");
LOG_WARN("server.loading", ">> Loaded 0 GameObjects for quests");
LOG_INFO("server.loading", " ");
return;
}
@@ -8245,7 +8245,7 @@ bool ObjectMgr::LoadAcoreStrings()
QueryResult result = WorldDatabase.Query("SELECT entry, content_default, locale_koKR, locale_frFR, locale_deDE, locale_zhCN, locale_zhTW, locale_esES, locale_esMX, locale_ruRU FROM acore_string");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 acore strings. DB table `acore_strings` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 acore strings. DB table `acore_strings` is empty.");
LOG_INFO("server.loading", " ");
return false;
}
@@ -8295,7 +8295,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 areas for fishing base skill level. DB table `skill_fishing_base_level` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 areas for fishing base skill level. DB table `skill_fishing_base_level` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -8436,7 +8436,7 @@ void ObjectMgr::LoadGameTele()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 GameTeleports. DB table `game_tele` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 GameTeleports. DB table `game_tele` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -8576,7 +8576,7 @@ void ObjectMgr::LoadMailLevelRewards()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 level dependent mail rewards. DB table `mail_level_reward` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 level dependent mail rewards. DB table `mail_level_reward` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -8723,7 +8723,7 @@ void ObjectMgr::LoadTrainerSpell()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 Trainers. DB table `npc_trainer` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 Trainers. DB table `npc_trainer` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -8805,7 +8805,7 @@ void ObjectMgr::LoadVendors()
if (!result)
{
LOG_INFO("server.loading", " ");
LOG_ERROR("sql.sql", ">> Loaded 0 Vendors. DB table `npc_vendor` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 Vendors. DB table `npc_vendor` is empty!");
return;
}
@@ -8851,7 +8851,7 @@ void ObjectMgr::LoadGossipMenu()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 gossip_menu entries. DB table `gossip_menu` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 gossip_menu entries. DB table `gossip_menu` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -8891,7 +8891,7 @@ void ObjectMgr::LoadGossipMenuItems()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 gossip_menu_option IDs. DB table `gossip_menu_option` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 gossip_menu_option IDs. DB table `gossip_menu_option` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -9157,7 +9157,7 @@ void ObjectMgr::LoadBroadcastTexts()
QueryResult result = WorldDatabase.Query("SELECT ID, LanguageID, MaleText, FemaleText, EmoteID1, EmoteID2, EmoteID3, EmoteDelay1, EmoteDelay2, EmoteDelay3, SoundEntriesID, EmotesID, Flags FROM broadcast_text");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 broadcast texts. DB table `broadcast_text` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 broadcast texts. DB table `broadcast_text` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -9241,7 +9241,7 @@ void ObjectMgr::LoadBroadcastTextLocales()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 broadcast text locales. DB table `broadcast_text_locale` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 broadcast text locales. DB table `broadcast_text_locale` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -9307,7 +9307,7 @@ void ObjectMgr::LoadCreatureClassLevelStats()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -9390,7 +9390,7 @@ void ObjectMgr::LoadFactionChangeAchievements()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 faction change achievement pairs. DB table `player_factionchange_achievement` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 faction change achievement pairs. DB table `player_factionchange_achievement` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -9426,7 +9426,7 @@ void ObjectMgr::LoadFactionChangeItems()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -9462,7 +9462,7 @@ void ObjectMgr::LoadFactionChangeQuests()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 faction change quest pairs. DB table `player_factionchange_quests` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 faction change quest pairs. DB table `player_factionchange_quests` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -9498,7 +9498,7 @@ void ObjectMgr::LoadFactionChangeReputations()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 faction change reputation pairs. DB table `player_factionchange_reputations` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 faction change reputation pairs. DB table `player_factionchange_reputations` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -9534,7 +9534,7 @@ void ObjectMgr::LoadFactionChangeSpells()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 faction change spell pairs. DB table `player_factionchange_spells` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 faction change spell pairs. DB table `player_factionchange_spells` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -9570,7 +9570,7 @@ void ObjectMgr::LoadFactionChangeTitles()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 faction change title pairs. DB table `player_factionchange_title` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 faction change title pairs. DB table `player_factionchange_title` is empty.");
return;
}
@@ -9664,7 +9664,7 @@ void ObjectMgr::LoadGameObjectQuestItems()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 gameobject quest items. DB table `gameobject_questitem` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 gameobject quest items. DB table `gameobject_questitem` is empty.");
return;
}
@@ -9694,7 +9694,7 @@ void ObjectMgr::LoadCreatureQuestItems()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creature quest items. DB table `creature_questitem` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creature quest items. DB table `creature_questitem` is empty.");
return;
}
@@ -9725,7 +9725,7 @@ void ObjectMgr::LoadQuestMoneyRewards()
QueryResult result = WorldDatabase.Query("SELECT `Level`, Money0, Money1, Money2, Money3, Money4, Money5, Money6, Money7, Money8, Money9 FROM `quest_money_reward` ORDER BY `Level`");
if (!result)
{
LOG_ERROR("server.loading", ">> Loaded 0 quest money rewards. DB table `quest_money_reward` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 quest money rewards. DB table `quest_money_reward` is empty.");
return;
}
+2 -2
View File
@@ -121,7 +121,7 @@ void GroupMgr::LoadGroups()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 group definitions. DB table `groups` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 group definitions. DB table `groups` is empty!");
LOG_INFO("server.loading", " ");
}
else
@@ -161,7 +161,7 @@ void GroupMgr::LoadGroups()
QueryResult result = CharacterDatabase.Query("SELECT guid, memberGuid, memberFlags, subgroup, roles FROM group_member ORDER BY guid");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 group members. DB table `group_member` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 group members. DB table `group_member` is empty!");
LOG_INFO("server.loading", " ");
}
else
+8 -8
View File
@@ -106,7 +106,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 guild definitions. DB table `guild` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 guild definitions. DB table `guild` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -146,7 +146,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 guild ranks. DB table `guild_rank` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 guild ranks. DB table `guild_rank` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -187,7 +187,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 guild members. DB table `guild_member` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 guild members. DB table `guild_member` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -223,7 +223,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -257,7 +257,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -292,7 +292,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -327,7 +327,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -364,7 +364,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty.");
LOG_INFO("server.loading", " ");
}
else
+5 -7
View File
@@ -16,6 +16,7 @@
*/
#include "CreatureAI.h"
#include "CombatPackets.h"
#include "Log.h"
#include "ObjectAccessor.h"
#include "ObjectDefines.h"
@@ -70,18 +71,15 @@ void WorldSession::HandleAttackStopOpcode(WorldPacket& /*recvData*/)
GetPlayer()->AttackStop();
}
void WorldSession::HandleSetSheathedOpcode(WorldPacket& recvData)
void WorldSession::HandleSetSheathedOpcode(WorldPackets::Combat::SetSheathed& packet)
{
uint32 sheathed;
recvData >> sheathed;
if (sheathed >= MAX_SHEATH_STATE)
if (packet.CurrentSheathState >= MAX_SHEATH_STATE)
{
LOG_ERROR("network.opcode", "Unknown sheath state {} ??", sheathed);
LOG_ERROR("network.opcode", "Unknown sheath state {} ??", packet.CurrentSheathState);
return;
}
GetPlayer()->SetSheath(SheathState(sheathed));
_player->SetSheath(SheathState(packet.CurrentSheathState));
}
void WorldSession::SendAttackStop(Unit const* enemy)
+2 -2
View File
@@ -958,7 +958,7 @@ void WorldSession::HandleCompleteCinematic(WorldPacket& /*recv_data*/)
LOG_DEBUG("network", "WORLD: Received CMSG_COMPLETE_CINEMATIC");
}
// If player has sight bound to visual waypoint NPC we should remove it
GetPlayer()->EndCinematic();
GetPlayer()->GetCinematicMgr()->EndCinematic();
}
void WorldSession::HandleNextCinematicCamera(WorldPacket& /*recv_data*/)
@@ -967,7 +967,7 @@ void WorldSession::HandleNextCinematicCamera(WorldPacket& /*recv_data*/)
LOG_DEBUG("network", "WORLD: Received CMSG_NEXT_CINEMATIC_CAMERA");
}
// Sent by client when cinematic actually begun. So we begin the server side process
GetPlayer()->BeginCinematic();
GetPlayer()->GetCinematicMgr()->BeginCinematic();
}
void WorldSession::HandleFeatherFallAck(WorldPacket& recv_data)
+1 -1
View File
@@ -43,7 +43,7 @@ void LootItemStorage::LoadStorageFromDB()
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 stored items!");
LOG_WARN("server.loading", ">> Loaded 0 stored items!");
LOG_INFO("server.loading", " ");
return;
}
+12 -12
View File
@@ -1923,7 +1923,7 @@ void LoadLootTemplates_Creature()
if (count)
LOG_INFO("server.loading", ">> Loaded {} creature loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -1958,7 +1958,7 @@ void LoadLootTemplates_Disenchant()
if (count)
LOG_INFO("server.loading", ">> Loaded {} disenchanting loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -1983,7 +1983,7 @@ void LoadLootTemplates_Fishing()
if (count)
LOG_INFO("server.loading", ">> Loaded {} fishing loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -2019,7 +2019,7 @@ void LoadLootTemplates_Gameobject()
if (count)
LOG_INFO("server.loading", ">> Loaded {} gameobject loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -2045,7 +2045,7 @@ void LoadLootTemplates_Item()
if (count)
LOG_INFO("server.loading", ">> Loaded {} item loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 item loot templates. DB table `item_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 item loot templates. DB table `item_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -2076,7 +2076,7 @@ void LoadLootTemplates_Milling()
if (count)
LOG_INFO("server.loading", ">> Loaded {} milling loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -2112,7 +2112,7 @@ void LoadLootTemplates_Pickpocketing()
if (count)
LOG_INFO("server.loading", ">> Loaded {} pickpocketing loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -2143,7 +2143,7 @@ void LoadLootTemplates_Prospecting()
if (count)
LOG_INFO("server.loading", ">> Loaded {} prospecting loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -2169,7 +2169,7 @@ void LoadLootTemplates_Mail()
if (count)
LOG_INFO("server.loading", ">> Loaded {} mail loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -2205,7 +2205,7 @@ void LoadLootTemplates_Skinning()
if (count)
LOG_INFO("server.loading", ">> Loaded {} skinning loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -2249,7 +2249,7 @@ void LoadLootTemplates_Spell()
if (count)
LOG_INFO("server.loading", ">> Loaded {} spell loot templates in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty");
LOG_INFO("server.loading", " ");
}
@@ -2268,7 +2268,7 @@ void LoadLootTemplates_Player()
}
else
{
LOG_ERROR("sql.sql", ">> Loaded 0 player loot templates. DB table `player_loot_template` is empty");
LOG_WARN("server.loading", ">> Loaded 0 player loot templates. DB table `player_loot_template` is empty");
}
LOG_INFO("server.loading", " ");
+1 -1
View File
@@ -55,7 +55,7 @@ void TransportMgr::LoadTransportTemplates()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 transport templates. DB table `gameobject_template` has no transports!");
LOG_WARN("server.loading", ">> Loaded 0 transport templates. DB table `gameobject_template` has no transports!");
return;
}
+2 -2
View File
@@ -36,7 +36,7 @@ void Graveyard::LoadGraveyardFromDB()
QueryResult result = WorldDatabase.Query("SELECT ID, Map, x, y, z, Comment FROM game_graveyard");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 graveyard. Table `game_graveyard` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 graveyard. Table `game_graveyard` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -362,7 +362,7 @@ void Graveyard::LoadGraveyardZones()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 graveyard-zone links. DB table `graveyard_zone` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 graveyard-zone links. DB table `graveyard_zone` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -52,7 +52,7 @@ void WaypointMgr::Load()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 waypoints. DB table `waypoint_data` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 waypoints. DB table `waypoint_data` is empty!");
LOG_INFO("server.loading", " ");
return;
}
+1 -1
View File
@@ -52,7 +52,7 @@ void OutdoorPvPMgr::InitOutdoorPvP()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
+2 -2
View File
@@ -45,7 +45,7 @@ void PetitionMgr::LoadPetitions()
QueryResult result = CharacterDatabase.Query("SELECT ownerguid, petitionguid, name, type FROM petition");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 Petitions!");
LOG_WARN("server.loading", ">> Loaded 0 Petitions!");
LOG_INFO("server.loading", " ");
return;
}
@@ -70,7 +70,7 @@ void PetitionMgr::LoadSignatures()
QueryResult result = CharacterDatabase.Query("SELECT petitionguid, playerguid, player_account FROM petition_sign");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 Petition signs!");
LOG_WARN("server.loading", ">> Loaded 0 Petition signs!");
LOG_INFO("server.loading", " ");
return;
}
+5 -5
View File
@@ -581,7 +581,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
mPoolTemplate.clear();
LOG_INFO("server.loading", ">> Loaded 0 object pools. DB table `pool_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 object pools. DB table `pool_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -614,7 +614,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -672,7 +672,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty.");
LOG_INFO("server.loading", " ");
}
else
@@ -742,7 +742,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 pools in pools");
LOG_WARN("server.loading", ">> Loaded 0 pools in pools");
LOG_INFO("server.loading", " ");
}
else
@@ -832,7 +832,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 quests in pools");
LOG_WARN("server.loading", ">> Loaded 0 quests in pools");
LOG_INFO("server.loading", " ");
}
else
+1 -1
View File
@@ -48,7 +48,7 @@ void SystemMgr::LoadScriptWaypoints()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -24,6 +24,7 @@
#include "ChatPackets.h"
#include "PetPackets.h"
#include "CombatLogPackets.h"
#include "CombatPackets.h"
#include "GuildPackets.h"
#include "MiscPackets.h"
#include "TotemPackets.h"
@@ -0,0 +1,23 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CombatPackets.h"
void WorldPackets::Combat::SetSheathed::Read()
{
_worldPacket >> CurrentSheathState;
}
@@ -0,0 +1,40 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CombatPackets_h__
#define CombatPackets_h__
#include "Packet.h"
#include "ObjectGuid.h"
namespace WorldPackets
{
namespace Combat
{
class SetSheathed final : public ClientPacket
{
public:
SetSheathed(WorldPacket&& packet) : ClientPacket(CMSG_SET_SHEATHED, std::move(packet)) { }
void Read() override;
uint32 CurrentSheathState = 0;
};
}
}
#endif // CombatPackets_h__
+1 -1
View File
@@ -608,7 +608,7 @@ void OpcodeTable::Initialize()
/*0x1DD*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_PONG, STATUS_NEVER);
/*0x1DE*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_CLEAR_COOLDOWN, STATUS_NEVER);
/*0x1DF*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_GAMEOBJECT_PAGETEXT, STATUS_NEVER);
/*0x1E0*/ DEFINE_HANDLER(CMSG_SETSHEATHED, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleSetSheathedOpcode );
/*0x1E0*/ DEFINE_HANDLER(CMSG_SET_SHEATHED, STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleSetSheathedOpcode );
/*0x1E1*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_COOLDOWN_CHEAT, STATUS_NEVER);
/*0x1E2*/ DEFINE_SERVER_OPCODE_HANDLER(SMSG_SPELL_DELAYED, STATUS_NEVER);
/*0x1E3*/ DEFINE_HANDLER(CMSG_QUEST_POI_QUERY, STATUS_LOGGEDIN, PROCESS_INPLACE, &WorldSession::HandleQuestPOIQuery );
+1 -1
View File
@@ -507,7 +507,7 @@ enum Opcodes : uint16
SMSG_PONG = 0x1DD,
SMSG_CLEAR_COOLDOWN = 0x1DE,
SMSG_GAMEOBJECT_PAGETEXT = 0x1DF,
CMSG_SETSHEATHED = 0x1E0,
CMSG_SET_SHEATHED = 0x1E0,
SMSG_COOLDOWN_CHEAT = 0x1E1,
SMSG_SPELL_DELAYED = 0x1E2,
CMSG_QUEST_POI_QUERY = 0x1E3,
+1 -1
View File
@@ -1363,7 +1363,7 @@ uint32 WorldSession::DosProtection::GetMaxPacketCounterAllowed(uint16 opcode) co
case CMSG_CORPSE_MAP_POSITION_QUERY: // 0 1
case CMSG_MOVE_TIME_SKIPPED: // 0 1
case MSG_QUERY_NEXT_MAIL_TIME: // 0 1
case CMSG_SETSHEATHED: // 0 1
case CMSG_SET_SHEATHED: // 0 1
case MSG_RAID_TARGET_UPDATE: // 0 1
case CMSG_PLAYER_LOGOUT: // 0 1
case CMSG_LOGOUT_REQUEST: // 0 1
+6 -1
View File
@@ -104,6 +104,11 @@ namespace WorldPackets
class BuyBankSlot;
}
namespace Combat
{
class SetSheathed;
}
namespace Guild
{
class QueryGuildInfo;
@@ -794,7 +799,7 @@ public: // opcodes handlers
void HandleAttackSwingOpcode(WorldPacket& recvPacket);
void HandleAttackStopOpcode(WorldPacket& recvPacket);
void HandleSetSheathedOpcode(WorldPacket& recvPacket);
void HandleSetSheathedOpcode(WorldPackets::Combat::SetSheathed& packet);
void HandleUseItemOpcode(WorldPacket& recvPacket);
void HandleOpenItemOpcode(WorldPacket& recvPacket);
+1 -1
View File
@@ -54,7 +54,7 @@ void LoadSkillDiscoveryTable()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
+2 -2
View File
@@ -60,7 +60,7 @@ void LoadSkillPerfectItemTable()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell perfection definitions. DB table `skill_perfect_item_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell perfection definitions. DB table `skill_perfect_item_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -146,7 +146,7 @@ void LoadSkillExtraItemTable()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty.");
LOG_INFO("server.loading", " ");
return;
}
+15 -15
View File
@@ -1300,7 +1300,7 @@ void SpellMgr::LoadSpellRanks()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1411,7 +1411,7 @@ void SpellMgr::LoadSpellRequired()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell required records. DB table `spell_required` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell required records. DB table `spell_required` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1528,7 +1528,7 @@ void SpellMgr::LoadSpellTargetPositions()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1632,7 +1632,7 @@ void SpellMgr::LoadSpellGroups()
QueryResult result = WorldDatabase.Query("SELECT id, spell_id, special_flag FROM spell_group");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1692,7 +1692,7 @@ void SpellMgr::LoadSpellGroupStackRules()
QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1743,7 +1743,7 @@ void SpellMgr::LoadSpellProcEvents()
QueryResult result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, procFlags, procEx, procPhase, ppmRate, CustomChance, Cooldown FROM spell_proc_event");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
return;
}
@@ -1837,7 +1837,7 @@ void SpellMgr::LoadSpellProcs()
QueryResult result = WorldDatabase.Query("SELECT spellId, schoolMask, spellFamilyName, spellFamilyMask0, spellFamilyMask1, spellFamilyMask2, typeMask, spellTypeMask, spellPhaseMask, hitMask, attributesMask, ratePerMinute, chance, cooldown, charges FROM spell_proc");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -1975,7 +1975,7 @@ void SpellMgr::LoadSpellBonusess()
QueryResult result = WorldDatabase.Query("SELECT entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus FROM spell_bonus_data");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2016,7 +2016,7 @@ void SpellMgr::LoadSpellThreats()
QueryResult result = WorldDatabase.Query("SELECT entry, flatMod, pctMod, apPctMod FROM spell_threat");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2057,7 +2057,7 @@ void SpellMgr::LoadSpellMixology()
QueryResult result = WorldDatabase.Query("SELECT entry, pctMod FROM spell_mixology");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 mixology bonuses. DB table `spell_mixology` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 mixology bonuses. DB table `spell_mixology` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2115,7 +2115,7 @@ void SpellMgr::LoadSpellPetAuras()
QueryResult result = WorldDatabase.Query("SELECT spell, effectId, pet, aura FROM spell_pet_auras");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2219,7 +2219,7 @@ void SpellMgr::LoadSpellEnchantProcData()
QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2263,7 +2263,7 @@ void SpellMgr::LoadSpellLinked()
QueryResult result = WorldDatabase.Query("SELECT spell_trigger, spell_effect, type FROM spell_linked_spell");
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2505,7 +2505,7 @@ void SpellMgr::LoadSpellAreas()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
LOG_INFO("server.loading", " ");
return;
}
@@ -2776,7 +2776,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 spell custom attributes from DB. DB table `spell_custom_attr` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 spell custom attributes from DB. DB table `spell_custom_attr` is empty.");
}
else
{
+1 -1
View File
@@ -91,7 +91,7 @@ void CreatureTextMgr::LoadCreatureTexts()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 ceature texts. DB table `creature_texts` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 ceature texts. DB table `creature_texts` is empty.");
LOG_INFO("server.loading", " ");
return;
}
+1 -1
View File
@@ -313,7 +313,7 @@ void TicketMgr::LoadTickets()
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 GM tickets. DB table `gm_ticket` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 GM tickets. DB table `gm_ticket` is empty!");
return;
}
+2 -2
View File
@@ -50,7 +50,7 @@ void WardenCheckMgr::LoadWardenChecks()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 Warden checks. DB table `warden_checks` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 Warden checks. DB table `warden_checks` is empty!");
LOG_INFO("server.loading", " ");
return;
}
@@ -176,7 +176,7 @@ void WardenCheckMgr::LoadWardenOverrides()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!");
LOG_INFO("server.loading", " ");
return;
}
+1 -1
View File
@@ -96,7 +96,7 @@ namespace WeatherMgr
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
LOG_WARN("server.loading", ">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
LOG_INFO("server.loading", " ");
return;
}
+6 -2
View File
@@ -62,6 +62,7 @@
#include "MMapFactory.h"
#include "MapMgr.h"
#include "Metric.h"
#include "M2Stores.h"
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "OutdoorPvPMgr.h"
@@ -1530,6 +1531,9 @@ void World::SetInitialWorldSettings()
LoadDBCStores(m_dataPath);
DetectDBCLang();
// Load cinematic cameras
LoadM2Cameras(m_dataPath);
// Load IP Location Database
sIPLocation->Load();
@@ -2196,7 +2200,7 @@ void World::LoadAutobroadcasts()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty for this realm!");
LOG_WARN("server.loading", ">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty for this realm!");
return;
}
@@ -3319,7 +3323,7 @@ void World::LoadWorldStates()
if (!result)
{
LOG_INFO("server.loading", ">> Loaded 0 world states. DB table `worldstates` is empty!");
LOG_WARN("server.loading", ">> Loaded 0 world states. DB table `worldstates` is empty!");
LOG_INFO("server.loading", " ");
return;
}