aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/collision/Management/VMapManager2.cpp1
-rw-r--r--src/server/collision/Maps/MapTree.cpp37
-rw-r--r--src/server/collision/Maps/MapTree.h1
-rw-r--r--src/server/game/DataStores/DBCStores.cpp2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp8
-rw-r--r--src/server/game/Server/Protocol/Handlers/MiscHandler.cpp2
-rw-r--r--src/server/game/World/World.cpp16
-rw-r--r--src/server/shared/Database/Database.h2
-rw-r--r--src/tools/vmap3_assembler/CMakeLists.txt5
-rw-r--r--src/tools/vmap3_extractor/wmo.cpp2
10 files changed, 43 insertions, 33 deletions
diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp
index 8e3681864d0..79d0b57790a 100644
--- a/src/server/collision/Management/VMapManager2.cpp
+++ b/src/server/collision/Management/VMapManager2.cpp
@@ -25,6 +25,7 @@
#include "ModelInstance.h"
#include "WorldModel.h"
#include "VMapDefinitions.h"
+#include "Log.h"
using G3D::Vector3;
diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp
index af4073fcc8c..af92ec37ae7 100644
--- a/src/server/collision/Maps/MapTree.cpp
+++ b/src/server/collision/Maps/MapTree.cpp
@@ -16,17 +16,23 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Errors.h"
#include "MapTree.h"
#include "ModelInstance.h"
#include "VMapManager2.h"
#include "VMapDefinitions.h"
+#include "Log.h"
#include <string>
#include <sstream>
#include <iomanip>
#include <limits>
+#ifndef NO_CORE_FUNCS
+ #include "Errors.h"
+#else
+ #define ASSERT(x)
+#endif
+
using G3D::Vector3;
namespace VMAP
@@ -51,7 +57,7 @@ namespace VMAP
void operator()(const Vector3& point, uint32 entry)
{
#ifdef VMAP_DEBUG
- std::cout << "trying to intersect '" << prims[entry].name << "'\n";
+ sLog.outDebug("trying to intersect '%s'", prims[entry].name.c_str());
#endif
prims[entry].intersectPoint(point, aInfo);
}
@@ -67,7 +73,7 @@ namespace VMAP
void operator()(const Vector3& point, uint32 entry)
{
#ifdef VMAP_DEBUG
- std::cout << "trying to intersect '" << prims[entry].name << "'\n";
+ sLog.outDebug("trying to intersect '%s'", prims[entry].name.c_str());
#endif
if (prims[entry].GetLocationInfo(point, locInfo))
result = true;
@@ -264,7 +270,7 @@ namespace VMAP
bool StaticMapTree::InitMap(const std::string &fname, VMapManager2 *vm)
{
- std::cout << "Initializing StaticMapTree '" << fname << "'\n";
+ sLog.outDebug("Initializing StaticMapTree '%s'", fname.c_str());
bool success = true;
std::string fullname = iBasePath + fname;
FILE *rf = fopen(fullname.c_str(), "rb");
@@ -292,12 +298,12 @@ namespace VMAP
// only non-tiled maps have them, and if so exactly one (so far at least...)
ModelSpawn spawn;
#ifdef VMAP_DEBUG
- std::cout << "Map isTiled:" << bool(iIsTiled) << std::endl;
+ sLog.outDebug("Map isTiled: %u", static_cast<uint32>(iIsTiled));
#endif
if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn))
{
WorldModel *model = vm->acquireModelInstance(iBasePath, spawn.name);
- std::cout << "StaticMapTree::InitMap(): loading " << spawn.name << std::endl;
+ sLog.outDebug("StaticMapTree::InitMap(): loading %s", spawn.name.c_str());
if (model)
{
// assume that global model always is the first and only tree value (could be improved...)
@@ -307,7 +313,7 @@ namespace VMAP
else
{
success = false;
- std::cout << "error: could not acquire WorldModel pointer!\n";
+ sLog.outError("Could not acquire WorldModel pointer!");
}
}
@@ -343,7 +349,7 @@ namespace VMAP
}
if (!iTreeValues)
{
- std::cout << "Tree has not been initialized!\n";
+ sLog.outError("Tree has not been initialized! [%u,%u]", tileX, tileY);
return false;
}
bool result = true;
@@ -364,7 +370,8 @@ namespace VMAP
{
// acquire model instance
WorldModel *model = vm->acquireModelInstance(iBasePath, spawn.name);
- if (!model) std::cout << "error: could not acquire WorldModel pointer!\n";
+ if (!model)
+ sLog.outError("error: could not acquire WorldModel pointer! [%u,%u]", tileX, tileY);
// update tree
uint32 referencedVal;
@@ -375,7 +382,7 @@ namespace VMAP
#ifdef VMAP_DEBUG
if (referencedVal > iNTreeValues)
{
- std::cout << "invalid tree element! (" << referencedVal << "/" << iNTreeValues << ")\n";
+ sLog.outDebug("invalid tree element! (%u/%u)", referencedVal, iNTreeValues);
continue;
}
#endif
@@ -386,8 +393,10 @@ namespace VMAP
{
++iLoadedSpawns[referencedVal];
#ifdef VMAP_DEBUG
- if (iTreeValues[referencedVal].ID != spawn.ID) std::cout << "error: trying to load wrong spawn in node!\n";
- else if (iTreeValues[referencedVal].name != spawn.name) std::cout << "error: name collision on GUID="<< spawn.ID << "\n";
+ if (iTreeValues[referencedVal].ID != spawn.ID)
+ sLog.outDebug("error: trying to load wrong spawn in node!");
+ else if (iTreeValues[referencedVal].name != spawn.name)
+ sLog.outDebug("error: name collision on GUID=%u", spawn.ID);
#endif
}
}
@@ -408,7 +417,7 @@ namespace VMAP
loadedTileMap::iterator tile = iLoadedTiles.find(tileID);
if (tile == iLoadedTiles.end())
{
- std::cout << "WARNING: trying to unload non-loaded tile. Map:" << iMapID << " X:" << tileX << " Y:" << tileY << std::endl;
+ sLog.outError("WARNING: trying to unload non-loaded tile. Map:%u X:%u Y:%u", iMapID, tileX, tileY);
return;
}
if (tile->second) // file associated with tile
@@ -437,7 +446,7 @@ namespace VMAP
fread(&referencedNode, sizeof(uint32), 1, tf);
if (!iLoadedSpawns.count(referencedNode))
{
- std::cout << "error! trying to unload non-referenced model '" << spawn.name << "' (ID:" << spawn.ID << ")\n";
+ sLog.outError("Trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID);
}
else if (--iLoadedSpawns[referencedNode] == 0)
{
diff --git a/src/server/collision/Maps/MapTree.h b/src/server/collision/Maps/MapTree.h
index f9c51d47b95..7a7af43e949 100644
--- a/src/server/collision/Maps/MapTree.h
+++ b/src/server/collision/Maps/MapTree.h
@@ -22,7 +22,6 @@
#include "Define.h"
#include "Dynamic/UnorderedMap.h"
#include "BoundingIntervalHierarchy.h"
-#include "Log.h"
namespace VMAP
{
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 510fbdad100..928b9f4f9e6 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -579,7 +579,7 @@ void LoadDBCStores(const std::string& dataPath)
// error checks
if (bad_dbc_files.size() >= DBCFilesCount)
{
- sLog.outError("\nIncorrect DataDir value in Trinityd.conf or ALL required *.dbc files (%d) not found by path: %sdbc",DBCFilesCount,dataPath.c_str());
+ sLog.outError("\nIncorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc",DBCFilesCount,dataPath.c_str());
exit(1);
}
else if (!bad_dbc_files.empty())
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index e78dc02a93f..d616806a7cc 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -2587,7 +2587,7 @@ void ObjectMgr::LoadPetLevelInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `pet_levelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
else
{
- sLog.outDetail("Unused (> MaxPlayerLevel in Trinityd.conf) level %u in `pet_levelstats` table, ignoring.",current_level);
+ sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `pet_levelstats` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@@ -3024,7 +3024,7 @@ void ObjectMgr::LoadPlayerInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `player_classlevelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
else
{
- sLog.outDetail("Unused (> MaxPlayerLevel in Trinityd.conf) level %u in `player_classlevelstats` table, ignoring.",current_level);
+ sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@@ -3121,7 +3121,7 @@ void ObjectMgr::LoadPlayerInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `player_levelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
else
{
- sLog.outDetail("Unused (> MaxPlayerLevel in Trinityd.conf) level %u in `player_levelstats` table, ignoring.",current_level);
+ sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_levelstats` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@@ -3231,7 +3231,7 @@ void ObjectMgr::LoadPlayerInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `player_xp_for_level` table, ignoring.", STRONG_MAX_LEVEL,current_level);
else
{
- sLog.outDetail("Unused (> MaxPlayerLevel in TrinityCore.conf) level %u in `player_xp_for_levels` table, ignoring.",current_level);
+ sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_xp_for_levels` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
index 378a817137d..e4d329e6afc 100644
--- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
@@ -374,7 +374,7 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/)
return;
}
- //instant logout in taverns/cities or on taxi or for admins, gm's, mod's if its enabled in TrinityCore.conf
+ //instant logout in taverns/cities or on taxi or for admins, gm's, mod's if its enabled in worldserver.conf
if (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() ||
GetSecurity() >= sWorld.getConfig(CONFIG_INSTANT_LOGOUT))
{
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 0041bbaecc8..4da78277c96 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -652,7 +652,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfig.GetIntDefault("WorldServerPort", DEFAULT_WORLDSERVER_PORT);
if (val != m_configs[CONFIG_PORT_WORLD])
- sLog.outError("WorldServerPort option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_PORT_WORLD]);
+ sLog.outError("WorldServerPort option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_PORT_WORLD]);
}
else
m_configs[CONFIG_PORT_WORLD] = sConfig.GetIntDefault("WorldServerPort", DEFAULT_WORLDSERVER_PORT);
@@ -661,7 +661,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME);
if (val != m_configs[CONFIG_SOCKET_SELECTTIME])
- sLog.outError("SocketSelectTime option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_SOCKET_SELECTTIME]);
+ sLog.outError("SocketSelectTime option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_SOCKET_SELECTTIME]);
}
else
m_configs[CONFIG_SOCKET_SELECTTIME] = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME);
@@ -670,7 +670,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_SESSION_ADD_DELAY] = sConfig.GetIntDefault("SessionAddDelay", 10000);
m_configs[CONFIG_GROUP_XP_DISTANCE] = sConfig.GetIntDefault("MaxGroupXPDistance", 74);
- /// \todo Add MonsterSight and GuarderSight (with meaning) in Trinityd.conf or put them as define
+ /// \todo Add MonsterSight and GuarderSight (with meaning) in worldserver.conf or put them as define
m_configs[CONFIG_SIGHT_MONSTER] = sConfig.GetIntDefault("MonsterSight", 50);
m_configs[CONFIG_SIGHT_GUARDER] = sConfig.GetIntDefault("GuarderSight", 50);
@@ -678,7 +678,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfig.GetIntDefault("GameType", 0);
if (val != m_configs[CONFIG_GAME_TYPE])
- sLog.outError("GameType option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_GAME_TYPE]);
+ sLog.outError("GameType option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_GAME_TYPE]);
}
else
m_configs[CONFIG_GAME_TYPE] = sConfig.GetIntDefault("GameType", 0);
@@ -687,7 +687,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfig.GetIntDefault("RealmZone", REALM_ZONE_DEVELOPMENT);
if (val != m_configs[CONFIG_REALM_ZONE])
- sLog.outError("RealmZone option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_REALM_ZONE]);
+ sLog.outError("RealmZone option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_REALM_ZONE]);
}
else
m_configs[CONFIG_REALM_ZONE] = sConfig.GetIntDefault("RealmZone", REALM_ZONE_DEVELOPMENT);
@@ -991,7 +991,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfig.GetIntDefault("Expansion",1);
if (val != m_configs[CONFIG_EXPANSION])
- sLog.outError("Expansion option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_EXPANSION]);
+ sLog.outError("Expansion option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_EXPANSION]);
}
else
m_configs[CONFIG_EXPANSION] = sConfig.GetIntDefault("Expansion",1);
@@ -1181,7 +1181,7 @@ void World::LoadConfigSettings(bool reload)
if (reload)
{
if (dataPath != m_dataPath)
- sLog.outError("DataDir option can't be changed at Trinityd.conf reload, using current value (%s).",m_dataPath.c_str());
+ sLog.outError("DataDir option can't be changed at worldserver.conf reload, using current value (%s).",m_dataPath.c_str());
}
else
{
@@ -1274,7 +1274,7 @@ void World::SetInitialWorldSettings()
||m_configs[CONFIG_EXPANSION] && (
!MapManager::ExistMapAndVMap(530,10349.6f,-6357.29f) || !MapManager::ExistMapAndVMap(530,-3961.64f,-13931.2f)))
{
- sLog.outError("Correct *.map files not found in path '%smaps' or *.vmap/*vmdir files in '%svmaps'. Please place *.map/*.vmap/*.vmdir files in appropriate directories or correct the DataDir value in the Trinityd.conf file.",m_dataPath.c_str(),m_dataPath.c_str());
+ sLog.outError("Correct *.map files not found in path '%smaps' or *.vmtree/*.vmtile files in '%svmaps'. Please place *.map/*.vmtree/*.vmtile files in appropriate directories or correct the DataDir value in the worldserver.conf file.",m_dataPath.c_str(),m_dataPath.c_str());
exit(1);
}
diff --git a/src/server/shared/Database/Database.h b/src/server/shared/Database/Database.h
index 1a516bdc3d7..96588adbf10 100644
--- a/src/server/shared/Database/Database.h
+++ b/src/server/shared/Database/Database.h
@@ -117,7 +117,7 @@ class Database
bool _UpdateDataBlobValue(const uint32 guid, const uint32 field, const int32 value);
bool _SetDataBlobValue(const uint32 guid, const uint32 field, const uint32 value);
- // Writes SQL commands to a LOG file (see Trinityd.conf "LogSQL")
+ // Writes SQL commands to a LOG file (see worldserver.conf "LogSQL")
bool PExecuteLog(const char *format,...) ATTR_PRINTF(2,3);
bool BeginTransaction();
diff --git a/src/tools/vmap3_assembler/CMakeLists.txt b/src/tools/vmap3_assembler/CMakeLists.txt
index 62eaca7e13f..4b86c1ffa16 100644
--- a/src/tools/vmap3_assembler/CMakeLists.txt
+++ b/src/tools/vmap3_assembler/CMakeLists.txt
@@ -11,13 +11,14 @@
include_directories(
${CMAKE_SOURCE_DIR}/externals/g3dlite
- ${CMAKE_SOURCE_DIR}/src/server/collision/Maps
- ${CMAKE_SOURCE_DIR}/src/server/collision/Models
${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Maps
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Models
${ACE_INCLUDE_DIR}
)
+add_definitions(-DNO_CORE_FUNCS)
add_executable(vmap3assembler VMapAssembler.cpp)
target_link_libraries(vmap3assembler collision g3dlib)
diff --git a/src/tools/vmap3_extractor/wmo.cpp b/src/tools/vmap3_extractor/wmo.cpp
index 650d2279f28..216a2248953 100644
--- a/src/tools/vmap3_extractor/wmo.cpp
+++ b/src/tools/vmap3_extractor/wmo.cpp
@@ -386,7 +386,7 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, WMORoot *rootWMO, bool pPrecis
if (rootWMO->liquidType & 4)
liquidEntry = liquidType;
else if (liquidType == 15)
- liquidEntry = 0;
+ liquidEntry = 1; // first entry, generic "Water"
else
liquidEntry = liquidType + 1;
// overwrite material type in header...