From 159b11344c51b19d5efff2c5762eab6cfa74a801 Mon Sep 17 00:00:00 2001 From: Niam5 Date: Thu, 10 Feb 2022 21:27:13 -0600 Subject: [PATCH] Add SPP Solocraft -Adds SoloCraft as an option to CMake to enable/disable mod -Updated CI files to test on push and build one daily release with SoloCraft Credit to acidmanifesto and the TrinityCore project for the heavy legwork on getting this created --- .github/workflows/windows-release.yml | 2 +- cmake/options.cmake | 2 + cmake/showoptions.cmake | 6 + sql/base/characters.sql | 23 ++ .../z9999_01_characters_custom_solocraft.sql | 9 + src/game/CMakeLists.txt | 4 + src/game/Entities/CharacterHandler.cpp | 13 + src/game/Entities/Player.cpp | 4 + src/game/Entities/Player.h | 10 + src/game/Entities/StatSystem.cpp | 12 + src/game/Entities/Unit.cpp | 10 + src/game/Entities/Unit.h | 3 + src/game/Maps/Map.cpp | 287 +++++++++++++++ src/game/Maps/Map.h | 21 ++ src/game/Server/WorldSession.cpp | 4 + src/game/World/World.cpp | 78 ++++ src/game/World/World.h | 74 ++++ src/mangosd/CMakeLists.txt | 5 + src/mangosd/mangosd.conf.dist.in | 332 +++++++++++++++++- src/shared/SystemConfig.h | 2 +- 20 files changed, 898 insertions(+), 3 deletions(-) create mode 100644 sql/updates/characters/z9999_01_characters_custom_solocraft.sql diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index ac512c0017..100eebb0e1 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -27,7 +27,7 @@ jobs: - OPTIONAL_DEFINES: "" TYPE: "default" - - OPTIONAL_DEFINES: "-DBUILD_EXTRACTORS=ON -DBUILD_IKE3_BOTS=ON -DBUILD_RECASTDEMOMOD=ON -DBUILD_GIT_ID=ON -DBUILD_ELUNA=ON" + - OPTIONAL_DEFINES: "-DBUILD_ELUNA=ON -DBUILD_SOLOCRAFT=ON -DBUILD_IKE3_BOTS=ON -DBUILD_EXTRACTORS=ON -DBUILD_RECASTDEMOMOD=ON -DBUILD_GIT_ID=ON " TYPE: "with-all" - OPTIONAL_DEFINES: "-DBUILD_IKE3_BOTS=ON -DBUILD_ELUNA=ON" diff --git a/cmake/options.cmake b/cmake/options.cmake index ab9ed6a230..7afbb95c3d 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -7,6 +7,7 @@ option(BUILD_LOGIN_SERVER "Build login server" ON) option(BUILD_EXTRACTORS "Build map/dbc/vmap/mmap extractors" OFF) option(BUILD_SCRIPTDEV "Build ScriptDev. (OFF Speedup build)" ON) option(BUILD_ELUNA "Build Eluna Lua Engine" OFF) +option(BUILD_SOLOCRAFT "Build SoloCraft mod" OFF) option(BUILD_PLAYERBOT "Build Playerbot mod" OFF) option(BUILD_IKE3_BOTS "Build ike3 Playerbots" OFF) option(BUILD_AHBOT "Build Auction House Bot mod" OFF) @@ -37,6 +38,7 @@ message(STATUS BUILD_EXTRACTORS Build map/dbc/vmap/mmap extractor BUILD_SCRIPTDEV Build scriptdev. (Disable it to speedup build in dev mode by not including scripts) BUILD_ELUNA Build Eluna Lua Engine + BUILD_SOLOCRAFT Build SoloCraft Mod BUILD_PLAYERBOT Build Playerbot mod BUILD_IKE3_BOTS Build Ike3 Playerbot mod BUILD_AHBOT Build Auction House Bot mod diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake index 977b755e15..9ea90f4501 100644 --- a/cmake/showoptions.cmake +++ b/cmake/showoptions.cmake @@ -55,6 +55,12 @@ else() message(STATUS "Build Eluna LuaEngine : No (default)") endif() +if(BUILD_SOLOCRAFT) + message(STATUS "Build SoloCraft Mod : Yes") +else() + message(STATUS "Build SoloCraft Mod : No (default)") +endif() + if(BUILD_AHBOT) message(STATUS "Build AHBot : Yes") else() diff --git a/sql/base/characters.sql b/sql/base/characters.sql index a973ca283b..9ddae90c5b 100644 --- a/sql/base/characters.sql +++ b/sql/base/characters.sql @@ -767,6 +767,29 @@ LOCK TABLES `creature_respawn` WRITE; /*!40000 ALTER TABLE `creature_respawn` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `custom_solocraft_character_stats` +-- + +DROP TABLE IF EXISTS `custom_solocraft_character_stats`; +CREATE TABLE `custom_solocraft_character_stats` ( + `GUID` int(11) unsigned NOT NULL, + `Difficulty` float NOT NULL, + `GroupSize` int(11) NOT NULL, + `SpellPower` int(10) unsigned NOT NULL DEFAULT '0', + `Stats` float NOT NULL DEFAULT '100', + PRIMARY KEY (`GUID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + +-- +-- Dumping data for table `custom_solocraft_character_stats` +-- + +LOCK TABLES `custom_solocraft_character_stats` WRITE; +/*!40000 ALTER TABLE `custom_solocraft_character_stats` DISABLE KEYS */; +/*!40000 ALTER TABLE `custom_solocraft_character_stats` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `game_event_status` -- diff --git a/sql/updates/characters/z9999_01_characters_custom_solocraft.sql b/sql/updates/characters/z9999_01_characters_custom_solocraft.sql new file mode 100644 index 0000000000..f29078b213 --- /dev/null +++ b/sql/updates/characters/z9999_01_characters_custom_solocraft.sql @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS `custom_solocraft_character_stats`; +CREATE TABLE `custom_solocraft_character_stats` ( + `GUID` int(11) unsigned NOT NULL, + `Difficulty` float NOT NULL, + `GroupSize` int(11) NOT NULL, + `SpellPower` int(10) unsigned NOT NULL DEFAULT '0', + `Stats` float NOT NULL DEFAULT '100', + PRIMARY KEY (`GUID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt index 85bfa5a589..58240731b3 100644 --- a/src/game/CMakeLists.txt +++ b/src/game/CMakeLists.txt @@ -53,6 +53,10 @@ else() add_definitions(-DBUILD_ELUNA -DCMANGOS -DCLASSIC) endif() +if(BUILD_SOLOCRAFT) +add_definitions(-DBUILD_SOLOCRAFT) +endif() + if(NOT BUILD_PLAYERBOT) # exclude Playerbot folder set (EXCLUDE_DIR "PlayerBot/") diff --git a/src/game/Entities/CharacterHandler.cpp b/src/game/Entities/CharacterHandler.cpp index 215c74d920..74b1ce5c0f 100644 --- a/src/game/Entities/CharacterHandler.cpp +++ b/src/game/Entities/CharacterHandler.cpp @@ -927,6 +927,19 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) sEluna->OnLogin(pCurrChar); #endif +#ifdef BUILD_SOLOCRAFT + bool SoloCraftEnable = sWorld.getConfig(CONFIG_BOOL_SOLOCRAFT_ENABLED); + bool SoloCraftAnnounceModule = sWorld.getConfig(CONFIG_BOOL_SOLOCRAFT_ANNOUNCE); + + if (SoloCraftEnable) + { + if (SoloCraftAnnounceModule) + { + ChatHandler(pCurrChar->GetSession()).SendSysMessage("This server is running |cff4CFF00SPP SoloCraft Custom |rmodule."); + } + } +#endif + delete holder; } diff --git a/src/game/Entities/Player.cpp b/src/game/Entities/Player.cpp index 47de6dd760..67ca7e370a 100644 --- a/src/game/Entities/Player.cpp +++ b/src/game/Entities/Player.cpp @@ -625,6 +625,10 @@ Player::Player(WorldSession* session): Unit(), m_taxiTracker(*this), m_mover(thi for (auto& enchantMod : m_enchantmentFlatMod) enchantMod = 0; +#ifdef BUILD_SOLOCRAFT + m_baseSpellPower = 0; +#endif + // Player summoning m_summon_expire = 0; m_summon_mapid = 0; diff --git a/src/game/Entities/Player.h b/src/game/Entities/Player.h index 52a7ff0d6c..283d095ddd 100644 --- a/src/game/Entities/Player.h +++ b/src/game/Entities/Player.h @@ -1637,6 +1637,9 @@ class Player : public Unit void UpdateMaxPower(Powers power) override; void UpdateAttackPowerAndDamage(bool ranged = false) override; void UpdateDamagePhysical(WeaponAttackType attType) override; +#ifdef BUILD_SOLOCRAFT + void ApplySpellPowerBonus(int32 amount, bool apply); +#endif void UpdateSpellDamageBonus(); void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, float& min_damage, float& max_damage, uint8 index = 0); @@ -1645,6 +1648,9 @@ class Player : public Unit float GetMeleeCritFromAgility() const; float GetDodgeFromAgility(float amount) const; float GetSpellCritFromIntellect() const; +#ifdef BUILD_SOLOCRAFT + uint32 GetBaseSpellPowerBonus() const { return m_baseSpellPower; } +#endif void UpdateBlockPercentage(); void UpdateCritPercentage(WeaponAttackType attType); @@ -2414,6 +2420,10 @@ class Player : public Unit float m_auraBaseMod[BASEMOD_END][MOD_END]; +#ifdef BUILD_SOLOCRAFT + uint16 m_baseSpellPower; +#endif + uint32 m_enchantmentFlatMod[MAX_ATTACK]; // TODO: Stat system - incorporate generically, exposes a required hidden weapon stat that does not apply when unarmed SpellModList m_spellMods[MAX_SPELLMOD]; diff --git a/src/game/Entities/StatSystem.cpp b/src/game/Entities/StatSystem.cpp index f8b11669bf..c089705ac9 100644 --- a/src/game/Entities/StatSystem.cpp +++ b/src/game/Entities/StatSystem.cpp @@ -71,6 +71,18 @@ bool Player::UpdateStats(Stats stat) return true; } +#ifdef BUILD_SOLOCRAFT +void Player::ApplySpellPowerBonus(int32 amount, bool apply) +{ + m_baseSpellPower += apply ? amount : -amount; + + // For speed just update for client + //ApplyModUInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, amount, apply); + for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) + ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + i, amount, apply); +} +#endif + void Player::UpdateSpellDamageBonus() { // Magic damage modifiers implemented in Unit::SpellDamageBonusDone diff --git a/src/game/Entities/Unit.cpp b/src/game/Entities/Unit.cpp index 905728da17..24c3c440a8 100644 --- a/src/game/Entities/Unit.cpp +++ b/src/game/Entities/Unit.cpp @@ -7358,6 +7358,11 @@ int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask) if (GetTypeId() == TYPEID_PLAYER) { +#ifdef BUILD_SOLOCRAFT + // Base value + DoneAdvertisedBenefit += ((Player*)this)->GetBaseSpellPowerBonus(); +#endif + // Damage bonus from stats AuraList const& mDamageDoneOfStatPercent = GetAurasByType(SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT); for (auto i : mDamageDoneOfStatPercent) @@ -7562,6 +7567,11 @@ int32 Unit::SpellBaseHealingBonusDone(SpellSchoolMask schoolMask) // Healing bonus of spirit, intellect and strength if (GetTypeId() == TYPEID_PLAYER) { +#ifdef BUILD_SOLOCRAFT + // Base value + AdvertisedBenefit += ((Player*)this)->GetBaseSpellPowerBonus(); +#endif + // Healing bonus from stats AuraList const& mHealingDoneOfStatPercent = GetAurasByType(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT); for (auto i : mHealingDoneOfStatPercent) diff --git a/src/game/Entities/Unit.h b/src/game/Entities/Unit.h index d8fe3ec906..83c52ff6de 100644 --- a/src/game/Entities/Unit.h +++ b/src/game/Entities/Unit.h @@ -1339,6 +1339,9 @@ class Unit : public WorldObject void SetMaxHealth(uint32 val); void SetHealthPercent(float percent); int32 ModifyHealth(int32 dVal); +#ifdef BUILD_SOLOCRAFT + void SetFullHealth() { SetHealth(GetMaxHealth()); } +#endif float OCTRegenHPPerSpirit() const; float OCTRegenMPPerSpirit() const; diff --git a/src/game/Maps/Map.cpp b/src/game/Maps/Map.cpp index 1d383bdcbf..b5c0f3cdeb 100644 --- a/src/game/Maps/Map.cpp +++ b/src/game/Maps/Map.cpp @@ -453,6 +453,93 @@ bool Map::Add(Player* player) sEluna->OnPlayerEnter(this, player); #endif +#ifdef BUILD_SOLOCRAFT + if (sWorld.getConfig(CONFIG_BOOL_SOLOCRAFT_ENABLED)) + { + //Get Config Values + //Balancing + SoloCraftDebuffEnable = sWorld.getConfig(CONFIG_BOOL_SOLOCRAFT_DEBUFF_ENABLE); + SoloCraftSpellMult = sWorld.getConfig(CONFIG_FLOAT_SOLOCRAFT_SPELLPOWER_MULT); + SoloCraftStatsMult = sWorld.getConfig(CONFIG_FLOAT_SOLOCRAFT_STATS_MULT); + //Level Thresholds + SolocraftLevelDiff = sWorld.getConfig(CONFIG_UINT32_SOLOCRAFT_MAX_LEVEL_DIFF); + //Default Value + SolocraftDungeonLevel = sWorld.getConfig(CONFIG_UINT32_DUNGEON_LEVEL); + //Dungeon Level + dungeons = + { + //Classic Instances + {33, sWorld.getConfig(CONFIG_UINT32_SHADOWFANGKEEP_LEVEL) }, + {34, sWorld.getConfig(CONFIG_UINT32_STOCKADES_LEVEL) }, + {36, sWorld.getConfig(CONFIG_UINT32_DEADMINES_LEVEL) }, + {43, sWorld.getConfig(CONFIG_UINT32_WAILINGCAVERNS_LEVEL) }, + {47, sWorld.getConfig(CONFIG_UINT32_RAZORFENKRAULINSTANCE_LEVEL) }, + {48, sWorld.getConfig(CONFIG_UINT32_BLACKFATHOM_LEVEL) }, + {70, sWorld.getConfig(CONFIG_UINT32_ULDAMAN_LEVEL) }, + {90, sWorld.getConfig(CONFIG_UINT32_GNOMERAGONINSTANCE_LEVEL) }, + {109, sWorld.getConfig(CONFIG_UINT32_SUNKENTEMPLE_LEVEL) }, + {129, sWorld.getConfig(CONFIG_UINT32_RAZORFENDOWNS_LEVEL) }, + {189, sWorld.getConfig(CONFIG_UINT32_MONASTERYINSTANCES_LEVEL) }, // Scarlet Monastery + {209, sWorld.getConfig(CONFIG_UINT32_TANARISINSTANCE_LEVEL) }, // Zul'Farrak + {229, sWorld.getConfig(CONFIG_UINT32_BLACKROCKSPIRE_LEVEL) }, + {230, sWorld.getConfig(CONFIG_UINT32_BLACKROCKDEPTHS_LEVEL) }, + {249, sWorld.getConfig(CONFIG_UINT32_ONYXIALAIRINSTANCE_LEVEL) }, + {289, sWorld.getConfig(CONFIG_UINT32_SCHOOLOFNECROMANCY_LEVEL) }, // Scholomance + {309, sWorld.getConfig(CONFIG_UINT32_ZULGURUB_LEVEL) }, + {329, sWorld.getConfig(CONFIG_UINT32_STRATHOLME_LEVEL) }, + {349, sWorld.getConfig(CONFIG_UINT32_MAURADON_LEVEL) }, + {389, sWorld.getConfig(CONFIG_UINT32_ORGRIMMARINSTANCE_LEVEL) }, // Ragefire Chasm + {409, sWorld.getConfig(CONFIG_UINT32_MOLTENCORE_LEVEL) }, + {429, sWorld.getConfig(CONFIG_UINT32_DIREMAUL_LEVEL) }, + {469, sWorld.getConfig(CONFIG_UINT32_BLACKWINGLAIR_LEVEL) }, + {509, sWorld.getConfig(CONFIG_UINT32_AHNQIRAJ_LEVEL) }, // Ruins of Ahn'Qiraj + {531, sWorld.getConfig(CONFIG_UINT32_AHNQIRAJTEMPLE_LEVEL) }, + {533, sWorld.getConfig(CONFIG_UINT32_STRATHOLMERAID_LEVEL) }, + }; + // Dungeon Difficulty + // Catch alls + D5 = sWorld.getConfig(CONFIG_FLOAT_DUNGEON_DIFF); + D25 = sWorld.getConfig(CONFIG_FLOAT_RAID25_DIFF); + D40 = sWorld.getConfig(CONFIG_FLOAT_RAID40_DIFF); + diff_Multiplier = + { + // WOW Classic Instances + {33, sWorld.getConfig(CONFIG_FLOAT_SHADOWFANGKEEP_DIFF) }, + {34, sWorld.getConfig(CONFIG_FLOAT_STOCKADES_DIFF) }, + {36, sWorld.getConfig(CONFIG_FLOAT_DEADMINES_DIFF) }, + {43, sWorld.getConfig(CONFIG_FLOAT_WAILINGCAVERNS_DIFF) }, + {47, sWorld.getConfig(CONFIG_FLOAT_RAZORFENKRAULINSTANCE_DIFF) }, + {48, sWorld.getConfig(CONFIG_FLOAT_BLACKFATHOM_DIFF) }, + {70, sWorld.getConfig(CONFIG_FLOAT_ULDAMAN_DIFF) }, + {90, sWorld.getConfig(CONFIG_FLOAT_GNOMERAGONINSTANCE_DIFF) }, + {109, sWorld.getConfig(CONFIG_FLOAT_SUNKENTEMPLE_DIFF) }, + {129, sWorld.getConfig(CONFIG_FLOAT_RAZORFENDOWNS_DIFF) }, + {189, sWorld.getConfig(CONFIG_FLOAT_MONASTERYINSTANCES_DIFF) }, // Scarlet + {209, sWorld.getConfig(CONFIG_FLOAT_TANARISINSTANCE_DIFF) }, // Zul'Farrak + {229, sWorld.getConfig(CONFIG_FLOAT_BLACKROCKSPIRE_DIFF) }, + {230, sWorld.getConfig(CONFIG_FLOAT_BLACKROCKDEPTHS_DIFF) }, + {249, sWorld.getConfig(CONFIG_FLOAT_ONYXIALAIRINSTANCE_DIFF) }, + {289, sWorld.getConfig(CONFIG_FLOAT_SCHOOLOFNECROMANCY_DIFF) }, // Scholo + {309, sWorld.getConfig(CONFIG_FLOAT_ZULGURUB_DIFF) }, + {329, sWorld.getConfig(CONFIG_FLOAT_STRATHOLME_DIFF) }, + {349, sWorld.getConfig(CONFIG_FLOAT_MAURADON_DIFF) }, + {389, sWorld.getConfig(CONFIG_FLOAT_ORGRIMMARINSTANCE_DIFF) }, // Ragefire + {409, sWorld.getConfig(CONFIG_FLOAT_MOLTENCORE_DIFF) }, + {429, sWorld.getConfig(CONFIG_FLOAT_DIREMAUL_DIFF) }, + {469, sWorld.getConfig(CONFIG_FLOAT_BLACKWINGLAIR_DIFF) }, + {509, sWorld.getConfig(CONFIG_FLOAT_AHNQIRAJ_DIFF) }, + {531, sWorld.getConfig(CONFIG_FLOAT_AHNQIRAJTEMPLE_DIFF) }, + {533, sWorld.getConfig(CONFIG_FLOAT_STRATHOLMERAID_DIFF) }, + }; + + Map* map = player->GetMap(); + float difficulty = CalculateDifficulty(map, player); + int dunLevel = CalculateDungeonLevel(map, player); + int numInGroup = GetNumInGroup(player); + ApplyBuffs(player, map, difficulty, dunLevel, numInGroup); + } +#endif + if (i_data) i_data->OnPlayerEnter(player); @@ -2935,3 +3022,203 @@ void Map::RemoveFromSpawnCount(const ObjectGuid& guid) { m_spawnedCount[guid.GetEntry()].erase(guid); } + +#ifdef BUILD_SOLOCRAFT +//Set the instance difficulty +int Map::CalculateDifficulty(Map* map, Player* /*player*/) +{ + //float difficulty = 0.0;//changed from 1.0 + if (map) + { + if (diff_Multiplier.find(map->GetId()) == diff_Multiplier.end()) { + //Catch Alls ----------------------5 Dungeons and 40 Raids + if (map->IsRaid()) { + return D40; + } + else if (map->IsDungeon()) { + return D5; + } + } + else + return diff_Multiplier[map->GetId()]; //return the specific dungeon's level + } + return 0; //return 0 +} + +//Set the Dungeon Level +int Map::CalculateDungeonLevel(Map* map, Player* /*player*/) +{ + if (dungeons.find(map->GetId()) == dungeons.end()) + { + return SolocraftDungeonLevel; //map not found returns the catch all value + } + else + return dungeons[map->GetId()]; //return the specific dungeon's level +} + +//Get the group's size +int Map::GetNumInGroup(Player* player) +{ + int numInGroup = 1; + Group* group = player->GetGroup(); + if (group) { + Group::MemberSlotList const& groupMembers = group->GetMemberSlots(); + numInGroup = groupMembers.size(); + } + return numInGroup; +} + +void Map::ApplyBuffs(Player* player, Map* map, float difficulty, int dunLevel, int numInGroup) +{ + int SpellPowerBonus = 0; + //Check whether to buff the player or check to debuff back to normal + if (difficulty != 0) + { + std::ostringstream ss; + if (player->GetLevel() <= dunLevel + SolocraftLevelDiff) //If a player is too high level for dungeon don't buff but if in a group will count towards the group offset balancing. + { + //Get Current members total difficulty offset and if it exceeds the difficulty offset of the dungeon then debuff new group members coming in until all members leave and re-enter. This happens when a player already inside dungeon invite others to the group but the player already has the full difficulty offset. + float GroupDifficulty = GetGroupDifficulty(player); + //Check to either debuff or buff player entering dungeon. Debuff must be enabled in Config + if (GroupDifficulty >= difficulty && SoloCraftDebuffEnable == 1) + { + //Current dungeon offset exceeded - Debuff player + difficulty = (-abs(difficulty)) + (difficulty / numInGroup); + difficulty = roundf(difficulty * 100) / 100; //Float variables suck + + //sLog->outError("%u: would have this difficulty: %f", player->GetGUID(), tempDiff); + } + else + { + //Current Dungeon offset not exceeded - Buff player + //Group difficulty adjustment + difficulty = difficulty / numInGroup; + difficulty = roundf(difficulty * 100) / 100; //Float variables suck - two decimal rounding + } + + //Check Database for a current dungeon entry + QueryResult* result = CharacterDatabase.PQuery("SELECT `GUID`, `Difficulty`, `GroupSize`, `SpellPower`, `Stats` FROM `custom_solocraft_character_stats` WHERE GUID = %u", player->GetGUIDLow()); + + //Modify Player Stats + for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i) //STATS defined/enum in SharedDefines.h + { + if (result) + { + player->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_VALUE, (*result)[1].GetFloat() * (*result)[4].GetFloat(), false); + } + // Buff the player + player->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_VALUE, difficulty * SoloCraftStatsMult, true); //Unitmods enum UNIT_MOD_STAT_START defined in Unit.h line 391 + } + // Set player health + player->SetFullHealth();//defined in Unit.h line 1524 + //Spellcaster Stat modify + if (player->GetPowerType() == POWER_MANA) + { + // Buff the player's mana + player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA)); + + //Check for Dungeon to Dungeon Transfer and remove old Spellpower buff + if (result) + { + // remove spellpower bonus + player->ApplySpellPowerBonus((*result)[3].GetUInt32() * (*result)[4].GetFloat(), false); + } + + //Buff Spellpower + if (difficulty > 0) //Debuffed characters do not get spellpower + { + SpellPowerBonus = static_cast((player->GetLevel() * SoloCraftSpellMult) * difficulty);//Yes, I pulled this calc out of my butt. + player->ApplySpellPowerBonus(SpellPowerBonus, true); + //sLog->outError("%u: spellpower Bonus applied: %i", player->GetGUID(), SpellPowerBonus); + } + } + //Announcements + if (difficulty > 0) + { + // Announce to player - Buff + ss << "|cffFF0000[SoloCraft] |cffFF8000" << player->GetName() << " entered %s - Difficulty Offset: %0.2f. Spellpower Bonus: %i"; + ChatHandler(player->GetSession()).PSendSysMessage(ss.str().c_str(), map->GetMapName(), difficulty, SpellPowerBonus); + } + else + { + // Announce to player - Debuff + ss << "|cffFF0000[SoloCraft] |cffFF8000" << player->GetName() << " entered %s - |cffFF0000BE ADVISED - You have been debuffed by offset: %0.2f. |cffFF8000 A group member already inside has the dungeon's full buff offset. No Spellpower buff will be applied to spell casters. ALL group members must exit the dungeon and re-enter to receive a balanced offset."; + ChatHandler(player->GetSession()).PSendSysMessage(ss.str().c_str(), map->GetMapName(), difficulty); + } + // Save Player Dungeon Offsets to Database + CharacterDatabase.PExecute("REPLACE INTO custom_solocraft_character_stats (GUID, Difficulty, GroupSize, SpellPower, Stats) VALUES (%u, %f, %u, %i, %f)", player->GetGUIDLow(), difficulty, numInGroup, SpellPowerBonus, SoloCraftStatsMult); + } + else + { + // Announce to player - Over Max Level Threshold + ss << "|cffFF0000[SoloCraft] |cffFF8000" << player->GetName() << " entered %s - |cffFF0000You have not been buffed. |cffFF8000 Your level is higher than the max level (%i) threshold for this dungeon."; + ChatHandler(player->GetSession()).PSendSysMessage(ss.str().c_str(), map->GetMapName(), dunLevel + SolocraftLevelDiff); + ClearBuffs(player, map); //Check to revert player back to normal + } + + } + else + { + ClearBuffs(player, map); //Check to revert player back to normal - Moving this here fixed logout and login while in instance buff and debuff issues + } +} + +// Get the current group members GUIDS and return the total sum of the difficulty offset by all group members currently in the dungeon +float Map::GetGroupDifficulty(Player* player) +{ + float GroupDifficulty = 0.0; + Group* group = player->GetGroup(); + if (group) + { + Group::MemberSlotList const& groupMembers = group->GetMemberSlots(); + for (Group::member_citerator itr = groupMembers.begin(); itr != groupMembers.end(); ++itr) + { + //Exclude player from the tally because the player is the one entering the dungeon + if (itr->guid != player->GetGUIDLow()) + { + //Database query to find difficulty for each group member that is currently in an instance + QueryResult* result = CharacterDatabase.PQuery("SELECT `GUID`, `Difficulty`, `GroupSize` FROM `custom_solocraft_character_stats` WHERE GUID = %u", itr->guid); + if (result) + { + //Test for debuffs already give to other members - They cannot be used to determine the total offset because negative numbers will skew the total difficulty offset + if ((*result)[1].GetFloat() > 0) + { + GroupDifficulty = GroupDifficulty + (*result)[1].GetFloat(); + //sLog->outError("%u : Group member GUID in instance: %u", player->GetGUID(), itr->guid); + } + } + } + } + } + return GroupDifficulty; +} + +void Map::ClearBuffs(Player* player, Map* map) +{ + //Database query to get offset from the last instance player exited + QueryResult* result = CharacterDatabase.PQuery("SELECT `GUID`, `Difficulty`, `GroupSize`, `SpellPower`, `Stats` FROM `custom_solocraft_character_stats` WHERE GUID = %u", player->GetGUIDLow()); + if (result) + { + float difficulty = (*result)[1].GetFloat(); + int SpellPowerBonus = (*result)[3].GetUInt32(); + float StatsMultPct = (*result)[4].GetFloat(); + //sLog->outError("Map difficulty: %f", difficulty); + // Inform the player + std::ostringstream ss; + ss << "|cffFF0000[SoloCraft] |cffFF8000" << player->GetName() << " exited to %s - Reverting Difficulty Offset: %0.2f. Spellpower Bonus Removed: %i"; + ChatHandler(player->GetSession()).PSendSysMessage(ss.str().c_str(), map->GetMapName(), difficulty, SpellPowerBonus); + // Clear the buffs + for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i) + { + player->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_VALUE, difficulty * StatsMultPct, false); + } + if (player->GetPowerType() == POWER_MANA && difficulty > 0) + { + // remove spellpower bonus + player->ApplySpellPowerBonus(SpellPowerBonus, false); + } + //Remove database entry as the player is no longer in an instance + CharacterDatabase.PExecute("DELETE FROM custom_solocraft_character_stats WHERE GUID = %u", player->GetGUIDLow()); + } +} +#endif \ No newline at end of file diff --git a/src/game/Maps/Map.h b/src/game/Maps/Map.h index e9a8af4c56..a261fc94ef 100644 --- a/src/game/Maps/Map.h +++ b/src/game/Maps/Map.h @@ -404,6 +404,27 @@ class Map : public GridRefManager bool HasActiveAreas(ContinentArea areaId = MAP_NO_AREA) { if (areaId == MAP_NO_AREA) { return !m_activeAreas.empty(); } else { return !(find(m_activeAreas.begin(), m_activeAreas.end(), areaId) == m_activeAreas.end()); } } bool HasActiveZone(uint32 zoneId) { return find(m_activeZones.begin(), m_activeZones.end(), zoneId) != m_activeZones.end(); } +#ifdef BUILD_SOLOCRAFT + bool SoloCraftDebuffEnable = 1; + float SoloCraftSpellMult = 1.0; + float SoloCraftStatsMult = 100.0; + uint32 SolocraftLevelDiff = 1; + std::map _unitDifficulty; + std::unordered_map dungeons; + std::unordered_map diff_Multiplier; + uint32 SolocraftDungeonLevel = 1; + float D5 = 1.0; + float D25 = 1.0; + float D40 = 1.0; + + int CalculateDifficulty(Map* map, Player* /*player*/); + int CalculateDungeonLevel(Map* map, Player* /*player*/); + int GetNumInGroup(Player* player); + void ApplyBuffs(Player* player, Map* map, float difficulty, int dunLevel, int numInGroup); + float GetGroupDifficulty(Player* player); + void ClearBuffs(Player* player, Map* map); +#endif + private: void LoadMapAndVMap(int gx, int gy); diff --git a/src/game/Server/WorldSession.cpp b/src/game/Server/WorldSession.cpp index c046846df7..94c997be56 100644 --- a/src/game/Server/WorldSession.cpp +++ b/src/game/Server/WorldSession.cpp @@ -764,6 +764,10 @@ void WorldSession::LogoutPlayer() uint32 guid = _player->GetGUIDLow(); #endif +#ifdef BUILD_SOLOCRAFT + CharacterDatabase.PExecute("DELETE FROM custom_solocraft_character_stats WHERE GUID = %u", _player->GetGUIDLow()); +#endif + ///- Remove the player from the world // the player may not be in the world when logging out // e.g if he got disconnected during a transfer to another map diff --git a/src/game/World/World.cpp b/src/game/World/World.cpp index 13155a5bf1..ccbd5c85e9 100644 --- a/src/game/World/World.cpp +++ b/src/game/World/World.cpp @@ -834,6 +834,84 @@ void World::LoadConfigSettings(bool reload) if (reload) sEluna->OnConfigLoad(reload); #endif + +#ifdef BUILD_SOLOCRAFT + // Start Solocraft Config + setConfig(CONFIG_BOOL_SOLOCRAFT_ENABLED, "Solocraft.Enable", true); + setConfig(CONFIG_BOOL_SOLOCRAFT_ANNOUNCE, "Solocraft.Announce", true); + + //Balancing + setConfig(CONFIG_BOOL_SOLOCRAFT_DEBUFF_ENABLE, "SoloCraft.Debuff.Enable", 1); + setConfig(CONFIG_FLOAT_SOLOCRAFT_SPELLPOWER_MULT, "SoloCraft.Spellpower.Mult", 2.5); + setConfig(CONFIG_FLOAT_SOLOCRAFT_STATS_MULT, "SoloCraft.Stats.Mult", 100.0); + //Level Thresholds + setConfig(CONFIG_UINT32_SOLOCRAFT_MAX_LEVEL_DIFF, "Solocraft.Max.Level.Diff", 10); + //Dungeon Values + //Default + setConfig(CONFIG_UINT32_DUNGEON_LEVEL, "Solocraft.Dungeon.Level", 60); + //Classic Instances + setConfig(CONFIG_UINT32_ORGRIMMARINSTANCE_LEVEL, "Solocraft.OrgrimmarInstance.Level", 15); + setConfig(CONFIG_UINT32_SHADOWFANGKEEP_LEVEL, "Solocraft.ShadowfangKeep.Level", 15); + setConfig(CONFIG_UINT32_WAILINGCAVERNS_LEVEL, "Solocraft.WailingCaverns.Level", 17); + setConfig(CONFIG_UINT32_DEADMINES_LEVEL, "Solocraft.Deadmines.Level", 18); + setConfig(CONFIG_UINT32_BLACKFATHOM_LEVEL, "Solocraft.Blackfathom.Level", 20); + setConfig(CONFIG_UINT32_STOCKADES_LEVEL, "Solocraft.Stockades.Level", 22); + setConfig(CONFIG_UINT32_GNOMERAGONINSTANCE_LEVEL, "Solocraft.GnomeragonInstance.Level", 24); + setConfig(CONFIG_UINT32_RAZORFENKRAULINSTANCE_LEVEL, "Solocraft.RazorfenKraulInstance.Level", 30); + setConfig(CONFIG_UINT32_MONASTERYINSTANCES_LEVEL, "Solocraft.MonasteryInstances.Level", 35); + setConfig(CONFIG_UINT32_RAZORFENDOWNS_LEVEL, "Solocraft.RazorfenDowns.Level", 40); + setConfig(CONFIG_UINT32_ULDAMAN_LEVEL, "Solocraft.Uldaman.Level", 40); + setConfig(CONFIG_UINT32_TANARISINSTANCE_LEVEL, "Solocraft.TanarisInstance.Level", 44); + setConfig(CONFIG_UINT32_MAURADON_LEVEL, "Solocraft.Mauradon.Level", 48); + setConfig(CONFIG_UINT32_DIREMAUL_LEVEL, "Solocraft.DireMaul.Level", 48); + setConfig(CONFIG_UINT32_SUNKENTEMPLE_LEVEL, "Solocraft.SunkenTemple.Level", 50); + setConfig(CONFIG_UINT32_BLACKROCKDEPTHS_LEVEL, "Solocraft.BlackrockDepths.Level", 50); + setConfig(CONFIG_UINT32_BLACKROCKSPIRE_LEVEL, "Solocraft.BlackRockSpire.Level", 55); + setConfig(CONFIG_UINT32_SCHOOLOFNECROMANCY_LEVEL, "Solocraft.SchoolofNecromancy.Level", 55); + setConfig(CONFIG_UINT32_STRATHOLME_LEVEL, "Solocraft.Stratholme.Level", 55); + setConfig(CONFIG_UINT32_ONYXIALAIRINSTANCE_LEVEL, "Solocraft.OnyxiaLairInstance.Level", 60); + setConfig(CONFIG_UINT32_MOLTENCORE_LEVEL, "Solocraft.MoltenCore.Level", 60); + setConfig(CONFIG_UINT32_BLACKWINGLAIR_LEVEL, "Solocraft.BlackwingLair.Level", 40); + setConfig(CONFIG_UINT32_ZULGURUB_LEVEL, "Solocraft.Zul'gurub.Level", 60); + setConfig(CONFIG_UINT32_AHNQIRAJ_LEVEL, "Solocraft.AhnQiraj.Level", 60); + setConfig(CONFIG_UINT32_AHNQIRAJTEMPLE_LEVEL, "Solocraft.AhnQirajTemple.Level", 60); + setConfig(CONFIG_UINT32_STRATHOLMERAID_LEVEL, "Solocraft.StratholmeRaid.Level", 60); + + //Dungeon Difficulty + //Catch alls + setConfig(CONFIG_FLOAT_DUNGEON_DIFF, "Solocraft.Dungeon", 5.0); + setConfig(CONFIG_FLOAT_RAID25_DIFF, "Solocraft.Raid25", 25.0); + setConfig(CONFIG_FLOAT_RAID40_DIFF, "Solocraft.Raid40", 40.0); + //Classic Instances + setConfig(CONFIG_FLOAT_ORGRIMMARINSTANCE_DIFF, "Solocraft.OrgrimmarInstance", 5.0); + setConfig(CONFIG_FLOAT_SHADOWFANGKEEP_DIFF, "Solocraft.ShadowfangKeep", 5.0); + setConfig(CONFIG_FLOAT_WAILINGCAVERNS_DIFF, "Solocraft.WailingCaverns", 5.0); + setConfig(CONFIG_FLOAT_DEADMINES_DIFF, "Solocraft.Deadmines", 5.0); + setConfig(CONFIG_FLOAT_BLACKFATHOM_DIFF, "Solocraft.Blackfathom", 5.0); + setConfig(CONFIG_FLOAT_STOCKADES_DIFF, "Solocraft.Stockades", 5.0); + setConfig(CONFIG_FLOAT_GNOMERAGONINSTANCE_DIFF, "Solocraft.GnomeragonInstance", 5.0); + setConfig(CONFIG_FLOAT_RAZORFENKRAULINSTANCE_DIFF, "Solocraft.RazorfenKraulInstance", 5.0); + setConfig(CONFIG_FLOAT_MONASTERYINSTANCES_DIFF, "Solocraft.MonasteryInstances", 5.0); + setConfig(CONFIG_FLOAT_RAZORFENDOWNS_DIFF, "Solocraft.RazorfenDowns", 5.0); + setConfig(CONFIG_FLOAT_ULDAMAN_DIFF, "Solocraft.Uldaman", 5.0); + setConfig(CONFIG_FLOAT_TANARISINSTANCE_DIFF, "Solocraft.TanarisInstance", 5.0); + setConfig(CONFIG_FLOAT_MAURADON_DIFF, "Solocraft.Mauradon", 5.0); + setConfig(CONFIG_FLOAT_DIREMAUL_DIFF, "Solocraft.DireMaul", 5.0); + setConfig(CONFIG_FLOAT_SUNKENTEMPLE_DIFF, "Solocraft.SunkenTemple", 5.0); + setConfig(CONFIG_FLOAT_BLACKROCKDEPTHS_DIFF, "Solocraft.BlackrockDepths", 5.0); + setConfig(CONFIG_FLOAT_BLACKROCKSPIRE_DIFF, "Solocraft.BlackRockSpire", 10.0); + setConfig(CONFIG_FLOAT_SCHOOLOFNECROMANCY_DIFF, "Solocraft.SchoolofNecromancy", 5.0); + setConfig(CONFIG_FLOAT_STRATHOLME_DIFF, "Solocraft.Stratholme", 5.0); + setConfig(CONFIG_FLOAT_ONYXIALAIRINSTANCE_DIFF, "Solocraft.OnyxiaLairInstance", 40.0); + setConfig(CONFIG_FLOAT_MOLTENCORE_DIFF, "Solocraft.MoltenCore", 40.0); + setConfig(CONFIG_FLOAT_BLACKWINGLAIR_DIFF, "Solocraft.BlackwingLair", 40.0); + setConfig(CONFIG_FLOAT_ZULGURUB_DIFF, "Solocraft.Zul'gurub", 20.0); + setConfig(CONFIG_FLOAT_AHNQIRAJ_DIFF, "Solocraft.AhnQiraj", 20.0); + setConfig(CONFIG_FLOAT_AHNQIRAJTEMPLE_DIFF, "Solocraft.AhnQirajTemple", 40.0); + setConfig(CONFIG_FLOAT_STRATHOLMERAID_DIFF, "Solocraft.StratholmeRaid", 40.0); + //End Solocraft Config +#endif + sLog.outString(); } diff --git a/src/game/World/World.h b/src/game/World/World.h index 15531ec5cc..4e1a32f3ab 100644 --- a/src/game/World/World.h +++ b/src/game/World/World.h @@ -198,6 +198,39 @@ enum eConfigUInt32Values CONFIG_UINT32_CREATURE_PICKPOCKET_RESTOCK_DELAY, CONFIG_UINT32_CHANNEL_STATIC_AUTO_TRESHOLD, CONFIG_UINT32_LFG_MATCHMAKING_TIMER, +#ifdef BUILD_SOLOCRAFT + //Level Thresholds + CONFIG_UINT32_SOLOCRAFT_MAX_LEVEL_DIFF, + //Default Instance Level + CONFIG_UINT32_DUNGEON_LEVEL, + //Classic Instances + CONFIG_UINT32_ORGRIMMARINSTANCE_LEVEL, + CONFIG_UINT32_SHADOWFANGKEEP_LEVEL, + CONFIG_UINT32_WAILINGCAVERNS_LEVEL, + CONFIG_UINT32_DEADMINES_LEVEL, + CONFIG_UINT32_BLACKFATHOM_LEVEL, + CONFIG_UINT32_STOCKADES_LEVEL, + CONFIG_UINT32_GNOMERAGONINSTANCE_LEVEL, + CONFIG_UINT32_RAZORFENKRAULINSTANCE_LEVEL, + CONFIG_UINT32_MONASTERYINSTANCES_LEVEL, + CONFIG_UINT32_RAZORFENDOWNS_LEVEL, + CONFIG_UINT32_ULDAMAN_LEVEL, + CONFIG_UINT32_TANARISINSTANCE_LEVEL, + CONFIG_UINT32_MAURADON_LEVEL, + CONFIG_UINT32_DIREMAUL_LEVEL, + CONFIG_UINT32_SUNKENTEMPLE_LEVEL, + CONFIG_UINT32_BLACKROCKDEPTHS_LEVEL, + CONFIG_UINT32_BLACKROCKSPIRE_LEVEL, + CONFIG_UINT32_SCHOOLOFNECROMANCY_LEVEL, + CONFIG_UINT32_STRATHOLME_LEVEL, + CONFIG_UINT32_ONYXIALAIRINSTANCE_LEVEL, + CONFIG_UINT32_MOLTENCORE_LEVEL, + CONFIG_UINT32_BLACKWINGLAIR_LEVEL, + CONFIG_UINT32_ZULGURUB_LEVEL, + CONFIG_UINT32_AHNQIRAJ_LEVEL, + CONFIG_UINT32_AHNQIRAJTEMPLE_LEVEL, + CONFIG_UINT32_STRATHOLMERAID_LEVEL, +#endif CONFIG_UINT32_VALUE_COUNT }; @@ -284,6 +317,42 @@ enum eConfigFloatValues CONFIG_FLOAT_GHOST_RUN_SPEED_WORLD, CONFIG_FLOAT_GHOST_RUN_SPEED_BG, CONFIG_FLOAT_LEASH_RADIUS, +#ifdef BUILD_SOLOCRAFT + //Balancing + CONFIG_FLOAT_SOLOCRAFT_SPELLPOWER_MULT, + CONFIG_FLOAT_SOLOCRAFT_STATS_MULT, + //Dungeon Catch-all + CONFIG_FLOAT_DUNGEON_DIFF, + CONFIG_FLOAT_RAID25_DIFF, + CONFIG_FLOAT_RAID40_DIFF, + //Classic Instances + CONFIG_FLOAT_ORGRIMMARINSTANCE_DIFF, + CONFIG_FLOAT_SHADOWFANGKEEP_DIFF, + CONFIG_FLOAT_WAILINGCAVERNS_DIFF, + CONFIG_FLOAT_DEADMINES_DIFF, + CONFIG_FLOAT_BLACKFATHOM_DIFF, + CONFIG_FLOAT_STOCKADES_DIFF, + CONFIG_FLOAT_GNOMERAGONINSTANCE_DIFF, + CONFIG_FLOAT_RAZORFENKRAULINSTANCE_DIFF, + CONFIG_FLOAT_MONASTERYINSTANCES_DIFF, + CONFIG_FLOAT_RAZORFENDOWNS_DIFF, + CONFIG_FLOAT_ULDAMAN_DIFF, + CONFIG_FLOAT_TANARISINSTANCE_DIFF, + CONFIG_FLOAT_MAURADON_DIFF, + CONFIG_FLOAT_DIREMAUL_DIFF, + CONFIG_FLOAT_SUNKENTEMPLE_DIFF, + CONFIG_FLOAT_BLACKROCKDEPTHS_DIFF, + CONFIG_FLOAT_BLACKROCKSPIRE_DIFF, + CONFIG_FLOAT_SCHOOLOFNECROMANCY_DIFF, + CONFIG_FLOAT_STRATHOLME_DIFF, + CONFIG_FLOAT_ONYXIALAIRINSTANCE_DIFF, + CONFIG_FLOAT_MOLTENCORE_DIFF, + CONFIG_FLOAT_BLACKWINGLAIR_DIFF, + CONFIG_FLOAT_ZULGURUB_DIFF, + CONFIG_FLOAT_AHNQIRAJ_DIFF, + CONFIG_FLOAT_AHNQIRAJTEMPLE_DIFF, + CONFIG_FLOAT_STRATHOLMERAID_DIFF, +#endif CONFIG_FLOAT_VALUE_COUNT }; @@ -349,6 +418,11 @@ enum eConfigBoolValues CONFIG_BOOL_MMAP_ENABLED, #ifdef BUILD_ELUNA CONFIG_BOOL_ELUNA_ENABLED, +#endif +#ifdef BUILD_SOLOCRAFT + CONFIG_BOOL_SOLOCRAFT_ENABLED, + CONFIG_BOOL_SOLOCRAFT_ANNOUNCE, + CONFIG_BOOL_SOLOCRAFT_DEBUFF_ENABLE, #endif CONFIG_BOOL_PLAYER_COMMANDS, CONFIG_BOOL_AUTOLOAD_ACTIVE, diff --git a/src/mangosd/CMakeLists.txt b/src/mangosd/CMakeLists.txt index 336bc7e64d..fa6a341ca0 100644 --- a/src/mangosd/CMakeLists.txt +++ b/src/mangosd/CMakeLists.txt @@ -167,6 +167,11 @@ if (BUILD_IKE3_BOTS) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ahbot.conf.dist DESTINATION ${CONF_DIR}) endif() +# Define BUILD_SOLOCRAFT if needed +if (BUILD_SOLOCRAFT) +add_definitions(-DBUILD_SOLOCRAFT) +endif() + if(MSVC) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${EXECUTABLE_NAME}.pdb DESTINATION ${BIN_DIR} CONFIGURATIONS Debug) endif() diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index ad1b65076e..47d2d603a1 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -3,7 +3,7 @@ ##################################### [MangosdConf] -ConfVersion=2022012301 +ConfVersion=2022021201 ################################################################################################################### # CONNECTIONS AND DIRECTORIES @@ -1792,3 +1792,333 @@ Dummy.Debug2 = 0 Eluna.Enabled = 1 Eluna.TraceBack = false Eluna.ScriptPath = "lua_scripts" + +################################################################################################################### +# SOLOCRAFT SETTINGS +# +# Solocraft.Enable +# Enable Solocraft module +# Default: 1 (Enabled) +# 0 (Disabled) +# +# Solocraft.Announce +# Announce the module when the player logs in? +# Default: 1 (Enabled) +# 0 (Disabled) +# +# Solocraft.Debuff.Enable +# Enable Debuff of new party members who enter the dungeon to avoid overloading the dungeon? +# Overloading is when a group member already in the dungeon has the full offset/buff of the +# dungeon applied then they invite new group members who enter the dungeon and also receive an +# offset which creates a huge imbalance. +# The debuff will make the new members weak until all members leave the instance/dungeon +# instance/dungeon and re-enter which will then split the offset among all the group members. +# Default: 1 (Enabled) +# 0 (Disabled) +# +# SoloCraft.Spellpower.Mult +# Spellpower Bonus Multiplier +# Spellcasters spellpower bonus multiplier to offset no spellpower received from stats +# Formula: (player->level * multiplier) * difficulty +# Example Level 24 Mage with default modifier and a dungeon difficulty of 5 will receive a base +# Spellpower increase of 300. +# Default: 2.5 +# 0.0 (Disabled) +# +# SoloCraft.Stats.Mult +# Stats Percentage Bonus Multiplier +# Forumla: player->Stats * (difficulty * multiplier) +# Default: 100.0 +# 0.0 (Disable) +# +# Solocraft.Max.Level.Diff +# Max player level difference over the Dungeon's Level for Solocraft to apply the difficulty offset buff. +# Default: 10 +# Disable: 60 +# +# Solocraft.Dungeon +# Difficulty offset for unhandled/undefined dungeons +# Default: 5.0 +# +# Solocraft.Raid25 +# Difficulty offset for unhandled/undefined 25-man raids +# Default: 25.0 +# +# Solocraft.Raid40 +# Difficulty offset for unhandled/undefined 40-man raids +# Default: 40.0 +# +# Solocraft.Dungeon.Level +# Base level for unhandled/undefined dungeons/raids +# Default: 60 +# +# Solocraft.OrgrimmarInstance +# Difficulty offset for Ragefire Chasm +# Default: 5.0 +# +# Solocraft.ShadowfangKeep +# Difficulty offset for Shadowfang Keep +# Default: 5.0 +# +# Solocraft.WailingCaverns +# Difficulty offset for Wailing Caverns +# Default: 5.0 +# +# Solocraft.Deadmines +# Difficulty offset for Deadmines +# Default: 5.0 +# +# Solocraft.Blackfathom +# Difficulty offset for Blackfathom Deeps +# Default: 5.0 +# +# Solocraft.Stockades +# Difficulty offset for Stormwind Stockades +# Default: 5.0 +# +# Solocraft.GnomeragonInstance +# Difficulty offset for Gnomeragon +# Default: 5.0 +# +# Solocraft.RazorfenKraulInstance +# Difficulty offset for Razorfen Kraul +# Default: 5.0 +# +# Solocraft.MonasteryInstances +# Difficulty offset for Scarlet Monastery Dungeons +# Default: 5.0 +# +# Solocraft.RazorfenDowns +# Difficulty offset for Razonfen Downs +# Default: 5.0 +# +# Solocraft.Uldaman +# Difficulty offset for Uldaman +# Default: 5.0 +# +# Solocraft.TanarisInstance +# Difficulty offset for Zul'Farrak +# Default: 5.0 +# +# Solocraft.Mauradon +# Difficulty offset for Maruadon +# Default: 5.0 +# +# Solocraft.DireMaul +# Difficulty offset for Dire Maul +# Default: 5.0 +# +# Solocraft.SunkenTemple +# Difficulty offset for The Temple of Atal'Hakkar aka Sunken Temple +# Default: 5.0 +# +# Solocraft.BlackrockDepths +# Difficulty offset for Blackrock Depths +# Default: 5.0 +# +# Solocraft.BlackRockSpire +# Difficulty offset for Blackrock Spire, both lower and upper +# Default: 10.0 +# +# Solocraft.SchoolofNecromancy +# Difficulty offset for Scholomance +# Default: 5.0 +# +# Solocraft.Stratholme +# Difficulty offset for Stratholme +# Default: 5.0 +# +# Solocraft.OnyxiaLairInstance +# Difficulty offset for Onyxia's Lair +# Default: 40.0 +# +# Solocraft.MoltenCore +# Difficulty offset for Molten Core +# Default: 40.0 +# +# Solocraft.BlackwingLair +# Difficulty offset for Blackwing Lair +# Default: 40.0 +# +# Solocraft.Zul'gurub +# Difficulty offset for Zul'gurub +# Default: 20.0 +# +# Solocraft.AhnQiraj +# Difficulty offset for the Ruins of Ahn'Qiraj +# Default: 20.0 +# +# Solocraft.AhnQirajTemple +# Difficulty offset for the Temple of Ahn'Qiraj +# Default: 40.0 +# +# Solocraft.StratholmeRaid +# Difficulty offset for Naxxramas +# Default: 40.0 +# +# Solocraft.OrgrimmarInstance.Level +# Base level for Ragefire Chasm +# Default: 15 +# +# Solocraft.ShadowfangKeep.Level +# Base level for Shadowfang Keep +# Default: 15 +# +# Solocraft.WailingCaverns.Level +# Base level for Wailing Caverns +# Default: 17 +# +# Solocraft.Deadmines.Level +# Base level for Deadmines +# Default: 18 +# +# Solocraft.Blackfathom.Level +# Base level for Blackfathom Deeps +# Default: 20 +# +# Solocraft.Stockades.Level +# Base level for Stormwind Stockades +# Default: 22 +# +# Solocraft.GnomeragonInstance.Level +# Base level for Gnomeragon +# Default: 24 +# +# Solocraft.RazorfenKraulInstance.Level +# Base level for Razonfen Kraul +# Default: 30 +# +# Solocraft.MonasteryInstances.Level +# Base level for Scarlet Monastery dungeons +# Default: 35 +# +# Solocraft.RazorfenDowns.Level +# Base level for Razorfen Downs +# Default: 40 +# +# Solocraft.Uldaman.Level +# Base level for Uldaman +# Default: 40 +# +# Solocraft.TanarisInstance.Level +# Base level for Zul'Farrak +# Default: 44 +# +# Solocraft.Mauradon.Level +# Base level for Mauradon +# Default: 48 +# +# Solocraft.DireMaul.Level +# Base level for Dire Maul +# Default: 48 +# +# Solocraft.SunkenTemple.Level +# Base level for The Temple of Atal'Hakkar aka Sunken Temple +# Default: 50 +# +# Solocraft.BlackrockDepths.Level +# Base level for Blackrock Depths +# Default: 50 +# +# Solocraft.BlackRockSpire.Level +# Base level for Blackrock Spire, both lower and upper +# Default: 55 +# +# Solocraft.SchoolofNecromancy.Level +# Base level for Scholomance +# Default: 55 +# +# Solocraft.Stratholme.Level +# Base level for Stratholme +# Default: 55 +# +# Solocraft.OnyxiaLairInstance.Level +# Base level for Onyxia's Lair +# Default: 60 +# +# Solocraft.MoltenCore.Level +# Base level for Molten Core +# Default: 60 +# +# Solocraft.BlackwingLair.Level +# Base level for Blackwing Lair +# Default: 60 +# +# Solocraft.Zul'gurub.Level +# Base level for Zul'gurub +# Default: 60 +# +# Solocraft.AhnQiraj.Level +# Base level for the Ruins of Ahn'Qiraj +# Default: 60 +# +# Solocraft.AhnQirajTemple.Level +# Base level for the Temple of Ahn'Qiraj +# Default: 60 +# +# Solocraft.StratholmeRaid.Level +# Base level for Naxxramas +# Default: 60 +################################################################################################################### +Solocraft.Enable = 1 +Solocraft.Announce = 1 +SoloCraft.Debuff.Enable = 1 +SoloCraft.Spellpower.Mult = 2.5 +SoloCraft.Stats.Mult = 100.0 +Solocraft.Max.Level.Diff = 10 +Solocraft.Dungeon = 5.0 +Solocraft.Raid25 = 25.0 +Solocraft.Raid40 = 40.0 +Solocraft.Dungeon.Level = 60 +Solocraft.OrgrimmarInstance = 5.0 +Solocraft.ShadowfangKeep = 5.0 +Solocraft.WailingCaverns = 5.0 +Solocraft.Deadmines = 5.0 +Solocraft.Blackfathom = 5.0 +Solocraft.Stockades = 5.0 +Solocraft.GnomeragonInstance = 5.0 +Solocraft.RazorfenKraulInstance = 5.0 +Solocraft.MonasteryInstances = 5.0 +Solocraft.RazorfenDowns = 5.0 +Solocraft.Uldaman = 5.0 +Solocraft.TanarisInstance = 5.0 +Solocraft.Mauradon = 5.0 +Solocraft.DireMaul = 5.0 +Solocraft.SunkenTemple = 5.0 +Solocraft.BlackrockDepths = 5.0 +Solocraft.BlackRockSpire = 10.0 +Solocraft.SchoolofNecromancy = 5.0 +Solocraft.Stratholme = 5.0 +Solocraft.OnyxiaLairInstance = 40.0 +Solocraft.MoltenCore = 40.0 +Solocraft.BlackwingLair = 40.0 +Solocraft.Zul'gurub = 20.0 +Solocraft.AhnQiraj = 20.0 +Solocraft.AhnQirajTemple = 40.0 +Solocraft.StratholmeRaid = 40.0 +Solocraft.OrgrimmarInstance.Level = 15 +Solocraft.ShadowfangKeep.Level = 15 +Solocraft.WailingCaverns.Level = 17 +Solocraft.Deadmines.Level = 18 +Solocraft.Blackfathom.Level = 20 +Solocraft.Stockades.Level = 22 +Solocraft.GnomeragonInstance.Level = 24 +Solocraft.RazorfenKraulInstance.Level = 30 +Solocraft.MonasteryInstances.Level = 35 +Solocraft.RazorfenDowns.Level = 40 +Solocraft.Uldaman.Level = 40 +Solocraft.TanarisInstance.Level = 44 +Solocraft.Mauradon.Level = 48 +Solocraft.DireMaul.Level = 48 +Solocraft.SunkenTemple.Level = 50 +Solocraft.BlackrockDepths.Level = 50 +Solocraft.BlackRockSpire.Level = 55 +Solocraft.SchoolofNecromancy.Level = 55 +Solocraft.Stratholme.Level = 55 +Solocraft.OnyxiaLairInstance.Level = 60 +Solocraft.MoltenCore.Level = 60 +Solocraft.BlackwingLair.Level = 60 +Solocraft.Zul'gurub.Level = 60 +Solocraft.AhnQiraj.Level = 60 +Solocraft.AhnQirajTemple.Level = 60 +Solocraft.StratholmeRaid.Level = 60 diff --git a/src/shared/SystemConfig.h b/src/shared/SystemConfig.h index fe461148ed..ea0a2ad851 100644 --- a/src/shared/SystemConfig.h +++ b/src/shared/SystemConfig.h @@ -37,7 +37,7 @@ // Format is YYYYMMDDRR where RR is the change in the conf file // for that day. #ifndef _MANGOSDCONFVERSION -# define _MANGOSDCONFVERSION 2022012301 +# define _MANGOSDCONFVERSION 2022021201 #endif #ifndef _REALMDCONFVERSION # define _REALMDCONFVERSION 2021031501