Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(SmartAI): align some SMART_ACTION(s) to TC #1329

Merged
merged 4 commits into from
Jan 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions data/sql/updates/pending_db_world/rev_1547942801355864450.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1547942801355864450');

-- SMART_ACTION_SET_SIGHT_DIST
UPDATE `smart_scripts` SET `action_type` = 121 WHERE `action_type` = 136;

-- SMART_ACTION_FLEE
UPDATE `smart_scripts` SET `action_type` = 122 WHERE `action_type` = 137;

-- SMART_ACTION_ADD_THREAT
UPDATE `smart_scripts` SET `action_type` = 123 WHERE `action_type` = 138;

-- SMART_ACTION_LOAD_EQUIPMENT
UPDATE `smart_scripts` SET `action_type` = 124 WHERE `action_type` = 139;

-- SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT
UPDATE `smart_scripts` SET `action_type` = 125 WHERE `action_type` = 140;

-- SMART_ACTION_REMOVE_ALL_GAMEOBJECTS
UPDATE `smart_scripts` SET `action_type` = 126 WHERE `action_type` = 146;
18 changes: 6 additions & 12 deletions src/server/game/AI/SmartScripts/SmartScriptMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,12 +550,12 @@ enum SMART_ACTION
// RESERVED = 118,
// RESERVED = 119,
// RESERVED = 120,
// RESERVED = 121,
// RESERVED = 122,
// RESERVED = 123,
// RESERVED = 124,
// RESERVED = 125,
// RESERVED = 126,
SMART_ACTION_SET_SIGHT_DIST = 121, // sightDistance
SMART_ACTION_FLEE = 122, // fleeTime
SMART_ACTION_ADD_THREAT = 123, // +threat, -threat
SMART_ACTION_LOAD_EQUIPMENT = 124, // id
SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT = 125, // id min range, id max range
SMART_ACTION_REMOVE_ALL_GAMEOBJECTS = 126,
// RESERVED = 127,
// RESERVED = 128,
// RESERVED = 129,
Expand All @@ -566,17 +566,11 @@ enum SMART_ACTION
SMART_ACTION_SET_UNIT_MOVEMENT_FLAGS = 133, // flags
SMART_ACTION_SET_COMBAT_DISTANCE = 134, // combatDistance
SMART_ACTION_SET_CASTER_COMBAT_DIST = 135, // followDistance, resetToMax
SMART_ACTION_SET_SIGHT_DIST = 136, // sightDistance
SMART_ACTION_FLEE = 137, // fleeTime
SMART_ACTION_ADD_THREAT = 138, // +threat, -threat
SMART_ACTION_LOAD_EQUIPMENT = 139, // id
SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT = 140, // id min range, id max range
SMART_ACTION_SET_HOVER = 141, // 0/1
SMART_ACTION_ADD_IMMUNITY = 142, // type, id, value
SMART_ACTION_REMOVE_IMMUNITY = 143, // type, id, value
SMART_ACTION_FALL = 144, //
SMART_ACTION_SET_EVENT_FLAG_RESET = 145, // 0/1
SMART_ACTION_REMOVE_ALL_GAMEOBJECTS = 146,
SMART_ACTION_STOP_MOTION = 147, // stopMoving, movementExpired
SMART_ACTION_NO_ENVIRONMENT_UPDATE = 148,
SMART_ACTION_ZONE_UNDER_ATTACK = 149,
Expand Down