summaryrefslogtreecommitdiff
path: root/src/game/AI/SmartScripts/SmartScriptMgr.cpp
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2017-09-16 13:47:19 +0200
committerYehonal <yehonal.azeroth@gmail.com>2017-09-16 13:47:19 +0200
commit3dde305068cad85aeee5b283bf46e2898c6f0a15 (patch)
treeac6f82f24e0de5faabb39927c8ea3abdf9ef3850 /src/game/AI/SmartScripts/SmartScriptMgr.cpp
parent584af79efa0fa3ad7e7d47b3622e0177c438cb7b (diff)
Core: step 1 - starting to fix core warnings
expecially from headers and some cpp files Scripts and tools in next steps
Diffstat (limited to 'src/game/AI/SmartScripts/SmartScriptMgr.cpp')
-rw-r--r--src/game/AI/SmartScripts/SmartScriptMgr.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/game/AI/SmartScripts/SmartScriptMgr.cpp
index c95c655b81..3af8f9adc3 100644
--- a/src/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -237,6 +237,8 @@ void SmartAIMgr::LoadSmartAIFromDB()
if (temp.event.friendlyCC.repeatMin == 0 && temp.event.friendlyCC.repeatMax == 0)
temp.event.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE;
break;
+ default:
+ break;
}
// xinef: rozpierdol tc, niedojeby ze szok
@@ -416,8 +418,10 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
break;
case SMART_EVENT_OOC_LOS:
case SMART_EVENT_IC_LOS:
- if (!IsMinMaxValid(e, e.event.los.cooldownMin, e.event.los.cooldownMax))
+ if (!IsMinMaxValid(e, e.event.los.cooldownMin, e.event.los.cooldownMax)) {
return false;
+ }
+
break;
case SMART_EVENT_RESPAWN:
if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_MAP && !sMapStore.LookupEntry(e.event.respawn.map))
@@ -971,14 +975,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
if (eventId < 1 || eventId >= events.size())
{
- sLog->outError("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);
+ sLog->outError("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())
{
- sLog->outError("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);
+ sLog->outError("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;
@@ -991,14 +995,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
if (eventId < 1 || eventId >= events.size())
{
- sLog->outError("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);
+ sLog->outError("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())
{
- sLog->outError("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);
+ sLog->outError("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;