aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/AI')
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.cpp8
-rw-r--r--src/server/game/AI/CreatureAI.cpp4
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp4
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp6
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp4
5 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp
index 364690c2999..0036e2e48be 100644
--- a/src/server/game/AI/CoreAI/UnitAI.cpp
+++ b/src/server/game/AI/CoreAI/UnitAI.cpp
@@ -312,7 +312,7 @@ bool SpellTargetSelector::operator()(Unit const* target) const
float rangeMod = 0.0f;
if (_spellInfo->RangeEntry)
{
- if (_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE)
+ if (_spellInfo->RangeEntry->Flags & SPELL_RANGE_MELEE)
{
rangeMod = _caster->GetCombatReach() + 4.0f / 3.0f;
rangeMod += target->GetCombatReach();
@@ -322,7 +322,7 @@ bool SpellTargetSelector::operator()(Unit const* target) const
else
{
float meleeRange = 0.0f;
- if (_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED)
+ if (_spellInfo->RangeEntry->Flags & SPELL_RANGE_RANGED)
{
meleeRange = _caster->GetCombatReach() + 4.0f / 3.0f;
meleeRange += target->GetCombatReach();
@@ -336,12 +336,12 @@ bool SpellTargetSelector::operator()(Unit const* target) const
rangeMod = _caster->GetCombatReach();
rangeMod += target->GetCombatReach();
- if (minRange > 0.0f && !(_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED))
+ if (minRange > 0.0f && !(_spellInfo->RangeEntry->Flags & SPELL_RANGE_RANGED))
minRange += rangeMod;
}
if (_caster->isMoving() && target->isMoving() && !_caster->IsWalking() && !target->IsWalking() &&
- (_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE || target->GetTypeId() == TYPEID_PLAYER))
+ (_spellInfo->RangeEntry->Flags & SPELL_RANGE_MELEE || target->GetTypeId() == TYPEID_PLAYER))
rangeMod += 8.0f / 3.0f;
}
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index e028665e843..b13c1660fc8 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -161,7 +161,7 @@ static bool ShouldFollowOnSpawn(SummonPropertiesEntry const* properties)
if (!properties)
return false;
- switch (properties->Category)
+ switch (properties->Control)
{
case SUMMON_CATEGORY_PET:
return true;
@@ -170,7 +170,7 @@ static bool ShouldFollowOnSpawn(SummonPropertiesEntry const* properties)
case SUMMON_CATEGORY_UNK:
if (properties->Flags & 512)
return true;
- switch (properties->Type)
+ switch (properties->Title)
{
case SUMMON_TYPE_PET:
case SUMMON_TYPE_GUARDIAN:
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index d348515ef45..e45e8e3841a 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -1123,10 +1123,10 @@ class SmartTrigger : public AreaTriggerScript
if (!player->IsAlive())
return false;
- TC_LOG_DEBUG("scripts.ai", "AreaTrigger %u is using SmartTrigger script", trigger->id);
+ TC_LOG_DEBUG("scripts.ai", "AreaTrigger %u is using SmartTrigger script", trigger->ID);
SmartScript script;
script.OnInitialize(player, trigger);
- script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->id);
+ script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->ID);
return true;
}
};
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 1df7d601d21..706c48f2dcd 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -3693,7 +3693,7 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn
if (obj)
TC_LOG_DEBUG("scripts.ai", "SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry());
if (at)
- TC_LOG_DEBUG("scripts.ai", "SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id);
+ TC_LOG_DEBUG("scripts.ai", "SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->ID);
return;
}
for (SmartScriptHolder& scriptholder : e)
@@ -3737,7 +3737,7 @@ void SmartScript::GetScript()
}
else if (trigger)
{
- e = sSmartScriptMgr->GetScript((int32)trigger->id, mScriptType);
+ e = sSmartScriptMgr->GetScript((int32)trigger->ID, mScriptType);
FillScript(e, nullptr, trigger);
}
}
@@ -3764,7 +3764,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at)
mScriptType = SMART_SCRIPT_TYPE_AREATRIGGER;
trigger = at;
atPlayer = obj->ToPlayer();
- TC_LOG_DEBUG("scripts.ai", "SmartScript::OnInitialize: source is AreaTrigger %u, triggered by player %s", trigger->id, atPlayer->GetGUID().ToString().c_str());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::OnInitialize: source is AreaTrigger %u, triggered by player %s", trigger->ID, atPlayer->GetGUID().ToString().c_str());
}
else
TC_LOG_ERROR("misc", "SmartScript::OnInitialize: !WARNING! Player TypeID is only allowed for AreaTriggers");
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 0e4f4c7f06a..31c98d61fab 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -1539,7 +1539,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
- if (areaEntry->zone != 0)
+ if (areaEntry->ParentAreaID != 0)
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses subzone (ID: %u) instead of zone, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.overrideLight.zoneId);
return false;
@@ -1568,7 +1568,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
- if (areaEntry->zone != 0)
+ if (areaEntry->ParentAreaID != 0)
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses subzone (ID: %u) instead of zone, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.overrideWeather.zoneId);
return false;