aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/database/Database/Implementation/WorldDatabase.cpp18
-rw-r--r--src/server/database/Database/Implementation/WorldDatabase.h11
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp2
-rw-r--r--src/server/game/Accounts/RBAC.h2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp32
-rw-r--r--src/server/game/Globals/ObjectMgr.h2
-rw-r--r--src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp7
-rw-r--r--src/server/game/Movement/Waypoints/WaypointDefines.h6
-rw-r--r--src/server/game/Movement/Waypoints/WaypointManager.cpp8
-rw-r--r--src/server/game/World/World.cpp1
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp22
-rw-r--r--src/server/scripts/Commands/cs_wp.cpp258
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp128
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp31
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp33
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp32
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp16
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp25
-rw-r--r--src/server/scripts/Outland/zone_nagrand.cpp19
19 files changed, 282 insertions, 371 deletions
diff --git a/src/server/database/Database/Implementation/WorldDatabase.cpp b/src/server/database/Database/Implementation/WorldDatabase.cpp
index 1a5275f0a13..7899ddd1ae9 100644
--- a/src/server/database/Database/Implementation/WorldDatabase.cpp
+++ b/src/server/database/Database/Implementation/WorldDatabase.cpp
@@ -48,36 +48,20 @@ void WorldDatabaseConnection::DoPrepareStatements()
PrepareStatement(WORLD_DEL_WAYPOINT_DATA, "DELETE FROM waypoint_data WHERE id = ? AND point = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_UPD_WAYPOINT_DATA_POINT, "UPDATE waypoint_data SET point = point - 1 WHERE id = ? AND point > ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_UPD_WAYPOINT_DATA_POSITION, "UPDATE waypoint_data SET position_x = ?, position_y = ?, position_z = ?, orientation = ? where id = ? AND point = ?", CONNECTION_ASYNC);
- PrepareStatement(WORLD_UPD_WAYPOINT_DATA_WPGUID, "UPDATE waypoint_data SET wpguid = ? WHERE id = ? and point = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_WAYPOINT_DATA_MAX_ID, "SELECT MAX(id) FROM waypoint_data", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_WAYPOINT_DATA_MAX_POINT, "SELECT MAX(point) FROM waypoint_data WHERE id = ?", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_WAYPOINT_DATA_BY_ID, "SELECT point, position_x, position_y, position_z, orientation, move_type, delay, action, action_chance FROM waypoint_data WHERE id = ? ORDER BY point", CONNECTION_SYNCH);
+ PrepareStatement(WORLD_SEL_WAYPOINT_DATA_BY_ID, "SELECT point, position_x, position_y, position_z, orientation, move_type, delay FROM waypoint_data WHERE id = ? ORDER BY point", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_WAYPOINT_DATA_POS_BY_ID, "SELECT point, position_x, position_y, position_z, orientation FROM waypoint_data WHERE id = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_WAYPOINT_DATA_POS_FIRST_BY_ID, "SELECT position_x, position_y, position_z, orientation FROM waypoint_data WHERE point = 1 AND id = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_WAYPOINT_DATA_POS_LAST_BY_ID, "SELECT position_x, position_y, position_z, orientation FROM waypoint_data WHERE id = ? ORDER BY point DESC LIMIT 1", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_WAYPOINT_DATA_BY_WPGUID, "SELECT id, point FROM waypoint_data WHERE wpguid = ?", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_WAYPOINT_DATA_ALL_BY_WPGUID, "SELECT id, point, delay, move_type, action, action_chance FROM waypoint_data WHERE wpguid = ?", CONNECTION_SYNCH);
- PrepareStatement(WORLD_UPD_WAYPOINT_DATA_ALL_WPGUID, "UPDATE waypoint_data SET wpguid = 0", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_WAYPOINT_DATA_BY_POS, "SELECT id, point FROM waypoint_data WHERE (abs(position_x - ?) <= ?) and (abs(position_y - ?) <= ?) and (abs(position_z - ?) <= ?)", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_WAYPOINT_DATA_WPGUID_BY_ID, "SELECT wpguid FROM waypoint_data WHERE id = ? and wpguid <> 0", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_WAYPOINT_DATA_ACTION, "SELECT DISTINCT action FROM waypoint_data", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPTS_MAX_ID, "SELECT MAX(guid) FROM waypoint_scripts", CONNECTION_SYNCH);
PrepareStatement(WORLD_INS_CREATURE_ADDON, "INSERT INTO creature_addon(guid, path_id) VALUES (?, ?)", CONNECTION_ASYNC);
PrepareStatement(WORLD_UPD_CREATURE_ADDON_PATH, "UPDATE creature_addon SET path_id = ? WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_DEL_CREATURE_ADDON, "DELETE FROM creature_addon WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_CREATURE_ADDON_BY_GUID, "SELECT guid FROM creature_addon WHERE guid = ?", CONNECTION_SYNCH);
- PrepareStatement(WORLD_INS_WAYPOINT_SCRIPT, "INSERT INTO waypoint_scripts (guid) VALUES (?)", CONNECTION_ASYNC);
- PrepareStatement(WORLD_DEL_WAYPOINT_SCRIPT, "DELETE FROM waypoint_scripts WHERE guid = ?", CONNECTION_ASYNC);
- PrepareStatement(WORLD_UPD_WAYPOINT_SCRIPT_ID, "UPDATE waypoint_scripts SET id = ? WHERE guid = ?", CONNECTION_ASYNC);
- PrepareStatement(WORLD_UPD_WAYPOINT_SCRIPT_X, "UPDATE waypoint_scripts SET x = ? WHERE guid = ?", CONNECTION_ASYNC);
- PrepareStatement(WORLD_UPD_WAYPOINT_SCRIPT_Y, "UPDATE waypoint_scripts SET y = ? WHERE guid = ?", CONNECTION_ASYNC);
- PrepareStatement(WORLD_UPD_WAYPOINT_SCRIPT_Z, "UPDATE waypoint_scripts SET z = ? WHERE guid = ?", CONNECTION_ASYNC);
- PrepareStatement(WORLD_UPD_WAYPOINT_SCRIPT_O, "UPDATE waypoint_scripts SET o = ? WHERE guid = ?", CONNECTION_ASYNC);
- PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_DEL_CREATURE, "DELETE FROM creature WHERE guid = ?", CONNECTION_ASYNC);
PrepareStatement(WORLD_SEL_COMMANDS, "SELECT name, help FROM command", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "SELECT entry, KillCredit1, KillCredit2, name, femaleName, subname, TitleAlt, IconName, RequiredExpansion, VignetteID, faction, npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, unit_flags3, family, trainer_class, type, VehicleId, AIName, MovementType, ctm.Ground, ctm.Swim, ctm.Flight, ctm.Rooted, ctm.Chase, ctm.Random, ctm.InteractionPauseTimer, ExperienceModifier, RacialLeader, movementId, WidgetSetID, WidgetSetUnitConditionID, RegenHealth, mechanic_immune_mask, spell_school_immune_mask, flags_extra, ScriptName, StringId FROM creature_template ct LEFT JOIN creature_template_movement ctm ON ct.entry = ctm.CreatureId WHERE entry = ? OR 1 = ?", CONNECTION_SYNCH);
- PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_GAMEOBJECT_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM gameobject WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? ORDER BY order_", CONNECTION_SYNCH);
PrepareStatement(WORLD_SEL_CREATURE_NEAREST, "SELECT guid, id, position_x, position_y, position_z, map, (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) AS order_ FROM creature WHERE map = ? AND (POW(position_x - ?, 2) + POW(position_y - ?, 2) + POW(position_z - ?, 2)) <= ? ORDER BY order_", CONNECTION_SYNCH);
diff --git a/src/server/database/Database/Implementation/WorldDatabase.h b/src/server/database/Database/Implementation/WorldDatabase.h
index 64ecb3a609c..32417efe722 100644
--- a/src/server/database/Database/Implementation/WorldDatabase.h
+++ b/src/server/database/Database/Implementation/WorldDatabase.h
@@ -65,24 +65,13 @@ enum WorldDatabaseStatements : uint32
WORLD_SEL_WAYPOINT_DATA_MAX_POINT,
WORLD_SEL_WAYPOINT_DATA_BY_POS,
WORLD_SEL_WAYPOINT_DATA_WPGUID_BY_ID,
- WORLD_SEL_WAYPOINT_DATA_ACTION,
- WORLD_SEL_WAYPOINT_SCRIPTS_MAX_ID,
WORLD_UPD_CREATURE_ADDON_PATH,
WORLD_INS_CREATURE_ADDON,
WORLD_DEL_CREATURE_ADDON,
WORLD_SEL_CREATURE_ADDON_BY_GUID,
- WORLD_INS_WAYPOINT_SCRIPT,
- WORLD_DEL_WAYPOINT_SCRIPT,
- WORLD_UPD_WAYPOINT_SCRIPT_ID,
- WORLD_UPD_WAYPOINT_SCRIPT_X,
- WORLD_UPD_WAYPOINT_SCRIPT_Y,
- WORLD_UPD_WAYPOINT_SCRIPT_Z,
- WORLD_UPD_WAYPOINT_SCRIPT_O,
- WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID,
WORLD_DEL_CREATURE,
WORLD_SEL_COMMANDS,
WORLD_SEL_CREATURE_TEMPLATE,
- WORLD_SEL_WAYPOINT_SCRIPT_BY_ID,
WORLD_SEL_CREATURE_BY_ID,
WORLD_SEL_GAMEOBJECT_NEAREST,
WORLD_SEL_CREATURE_NEAREST,
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index c12c1b8c1f2..ecc44114f85 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -272,8 +272,6 @@ void EscortAI::AddWaypoint(uint32 id, float x, float y, float z, float orientati
waypoint.orientation = orientation;
waypoint.moveType = run ? WAYPOINT_MOVE_TYPE_RUN : WAYPOINT_MOVE_TYPE_WALK;
waypoint.delay = waitTime.count();
- waypoint.eventId = 0;
- waypoint.eventChance = 100;
_path.nodes.push_back(std::move(waypoint));
}
diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h
index e175025d9bb..c5f46ae0053 100644
--- a/src/server/game/Accounts/RBAC.h
+++ b/src/server/game/Accounts/RBAC.h
@@ -575,7 +575,7 @@ enum RBACPermissions
RBAC_PERM_COMMAND_RELOAD_SPELL_GROUP_STACK_RULES = 703,
RBAC_PERM_COMMAND_RELOAD_TRINITY_STRING = 704,
// 705 previously used, do not reuse
- RBAC_PERM_COMMAND_RELOAD_WAYPOINT_SCRIPTS = 706,
+ // 706 previously used, do not reuse
RBAC_PERM_COMMAND_RELOAD_WAYPOINT_DATA = 707,
RBAC_PERM_COMMAND_RELOAD_VEHICLE_ACCESORY = 708,
RBAC_PERM_COMMAND_RELOAD_VEHICLE_TEMPLATE_ACCESSORY = 709,
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 2f4573c7ee0..4aa8e3b7304 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -77,7 +77,6 @@
ScriptMapMap sSpellScripts;
ScriptMapMap sEventScripts;
-ScriptMapMap sWaypointScripts;
std::string GetScriptsTableNameByType(ScriptsType type)
{
@@ -86,7 +85,6 @@ std::string GetScriptsTableNameByType(ScriptsType type)
{
case SCRIPTS_SPELL: res = "spell_scripts"; break;
case SCRIPTS_EVENT: res = "event_scripts"; break;
- case SCRIPTS_WAYPOINT: res = "waypoint_scripts"; break;
default: break;
}
return res;
@@ -99,7 +97,6 @@ ScriptMapMap* GetScriptsMapByType(ScriptsType type)
{
case SCRIPTS_SPELL: res = &sSpellScripts; break;
case SCRIPTS_EVENT: res = &sEventScripts; break;
- case SCRIPTS_WAYPOINT: res = &sWaypointScripts; break;
default: break;
}
return res;
@@ -5962,35 +5959,6 @@ void ObjectMgr::LoadEventScripts()
TC_LOG_INFO("server.loading", ">> Loaded {} event scripts in {} ms", _eventScriptStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
-//Load WP Scripts
-void ObjectMgr::LoadWaypointScripts()
-{
- LoadScripts(SCRIPTS_WAYPOINT);
-
- std::set<uint32> actionSet;
-
- for (ScriptMapMap::const_iterator itr = sWaypointScripts.begin(); itr != sWaypointScripts.end(); ++itr)
- actionSet.insert(itr->first);
-
- WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_ACTION);
- PreparedQueryResult result = WorldDatabase.Query(stmt);
-
- if (result)
- {
- do
- {
- Field* fields = result->Fetch();
- uint32 action = fields[0].GetUInt32();
-
- actionSet.erase(action);
- }
- while (result->NextRow());
- }
-
- for (std::set<uint32>::iterator itr = actionSet.begin(); itr != actionSet.end(); ++itr)
- TC_LOG_ERROR("sql.sql", "There is no waypoint which links to the waypoint script {}", *itr);
-}
-
void ObjectMgr::LoadSpellScriptNames()
{
uint32 oldMSTime = getMSTime();
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index a3af1016609..5a86448d870 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -420,7 +420,6 @@ typedef std::multimap<uint32 /*spell id*/, std::pair<uint32 /*script id*/, bool
typedef std::pair<SpellScriptsContainer::iterator, SpellScriptsContainer::iterator> SpellScriptsBounds;
TC_GAME_API extern ScriptMapMap sSpellScripts;
TC_GAME_API extern ScriptMapMap sEventScripts;
-TC_GAME_API extern ScriptMapMap sWaypointScripts;
std::string GetScriptsTableNameByType(ScriptsType type);
ScriptMapMap* GetScriptsMapByType(ScriptsType type);
@@ -1295,7 +1294,6 @@ class TC_GAME_API ObjectMgr
void LoadEventScripts();
void LoadSpellScripts();
- void LoadWaypointScripts();
void LoadSpellScriptNames();
void ValidateSpellScripts();
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index 5b67247eff0..fc8ab81069c 100644
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -292,13 +292,6 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature* owner)
_nextMoveTime.Reset(waitTime);
}
- if (waypoint.eventId && urand(0, 99) < waypoint.eventChance)
- {
- TC_LOG_DEBUG("maps.script", "Creature movement start script {} at point {} for {}.", waypoint.eventId, _currentNode, owner->GetGUID().ToString());
- owner->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
- owner->GetMap()->ScriptsStart(sWaypointScripts, waypoint.eventId, owner, nullptr);
- }
-
// inform AI
if (CreatureAI* AI = owner->AI())
{
diff --git a/src/server/game/Movement/Waypoints/WaypointDefines.h b/src/server/game/Movement/Waypoints/WaypointDefines.h
index 70ab08f2958..119219dd3d4 100644
--- a/src/server/game/Movement/Waypoints/WaypointDefines.h
+++ b/src/server/game/Movement/Waypoints/WaypointDefines.h
@@ -34,7 +34,7 @@ enum WaypointMoveType
struct WaypointNode
{
- WaypointNode() : id(0), x(0.f), y(0.f), z(0.f), delay(0), eventId(0), moveType(WAYPOINT_MOVE_TYPE_RUN), eventChance(0) { }
+ WaypointNode() : id(0), x(0.f), y(0.f), z(0.f), delay(0), moveType(WAYPOINT_MOVE_TYPE_RUN) { }
WaypointNode(uint32 _id, float _x, float _y, float _z, Optional<float> _orientation = { }, uint32 _delay = 0)
{
id = _id;
@@ -43,18 +43,14 @@ struct WaypointNode
z = _z;
orientation = _orientation;
delay = _delay;
- eventId = 0;
moveType = WAYPOINT_MOVE_TYPE_WALK;
- eventChance = 100;
}
uint32 id;
float x, y, z;
Optional<float> orientation;
uint32 delay;
- uint32 eventId;
uint32 moveType;
- uint8 eventChance;
};
struct WaypointPath
diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp
index 07ccd574ffc..ab018e66233 100644
--- a/src/server/game/Movement/Waypoints/WaypointManager.cpp
+++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp
@@ -24,8 +24,8 @@ void WaypointMgr::Load()
{
uint32 oldMSTime = getMSTime();
- // 0 1 2 3 4 5 6 7 8 9
- QueryResult result = WorldDatabase.Query("SELECT id, point, position_x, position_y, position_z, orientation, move_type, delay, action, action_chance FROM waypoint_data ORDER BY id, point");
+ // 0 1 2 3 4 5 6 7
+ QueryResult result = WorldDatabase.Query("SELECT id, point, position_x, position_y, position_z, orientation, move_type, delay FROM waypoint_data ORDER BY id, point");
if (!result)
{
@@ -64,8 +64,6 @@ void WaypointMgr::Load()
}
waypoint.delay = fields[7].GetUInt32();
- waypoint.eventId = fields[8].GetUInt32();
- waypoint.eventChance = fields[9].GetInt16();
WaypointPath& path = _waypointStore[pathId];
path.id = pathId;
@@ -123,8 +121,6 @@ void WaypointMgr::ReloadPath(uint32 id)
}
waypoint.delay = fields[6].GetUInt32();
- waypoint.eventId = fields[7].GetUInt32();
- waypoint.eventChance = fields[8].GetUInt8();
values.push_back(std::move(waypoint));
}
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 2a750efef92..ddb921ef3d1 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -2339,7 +2339,6 @@ void World::SetInitialWorldSettings()
///- Load and initialize scripts
sObjectMgr->LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
sObjectMgr->LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
- sObjectMgr->LoadWaypointScripts();
TC_LOG_INFO("server.loading", "Loading spell script names...");
sObjectMgr->LoadSpellScriptNames();
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index 1812fabbdb7..5e4df483bd7 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -163,7 +163,6 @@ public:
{ "support", rbac::RBAC_PERM_COMMAND_RELOAD_SUPPORT_SYSTEM, true, &HandleReloadSupportSystemCommand, "" },
{ "trainer", rbac::RBAC_PERM_COMMAND_RELOAD_TRAINER, true, &HandleReloadTrainerCommand, "" },
{ "trinity_string", rbac::RBAC_PERM_COMMAND_RELOAD_TRINITY_STRING, true, &HandleReloadTrinityStringCommand, "" },
- { "waypoint_scripts", rbac::RBAC_PERM_COMMAND_RELOAD_WAYPOINT_SCRIPTS, true, &HandleReloadWpScriptsCommand, "" },
{ "waypoint_data", rbac::RBAC_PERM_COMMAND_RELOAD_WAYPOINT_DATA, true, &HandleReloadWpCommand, "" },
{ "vehicle_template", rbac::RBAC_PERM_COMMAND_RELOAD_VEHICLE_TEMPLATE, true, &HandleReloadVehicleTemplateCommand, "" },
{ "vehicle_accessory", rbac::RBAC_PERM_COMMAND_RELOAD_VEHICLE_ACCESORY, true, &HandleReloadVehicleAccessoryCommand, "" },
@@ -281,7 +280,6 @@ public:
HandleReloadSpellScriptsCommand(handler, "a");
HandleReloadSpellScriptNamesCommand(handler, "a");
handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded.");
- HandleReloadWpScriptsCommand(handler, "a");
HandleReloadWpCommand(handler, "a");
return true;
}
@@ -907,26 +905,6 @@ public:
return true;
}
- static bool HandleReloadWpScriptsCommand(ChatHandler* handler, char const* args)
- {
- if (sMapMgr->IsScriptScheduled())
- {
- handler->SendSysMessage("DB scripts used currently, please attempt reload later.");
- handler->SetSentErrorMessage(true);
- return false;
- }
-
- if (*args != 'a')
- TC_LOG_INFO("misc", "Re-Loading Scripts from `waypoint_scripts`...");
-
- sObjectMgr->LoadWaypointScripts();
-
- if (*args != 'a')
- handler->SendGlobalGMSysMessage("DB table `waypoint_scripts` reloaded.");
-
- return true;
- }
-
static bool HandleReloadWpCommand(ChatHandler* handler, char const* args)
{
if (*args != 'a')
diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp
index 851bb6cb43a..124c7a9a1a0 100644
--- a/src/server/scripts/Commands/cs_wp.cpp
+++ b/src/server/scripts/Commands/cs_wp.cpp
@@ -51,7 +51,6 @@ public:
static std::vector<ChatCommand> wpCommandTable =
{
{ "add", rbac::RBAC_PERM_COMMAND_WP_ADD, false, &HandleWpAddCommand, "" },
- { "event", rbac::RBAC_PERM_COMMAND_WP_EVENT, false, &HandleWpEventCommand, "" },
{ "load", rbac::RBAC_PERM_COMMAND_WP_LOAD, false, &HandleWpLoadCommand, "" },
{ "modify", rbac::RBAC_PERM_COMMAND_WP_MODIFY, false, &HandleWpModifyCommand, "" },
{ "unload", rbac::RBAC_PERM_COMMAND_WP_UNLOAD, false, &HandleWpUnLoadCommand, "" },
@@ -290,259 +289,6 @@ public:
return true;
}
- static bool HandleWpEventCommand(ChatHandler* handler, char const* args)
- {
- if (!*args)
- return false;
-
- char* show_str = strtok((char*)args, " ");
- std::string show = show_str;
- WorldDatabasePreparedStatement* stmt = nullptr;
-
- // Check
- if ((show != "add") && (show != "mod") && (show != "del") && (show != "listid"))
- return false;
-
- char* arg_id = strtok(nullptr, " ");
-
- if (show == "add")
- {
- if (Optional<uint32> id = Trinity::StringTo<uint32>(arg_id))
- {
- stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID);
- stmt->setUInt32(0, *id);
- PreparedQueryResult result = WorldDatabase.Query(stmt);
-
- if (!result)
- {
- stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_WAYPOINT_SCRIPT);
- stmt->setUInt32(0, *id);
- WorldDatabase.Execute(stmt);
-
- handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: ", *id);
- }
- else
- handler->PSendSysMessage("|cff00ff00Wp Event: You have choosed an existing waypoint script guid: %u|r", *id);
- }
- else
- {
- stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_SCRIPTS_MAX_ID);
- PreparedQueryResult result = WorldDatabase.Query(stmt);
- id = result->Fetch()->GetUInt32();
- stmt = WorldDatabase.GetPreparedStatement(WORLD_INS_WAYPOINT_SCRIPT);
- stmt->setUInt32(0, *id + 1);
- WorldDatabase.Execute(stmt);
-
- handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: |r|cff00ffff", *id+1);
- }
-
- return true;
- }
-
- if (show == "listid")
- {
- if (!arg_id)
- {
- handler->PSendSysMessage("%s%s|r", "|cff33ffff", "Wp Event: You must provide waypoint script id.");
- return true;
- }
-
- uint32 id = Trinity::StringTo<uint32>(arg_id).value_or(0);
-
- uint32 a2, a3, a4, a5, a6;
- float a8, a9, a10, a11;
- char const* a7;
-
- stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_SCRIPT_BY_ID);
- stmt->setUInt32(0, id);
- PreparedQueryResult result = WorldDatabase.Query(stmt);
-
- if (!result)
- {
- handler->PSendSysMessage("%s%s%u|r", "|cff33ffff", "Wp Event: No waypoint scripts found on id: ", id);
- return true;
- }
-
- Field* fields;
-
- do
- {
- fields = result->Fetch();
- a2 = fields[0].GetUInt32();
- a3 = fields[1].GetUInt32();
- a4 = fields[2].GetUInt32();
- a5 = fields[3].GetUInt32();
- a6 = fields[4].GetUInt32();
- a7 = fields[5].GetCString();
- a8 = fields[6].GetFloat();
- a9 = fields[7].GetFloat();
- a10 = fields[8].GetFloat();
- a11 = fields[9].GetFloat();
-
- handler->PSendSysMessage("|cffff33ffid:|r|cff00ffff %u|r|cff00ff00, guid: |r|cff00ffff%u|r|cff00ff00, delay: |r|cff00ffff%u|r|cff00ff00, command: |r|cff00ffff%u|r|cff00ff00, datalong: |r|cff00ffff%u|r|cff00ff00, datalong2: |r|cff00ffff%u|r|cff00ff00, datatext: |r|cff00ffff%s|r|cff00ff00, posx: |r|cff00ffff%f|r|cff00ff00, posy: |r|cff00ffff%f|r|cff00ff00, posz: |r|cff00ffff%f|r|cff00ff00, orientation: |r|cff00ffff%f|r", id, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
- }
- while (result->NextRow());
- }
-
- if (show == "del")
- {
- if (!arg_id)
- {
- handler->SendSysMessage("|cffff33ffERROR: Waypoint script guid not present.|r");
- return true;
- }
-
- uint32 id = Trinity::StringTo<uint32>(arg_id).value_or(0);
-
- stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID);
- stmt->setUInt32(0, id);
- PreparedQueryResult result = WorldDatabase.Query(stmt);
-
- if (result)
- {
- stmt = WorldDatabase.GetPreparedStatement(WORLD_DEL_WAYPOINT_SCRIPT);
- stmt->setUInt32(0, id);
- WorldDatabase.Execute(stmt);
-
- handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: Waypoint script removed: ", id);
- }
- else
- handler->PSendSysMessage("|cffff33ffWp Event: ERROR: you have selected a non existing script: %u|r", id);
-
- return true;
- }
-
- if (show == "mod")
- {
- if (!arg_id)
- {
- handler->SendSysMessage("|cffff33ffERROR: Waypoint script guid not present.|r");
- return true;
- }
-
- uint32 id = Trinity::StringTo<uint32>(arg_id).value_or(0);
-
- if (!id)
- {
- handler->SendSysMessage("|cffff33ffERROR: No valid waypoint script id not present.|r");
- return true;
- }
-
- char* arg_2 = strtok(nullptr, " ");
-
- if (!arg_2)
- {
- handler->SendSysMessage("|cffff33ffERROR: No argument present.|r");
- return true;
- }
-
- std::string arg_string = arg_2;
-
- if ((arg_string != "setid") && (arg_string != "delay") && (arg_string != "command")
- && (arg_string != "datalong") && (arg_string != "datalong2") && (arg_string != "dataint") && (arg_string != "posx")
- && (arg_string != "posy") && (arg_string != "posz") && (arg_string != "orientation"))
- {
- handler->SendSysMessage("|cffff33ffERROR: No valid argument present.|r");
- return true;
- }
-
- char* arg_3;
- std::string arg_str_2 = arg_2;
- arg_3 = strtok(nullptr, " ");
-
- if (!arg_3)
- {
- handler->SendSysMessage("|cffff33ffERROR: No additional argument present.|r");
- return true;
- }
-
- if (arg_str_2 == "setid")
- {
- uint32 newid = Trinity::StringTo<uint32>(arg_3).value_or(0);
- handler->PSendSysMessage("%s%s|r|cff00ffff%u|r|cff00ff00%s|r|cff00ffff%u|r", "|cff00ff00", "Wp Event: Waypoint script guid: ", newid, " id changed: ", id);
-
- stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_ID);
- stmt->setUInt32(0, newid);
- stmt->setUInt32(1, id);
- WorldDatabase.Execute(stmt);
-
- return true;
- }
- else
- {
- stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID);
- stmt->setUInt32(0, id);
- PreparedQueryResult result = WorldDatabase.Query(stmt);
-
- if (!result)
- {
- handler->SendSysMessage("|cffff33ffERROR: You have selected an non existing waypoint script guid.|r");
- return true;
- }
-
- if (arg_str_2 == "posx")
- {
- stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_X);
- stmt->setFloat(0, float(atof(arg_3)));
- stmt->setUInt32(1, id);
-
- WorldDatabase.Execute(stmt);
-
- handler->PSendSysMessage("|cff00ff00Waypoint script:|r|cff00ffff %u|r|cff00ff00 position_x updated.|r", id);
- return true;
- }
- else if (arg_str_2 == "posy")
- {
- stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_Y);
- stmt->setFloat(0, float(atof(arg_3)));
- stmt->setUInt32(1, id);
-
- WorldDatabase.Execute(stmt);
-
- handler->PSendSysMessage("|cff00ff00Waypoint script: %u position_y updated.|r", id);
- return true;
- }
- else if (arg_str_2 == "posz")
- {
- stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_Z);
- stmt->setFloat(0, float(atof(arg_3)));
- stmt->setUInt32(1, id);
-
- WorldDatabase.Execute(stmt);
-
- handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 position_z updated.|r", id);
- return true;
- }
- else if (arg_str_2 == "orientation")
- {
- stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_O);
- stmt->setFloat(0, float(atof(arg_3)));
- stmt->setUInt32(1, id);
-
- WorldDatabase.Execute(stmt);
-
- handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 orientation updated.|r", id);
- return true;
- }
- else if (arg_str_2 == "dataint")
- {
- WorldDatabase.PExecute("UPDATE waypoint_scripts SET {}='{}' WHERE guid='{}'", arg_2, arg_3, id); // Query can't be a prepared statement
-
- handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 dataint updated.|r", id);
- return true;
- }
- else
- {
- std::string arg_str_3 = arg_3;
- WorldDatabase.EscapeString(arg_str_3);
- WorldDatabase.PExecute("UPDATE waypoint_scripts SET {}='{}' WHERE guid='{}'", arg_2, arg_str_3, id); // Query can't be a prepared statement
- }
- }
- handler->PSendSysMessage("%s%s|r|cff00ffff%u:|r|cff00ff00 %s %s|r", "|cff00ff00", "Waypoint script:", id, arg_2, "updated.");
- }
- return true;
- }
-
static bool HandleWpModifyCommand(ChatHandler* handler, char const* args)
{
if (!*args)
@@ -811,14 +557,10 @@ public:
uint32 point = fields[1].GetUInt32();
uint32 delay = fields[2].GetUInt32();
uint32 flag = fields[3].GetUInt32();
- uint32 ev_id = fields[4].GetUInt32();
- uint32 ev_chance = fields[5].GetUInt16();
handler->PSendSysMessage("|cff00ff00Show info: for current point: |r|cff00ffff%u|r|cff00ff00, Path ID: |r|cff00ffff%u|r", point, pathid);
handler->PSendSysMessage("|cff00ff00Show info: delay: |r|cff00ffff%u|r", delay);
handler->PSendSysMessage("|cff00ff00Show info: Move flag: |r|cff00ffff%u|r", flag);
- handler->PSendSysMessage("|cff00ff00Show info: Waypoint event: |r|cff00ffff%u|r", ev_id);
- handler->PSendSysMessage("|cff00ff00Show info: Event chance: |r|cff00ffff%u|r", ev_chance);
}
while (result->NextRow());
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index c3414c6fabb..f93716612a9 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -545,6 +545,18 @@ enum Misc_VBN
QUEST_DEATH_CHALLENGE = 12733
};
+enum Paths_VBN
+{
+ PATH_DEATH_KNIGHT_INITIATE = 10361360,
+ PATH_DEATH_KNIGHT_INITIATE2 = 10361440,
+ PATH_DEATH_KNIGHT_INITIATE3 = 10362320,
+ PATH_DEATH_KNIGHT_INITIATE4 = 10362400,
+ PATH_DEATH_KNIGHT_INITIATE5 = 10362480,
+ PATH_DEATH_KNIGHT_INITIATE6 = 10363520,
+ PATH_DEATH_KNIGHT_INITIATE7 = 10363680,
+ PATH_DEATH_KNIGHT_INITIATE8 = 10363760,
+};
+
class npc_death_knight_initiate : public CreatureScript
{
public:
@@ -693,6 +705,25 @@ public:
}
return true;
}
+
+ void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
+ {
+ switch (pathId)
+ {
+ case PATH_DEATH_KNIGHT_INITIATE:
+ case PATH_DEATH_KNIGHT_INITIATE2:
+ case PATH_DEATH_KNIGHT_INITIATE3:
+ case PATH_DEATH_KNIGHT_INITIATE4:
+ case PATH_DEATH_KNIGHT_INITIATE5:
+ case PATH_DEATH_KNIGHT_INITIATE6:
+ case PATH_DEATH_KNIGHT_INITIATE7:
+ case PATH_DEATH_KNIGHT_INITIATE8:
+ me->DespawnOrUnsummon(1s);
+ break;
+ default:
+ break;
+ }
+ }
};
CreatureAI* GetAI(Creature* creature) const override
@@ -1138,6 +1169,51 @@ class spell_chapter1_runeforging_credit : public SpellScript
}
};
+enum HearthglenCrusaderPaths : uint32
+{
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN = 10445360,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN2 = 10445600,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN3 = 10448640,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN4 = 10449200,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN5 = 10452240,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN6 = 10452880,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN7 = 10452960,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN8 = 10453040,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN9 = 10453520,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN10 = 10453680,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN11 = 10454000,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN12 = 10454080,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN13 = 10454160,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN14 = 10454320,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN15 = 10454560,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN16 = 10459440,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN17 = 10460320,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN18 = 10463040,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN19 = 10463120,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN20 = 10463280,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN21 = 10463360,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN22 = 10463520,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN23 = 10463680,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN24 = 10463840,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN25 = 10464080,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN26 = 10464160,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN27 = 10464240,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN28 = 10464320,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN29 = 10464400,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN30 = 10464480,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN31 = 10464720,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN32 = 10464800,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN33 = 10464880,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN34 = 10464960,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN35 = 10465040,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN36 = 10465520,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN37 = 10465600,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN38 = 10466000,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN39 = 10466160,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN40 = 10466320,
+ PATH_HEARTHGLEN_CRUSADER_DESPAWN41 = 10466400,
+};
+
// 29102 - Hearthglen Crusader
// 29103 - Tirisfal Crusader
struct npc_hearthglen_crusader : public ScriptedAI
@@ -1187,6 +1263,58 @@ struct npc_hearthglen_crusader : public ScriptedAI
DoMeleeAttackIfReady();
}
+ void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override
+ {
+ switch (pathId)
+ {
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN2:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN3:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN4:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN5:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN6:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN7:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN8:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN9:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN10:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN11:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN12:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN13:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN14:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN15:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN16:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN17:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN18:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN19:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN20:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN21:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN22:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN23:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN24:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN25:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN26:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN27:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN28:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN29:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN30:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN31:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN32:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN33:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN34:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN35:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN36:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN37:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN38:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN39:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN40:
+ case PATH_HEARTHGLEN_CRUSADER_DESPAWN41:
+ me->DespawnOrUnsummon(1s);
+ break;
+ default:
+ break;
+ }
+ }
+
private:
float _minimumRange;
};
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
index e01f0b9c9eb..9d652f8f5de 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
@@ -19,12 +19,12 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-enum Emotes
+enum VectusEmotes
{
EMOTE_FRENZY = 0
};
-enum Spells
+enum VectusSpells
{
SPELL_FLAMESTRIKE = 18399,
SPELL_BLAST_WAVE = 16046,
@@ -32,13 +32,25 @@ enum Spells
SPELL_FRENZY = 8269 // 28371
};
-enum Events
+enum VectusEvents
{
EVENT_FIRE_SHIELD = 1,
EVENT_BLAST_WAVE,
EVENT_FRENZY
};
+enum VectusTalks
+{
+ TALK_IDLE = 1,
+ TALK_IDLE2 = 2,
+ TALK_IDLE3 = 3
+};
+
+enum VectusPaths
+{
+ PATH_VECTUS_IDLE = 3904400
+};
+
class boss_vectus : public CreatureScript
{
public:
@@ -102,6 +114,19 @@ public:
DoMeleeAttackIfReady();
}
+
+ void WaypointReached(uint32 waypointId, uint32 pathId) override
+ {
+ if (pathId != PATH_VECTUS_IDLE)
+ return;
+
+ if (waypointId == 2)
+ Talk(TALK_IDLE);
+ else if (waypointId == 3)
+ Talk(TALK_IDLE2);
+ else if (waypointId == 4)
+ Talk(TALK_IDLE3);
+ }
};
CreatureAI* GetAI(Creature* creature) const override
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index 53b23697add..eb09f2085fc 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -51,6 +51,9 @@ enum FreyaYells
enum FreyaSpells
{
// Freya
+ SPELL_FREYA_DUMMY_GREEN = 63295,
+ SPELL_FREYA_DUMMY_YELLOW = 63292,
+ SPELL_FREYA_DUMMY_BLUE = 63294,
SPELL_ATTUNED_TO_NATURE = 62519,
SPELL_TOUCH_OF_EONAR = 62528,
SPELL_SUNBEAM = 62623,
@@ -155,6 +158,7 @@ enum FreyaSpells
enum FreyaNpcs
{
+ NPC_CHANNEL_STALKER_FREYA = 33575,
NPC_SUN_BEAM = 33170,
NPC_DETONATING_LASHER = 32918,
NPC_ANCIENT_CONSERVATOR = 33203,
@@ -204,13 +208,18 @@ enum FreyaEvents
EVENT_FLUX = 17
};
-enum Misc
+enum FreyaMisc
{
TIME_DIFFERENCE = 10000, // If difference between waveTime and WAVE_TIME is bigger then TIME_DIFFERENCE, schedule EVENT_WAVE in 10 seconds
DATA_GETTING_BACK_TO_NATURE = 1,
DATA_KNOCK_ON_WOOD = 2
};
+enum FreyaPaths
+{
+ PATH_FREYA_IDLE = 10924320,
+};
+
constexpr Seconds FREYA_WAVE_TIME = 60s; // Normal wave is one minute
class npc_iron_roots : public CreatureScript
@@ -687,6 +696,28 @@ class boss_freya : public CreatureScript
break;
}
}
+
+ void WaypointReached(uint32 waypointId, uint32 pathId) override
+ {
+ if (pathId != PATH_FREYA_IDLE)
+ return;
+
+ if (waypointId == 4)
+ {
+ if (Creature* creature = me->FindNearestCreature(NPC_CHANNEL_STALKER_FREYA, 30.0f))
+ DoCast(creature, SPELL_FREYA_DUMMY_GREEN);
+ }
+ else if (waypointId == 10)
+ {
+ if (Creature* creature = me->FindNearestCreature(NPC_CHANNEL_STALKER_FREYA, 30.0f))
+ DoCast(creature, SPELL_FREYA_DUMMY_YELLOW);
+ }
+ else if (waypointId == 18)
+ {
+ if (Creature* creature = me->FindNearestCreature(NPC_CHANNEL_STALKER_FREYA, 30.0f))
+ DoCast(creature, SPELL_FREYA_DUMMY_BLUE);
+ }
+ }
};
CreatureAI* GetAI(Creature* creature) const override
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
index 422e4283693..6fc929c95c4 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
@@ -135,6 +135,11 @@ enum Misc
GROUP_SEARING_GRAVITY = 1
};
+enum XT002Paths
+{
+ PATH_XT002_IDLE = 10884320
+};
+
struct boss_xt002 : public BossAI
{
boss_xt002(Creature* creature) : BossAI(creature, DATA_XT002)
@@ -182,6 +187,8 @@ struct boss_xt002 : public BossAI
void JustEngagedWith(Unit* who) override
{
+ scheduler.CancelAll();
+
Talk(SAY_AGGRO);
BossAI::JustEngagedWith(who);
events.ScheduleEvent(EVENT_SEARING_LIGHT, Is25ManRaid() ? 9s : 11s, GROUP_SEARING_GRAVITY, PHASE_1);
@@ -383,6 +390,31 @@ struct boss_xt002 : public BossAI
DoMeleeAttackIfReady();
}
+ void WaypointReached(uint32 waypointId, uint32 pathId) override
+ {
+ if (pathId != PATH_XT002_IDLE)
+ return;
+
+ if (waypointId == 3 || waypointId == 9)
+ {
+ me->SetEmoteState(EMOTE_STATE_SPELL_CHANNEL_OMNI);
+
+ scheduler.Schedule(11s, [this](TaskContext /*task*/)
+ {
+ me->SetEmoteState(EMOTE_ONESHOT_NONE);
+ });
+ }
+ else if (waypointId == 13)
+ {
+ me->SetEmoteState(EMOTE_STATE_DANCE);
+
+ scheduler.Schedule(30s, [this](TaskContext /*task*/)
+ {
+ me->SetEmoteState(EMOTE_ONESHOT_NONE);
+ });
+ }
+ }
+
private:
bool _healthRecovered; // Did a scrapbot recover XT-002's health during the encounter?
bool _hardMode; // Are we in hard mode? Or: was the heart killed during phase 2?
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
index 38a7fd78d66..d7d3c6245c7 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
@@ -57,6 +57,11 @@ enum BlackheartEvents
EVENT_WAR_STOMP
};
+enum BlackheartPaths
+{
+ PATH_BLACKHEART_IDLE = 5354960,
+};
+
class BlackheartCharmedPlayerAI : public SimpleCharmedPlayerAI
{
using SimpleCharmedPlayerAI::SimpleCharmedPlayerAI;
@@ -161,6 +166,17 @@ struct boss_blackheart_the_inciter : public BossAI
DoMeleeAttackIfReady();
}
+
+ void WaypointReached(uint32 waypointId, uint32 pathId) override
+ {
+ if (pathId != PATH_BLACKHEART_IDLE)
+ return;
+
+ if (waypointId == 2)
+ Talk(SAY_DEATH); // ?
+ else if (waypointId == 3)
+ Talk(SAY_AGGRO); // ?
+ }
};
struct boss_blackheart_the_inciter_mc_dummy : public NullCreatureAI
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
index 2330a2f75ba..3aa3f7c4541 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
@@ -35,7 +35,7 @@ like lack of delays between packets makes it work differently too.
Of course as was said above player can be pulled towards 2 times in a row but that looks like a rare case.
*/
-enum Spells
+enum BlackStalkerSpells
{
SPELL_LEVITATE = 31704,
SPELL_CHAIN_LIGHTNING = 31717,
@@ -52,7 +52,7 @@ enum Spells
SPELL_SUMMON_SPORE_STRIDER = 38755
};
-enum Events
+enum BlackStalkerEvents
{
EVENT_LEASH_CHECK = 1,
EVENT_LEVITATE,
@@ -61,6 +61,11 @@ enum Events
EVENT_SUMMON_SPORE_STRIDER
};
+enum BlackStalkerPaths
+{
+ PATH_BLACK_STALKER_IDLE = 4346960,
+};
+
struct boss_the_black_stalker : public BossAI
{
boss_the_black_stalker(Creature* creature) : BossAI(creature, DATA_THE_BLACK_STALKER), _summons(creature) { }
@@ -68,6 +73,8 @@ struct boss_the_black_stalker : public BossAI
void JustEngagedWith(Unit* who) override
{
BossAI::JustEngagedWith(who);
+ scheduler.CancelAll();
+
_events.ScheduleEvent(EVENT_LEASH_CHECK, 5s);
_events.ScheduleEvent(EVENT_LEVITATE, 8s, 18s);
_events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 0s, 3s);
@@ -130,6 +137,20 @@ struct boss_the_black_stalker : public BossAI
DoMeleeAttackIfReady();
}
+ void WaypointReached(uint32 waypointId, uint32 pathId) override
+ {
+ if (pathId != PATH_BLACK_STALKER_IDLE)
+ return;
+
+ if (waypointId == 2 || waypointId == 4 || waypointId == 6)
+ {
+ scheduler.Schedule(2s, [this](TaskContext /*task*/)
+ {
+ me->HandleEmoteCommand(EMOTE_ONESHOT_EAT);
+ });
+ }
+ }
+
private:
EventMap _events;
SummonList _summons;
diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp
index 1bbf80b84e9..c13395e9adc 100644
--- a/src/server/scripts/Outland/zone_nagrand.cpp
+++ b/src/server/scripts/Outland/zone_nagrand.cpp
@@ -429,7 +429,9 @@ enum PlantBannerQuests
NPC_KIL_SORROW_DEATHSWORN = 17148,
NPC_GISELDA_THE_CRONE = 18391,
NPC_WARMAUL_REAVER = 17138,
- NPC_WARMAUL_SHAMAN = 18064
+ NPC_WARMAUL_SHAMAN = 18064,
+
+ PATH_NAGRAND_BANNER = 4816480,
};
class npc_nagrand_banner : public CreatureScript
@@ -474,6 +476,21 @@ public:
return bannered;
}
+ void WaypointReached(uint32 waypointId, uint32 pathId) override
+ {
+ if (pathId != PATH_NAGRAND_BANNER)
+ return;
+
+ if (waypointId == 11)
+ me->HandleEmoteCommand(EMOTE_ONESHOT_APPLAUD);
+ else if (waypointId == 4 || waypointId == 8)
+ me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
+ else if (waypointId == 10)
+ me->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
+ else if (waypointId == 3 || waypointId == 7)
+ me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING);
+ }
+
protected:
TaskScheduler scheduler;