diff options
| author | Traesh <traesh@farahlon.com> | 2016-09-25 16:13:12 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2016-09-25 16:13:12 +0200 |
| commit | d4887311e39527e036419ebd966f399fdbdae67a (patch) | |
| tree | 7a87b65e493e3b0660790b02b151107fc4ab66b4 /src/server/scripts/World | |
| parent | dd64a3cd36d7c8db67f4075c5a8c1eb01898d1ed (diff) | |
Core/Scenes: Implemented scene system
Closes #17858
Closes #17976
Diffstat (limited to 'src/server/scripts/World')
| -rw-r--r-- | src/server/scripts/World/scene_scripts.cpp | 42 | ||||
| -rw-r--r-- | src/server/scripts/World/world_script_loader.cpp | 2 |
2 files changed, 44 insertions, 0 deletions
diff --git a/src/server/scripts/World/scene_scripts.cpp b/src/server/scripts/World/scene_scripts.cpp new file mode 100644 index 00000000000..860c97e60ea --- /dev/null +++ b/src/server/scripts/World/scene_scripts.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptMgr.h" +#include "Player.h" + +enum SceneSpells +{ + SPELL_DEATHWING_SIMULATOR = 201184 +}; + +class scene_deathwing_simulator : public SceneScript +{ + public: + scene_deathwing_simulator() : SceneScript("scene_deathwing_simulator") { } + + // Called when a player receive trigger from scene + void OnSceneTriggerEvent(Player* player, uint32 /*sceneInstanceID*/, SceneTemplate const* /*sceneTemplate*/, std::string const& triggerName) override + { + if (triggerName == "BURN PLAYER") + player->CastSpell(player, SPELL_DEATHWING_SIMULATOR, true); // Deathwing Simulator Burn player + } +}; + +void AddSC_scene_scripts() +{ + new scene_deathwing_simulator(); +} diff --git a/src/server/scripts/World/world_script_loader.cpp b/src/server/scripts/World/world_script_loader.cpp index bc007ab8100..2d5b5efebf2 100644 --- a/src/server/scripts/World/world_script_loader.cpp +++ b/src/server/scripts/World/world_script_loader.cpp @@ -30,6 +30,7 @@ void AddSC_npc_innkeeper(); void AddSC_npcs_special(); void AddSC_achievement_scripts(); void AddSC_action_ip_logger(); +void AddSC_scene_scripts(); // player void AddSC_chat_log(); void AddSC_duel_reset(); @@ -49,6 +50,7 @@ void AddWorldScripts() AddSC_npcs_special(); AddSC_achievement_scripts(); AddSC_chat_log(); // location: scripts\World\chat_log.cpp + AddSC_scene_scripts(); // FIXME: This should be moved in a script validation hook. // To avoid duplicate code, we check once /*ONLY*/ if logging is permitted or not. |
