aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp3
-rw-r--r--src/server/game/Server/Packets/CharacterPackets.cpp2
-rw-r--r--src/server/game/Server/Packets/CharacterPackets.h12
-rw-r--r--src/server/game/World/World.cpp14
-rw-r--r--src/server/game/World/World.h1
-rw-r--r--src/server/scripts/DragonIsles/dragon_isles_script_loader.cpp26
-rw-r--r--src/server/scripts/DragonIsles/zone_the_forbidden_reach.cpp99
-rw-r--r--src/server/worldserver/worldserver.conf.dist8
9 files changed, 160 insertions, 7 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 21498f3a01d..26da5e71beb 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -23027,6 +23027,8 @@ uint8 Player::GetStartLevel(uint8 race, uint8 playerClass, Optional<int32> chara
}
else if (playerClass == CLASS_DEMON_HUNTER)
startLevel = std::max<uint8>(sWorld->getIntConfig(CONFIG_START_DEMON_HUNTER_PLAYER_LEVEL), startLevel);
+ else if (playerClass == CLASS_EVOKER)
+ startLevel = std::max<uint8>(sWorld->getIntConfig(CONFIG_START_EVOKER_PLAYER_LEVEL), startLevel);
if (characterTemplateId)
{
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 248306ad8c3..ec7e046c2f8 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -4340,6 +4340,9 @@ void ObjectMgr::LoadPlayerInfo()
if (sWorld->getIntConfig(CONFIG_EXPANSION) < EXPANSION_LEGION && class_ == CLASS_DEMON_HUNTER)
continue;
+ if (sWorld->getIntConfig(CONFIG_EXPANSION) < EXPANSION_DRAGONFLIGHT && class_ == CLASS_EVOKER)
+ continue;
+
// fatal error if no level 1 data
if (!playerInfo->get()->levelInfo || playerInfo->get()->levelInfo[0].stats[0] == 0)
{
diff --git a/src/server/game/Server/Packets/CharacterPackets.cpp b/src/server/game/Server/Packets/CharacterPackets.cpp
index 9eae2466da9..210b22f9d18 100644
--- a/src/server/game/Server/Packets/CharacterPackets.cpp
+++ b/src/server/game/Server/Packets/CharacterPackets.cpp
@@ -46,7 +46,7 @@ namespace WorldPackets
{
namespace Character
{
-void SortCustomizations(Array<ChrCustomizationChoice, 50>& customizations)
+void SortCustomizations(Array<ChrCustomizationChoice, 72>& customizations)
{
auto first = customizations.begin();
auto last = customizations.end();
diff --git a/src/server/game/Server/Packets/CharacterPackets.h b/src/server/game/Server/Packets/CharacterPackets.h
index cf7b14a81ff..d82c45e87e3 100644
--- a/src/server/game/Server/Packets/CharacterPackets.h
+++ b/src/server/game/Server/Packets/CharacterPackets.h
@@ -60,7 +60,7 @@ namespace WorldPackets
uint8 Race = RACE_NONE;
uint8 Class = CLASS_NONE;
uint8 Sex = GENDER_NONE;
- Array<ChrCustomizationChoice, 50> Customizations;
+ Array<ChrCustomizationChoice, 72> Customizations;
Optional<int32> TemplateSet;
bool IsTrialBoost = false;
bool UseNPE = false;
@@ -81,7 +81,7 @@ namespace WorldPackets
ObjectGuid CharGUID;
uint8 SexID = GENDER_NONE;
std::string CharName;
- Array<ChrCustomizationChoice, 50> Customizations;
+ Array<ChrCustomizationChoice, 72> Customizations;
};
struct CharRaceOrFactionChangeInfo
@@ -92,7 +92,7 @@ namespace WorldPackets
ObjectGuid Guid;
bool FactionChange = false;
std::string Name;
- Array<ChrCustomizationChoice, 50> Customizations;
+ Array<ChrCustomizationChoice, 72> Customizations;
};
struct CharacterUndeleteInfo
@@ -366,7 +366,7 @@ namespace WorldPackets
std::string Name;
uint8 SexID = 0;
uint8 RaceID = RACE_NONE;
- Array<ChrCustomizationChoice, 50> const* Customizations = nullptr;
+ Array<ChrCustomizationChoice, 72> const* Customizations = nullptr;
};
class CharFactionChangeResult final : public ServerPacket
@@ -637,7 +637,7 @@ namespace WorldPackets
void Read() override;
uint8 NewSex = 0;
- Array<ChrCustomizationChoice, 50> Customizations;
+ Array<ChrCustomizationChoice, 72> Customizations;
int32 CustomizedRace = 0;
};
@@ -744,7 +744,7 @@ namespace WorldPackets
ObjectGuid CharGUID;
std::string CharName;
uint8 SexID = 0;
- Array<ChrCustomizationChoice, 50> const& Customizations;
+ Array<ChrCustomizationChoice, 72> const& Customizations;
};
class CharCustomizeFailure final : public ServerPacket
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 6b499500c54..ac2bbdb259e 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1030,6 +1030,20 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_START_DEMON_HUNTER_PLAYER_LEVEL] = m_int_configs[CONFIG_MAX_PLAYER_LEVEL];
}
+ m_int_configs[CONFIG_START_EVOKER_PLAYER_LEVEL] = sConfigMgr->GetIntDefault("StartEvokerPlayerLevel", 58);
+ if (m_int_configs[CONFIG_START_EVOKER_PLAYER_LEVEL] < 1)
+ {
+ TC_LOG_ERROR("server.loading", "StartEvokerPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 1.",
+ m_int_configs[CONFIG_START_EVOKER_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
+ m_int_configs[CONFIG_START_EVOKER_PLAYER_LEVEL] = 1;
+ }
+ else if (m_int_configs[CONFIG_START_EVOKER_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
+ {
+ TC_LOG_ERROR("server.loading", "StartEvokerPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.",
+ m_int_configs[CONFIG_START_EVOKER_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
+ m_int_configs[CONFIG_START_EVOKER_PLAYER_LEVEL] = m_int_configs[CONFIG_MAX_PLAYER_LEVEL];
+ }
+
m_int_configs[CONFIG_START_ALLIED_RACE_LEVEL] = sConfigMgr->GetIntDefault("StartAlliedRacePlayerLevel", 10);
if (m_int_configs[CONFIG_START_ALLIED_RACE_LEVEL] < 1)
{
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index fae74be2f26..3be26d65a9c 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -258,6 +258,7 @@ enum WorldIntConfigs
CONFIG_START_PLAYER_LEVEL,
CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL,
CONFIG_START_DEMON_HUNTER_PLAYER_LEVEL,
+ CONFIG_START_EVOKER_PLAYER_LEVEL,
CONFIG_START_ALLIED_RACE_LEVEL,
CONFIG_START_PLAYER_MONEY,
CONFIG_CURRENCY_START_APEXIS_CRYSTALS,
diff --git a/src/server/scripts/DragonIsles/dragon_isles_script_loader.cpp b/src/server/scripts/DragonIsles/dragon_isles_script_loader.cpp
new file mode 100644
index 00000000000..a7db19599fc
--- /dev/null
+++ b/src/server/scripts/DragonIsles/dragon_isles_script_loader.cpp
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
+ *
+ * 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/>.
+ */
+
+// This is where scripts' loading functions should be declared:
+void AddSC_zone_the_forbidden_reach();
+
+// The name of this function should match:
+// void Add${NameOfDirectory}Scripts()
+void AddDragonIslesScripts()
+{
+ AddSC_zone_the_forbidden_reach();
+}
diff --git a/src/server/scripts/DragonIsles/zone_the_forbidden_reach.cpp b/src/server/scripts/DragonIsles/zone_the_forbidden_reach.cpp
new file mode 100644
index 00000000000..e6af907968e
--- /dev/null
+++ b/src/server/scripts/DragonIsles/zone_the_forbidden_reach.cpp
@@ -0,0 +1,99 @@
+/*
+ * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
+ *
+ * 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 "Containers.h"
+#include "Player.h"
+#include "Spell.h"
+#include "SpellScript.h"
+#include "Log.h"
+
+enum DracthyrLoginSpells
+{
+ // Spells
+ SPELL_DRACTHYR_LOGIN = 369728, // teleports to random room, plays scene for the room, binds the home position
+ SPELL_STASIS_1 = 369735, // triggers 366620
+ SPELL_STASIS_2 = 366620, // triggers 366636
+ SPELL_STASIS_3 = 366636, // removes 365560, sends first quest (64864)
+ SPELL_STASIS_4 = 365560, // freeze the target
+ SPELL_DRACTHYR_MOVIE_ROOM_01 = 394245, // scene for room 1
+ SPELL_DRACTHYR_MOVIE_ROOM_02 = 394279, // scene for room 2
+ SPELL_DRACTHYR_MOVIE_ROOM_03 = 394281, // scene for room 3
+ SPELL_DRACTHYR_MOVIE_ROOM_04 = 394282, // scene for room 4
+ //SPELL_DRACTHYR_MOVIE_ROOM_05 = 394283, // scene for room 5 (only plays sound, unused?)
+};
+
+std::array<std::pair<uint32, Position>, 4> LoginRoomData =
+{
+ {
+ { SPELL_DRACTHYR_MOVIE_ROOM_01, { 5725.32f, -3024.26f, 251.047f, 0.01745329238474369f } },
+ { SPELL_DRACTHYR_MOVIE_ROOM_02, { 5743.03f, -3067.28f, 251.047f, 0.798488140106201171f } },
+ { SPELL_DRACTHYR_MOVIE_ROOM_03, { 5787.1597f, -3083.3906f, 251.04698f, 1.570796370506286621f } },
+ { SPELL_DRACTHYR_MOVIE_ROOM_04, { 5829.32f, -3064.49f, 251.047f, 2.364955902099609375f } }
+ }
+};
+
+// 369728 - Dracthyr Login
+class spell_dracthyr_login : public SpellScript
+{
+ PrepareSpellScript(spell_dracthyr_login);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DRACTHYR_MOVIE_ROOM_01, SPELL_DRACTHYR_MOVIE_ROOM_02, SPELL_DRACTHYR_MOVIE_ROOM_03, SPELL_DRACTHYR_MOVIE_ROOM_04 });
+ }
+
+ void HandleTeleport(SpellEffIndex /*effIndex*/)
+ {
+ std::pair<uint32, Position> const& room = LoginRoomData[urand(0, 3)];
+
+ WorldLocation dest = GetHitUnit()->GetWorldLocation();
+ SetExplTargetDest(dest);
+
+ GetHitDest()->Relocate(room.second);
+
+ GetCaster()->CastSpell(GetHitUnit(), room.first, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_dracthyr_login::HandleTeleport, EFFECT_0, SPELL_EFFECT_TELEPORT_UNITS);
+ }
+};
+
+// 3730 - Dracthyr Evoker Intro (Post Movie)
+class scene_dracthyr_evoker_intro : public SceneScript
+{
+public:
+ scene_dracthyr_evoker_intro() : SceneScript("scene_dracthyr_evoker_intro") { }
+
+ void OnSceneComplete(Player* player, uint32 /*sceneInstanceID*/, SceneTemplate const* /*sceneTemplate*/) override
+ {
+ player->CastSpell(player, SPELL_STASIS_1, true);
+ }
+
+ void OnSceneCancel(Player* player, uint32 /*sceneInstanceID*/, SceneTemplate const* /*sceneTemplate*/) override
+ {
+ player->CastSpell(player, SPELL_STASIS_1, true);
+ }
+};
+
+void AddSC_zone_the_forbidden_reach()
+{
+ RegisterSpellScript(spell_dracthyr_login);
+ new scene_dracthyr_evoker_intro();
+}
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index fe03a29dfed..0aa8235e04e 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -924,6 +924,14 @@ StartDeathKnightPlayerLevel = 8
StartDemonHunterPlayerLevel = 8
#
+# StartEvokerPlayerLevel
+# Description: Staring level for evokers after creation.
+# Range: 1-MaxPlayerLevel
+# Default: 58
+
+StartEvokerPlayerLevel = 58
+
+#
# StartAlliedRacePlayerLevel
# Description: Staring level for allied races after creation.
# Range: 1-MaxPlayerLevel