mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core: Yet more warning fixes
This commit is contained in:
@@ -873,14 +873,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
|
||||
if (eventId < 1 || eventId >= events.size())
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop.id);
|
||||
return false;
|
||||
}
|
||||
|
||||
GameEventData const& eventData = events[eventId];
|
||||
if (!eventData.isValid())
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop.id);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -892,14 +892,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
|
||||
if (eventId < 1 || eventId >= events.size())
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart.id);
|
||||
return false;
|
||||
}
|
||||
|
||||
GameEventData const& eventData = events[eventId];
|
||||
if (!eventData.isValid())
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart);
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart.id);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -99,6 +99,7 @@ bool WorldSessionFilter::Process(WorldPacket* packet)
|
||||
WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter):
|
||||
m_muteTime(mute_time),
|
||||
m_timeOutTime(0),
|
||||
AntiDOS(this),
|
||||
_player(NULL),
|
||||
m_Socket(sock),
|
||||
_security(sec),
|
||||
@@ -118,8 +119,7 @@ WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8
|
||||
recruiterId(recruiter),
|
||||
isRecruiter(isARecruiter),
|
||||
timeLastWhoCommand(0),
|
||||
_RBACData(NULL),
|
||||
AntiDOS(this)
|
||||
_RBACData(NULL)
|
||||
{
|
||||
if (sock)
|
||||
{
|
||||
@@ -1241,7 +1241,7 @@ bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p) const
|
||||
case POLICY_BAN:
|
||||
{
|
||||
BanMode bm = (BanMode)sWorld->getIntConfig(CONFIG_PACKET_SPOOF_BANMODE);
|
||||
uin32 duration = sWorld->getIntConfig(CONFIG_PACKET_SPOOF_BANDURATION); // in seconds
|
||||
uint32 duration = sWorld->getIntConfig(CONFIG_PACKET_SPOOF_BANDURATION); // in seconds
|
||||
std::string nameOrIp = "";
|
||||
switch (bm)
|
||||
{
|
||||
|
||||
@@ -944,8 +944,6 @@ class WorldSession
|
||||
typedef UNORDERED_MAP<uint16, bool> OpcodeStatusMap;
|
||||
OpcodeStatusMap _isOpcodeAllowed; // could be bool array, but wouldn't be practical for game versions with non-linear opcodes
|
||||
Policy _policy;
|
||||
|
||||
|
||||
} AntiDOS;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user