mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/SAI: Add a warning when a boolean value is outside of [0,1] range (#26608)
* Core/SAI: Add a warning when a boolean value is outside of [0,1] range
* Replace boolean fields in SAI with SAIBool (from uint32)
(cherry picked from commit 84c8d21ad3)
This commit is contained in:
@@ -1555,19 +1555,19 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!target)
|
||||
{
|
||||
Position dest(e.target.x, e.target.y, e.target.z);
|
||||
if (e.action.MoveToPos.transport)
|
||||
if (e.action.moveToPos.transport)
|
||||
if (TransportBase* trans = me->GetDirectTransport())
|
||||
trans->CalculatePassengerPosition(dest.m_positionX, dest.m_positionY, dest.m_positionZ);
|
||||
|
||||
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest, e.action.MoveToPos.disablePathfinding == 0);
|
||||
me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, dest, e.action.moveToPos.disablePathfinding == 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
float x, y, z;
|
||||
target->GetPosition(x, y, z);
|
||||
if (e.action.MoveToPos.ContactDistance > 0)
|
||||
target->GetContactPoint(me, x, y, z, e.action.MoveToPos.ContactDistance);
|
||||
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, e.action.MoveToPos.disablePathfinding == 0);
|
||||
if (e.action.moveToPos.ContactDistance > 0)
|
||||
target->GetContactPoint(me, x, y, z, e.action.moveToPos.ContactDistance);
|
||||
me->GetMotionMaster()->MovePoint(e.action.moveToPos.pointId, x + e.target.x, y + e.target.y, z + e.target.z, e.action.moveToPos.disablePathfinding == 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -36,6 +36,16 @@
|
||||
#include "WaypointDefines.h"
|
||||
#include <algorithm>
|
||||
|
||||
#define TC_SAI_IS_BOOLEAN_VALID(e, value) \
|
||||
{ \
|
||||
if (value > 1) \
|
||||
{ \
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses param %s of type Boolean with value %u, valid values are 0 or 1, skipped.", \
|
||||
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), STRINGIZE(value), value); \
|
||||
return false; \
|
||||
} \
|
||||
}
|
||||
|
||||
SmartWaypointMgr* SmartWaypointMgr::instance()
|
||||
{
|
||||
static SmartWaypointMgr instance;
|
||||
@@ -583,24 +593,37 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SMART_TARGET_PLAYER_RANGE:
|
||||
case SMART_TARGET_SELF:
|
||||
case SMART_TARGET_VICTIM:
|
||||
case SMART_TARGET_HOSTILE_SECOND_AGGRO:
|
||||
case SMART_TARGET_HOSTILE_LAST_AGGRO:
|
||||
case SMART_TARGET_HOSTILE_RANDOM:
|
||||
case SMART_TARGET_HOSTILE_RANDOM_NOT_TOP:
|
||||
case SMART_TARGET_POSITION:
|
||||
case SMART_TARGET_NONE:
|
||||
case SMART_TARGET_OWNER_OR_SUMMONER:
|
||||
case SMART_TARGET_THREAT_LIST:
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.target.hostilRandom.playerOnly);
|
||||
break;
|
||||
case SMART_TARGET_FARTHEST:
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.target.farthest.playerOnly);
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.target.farthest.isInLos);
|
||||
break;
|
||||
case SMART_TARGET_CLOSEST_GAMEOBJECT:
|
||||
case SMART_TARGET_CLOSEST_CREATURE:
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.target.closest.dead);
|
||||
break;
|
||||
case SMART_TARGET_CLOSEST_ENEMY:
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.target.closestAttackable.playerOnly);
|
||||
break;
|
||||
case SMART_TARGET_CLOSEST_FRIENDLY:
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.target.closestFriendly.playerOnly);
|
||||
break;
|
||||
case SMART_TARGET_OWNER_OR_SUMMONER:
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.target.owner.useCharmerOrOwner);
|
||||
break;
|
||||
case SMART_TARGET_PLAYER_RANGE:
|
||||
case SMART_TARGET_SELF:
|
||||
case SMART_TARGET_VICTIM:
|
||||
case SMART_TARGET_POSITION:
|
||||
case SMART_TARGET_NONE:
|
||||
case SMART_TARGET_THREAT_LIST:
|
||||
case SMART_TARGET_STORED:
|
||||
case SMART_TARGET_LOOT_RECIPIENTS:
|
||||
case SMART_TARGET_FARTHEST:
|
||||
case SMART_TARGET_VEHICLE_PASSENGER:
|
||||
case SMART_TARGET_CLOSEST_UNSPAWNED_GAMEOBJECT:
|
||||
break;
|
||||
@@ -839,6 +862,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.los.hostilityMode, AsUnderlyingType(SmartEvent::LOSHostilityMode::End) - 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.event.los.playerOnly);
|
||||
break;
|
||||
case SMART_EVENT_RESPAWN:
|
||||
if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_MAP && !sMapStore.LookupEntry(e.event.respawn.map))
|
||||
@@ -881,6 +906,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
|
||||
if (e.event.kill.creature && !IsCreatureValid(e, e.event.kill.creature))
|
||||
return false;
|
||||
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.event.kill.playerOnly);
|
||||
break;
|
||||
case SMART_EVENT_VICTIM_CASTING:
|
||||
if (e.event.targetCasting.spellId > 0 && !sSpellMgr->GetSpellInfo(e.event.targetCasting.spellId, DIFFICULTY_NONE))
|
||||
@@ -1116,6 +1143,9 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SMART_EVENT_CHARMED:
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.event.charm.onRemove);
|
||||
break;
|
||||
case SMART_EVENT_QUEST_OBJ_COMPLETION:
|
||||
if (!sObjectMgr->GetQuestObjective(e.event.questObjective.id))
|
||||
{
|
||||
@@ -1134,7 +1164,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_EVENT_TIMED_EVENT_TRIGGERED:
|
||||
case SMART_EVENT_INSTANCE_PLAYER_ENTER:
|
||||
case SMART_EVENT_TRANSPORT_RELOCATE:
|
||||
case SMART_EVENT_CHARMED:
|
||||
case SMART_EVENT_CHARMED_TARGET:
|
||||
case SMART_EVENT_CORPSE_REMOVED:
|
||||
case SMART_EVENT_AI_INIT:
|
||||
@@ -1170,6 +1199,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
switch (e.GetActionType())
|
||||
{
|
||||
case SMART_ACTION_TALK:
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.talk.useTalkTarget);
|
||||
[[fallthrough]];
|
||||
case SMART_ACTION_SIMPLE_TALK:
|
||||
if (!IsTextValid(e, e.action.talk.textGroupID))
|
||||
return false;
|
||||
@@ -1209,6 +1240,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_SOUND:
|
||||
if (!IsSoundValid(e, e.action.sound.sound))
|
||||
return false;
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.sound.onlySelf);
|
||||
break;
|
||||
case SMART_ACTION_SET_EMOTE_STATE:
|
||||
case SMART_ACTION_PLAY_EMOTE:
|
||||
@@ -1229,9 +1261,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
if (e.action.spellVisualKit.spellVisualKitId && !IsSpellVisualKitValid(e, e.action.spellVisualKit.spellVisualKitId))
|
||||
return false;
|
||||
break;
|
||||
case SMART_ACTION_FAIL_QUEST:
|
||||
case SMART_ACTION_OFFER_QUEST:
|
||||
if (!e.action.quest.quest || !IsQuestValid(e, e.action.quest.quest))
|
||||
if (!IsQuestValid(e, e.action.questOffer.questID))
|
||||
return false;
|
||||
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.questOffer.directAdd);
|
||||
break;
|
||||
case SMART_ACTION_FAIL_QUEST:
|
||||
if (!IsQuestValid(e, e.action.quest.quest))
|
||||
return false;
|
||||
break;
|
||||
case SMART_ACTION_ACTIVATE_TAXI:
|
||||
@@ -1290,6 +1327,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
if (sound && !IsSoundValid(e, sound))
|
||||
return false;
|
||||
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.randomSound.onlySelf);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_CAST:
|
||||
@@ -1364,6 +1402,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_REMOVEAURASFROMSPELL:
|
||||
if (e.action.removeAura.spell != 0 && !IsSpellValid(e, e.action.removeAura.spell))
|
||||
return false;
|
||||
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.removeAura.onlyOwnedAuras);
|
||||
break;
|
||||
case SMART_ACTION_RANDOM_PHASE:
|
||||
{
|
||||
@@ -1409,6 +1449,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type);
|
||||
return false;
|
||||
}
|
||||
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.summonCreature.attackInvoker);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_CALL_KILLEDMONSTER:
|
||||
@@ -1431,6 +1473,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_UPDATE_TEMPLATE:
|
||||
if (!IsCreatureValid(e, e.action.updateTemplate.creature))
|
||||
return false;
|
||||
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.updateTemplate.updateLevel);
|
||||
break;
|
||||
case SMART_ACTION_SET_SHEATH:
|
||||
if (e.action.setSheath.sheath && e.action.setSheath.sheath >= MAX_SHEATH_STATE)
|
||||
@@ -1497,6 +1541,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_WP_STOP:
|
||||
if (e.action.wpStop.quest && !IsQuestValid(e, e.action.wpStop.quest))
|
||||
return false;
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.wpStop.fail);
|
||||
break;
|
||||
case SMART_ACTION_WP_START:
|
||||
{
|
||||
@@ -1513,6 +1558,9 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Creature " SI64FMTD " Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState);
|
||||
return false;
|
||||
}
|
||||
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.wpStart.run);
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.wpStart.repeat);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_CREATE_TIMED_EVENT:
|
||||
@@ -1711,6 +1759,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u does not specify pause duration", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.pauseMovement.force);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_MOVEMENT_SPEED:
|
||||
@@ -1790,6 +1840,103 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_AUTO_ATTACK:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.autoAttack.attack);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_ALLOW_COMBAT_MOVEMENT:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.combatMove.move);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_CALL_FOR_HELP:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.callHelp.withEmote);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_VISIBILITY:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.visibility.state);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_ACTIVE:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.active.state);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_RUN:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.setRun.run);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_DISABLE_GRAVITY:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.setDisableGravity.disable);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_CAN_FLY:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.setFly.fly);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_SWIM:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.setSwim.swim);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_COUNTER:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.setCounter.reset);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_CALL_TIMED_ACTIONLIST:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.timedActionList.allowOverride);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_INTERRUPT_SPELL:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.interruptSpellCasting.withDelayed);
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.interruptSpellCasting.withInstant);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_FLEE_FOR_ASSIST:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.fleeAssist.withEmote);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_MOVE_TO_POS:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.moveToPos.transport);
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.moveToPos.disablePathfinding);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_ROOT:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.setRoot.root);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_DISABLE_EVADE:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.disableEvade.disable);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_LOAD_EQUIPMENT:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.loadEquipment.force);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_HOVER:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.setHover.enable);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_EVADE:
|
||||
{
|
||||
TC_SAI_IS_BOOLEAN_VALID(e, e.action.evade.toRespawnPosition);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_CREATE_CONVERSATION:
|
||||
{
|
||||
if (!sConversationDataStore->GetConversationTemplate(e.action.conversation.id))
|
||||
@@ -1803,12 +1950,9 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_FOLLOW:
|
||||
case SMART_ACTION_SET_ORIENTATION:
|
||||
case SMART_ACTION_STORE_TARGET_LIST:
|
||||
case SMART_ACTION_EVADE:
|
||||
case SMART_ACTION_FLEE_FOR_ASSIST:
|
||||
case SMART_ACTION_COMBAT_STOP:
|
||||
case SMART_ACTION_DIE:
|
||||
case SMART_ACTION_SET_IN_COMBAT_WITH_ZONE:
|
||||
case SMART_ACTION_SET_ACTIVE:
|
||||
case SMART_ACTION_WP_RESUME:
|
||||
case SMART_ACTION_KILL_UNIT:
|
||||
case SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL:
|
||||
@@ -1817,22 +1961,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_THREAT_ALL_PCT:
|
||||
case SMART_ACTION_THREAT_SINGLE_PCT:
|
||||
case SMART_ACTION_SET_INST_DATA64:
|
||||
case SMART_ACTION_AUTO_ATTACK:
|
||||
case SMART_ACTION_ALLOW_COMBAT_MOVEMENT:
|
||||
case SMART_ACTION_CALL_FOR_HELP:
|
||||
case SMART_ACTION_SET_DATA:
|
||||
case SMART_ACTION_ATTACK_STOP:
|
||||
case SMART_ACTION_SET_VISIBILITY:
|
||||
case SMART_ACTION_WP_PAUSE:
|
||||
case SMART_ACTION_SET_DISABLE_GRAVITY:
|
||||
case SMART_ACTION_SET_CAN_FLY:
|
||||
case SMART_ACTION_SET_RUN:
|
||||
case SMART_ACTION_SET_SWIM:
|
||||
case SMART_ACTION_FORCE_DESPAWN:
|
||||
case SMART_ACTION_SET_UNIT_FLAG:
|
||||
case SMART_ACTION_REMOVE_UNIT_FLAG:
|
||||
case SMART_ACTION_PLAYMOVIE:
|
||||
case SMART_ACTION_MOVE_TO_POS:
|
||||
case SMART_ACTION_CLOSE_GOSSIP:
|
||||
case SMART_ACTION_TRIGGER_TIMED_EVENT:
|
||||
case SMART_ACTION_REMOVE_TIMED_EVENT:
|
||||
@@ -1841,14 +1976,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_ACTIVATE_GOBJECT:
|
||||
case SMART_ACTION_CALL_SCRIPT_RESET:
|
||||
case SMART_ACTION_SET_RANGED_MOVEMENT:
|
||||
case SMART_ACTION_CALL_TIMED_ACTIONLIST:
|
||||
case SMART_ACTION_SET_NPC_FLAG:
|
||||
case SMART_ACTION_ADD_NPC_FLAG:
|
||||
case SMART_ACTION_REMOVE_NPC_FLAG:
|
||||
case SMART_ACTION_RANDOM_MOVE:
|
||||
case SMART_ACTION_SET_UNIT_FIELD_BYTES_1:
|
||||
case SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1:
|
||||
case SMART_ACTION_INTERRUPT_SPELL:
|
||||
case SMART_ACTION_SEND_GO_CUSTOM_ANIM:
|
||||
case SMART_ACTION_SET_DYNAMIC_FLAG:
|
||||
case SMART_ACTION_ADD_DYNAMIC_FLAG:
|
||||
@@ -1860,24 +1993,19 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_SEND_TARGET_TO_TARGET:
|
||||
case SMART_ACTION_SET_HOME_POS:
|
||||
case SMART_ACTION_SET_HEALTH_REGEN:
|
||||
case SMART_ACTION_SET_ROOT:
|
||||
case SMART_ACTION_SET_GO_FLAG:
|
||||
case SMART_ACTION_ADD_GO_FLAG:
|
||||
case SMART_ACTION_REMOVE_GO_FLAG:
|
||||
case SMART_ACTION_SUMMON_CREATURE_GROUP:
|
||||
case SMART_ACTION_MOVE_OFFSET:
|
||||
case SMART_ACTION_SET_CORPSE_DELAY:
|
||||
case SMART_ACTION_DISABLE_EVADE:
|
||||
case SMART_ACTION_SET_SIGHT_DIST:
|
||||
case SMART_ACTION_FLEE:
|
||||
case SMART_ACTION_ADD_THREAT:
|
||||
case SMART_ACTION_LOAD_EQUIPMENT:
|
||||
case SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT:
|
||||
case SMART_ACTION_SET_COUNTER:
|
||||
case SMART_ACTION_REMOVE_ALL_GAMEOBJECTS:
|
||||
case SMART_ACTION_SPAWN_SPAWNGROUP:
|
||||
case SMART_ACTION_DESPAWN_SPAWNGROUP:
|
||||
case SMART_ACTION_SET_HOVER:
|
||||
case SMART_ACTION_ADD_TO_STORED_TARGET_LIST:
|
||||
break;
|
||||
case SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER:
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
class WorldObject;
|
||||
enum SpellEffIndex : uint8;
|
||||
typedef uint32 SAIBool;
|
||||
|
||||
enum eSmartAI
|
||||
{
|
||||
@@ -204,7 +205,7 @@ struct SmartEvent
|
||||
{
|
||||
uint32 cooldownMin;
|
||||
uint32 cooldownMax;
|
||||
uint32 playerOnly;
|
||||
SAIBool playerOnly;
|
||||
uint32 creature;
|
||||
} kill;
|
||||
|
||||
@@ -225,7 +226,7 @@ struct SmartEvent
|
||||
uint32 maxDist;
|
||||
uint32 cooldownMin;
|
||||
uint32 cooldownMax;
|
||||
uint32 playerOnly;
|
||||
SAIBool playerOnly;
|
||||
} los;
|
||||
|
||||
struct
|
||||
@@ -307,7 +308,7 @@ struct SmartEvent
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 onRemove;
|
||||
SAIBool onRemove;
|
||||
} charm;
|
||||
|
||||
struct
|
||||
@@ -654,7 +655,7 @@ struct SmartAction
|
||||
{
|
||||
uint32 textGroupID;
|
||||
uint32 duration;
|
||||
uint32 useTalkTarget;
|
||||
SAIBool useTalkTarget;
|
||||
} talk;
|
||||
|
||||
struct
|
||||
@@ -671,7 +672,7 @@ struct SmartAction
|
||||
struct
|
||||
{
|
||||
uint32 sound;
|
||||
uint32 onlySelf;
|
||||
SAIBool onlySelf;
|
||||
uint32 distance;
|
||||
uint32 keyBroadcastTextId;
|
||||
} sound;
|
||||
@@ -689,7 +690,7 @@ struct SmartAction
|
||||
struct
|
||||
{
|
||||
uint32 questID;
|
||||
uint32 directAdd;
|
||||
SAIBool directAdd;
|
||||
} questOffer;
|
||||
|
||||
struct
|
||||
@@ -725,7 +726,7 @@ struct SmartAction
|
||||
uint32 creature;
|
||||
uint32 type;
|
||||
uint32 duration;
|
||||
uint32 attackInvoker;
|
||||
SAIBool attackInvoker;
|
||||
uint32 flags; // SmartActionSummonCreatureFlags
|
||||
uint32 count;
|
||||
} summonCreature;
|
||||
@@ -758,12 +759,12 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 attack;
|
||||
SAIBool attack;
|
||||
} autoAttack;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 move;
|
||||
SAIBool move;
|
||||
} combatMove;
|
||||
|
||||
struct
|
||||
@@ -781,7 +782,7 @@ struct SmartAction
|
||||
{
|
||||
uint32 spell;
|
||||
uint32 charges;
|
||||
uint32 onlyOwnedAuras;
|
||||
SAIBool onlyOwnedAuras;
|
||||
} removeAura;
|
||||
|
||||
struct
|
||||
@@ -824,13 +825,13 @@ struct SmartAction
|
||||
struct
|
||||
{
|
||||
uint32 creature;
|
||||
uint32 updateLevel;
|
||||
SAIBool updateLevel;
|
||||
} updateTemplate;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 range;
|
||||
uint32 withEmote;
|
||||
SAIBool withEmote;
|
||||
} callHelp;
|
||||
|
||||
struct
|
||||
@@ -875,7 +876,7 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 state;
|
||||
SAIBool state;
|
||||
} visibility;
|
||||
|
||||
struct
|
||||
@@ -887,7 +888,7 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 state;
|
||||
SAIBool state;
|
||||
} active;
|
||||
|
||||
struct
|
||||
@@ -897,9 +898,9 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 run;
|
||||
SAIBool run;
|
||||
uint32 pathID;
|
||||
uint32 repeat;
|
||||
SAIBool repeat;
|
||||
uint32 quest;
|
||||
uint32 despawnTime;
|
||||
uint32 reactState;
|
||||
@@ -914,7 +915,7 @@ struct SmartAction
|
||||
{
|
||||
uint32 despawnTime;
|
||||
uint32 quest;
|
||||
uint32 fail;
|
||||
SAIBool fail;
|
||||
} wpStop;
|
||||
|
||||
struct
|
||||
@@ -935,22 +936,22 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 run;
|
||||
SAIBool run;
|
||||
} setRun;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 disable;
|
||||
SAIBool disable;
|
||||
} setDisableGravity;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 fly;
|
||||
SAIBool fly;
|
||||
} setFly;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 swim;
|
||||
SAIBool swim;
|
||||
} setSwim;
|
||||
|
||||
struct
|
||||
@@ -962,7 +963,7 @@ struct SmartAction
|
||||
{
|
||||
uint32 counterId;
|
||||
uint32 value;
|
||||
uint32 reset;
|
||||
SAIBool reset;
|
||||
} setCounter;
|
||||
|
||||
struct
|
||||
@@ -1027,7 +1028,7 @@ struct SmartAction
|
||||
{
|
||||
uint32 id;
|
||||
uint32 timerType;
|
||||
uint32 allowOverride;
|
||||
SAIBool allowOverride;
|
||||
} timedActionList;
|
||||
|
||||
struct
|
||||
@@ -1037,9 +1038,9 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 withDelayed;
|
||||
SAIBool withDelayed;
|
||||
uint32 spell_id;
|
||||
uint32 withInstant;
|
||||
SAIBool withInstant;
|
||||
} interruptSpellCasting;
|
||||
|
||||
struct
|
||||
@@ -1055,7 +1056,7 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 withEmote;
|
||||
SAIBool withEmote;
|
||||
} fleeAssist;
|
||||
|
||||
struct
|
||||
@@ -1071,10 +1072,10 @@ struct SmartAction
|
||||
struct
|
||||
{
|
||||
uint32 pointId;
|
||||
uint32 transport;
|
||||
uint32 disablePathfinding;
|
||||
SAIBool transport;
|
||||
SAIBool disablePathfinding;
|
||||
uint32 ContactDistance;
|
||||
} MoveToPos;
|
||||
} moveToPos;
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -1105,7 +1106,7 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 root;
|
||||
SAIBool root;
|
||||
} setRoot;
|
||||
|
||||
struct
|
||||
@@ -1148,7 +1149,7 @@ struct SmartAction
|
||||
struct
|
||||
{
|
||||
uint32 sounds[SMART_ACTION_PARAM_COUNT - 2];
|
||||
uint32 onlySelf;
|
||||
SAIBool onlySelf;
|
||||
uint32 distance;
|
||||
} randomSound;
|
||||
|
||||
@@ -1160,8 +1161,9 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 disable;
|
||||
SAIBool disable;
|
||||
} disableEvade;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 groupId;
|
||||
@@ -1183,7 +1185,7 @@ struct SmartAction
|
||||
struct
|
||||
{
|
||||
uint32 id;
|
||||
uint32 force;
|
||||
SAIBool force;
|
||||
} loadEquipment;
|
||||
|
||||
struct
|
||||
@@ -1196,7 +1198,7 @@ struct SmartAction
|
||||
{
|
||||
uint32 movementSlot;
|
||||
uint32 pauseTimer;
|
||||
uint32 force;
|
||||
SAIBool force;
|
||||
} pauseMovement;
|
||||
|
||||
struct
|
||||
@@ -1252,12 +1254,12 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 enable;
|
||||
SAIBool enable;
|
||||
} setHover;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 toRespawnPosition;
|
||||
SAIBool toRespawnPosition;
|
||||
} evade;
|
||||
|
||||
struct
|
||||
@@ -1373,15 +1375,15 @@ struct SmartTarget
|
||||
struct
|
||||
{
|
||||
uint32 maxDist;
|
||||
uint32 playerOnly;
|
||||
SAIBool playerOnly;
|
||||
uint32 powerType;
|
||||
} hostilRandom;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 maxDist;
|
||||
uint32 playerOnly;
|
||||
uint32 isInLos;
|
||||
SAIBool playerOnly;
|
||||
SAIBool isInLos;
|
||||
} farthest;
|
||||
|
||||
struct
|
||||
@@ -1451,24 +1453,24 @@ struct SmartTarget
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 dist;
|
||||
uint32 dead;
|
||||
SAIBool dead;
|
||||
} closest;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 maxDist;
|
||||
uint32 playerOnly;
|
||||
SAIBool playerOnly;
|
||||
} closestAttackable;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 maxDist;
|
||||
uint32 playerOnly;
|
||||
SAIBool playerOnly;
|
||||
} closestFriendly;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 useCharmerOrOwner;
|
||||
SAIBool useCharmerOrOwner;
|
||||
} owner;
|
||||
|
||||
struct
|
||||
|
||||
Reference in New Issue
Block a user