aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorForesterDev <11771800+ForesterDev@users.noreply.github.com>2020-02-28 22:23:20 +0400
committerGitHub <noreply@github.com>2020-02-28 19:23:20 +0100
commit5cfce94619cc02cc04bb25ccdd2e1b98e53d9160 (patch)
treecea19a8eff29e667df807961d8241719060291ca /src/server/game/AI/SmartScripts
parent6cbfda2fcecdda980b60b359018e520f1daeaf3a (diff)
Core/DynamicInfo: rename some parameters according packet definitions (#24192)
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp12
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp4
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h10
3 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 39f1f030cef..3a438004703 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -2313,9 +2313,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (WorldObject* obj = GetBaseObject())
{
- obj->GetMap()->SetZoneOverrideLight(e.action.overrideLight.zoneId, e.action.overrideLight.lightId, e.action.overrideLight.fadeInTime);
- TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_OVERRIDE_LIGHT: %s sets zone override light (zoneId: %u, lightId: %u, fadeInTime: %u)",
- obj->GetGUID().ToString().c_str(), e.action.overrideLight.zoneId, e.action.overrideLight.lightId, e.action.overrideLight.fadeInTime);
+ obj->GetMap()->SetZoneOverrideLight(e.action.overrideLight.zoneId, e.action.overrideLight.overrideLightId, e.action.overrideLight.transitionMilliseconds);
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_OVERRIDE_LIGHT: %s sets zone override light (zoneId: %u, overrideLightId: %u, transitionMilliseconds: %u)",
+ obj->GetGUID().ToString().c_str(), e.action.overrideLight.zoneId, e.action.overrideLight.overrideLightId, e.action.overrideLight.transitionMilliseconds);
}
break;
}
@@ -2323,9 +2323,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (WorldObject* obj = GetBaseObject())
{
- obj->GetMap()->SetZoneWeather(e.action.overrideWeather.zoneId, (WeatherState)e.action.overrideWeather.weatherId, float(e.action.overrideWeather.weatherGrade));
- TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_OVERRIDE_WEATHER: %s sets zone weather (zoneId: %u, weatherId: %u, weatherGrade: %u)",
- obj->GetGUID().ToString().c_str(), e.action.overrideWeather.zoneId, e.action.overrideWeather.weatherId, e.action.overrideWeather.weatherGrade);
+ obj->GetMap()->SetZoneWeather(e.action.overrideWeather.zoneId, (WeatherState)e.action.overrideWeather.weatherId, float(e.action.overrideWeather.intensity));
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_OVERRIDE_WEATHER: %s sets zone weather (zoneId: %u, weatherId: %u, intensity: %u)",
+ obj->GetGUID().ToString().c_str(), e.action.overrideWeather.zoneId, e.action.overrideWeather.weatherId, e.action.overrideWeather.intensity);
}
break;
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index a004f454f33..9ce7a61c89d 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -1543,9 +1543,9 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
- if (!sLightStore.LookupEntry(e.action.overrideLight.lightId))
+ if (!sLightStore.LookupEntry(e.action.overrideLight.overrideLightId))
{
- TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent lightId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.overrideLight.lightId);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent overrideLightId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.overrideLight.overrideLightId);
return false;
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 6416d63667b..caa523bf335 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -587,8 +587,8 @@ enum SMART_ACTION
SMART_ACTION_PLAY_CINEMATIC = 135, // entry, cinematic
SMART_ACTION_SET_MOVEMENT_SPEED = 136, // movementType, speedInteger, speedFraction
SMART_ACTION_PLAY_SPELL_VISUAL_KIT = 137, // spellVisualKitId (RESERVED, PENDING CHERRYPICK)
- SMART_ACTION_OVERRIDE_LIGHT = 138, // zoneId, lightId, fadeInTime
- SMART_ACTION_OVERRIDE_WEATHER = 139, // zoneId, weatherId, weatherGrade
+ SMART_ACTION_OVERRIDE_LIGHT = 138, // zoneId, overrideLightID, transitionMilliseconds
+ SMART_ACTION_OVERRIDE_WEATHER = 139, // zoneId, weatherId, intensity
SMART_ACTION_END = 140
};
@@ -1158,15 +1158,15 @@ struct SmartAction
struct
{
uint32 zoneId;
- uint32 lightId;
- uint32 fadeInTime;
+ uint32 overrideLightId;
+ uint32 transitionMilliseconds;
} overrideLight;
struct
{
uint32 zoneId;
uint32 weatherId;
- uint32 weatherGrade;
+ uint32 intensity;
} overrideWeather;
//! Note for any new future actions