mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into 6.x
This commit is contained in:
@@ -73,6 +73,8 @@ include_directories(
|
||||
${ZMQ_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_executable(bnetserver
|
||||
${bnetserver_SRCS}
|
||||
${bnetserver_PCH_SRC}
|
||||
|
||||
@@ -81,6 +81,8 @@ include_directories(
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_library(collision STATIC
|
||||
${collision_STAT_SRCS}
|
||||
${collision_STAT_PCH_SRC}
|
||||
|
||||
@@ -214,6 +214,8 @@ include_directories(
|
||||
${ZMQ_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_library(game STATIC
|
||||
${game_STAT_SRCS}
|
||||
${game_STAT_PCH_SRC}
|
||||
|
||||
@@ -1512,7 +1512,7 @@ void OpcodeTable::Initialize()
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_CLEAR_SPELLS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_DISMISS_SOUND, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_GOD_MODE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_GUI_DS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_GUIDS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_LEARNED_SPELLS, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_MODE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_PET_NAME_INVALID, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
|
||||
@@ -1419,7 +1419,7 @@ enum OpcodeServer : uint32
|
||||
SMSG_PET_CLEAR_SPELLS = 0x193A,
|
||||
SMSG_PET_DISMISS_SOUND = 0x0237,
|
||||
SMSG_PET_GOD_MODE = 0x1C66,
|
||||
SMSG_PET_GUI_DS = 0x0245,
|
||||
SMSG_PET_GUIDS = 0x0245,
|
||||
SMSG_PET_LEARNED_SPELLS = 0x1099,
|
||||
SMSG_PET_MODE = 0x1F0B,
|
||||
SMSG_PET_NAME_INVALID = 0x0975,
|
||||
|
||||
@@ -332,9 +332,6 @@ Aura* Aura::Create(SpellInfo const* spellproto, uint32 effMask, WorldObject* own
|
||||
else
|
||||
casterGUID = caster->GetGUID();
|
||||
|
||||
// at this point of Aura::Create() there MUST be a valid caster
|
||||
ASSERT(caster);
|
||||
|
||||
// check if aura can be owned by owner
|
||||
if (owner->isType(TYPEMASK_UNIT))
|
||||
if (!owner->IsInWorld() || ((Unit*)owner)->IsDuringRemoveFromWorld())
|
||||
|
||||
@@ -151,6 +151,8 @@ include_directories(
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_library(scripts STATIC
|
||||
${scripts_STAT_SRCS}
|
||||
${scripts_STAT_PCH_SRC}
|
||||
|
||||
@@ -34,6 +34,7 @@ EndContentData */
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "CellImpl.h"
|
||||
|
||||
/*######
|
||||
## npc_webbed_creature
|
||||
|
||||
@@ -87,6 +87,8 @@ include_directories(
|
||||
${VALGRIND_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_library(shared STATIC
|
||||
${shared_STAT_SRCS}
|
||||
${shared_STAT_PCH_SRC}
|
||||
|
||||
@@ -79,7 +79,7 @@ uint32 MySQLConnection::Open()
|
||||
if (!mysqlInit)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Could not initialize Mysql connection to database `%s`", m_connectionInfo.database.c_str());
|
||||
return false;
|
||||
return CR_UNKNOWN_ERROR;
|
||||
}
|
||||
|
||||
int port;
|
||||
@@ -492,9 +492,17 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo)
|
||||
uint64 oldThreadId = mysql_thread_id(GetHandle());
|
||||
mysql_close(GetHandle());
|
||||
|
||||
// Don't remove 'this' pointer unless you want to skip loading all prepared statements....
|
||||
if (this->Open() && this->PrepareStatements())
|
||||
uint32 const lErrno = Open();
|
||||
if (!lErrno)
|
||||
{
|
||||
// Don't remove 'this' pointer unless you want to skip loading all prepared statements...
|
||||
if (!this->PrepareStatements())
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Could not re-prepare statements!");
|
||||
Close();
|
||||
return false;
|
||||
}
|
||||
|
||||
TC_LOG_INFO("sql.sql", "Connection to the MySQL server is active.");
|
||||
if (oldThreadId != mysql_thread_id(GetHandle()))
|
||||
TC_LOG_INFO("sql.sql", "Successfully reconnected to %s @%s:%s (%s).",
|
||||
@@ -505,7 +513,7 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo)
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 lErrno = mysql_errno(GetHandle()); // It's possible this attempted reconnect throws 2006 at us. To prevent crazy recursive calls, sleep here.
|
||||
// It's possible this attempted reconnect throws 2006 at us. To prevent crazy recursive calls, sleep here.
|
||||
std::this_thread::sleep_for(std::chrono::seconds(3)); // Sleep 3 seconds
|
||||
return _HandleMySQLErrno(lErrno); // Call self (recursive)
|
||||
}
|
||||
|
||||
@@ -149,6 +149,8 @@ include_directories(
|
||||
${ZMQ_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_executable(worldserver
|
||||
${worldserver_SRCS}
|
||||
${worldserver_PCH_SRC}
|
||||
|
||||
Reference in New Issue
Block a user