From 22bb77a8932fd83d0e52d9e3ca81011391540182 Mon Sep 17 00:00:00 2001 From: blkht01 <25400057+blkht01@users.noreply.github.com> Date: Thu, 30 May 2024 01:05:25 +0200 Subject: [PATCH 1/8] Update handling of config value for InNormalDungeons Inverse the handling of config value InNormalDungeons Added new category: "Other" for stuff like mounts, currencies, etc.. Added Gnomeregan and RFK --- src/mod_zone_difficulty_handler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mod_zone_difficulty_handler.cpp b/src/mod_zone_difficulty_handler.cpp index 67a4a8ce..4733b6fa 100644 --- a/src/mod_zone_difficulty_handler.cpp +++ b/src/mod_zone_difficulty_handler.cpp @@ -96,6 +96,7 @@ void ZoneDifficulty::LoadMapDifficultySettings() sZoneDifficulty->ItemIcons[ITEMTYPE_MAIL] = "|TInterface\\icons\\inv_chest_chain_13:15|t "; sZoneDifficulty->ItemIcons[ITEMTYPE_PLATE] = "|TInterface\\icons\\inv_chest_plate12:15|t "; sZoneDifficulty->ItemIcons[ITEMTYPE_WEAPONS] = "|TInterface\\icons\\inv_mace_25:15|t |TInterface\\icons\\inv_shield_27:15|t |TInterface\\icons\\inv_weapon_crossbow_04:15|t "; + sZoneDifficulty->ItemIcons[ITEMTYPE_OTHER] = "|TInterface\\icons\\inv_jewelcrafting_shadowspirit_01:15|t "; if (QueryResult result = WorldDatabase.Query("SELECT * FROM zone_difficulty_info")) { From b11afeb25832bfc4895d1a2d2258faae7f52e581 Mon Sep 17 00:00:00 2001 From: blkht01 <25400057+blkht01@users.noreply.github.com> Date: Thu, 30 May 2024 01:17:14 +0200 Subject: [PATCH 2/8] Update handling of config value for InNormalDungeons Inverse the handling of config value InNormalDungeons Added new category: "Other" for stuff like mounts, currencies, etc.. Added Gnomeregan and RFK --- src/ZoneDifficulty.h | 1 + src/mod_zone_difficulty_handler.cpp | 10 ++++++++++ src/mod_zone_difficulty_scripts.cpp | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ZoneDifficulty.h b/src/ZoneDifficulty.h index eac63477..db621439 100644 --- a/src/ZoneDifficulty.h +++ b/src/ZoneDifficulty.h @@ -102,6 +102,7 @@ uint32 const ITEMTYPE_LEATHER = 3; uint32 const ITEMTYPE_MAIL = 4; uint32 const ITEMTYPE_PLATE = 5; uint32 const ITEMTYPE_WEAPONS = 6; +uint32 const ITEMTYPE_OTHER = 7; uint32 const TARGET_NONE = 0; uint32 const TARGET_SELF = 1; diff --git a/src/mod_zone_difficulty_handler.cpp b/src/mod_zone_difficulty_handler.cpp index 4733b6fa..d7a6f2dc 100644 --- a/src/mod_zone_difficulty_handler.cpp +++ b/src/mod_zone_difficulty_handler.cpp @@ -66,6 +66,10 @@ void ZoneDifficulty::LoadMapDifficultySettings() HeroicTBCQuestMapList[554] = 11386; // The Mechanar HeroicTBCQuestMapList[545] = 11370; // The Steamvault + // Category 1 + EncounterCounter[47] = 5; // Razorfen Kraul + EncounterCounter[90] = 5; // Gnomeregan + // Category 8 EncounterCounter[542] = 3; // Blood Furnace EncounterCounter[543] = 3; // Hellfire Ramparts @@ -472,6 +476,9 @@ std::string ZoneDifficulty::GetItemTypeString(uint32 type) case ITEMTYPE_WEAPONS: typestring = "Weapons and Shields"; break; + case ITEMTYPE_OTHER: + typestring = "Emblem, Vanity, Consumables, and other items"; + break; default: LOG_ERROR("module", "MOD-ZONE-DIFFICULTY: Unknown type {} in ZoneDifficulty::GetItemTypeString.", type); } @@ -1009,6 +1016,9 @@ bool ZoneDifficulty::HasCompletedFullTier(uint32 category, uint32 playerGuid) std::vector MapList; switch (category) { + case TYPE_VANILLA: + MapList = { 47, 90 }; + break; case TYPE_HEROIC_TBC: //585 is Magister's Terrace. Only add when released. MapList = { 269, 540, 542, 543, 545, 547, 546, 552, 553, 554, 555, 556, 557, 558, 560/*, 585*/ }; diff --git a/src/mod_zone_difficulty_scripts.cpp b/src/mod_zone_difficulty_scripts.cpp index ce5a5339..8a48b0e0 100644 --- a/src/mod_zone_difficulty_scripts.cpp +++ b/src/mod_zone_difficulty_scripts.cpp @@ -600,7 +600,7 @@ class mod_zone_difficulty_globalscript : public GlobalScript } uint32 instanceId = instance->GetInstanceId(); if (!sZoneDifficulty->IsMythicmodeMap(instance->GetId()) || - (!sZoneDifficulty->MythicmodeInNormalDungeons && !instance->IsRaidOrHeroicDungeon())) + (sZoneDifficulty->MythicmodeInNormalDungeons && !instance->IsRaidOrHeroicDungeon())) { //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: OnBeforeSetBossState: Instance not handled because there is no Mythicmode loot data for map id: {}", instance->GetId()); return; @@ -697,7 +697,7 @@ class mod_zone_difficulty_globalscript : public GlobalScript { sZoneDifficulty->AddMythicmodeScore(map, sZoneDifficulty->Expansion[mapId], score); } - else if (map->IsRaid()) + else if (map->IsRaid() || sZoneDifficulty->MythicmodeInNormalDungeons) { sZoneDifficulty->AddMythicmodeScore(map, sZoneDifficulty->Expansion[mapId], score); } From 7c3e65821f7e50e5a34ac8ca81d0c785089b1741 Mon Sep 17 00:00:00 2001 From: blkht01 <25400057+blkht01@users.noreply.github.com> Date: Sat, 1 Jun 2024 14:28:45 +0200 Subject: [PATCH 3/8] Comment LOG_INFO --- .../world/2024_0_29_qeme-rfk-heroic.sql | 3 + src/mod_zone_difficulty_handler.cpp | 22 +++-- src/mod_zone_difficulty_scripts.cpp | 84 +++++++++++++------ 3 files changed, 75 insertions(+), 34 deletions(-) create mode 100644 data/sql/updates/world/2024_0_29_qeme-rfk-heroic.sql diff --git a/data/sql/updates/world/2024_0_29_qeme-rfk-heroic.sql b/data/sql/updates/world/2024_0_29_qeme-rfk-heroic.sql new file mode 100644 index 00000000..6f145cd7 --- /dev/null +++ b/data/sql/updates/world/2024_0_29_qeme-rfk-heroic.sql @@ -0,0 +1,3 @@ +-- let all normal dungeon creatures spawn in heroic mode as well +UPDATE creature SET spawnMask = 3 WHERE map = 47 + diff --git a/src/mod_zone_difficulty_handler.cpp b/src/mod_zone_difficulty_handler.cpp index d7a6f2dc..2bf146e7 100644 --- a/src/mod_zone_difficulty_handler.cpp +++ b/src/mod_zone_difficulty_handler.cpp @@ -49,6 +49,7 @@ void ZoneDifficulty::LoadMapDifficultySettings() NerfInfo[DUEL_INDEX][0].SpellDamageBuffPct = 1; // Heroic Quest -> MapId Translation + HeroicTBCQuestMapList[47] = 90135; // Razorfen Kraul HeroicTBCQuestMapList[542] = 11362; // Blood Furnace HeroicTBCQuestMapList[543] = 11354; // Hellfire Ramparts HeroicTBCQuestMapList[547] = 11368; // Slave Pens @@ -273,13 +274,13 @@ void ZoneDifficulty::LoadMapDifficultySettings() if (data.Chance != 0 && data.Spell != 0 && ((data.Target >= 1 && data.Target <= 6) || data.Target == 18)) { sZoneDifficulty->MythicmodeAI[creatureEntry].push_back(data); - LOG_INFO("module", "MOD-ZONE-DIFFICULTY: New AI for entry {} with spell {}", creatureEntry, data.Spell); + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: New AI for entry {} with spell {}", creatureEntry, data.Spell); } else { LOG_ERROR("module", "MOD-ZONE-DIFFICULTY: Unknown type for `Target`: {} in zone_difficulty_mythicmode_ai", data.Target); } - //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: New creature with entry: {} has exception for hp: {}", creatureEntry, hpModifier); + ////LOG_INFO("module", "MOD-ZONE-DIFFICULTY: New creature with entry: {} has exception for hp: {}", creatureEntry, hpModifier); } } while (result->NextRow()); } @@ -324,7 +325,7 @@ void ZoneDifficulty::LoadMapDifficultySettings() //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Loading tier reward with entry {} has enchant {} in slot {}. contentType: {} itemType: {}", data.Entry, data.Enchant, data.EnchantSlot, contentType, itemType); } } - //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Total items in Rewards map: {}.", i); + ////LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Total items in Rewards map: {}.", i); } while (result->NextRow()); } else @@ -348,7 +349,7 @@ void ZoneDifficulty::LoadMythicmodeInstanceData() /* debugging * for (int i = 0; i < int(instanceIDs.size()); i++) * { - * LOG_INFO("module", "MOD-ZONE-DIFFICULTY: ZoneDifficulty::LoadMythicmodeInstanceData: id {} exists: {}:", i, instanceIDs[i]); + * //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: ZoneDifficulty::LoadMythicmodeInstanceData: id {} exists: {}:", i, instanceIDs[i]); * } * end debugging */ @@ -361,7 +362,7 @@ void ZoneDifficulty::LoadMythicmodeInstanceData() if (instanceIDs[InstanceId]) { - LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Loading from DB for instanceId {}: MythicmodeOn = {}", InstanceId, MythicmodeOn); + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Loading from DB for instanceId {}: MythicmodeOn = {}", InstanceId, MythicmodeOn); sZoneDifficulty->MythicmodeInstanceData[InstanceId] = MythicmodeOn; } else @@ -420,11 +421,11 @@ void ZoneDifficulty::LoadMythicmodeScoreData() { for (int i = 0; i < sZoneDifficulty->EncounterCounter[MapId]; ++i) { - LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Initializing player record for PlayerGuid {} in MapId {} for BossId {}: False", PlayerGuid, MapId, i); + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Initializing player record for PlayerGuid {} in MapId {} for BossId {}: False", PlayerGuid, MapId, i); sZoneDifficulty->Logs[PlayerGuid][MapId][i] = false; } } - LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Setting player record for PlayerGuid {} in MapId {} for BossId {}: True", PlayerGuid, MapId, BossID); + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Setting player record for PlayerGuid {} in MapId {} for BossId {}: True", PlayerGuid, MapId, BossID); sZoneDifficulty->Logs[PlayerGuid][MapId][BossID] = true; } while (result->NextRow()); } @@ -582,7 +583,7 @@ void ZoneDifficulty::AddMythicmodeScore(Map* map, uint32 type, uint32 score) //if (sZoneDifficulty->IsDebugInfoEnabled) //{ - // LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Player {} new score: {}", player->GetName(), sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()][type]); + // //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Player {} new score: {}", player->GetName(), sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()][type]); //} std::string typestring = sZoneDifficulty->GetContentTypeString(type); @@ -602,7 +603,7 @@ void ZoneDifficulty::DeductMythicmodeScore(Player* player, uint32 type, uint32 s // NULL check happens in the calling function if (sZoneDifficulty->IsDebugInfoEnabled) { - LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Reducing score with type {} from player with guid {} by {}.", type, player->GetGUID().GetCounter(), score); + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Reducing score with type {} from player with guid {} by {}.", type, player->GetGUID().GetCounter(), score); } sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()][type] = sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()][type] - score; CharacterDatabase.Execute("REPLACE INTO zone_difficulty_mythicmode_score VALUES({}, {}, {})", player->GetGUID().GetCounter(), type, sZoneDifficulty->MythicmodeScore[player->GetGUID().GetCounter()][type]); @@ -681,12 +682,15 @@ bool ZoneDifficulty::IsMythicmodeMap(uint32 mapId) { if (!sZoneDifficulty->MythicmodeEnable) { + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Mythicmode is disabled."); return false; } if (sZoneDifficulty->MythicmodeLoot.find(mapId) == sZoneDifficulty->MythicmodeLoot.end()) { + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: No Mythicmode data found for mapId {}.", mapId); return false; } + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Mythicmode data found for mapId {}.", mapId); return true; } diff --git a/src/mod_zone_difficulty_scripts.cpp b/src/mod_zone_difficulty_scripts.cpp index 8a48b0e0..3b87124b 100644 --- a/src/mod_zone_difficulty_scripts.cpp +++ b/src/mod_zone_difficulty_scripts.cpp @@ -592,42 +592,77 @@ class mod_zone_difficulty_globalscript : public GlobalScript { if (!sZoneDifficulty->MythicmodeEnable) { + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Mythicmode is disabled."); return; } + if (sZoneDifficulty->IsDebugInfoEnabled) { - //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: OnBeforeSetBossState: bossId = {}, newState = {}, oldState = {}, MapId = {}, InstanceId = {}", id, newState, oldState, instance->GetId(), instance->GetInstanceId()); + //LOG_INFO("module", + "MOD-ZONE-DIFFICULTY: OnBeforeSetBossState: bossId = {}, newState = {}, oldState = {}, MapId = {}, InstanceId = {}", + id, newState, oldState, instance->GetId(), instance->GetInstanceId()); } + uint32 instanceId = instance->GetInstanceId(); + + // Check if the map is eligible for Mythicmode if (!sZoneDifficulty->IsMythicmodeMap(instance->GetId()) || (sZoneDifficulty->MythicmodeInNormalDungeons && !instance->IsRaidOrHeroicDungeon())) { - //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: OnBeforeSetBossState: Instance not handled because there is no Mythicmode loot data for map id: {}", instance->GetId()); + //LOG_INFO("module", + "MOD-ZONE-DIFFICULTY: OnBeforeSetBossState: Instance not handled because there is no Mythicmode loot data for map id: {}", + instance->GetId()); return; } + + // Handle transition to IN_PROGRESS state if (oldState != IN_PROGRESS && newState == IN_PROGRESS) { + //LOG_INFO("module", + "MOD-ZONE-DIFFICULTY: Encounter started. Map relevant. Checking for Mythicmode: {}", + sZoneDifficulty->MythicmodeInstanceData[instanceId]); if (sZoneDifficulty->MythicmodeInstanceData[instanceId]) { + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Mythicmode is on."); sZoneDifficulty->EncountersInProgress[instanceId] = GameTime::GetGameTime().count(); } } + // Handle transition from IN_PROGRESS to DONE state else if (oldState == IN_PROGRESS && newState == DONE) { if (sZoneDifficulty->MythicmodeInstanceData[instanceId]) { - //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Mythicmode is on."); - if (sZoneDifficulty->EncountersInProgress.find(instanceId) != sZoneDifficulty->EncountersInProgress.end() && sZoneDifficulty->EncountersInProgress[instanceId] != 0) + //LOG_INFO("module", "\033[33mMOD-ZONE-DIFFICULTY: Mythicmode is on.\033[0m"); + + if (sZoneDifficulty->EncountersInProgress.find(instanceId) != sZoneDifficulty->EncountersInProgress.end() && + sZoneDifficulty->EncountersInProgress[instanceId] != 0) { Map::PlayerList const& PlayerList = instance->GetPlayers(); + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { Player* player = i->GetSource(); + if (!player->IsGameMaster() && !player->IsDeveloper()) { + //LOG_INFO("module", + "MOD-ZONE-DIFFICULTY: Encounter completed. Map relevant. Checking for source: {}", + player->GetGUID().GetCounter()); + // Log the encounter for non-GM and non-developer players CharacterDatabase.Execute( "REPLACE INTO `zone_difficulty_encounter_logs` VALUES({}, {}, {}, {}, {}, {}, {})", - instanceId, sZoneDifficulty->EncountersInProgress[instanceId], GameTime::GetGameTime().count(), instance->GetId(), id, player->GetGUID().GetCounter(), 64); + instanceId, sZoneDifficulty->EncountersInProgress[instanceId], + GameTime::GetGameTime().count(), instance->GetId(), id, + player->GetGUID().GetCounter(), 64); + } + else + { + // Log the encounter for GM and developer players with an additional flag + CharacterDatabase.Execute( + "REPLACE INTO `zone_difficulty_encounter_logs` VALUES({}, {}, {}, {}, {}, {}, {}, 1)", + instanceId, sZoneDifficulty->EncountersInProgress[instanceId], + GameTime::GetGameTime().count(), instance->GetId(), id, + player->GetGUID().GetCounter(), 64); } } } @@ -701,12 +736,11 @@ class mod_zone_difficulty_globalscript : public GlobalScript { sZoneDifficulty->AddMythicmodeScore(map, sZoneDifficulty->Expansion[mapId], score); } - /* debug - * else - * { - * LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Map with id {} is not a raid or a dungeon. Mythicmode loot not granted.", map->GetInstanceId()); - * } - */ + // debug + else + { + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Map with id {} is not a raid or a dungeon. Mythicmode loot not granted.", map->GetInstanceId()); + } } } } @@ -995,7 +1029,7 @@ class mod_zone_difficulty_rewardnpc : public CreatureScript gossip.append(" to receive this item. Before i can give it to you, you need to complete the whole dungeon where it can be obtained."); creature->Whisper(gossip, LANG_UNIVERSAL, player); /* debug - * LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Player missing achiement with ID {} to obtain item with category {}, itemType {}, counter {}", + * //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Player missing achiement with ID {} to obtain item with category {}, itemType {}, counter {}", * sZoneDifficulty->Rewards[category][itemType][counter].Achievement, category, itemType, counter); * end debug */ @@ -1184,11 +1218,11 @@ class mod_zone_difficulty_dungeonmaster : public CreatureScript { //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: OnGossipHelloChromie"); Group* group = player->GetGroup(); - if (group && group->IsLfgRandomInstance() && !player->GetMap()->IsRaid()) - { - creature->Whisper("I am sorry, time-traveler. You can not accept challenges here. You need to choose a specific dungeon in order to play my history lessons.", LANG_UNIVERSAL, player); - return true; - } + //if (group && group->IsLfgRandomInstance() && !player->GetMap()->IsRaid()) // Qeme + // if (group && !player->GetMap()->IsRaid()) { + // creature->Whisper("I am sorry, time-traveler. You can not accept challenges here. You need to choose a specific dungeon in order to play my history lessons.", LANG_UNIVERSAL, player); + // return true; + // } if (!group && !player->IsGameMaster()) { creature->Whisper("I am sorry, time-traveler. You can not play my history lessons on your own. Bring some friends?", LANG_UNIVERSAL, player); @@ -1239,7 +1273,7 @@ class mod_zone_difficulty_allcreaturescript : public AllCreatureScript } if (!map->IsRaid() && - (!(map->IsHeroic() && map->IsDungeon()))) + (!(map->IsHeroic() && !map->IsDungeon()))) { return; } @@ -1296,10 +1330,10 @@ class mod_zone_difficulty_allcreaturescript : public AllCreatureScript { return; } - //if (sZoneDifficulty->IsDebugInfoEnabled) - //{ + if (sZoneDifficulty->IsDebugInfoEnabled) + { //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Modify creature hp for Mythic Mode: {} to {}", baseHealth, newHp); - //} + } bool hpIsFull = false; if (creature->GetHealthPct() >= 100) { @@ -1321,10 +1355,10 @@ class mod_zone_difficulty_allcreaturescript : public AllCreatureScript { if (creature->GetMaxHealth() == newHp) { - //if (sZoneDifficulty->IsDebugInfoEnabled) - //{ - // //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Modify creature hp for normal mode: {} to {}", baseHealth, baseHealth); - //} + if (sZoneDifficulty->IsDebugInfoEnabled) + { + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Modify creature hp for normal mode: {} to {}", baseHealth, baseHealth); + } bool hpIsFull = false; if (creature->GetHealthPct() >= 100) { From 8aa879edffc0771503c4f081f134e8b22a6feaa5 Mon Sep 17 00:00:00 2001 From: blkht01 <25400057+blkht01@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:44:13 +0200 Subject: [PATCH 4/8] Added config value, correcting some typos and cleaning up according to feedback --- conf/mod-zone-difficulty.conf.dist | 8 +++++ .../world/2024_06_03_qeme-add-gm-col.sql | 3 ++ src/ZoneDifficulty.h | 1 + src/mod_zone_difficulty_handler.cpp | 1 - src/mod_zone_difficulty_scripts.cpp | 31 ++++++++++--------- 5 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 data/sql/updates/world/2024_06_03_qeme-add-gm-col.sql diff --git a/conf/mod-zone-difficulty.conf.dist b/conf/mod-zone-difficulty.conf.dist index c161f27d..5f471d0f 100644 --- a/conf/mod-zone-difficulty.conf.dist +++ b/conf/mod-zone-difficulty.conf.dist @@ -68,3 +68,11 @@ ModZoneDifficulty.Mythicmode.HpModifier = 2.0 # 1 - Enabled ModZoneDifficulty.Mythicmode.InNormalDungeons = 0 + +# +# ModZoneDifficulty.LfgAllowed +# Description: Enable or disable mythic mode for LFG dungeons. +# Default: 0 - Disabled +# 1 - Enabled + +ModZoneDifficulty.LfgAllowed = 0 diff --git a/data/sql/updates/world/2024_06_03_qeme-add-gm-col.sql b/data/sql/updates/world/2024_06_03_qeme-add-gm-col.sql new file mode 100644 index 00000000..9ea9b570 --- /dev/null +++ b/data/sql/updates/world/2024_06_03_qeme-add-gm-col.sql @@ -0,0 +1,3 @@ +-- Column to flag log entry for GM/Dev players. +ALTER TABLE zone_difficulty_encounter_logs +ADD COLUMN IF NOT EXISTS IsDev TINYINT(3) NULL DEFAULT 0 COMMENT ''; \ No newline at end of file diff --git a/src/ZoneDifficulty.h b/src/ZoneDifficulty.h index db621439..4c609616 100644 --- a/src/ZoneDifficulty.h +++ b/src/ZoneDifficulty.h @@ -148,6 +148,7 @@ class ZoneDifficulty float MythicmodeHpModifier{ 2.0 }; bool MythicmodeEnable{ false }; bool MythicmodeInNormalDungeons{ false }; + bool LfgAllowed{ false }; // Config value for mythicmode on/off in LFG dungeons std::vector DailyHeroicQuests; std::map HeroicTBCQuestMapList; std::map EncounterCounter; diff --git a/src/mod_zone_difficulty_handler.cpp b/src/mod_zone_difficulty_handler.cpp index 2bf146e7..c03375aa 100644 --- a/src/mod_zone_difficulty_handler.cpp +++ b/src/mod_zone_difficulty_handler.cpp @@ -49,7 +49,6 @@ void ZoneDifficulty::LoadMapDifficultySettings() NerfInfo[DUEL_INDEX][0].SpellDamageBuffPct = 1; // Heroic Quest -> MapId Translation - HeroicTBCQuestMapList[47] = 90135; // Razorfen Kraul HeroicTBCQuestMapList[542] = 11362; // Blood Furnace HeroicTBCQuestMapList[543] = 11354; // Hellfire Ramparts HeroicTBCQuestMapList[547] = 11368; // Slave Pens diff --git a/src/mod_zone_difficulty_scripts.cpp b/src/mod_zone_difficulty_scripts.cpp index 3b87124b..ab8178c5 100644 --- a/src/mod_zone_difficulty_scripts.cpp +++ b/src/mod_zone_difficulty_scripts.cpp @@ -573,6 +573,7 @@ class mod_zone_difficulty_worldscript : public WorldScript sZoneDifficulty->MythicmodeHpModifier = sConfigMgr->GetOption("ModZoneDifficulty.Mythicmode.HpModifier", 2); sZoneDifficulty->MythicmodeEnable = sConfigMgr->GetOption("ModZoneDifficulty.Mythicmode.Enable", false); sZoneDifficulty->MythicmodeInNormalDungeons = sConfigMgr->GetOption("ModZoneDifficulty.Mythicmode.InNormalDungeons", false); + sZoneDifficulty->LfgAllowed = sConfigMgr->GetOption("ModZoneDifficulty.LfgAllowed", false); // Config value for mythicmode on/off in LFG dungeons sZoneDifficulty->LoadMapDifficultySettings(); } @@ -599,8 +600,8 @@ class mod_zone_difficulty_globalscript : public GlobalScript if (sZoneDifficulty->IsDebugInfoEnabled) { //LOG_INFO("module", - "MOD-ZONE-DIFFICULTY: OnBeforeSetBossState: bossId = {}, newState = {}, oldState = {}, MapId = {}, InstanceId = {}", - id, newState, oldState, instance->GetId(), instance->GetInstanceId()); + // "MOD-ZONE-DIFFICULTY: OnBeforeSetBossState: bossId = {}, newState = {}, oldState = {}, MapId = {}, InstanceId = {}", + // id, newState, oldState, instance->GetId(), instance->GetInstanceId()); } uint32 instanceId = instance->GetInstanceId(); @@ -610,8 +611,8 @@ class mod_zone_difficulty_globalscript : public GlobalScript (sZoneDifficulty->MythicmodeInNormalDungeons && !instance->IsRaidOrHeroicDungeon())) { //LOG_INFO("module", - "MOD-ZONE-DIFFICULTY: OnBeforeSetBossState: Instance not handled because there is no Mythicmode loot data for map id: {}", - instance->GetId()); + // "MOD-ZONE-DIFFICULTY: OnBeforeSetBossState: Instance not handled because there is no Mythicmode loot data for map id: {}", + // instance->GetId()); return; } @@ -619,8 +620,8 @@ class mod_zone_difficulty_globalscript : public GlobalScript if (oldState != IN_PROGRESS && newState == IN_PROGRESS) { //LOG_INFO("module", - "MOD-ZONE-DIFFICULTY: Encounter started. Map relevant. Checking for Mythicmode: {}", - sZoneDifficulty->MythicmodeInstanceData[instanceId]); + // "MOD-ZONE-DIFFICULTY: Encounter started. Map relevant. Checking for Mythicmode: {}", + // sZoneDifficulty->MythicmodeInstanceData[instanceId]); if (sZoneDifficulty->MythicmodeInstanceData[instanceId]) { //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Mythicmode is on."); @@ -632,7 +633,7 @@ class mod_zone_difficulty_globalscript : public GlobalScript { if (sZoneDifficulty->MythicmodeInstanceData[instanceId]) { - //LOG_INFO("module", "\033[33mMOD-ZONE-DIFFICULTY: Mythicmode is on.\033[0m"); + //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Mythicmode is on."); if (sZoneDifficulty->EncountersInProgress.find(instanceId) != sZoneDifficulty->EncountersInProgress.end() && sZoneDifficulty->EncountersInProgress[instanceId] != 0) @@ -646,8 +647,8 @@ class mod_zone_difficulty_globalscript : public GlobalScript if (!player->IsGameMaster() && !player->IsDeveloper()) { //LOG_INFO("module", - "MOD-ZONE-DIFFICULTY: Encounter completed. Map relevant. Checking for source: {}", - player->GetGUID().GetCounter()); + // "MOD-ZONE-DIFFICULTY: Encounter completed. Map relevant. Checking for source: {}", + // player->GetGUID().GetCounter()); // Log the encounter for non-GM and non-developer players CharacterDatabase.Execute( "REPLACE INTO `zone_difficulty_encounter_logs` VALUES({}, {}, {}, {}, {}, {}, {})", @@ -659,7 +660,7 @@ class mod_zone_difficulty_globalscript : public GlobalScript { // Log the encounter for GM and developer players with an additional flag CharacterDatabase.Execute( - "REPLACE INTO `zone_difficulty_encounter_logs` VALUES({}, {}, {}, {}, {}, {}, {}, 1)", + "REPLACE INTO `zone_difficulty_encounter_logs` VALUES({}, {}, {}, {}, {}, {}, {}, -1)", instanceId, sZoneDifficulty->EncountersInProgress[instanceId], GameTime::GetGameTime().count(), instance->GetId(), id, player->GetGUID().GetCounter(), 64); @@ -1218,11 +1219,11 @@ class mod_zone_difficulty_dungeonmaster : public CreatureScript { //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: OnGossipHelloChromie"); Group* group = player->GetGroup(); - //if (group && group->IsLfgRandomInstance() && !player->GetMap()->IsRaid()) // Qeme - // if (group && !player->GetMap()->IsRaid()) { - // creature->Whisper("I am sorry, time-traveler. You can not accept challenges here. You need to choose a specific dungeon in order to play my history lessons.", LANG_UNIVERSAL, player); - // return true; - // } + if (group && group->IsLfgRandomInstance() && !player->GetMap()->IsRaid() && !sZoneDifficulty->LfgAllowed) + { + creature->Whisper("I am sorry, time-traveler. You can not accept challenges here. You need to choose a specific dungeon in order to play my history lessons.", LANG_UNIVERSAL, player); + return true; + } if (!group && !player->IsGameMaster()) { creature->Whisper("I am sorry, time-traveler. You can not play my history lessons on your own. Bring some friends?", LANG_UNIVERSAL, player); From f67aaa88d58eb30cf3a5dad584d684c0b94abc14 Mon Sep 17 00:00:00 2001 From: blkht01 <25400057+blkht01@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:45:14 +0200 Subject: [PATCH 5/8] Loginfo --- conf/mod-zone-difficulty.conf | 78 +++++++++++++++++++++++++++++ src/mod_zone_difficulty_scripts.cpp | 2 +- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 conf/mod-zone-difficulty.conf diff --git a/conf/mod-zone-difficulty.conf b/conf/mod-zone-difficulty.conf new file mode 100644 index 00000000..e8425541 --- /dev/null +++ b/conf/mod-zone-difficulty.conf @@ -0,0 +1,78 @@ +# +# Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 +# + +[worldserver] + +######################################## +# ModZoneDifficulty +######################################## +# +# ModZoneDifficulty.Enable +# Description: Enable my module. +# Default: 0 - Disabled +# 1 - Enabled +# + +ModZoneDifficulty.Enable = 1 + +# +# ModZoneDifficulty.DebugInfo +# Description: Displays debug data for absorbs. +# Default: 0 - Disabled +# 1 - Enabled +# + +ModZoneDifficulty.DebugInfo = 0 + +# +# ModZoneDifficulty.SpellBuff.OnlyBosses +# Description: Spell damage buffs will only affect bosses. +# Default: 0 - Disabled +# 1 - Enabled +# + +ModZoneDifficulty.SpellBuff.OnlyBosses = 0 + +# +# ModZoneDifficulty.MeleeBuff.OnlyBosses +# Description: Melee damage buffs will only affect bosses. +# Default: 0 - Disabled +# 1 - Enabled +# + +ModZoneDifficulty.MeleeBuff.OnlyBosses = 0 + +# +# ModZoneDifficulty.Mythicmode.Enable +# Description: Enable or disable the mythic mode. +# Default: 0 - Disabled +# 1 - Enabled + +ModZoneDifficulty.Mythicmode.Enable = 1 + +# +# ModZoneDifficulty.Mythicmode.HpModifier +# Description: Modifier for creature HP except bosses in mythic mode. +# Possible to override per creature by adding data to `zone_difficulty_mythicmode_creatureoverrides`. +# Default: 2.0 - 200% HP +# + +ModZoneDifficulty.Mythicmode.HpModifier = 2.0 + +# +# ModZoneDifficulty.Mythicmode.InNormalDungeons +# Description: Enable or disable mythic mode in non-heroic 5man dungeons. +# Dungeonmaster NPCs still need to be spawned. They only appear in heroic 5mans and raids by default. +# Default: 0 - Disabled +# 1 - Enabled + +ModZoneDifficulty.Mythicmode.InNormalDungeons = 0 + +# +# ModZoneDifficulty.LfgAllowed +# Description: Enable or disable mythic mode for LFG dungeons. +# Default: 0 - Disabled +# 1 - Enabled + +ModZoneDifficulty.LfgAllowed = 1 diff --git a/src/mod_zone_difficulty_scripts.cpp b/src/mod_zone_difficulty_scripts.cpp index ab8178c5..86681eb3 100644 --- a/src/mod_zone_difficulty_scripts.cpp +++ b/src/mod_zone_difficulty_scripts.cpp @@ -1358,7 +1358,7 @@ class mod_zone_difficulty_allcreaturescript : public AllCreatureScript { if (sZoneDifficulty->IsDebugInfoEnabled) { - //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Modify creature hp for normal mode: {} to {}", baseHealth, baseHealth); + LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Modify creature hp for normal mode: {} to {}", baseHealth, baseHealth); } bool hpIsFull = false; if (creature->GetHealthPct() >= 100) From fccf40212e05bcd7247489b33874e2bd4f100d60 Mon Sep 17 00:00:00 2001 From: blkht01 <25400057+blkht01@users.noreply.github.com> Date: Sat, 15 Jun 2024 00:59:21 +0200 Subject: [PATCH 6/8] Improve score assignment logic based on Override value --- src/mod_zone_difficulty_scripts.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mod_zone_difficulty_scripts.cpp b/src/mod_zone_difficulty_scripts.cpp index 86681eb3..de8690f1 100644 --- a/src/mod_zone_difficulty_scripts.cpp +++ b/src/mod_zone_difficulty_scripts.cpp @@ -690,7 +690,7 @@ class mod_zone_difficulty_globalscript : public GlobalScript } if (!source) { - //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: source is a nullptr in OnAfterUpdateEncounterState"); + LOG_INFO("module", "MOD-ZONE-DIFFICULTY: source is a nullptr in OnAfterUpdateEncounterState"); return; } @@ -705,24 +705,30 @@ class mod_zone_difficulty_globalscript : public GlobalScript if (!sZoneDifficulty->IsMythicmodeMap(mapId) || (!sZoneDifficulty->MythicmodeInNormalDungeons && !map->IsRaidOrHeroicDungeon())) { - //LOG_INFO("module", "MOD-ZONE-DIFFICULTY: No additional loot stored in map with id {}.", map->GetInstanceId()); + LOG_INFO("module", "MOD-ZONE-DIFFICULTY: No additional loot stored in map with id {}.", map->GetInstanceId()); return; } bool SourceAwardsMythicmodeLoot = false; //iterate over all listed creature entries for that map id and see, if the encounter should yield Mythicmode loot and if there is an override to the default behaviour + // Qeme for (auto value : sZoneDifficulty->MythicmodeLoot[mapId]) { if (value.EncounterEntry == source->GetEntry()) { SourceAwardsMythicmodeLoot = true; - if (!(value.Override & 1)) + if (value.Override & 1) { - score = 1; + score = value.Override; // Set score to Override value if it exists (zone_difficulty_mythicmode_instance_data.override) + } + else + { + score = 1; // Default score } break; } } + // Qeme if (!SourceAwardsMythicmodeLoot) { From 55cce90b5d83d3f56e21aacfd7b22e2d3248ba93 Mon Sep 17 00:00:00 2001 From: blkht01 <25400057+blkht01@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:25:18 +0200 Subject: [PATCH 7/8] Create 15062024_qeme_backup_reward_items_for_T9.sql --- ...062024_qeme_backup_reward_items_for_T9.sql | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 data/backups/15062024_qeme_backup_reward_items_for_T9.sql diff --git a/data/backups/15062024_qeme_backup_reward_items_for_T9.sql b/data/backups/15062024_qeme_backup_reward_items_for_T9.sql new file mode 100644 index 00000000..3aa7dec2 --- /dev/null +++ b/data/backups/15062024_qeme_backup_reward_items_for_T9.sql @@ -0,0 +1,64 @@ +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=13583 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 7, 13583, 20, 0, 0, 0, 1, 'Panda Cub for clearing all T4 raids on Mythicmode'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28774 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 28774, 10, 0, 0, 0, 1, 'Glaive of the Pit +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28775 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 4, 28775, 10, 0, 0, 0, 1, 'Thundering Greathelm +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28776 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 3, 28776, 10, 0, 0, 0, 1, 'Liar\'s Tongue Gloves +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28777 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 1, 28777, 10, 0, 0, 0, 1, 'Cloak of the Pit Stalker +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28778 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 3, 28778, 10, 0, 0, 0, 1, 'Terror Pit Girdle +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28779 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 4, 28779, 10, 0, 0, 0, 1, 'Girdle of the Endless Pit +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28780 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 2, 28780, 10, 0, 0, 0, 1, 'Soul-Eater\'s Handwraps +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28781 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 28781, 10, 0, 0, 0, 1, 'Karaborian Talisman +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28782 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 28782, 10, 0, 0, 0, 1, 'Crystalheart Pulse-Staff +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28783 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 28783, 10, 0, 0, 0, 1, 'Eredar Wand of Obliteration +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28789 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 1, 28789, 10, 0, 0, 0, 1, 'Eye of Magtheridon +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28794 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 28794, 10, 0, 0, 0, 1, 'Axe of the Gronn Lords +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28795 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 4, 28795, 10, 0, 0, 0, 1, 'Bladespire Warbands +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28796 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 3, 28796, 10, 0, 0, 0, 1, 'Malefic Mask of the Shadows +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28797 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 1, 28797, 10, 0, 0, 0, 1, 'Brute Cloak of the Ogre-Magi +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28799 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 2, 28799, 10, 0, 0, 0, 1, 'Belt of Divine Inspiration +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28800 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 28800, 10, 0, 0, 0, 1, 'Hammer of the Naaru +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28801 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 3, 28801, 10, 0, 0, 0, 1, 'Maulgar\'s Warhelm +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28802 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 28802, 10, 0, 0, 0, 1, 'Bloodmaw Magus-Blade +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28803 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 3, 28803, 10, 0, 0, 0, 1, 'Cowl of Nature\'s Breath +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28804 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 2, 28804, 10, 0, 0, 0, 1, 'Collar of Cho\'gall +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28810 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 3, 28810, 10, 0, 0, 0, 1, 'Windshear Boots +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28822 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 1, 28822, 10, 0, 0, 0, 1, 'Teeth of Gruul +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28823 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 1, 28823, 10, 0, 0, 0, 1, 'Eye of Gruul +7 SP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28824 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 4, 28824, 10, 0, 0, 0, 1, 'Gauntlets of Martial Perfection +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28825 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 28825, 10, 0, 0, 0, 1, 'Aldori Legacy Defender +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28826 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 28826, 10, 0, 0, 0, 1, 'Shuriken of Negation +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28827 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 3, 28827, 10, 0, 0, 0, 1, 'Gauntlets of the Dragonslayer +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28828 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 3, 28828, 10, 0, 0, 0, 1, 'Gronn-Stitched Girdle +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=28830 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 1, 28830, 10, 0, 0, 0, 1, 'Dragonspine Trophy +14 AP'); +DELETE FROM `zone_difficulty_mythicmode_rewards` WHERE `ContentType`=9 AND `Entry`=29458 AND `Enchant`=0; +INSERT INTO `zone_difficulty_mythicmode_rewards` (`ContentType`, `ItemType`, `Entry`, `Price`, `Enchant`, `EnchantSlot`, `Achievement`, `Enabled`, `Comment`) VALUES (9, 6, 29458, 10, 0, 0, 0, 1, 'Aegis of the Vindicator +7 SP'); From 068663477045d2729ade8f3b94a8c5be6a36cd53 Mon Sep 17 00:00:00 2001 From: blkht01 <25400057+blkht01@users.noreply.github.com> Date: Sun, 23 Jun 2024 02:55:05 +0200 Subject: [PATCH 8/8] update PR with requested changes remove .conf add empty gh line to sql --- .gitignore | 1 + conf/mod-zone-difficulty.conf | 78 ------------------- .../world/2024_06_03_qeme-add-gm-col.sql | 2 +- 3 files changed, 2 insertions(+), 79 deletions(-) delete mode 100644 conf/mod-zone-difficulty.conf diff --git a/.gitignore b/.gitignore index cc69717f..833076b3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ #Generic # +*.conf .directory .mailmap *.orig diff --git a/conf/mod-zone-difficulty.conf b/conf/mod-zone-difficulty.conf deleted file mode 100644 index e8425541..00000000 --- a/conf/mod-zone-difficulty.conf +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 -# - -[worldserver] - -######################################## -# ModZoneDifficulty -######################################## -# -# ModZoneDifficulty.Enable -# Description: Enable my module. -# Default: 0 - Disabled -# 1 - Enabled -# - -ModZoneDifficulty.Enable = 1 - -# -# ModZoneDifficulty.DebugInfo -# Description: Displays debug data for absorbs. -# Default: 0 - Disabled -# 1 - Enabled -# - -ModZoneDifficulty.DebugInfo = 0 - -# -# ModZoneDifficulty.SpellBuff.OnlyBosses -# Description: Spell damage buffs will only affect bosses. -# Default: 0 - Disabled -# 1 - Enabled -# - -ModZoneDifficulty.SpellBuff.OnlyBosses = 0 - -# -# ModZoneDifficulty.MeleeBuff.OnlyBosses -# Description: Melee damage buffs will only affect bosses. -# Default: 0 - Disabled -# 1 - Enabled -# - -ModZoneDifficulty.MeleeBuff.OnlyBosses = 0 - -# -# ModZoneDifficulty.Mythicmode.Enable -# Description: Enable or disable the mythic mode. -# Default: 0 - Disabled -# 1 - Enabled - -ModZoneDifficulty.Mythicmode.Enable = 1 - -# -# ModZoneDifficulty.Mythicmode.HpModifier -# Description: Modifier for creature HP except bosses in mythic mode. -# Possible to override per creature by adding data to `zone_difficulty_mythicmode_creatureoverrides`. -# Default: 2.0 - 200% HP -# - -ModZoneDifficulty.Mythicmode.HpModifier = 2.0 - -# -# ModZoneDifficulty.Mythicmode.InNormalDungeons -# Description: Enable or disable mythic mode in non-heroic 5man dungeons. -# Dungeonmaster NPCs still need to be spawned. They only appear in heroic 5mans and raids by default. -# Default: 0 - Disabled -# 1 - Enabled - -ModZoneDifficulty.Mythicmode.InNormalDungeons = 0 - -# -# ModZoneDifficulty.LfgAllowed -# Description: Enable or disable mythic mode for LFG dungeons. -# Default: 0 - Disabled -# 1 - Enabled - -ModZoneDifficulty.LfgAllowed = 1 diff --git a/data/sql/updates/world/2024_06_03_qeme-add-gm-col.sql b/data/sql/updates/world/2024_06_03_qeme-add-gm-col.sql index 9ea9b570..8de7b438 100644 --- a/data/sql/updates/world/2024_06_03_qeme-add-gm-col.sql +++ b/data/sql/updates/world/2024_06_03_qeme-add-gm-col.sql @@ -1,3 +1,3 @@ -- Column to flag log entry for GM/Dev players. ALTER TABLE zone_difficulty_encounter_logs -ADD COLUMN IF NOT EXISTS IsDev TINYINT(3) NULL DEFAULT 0 COMMENT ''; \ No newline at end of file +ADD COLUMN IF NOT EXISTS IsDev TINYINT(3) NULL DEFAULT 0 COMMENT '';