Skip to content

Commit

Permalink
fix: Dont load disabled data
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyeriah committed Oct 13, 2024
1 parent d14d2d7 commit a83a683
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mod_zone_difficulty_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,15 @@ void ZoneDifficulty::LoadMapDifficultySettings()
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 ";

if (QueryResult result = WorldDatabase.Query("SELECT * FROM zone_difficulty_info"))
if (QueryResult result = WorldDatabase.Query("SELECT * FROM zone_difficulty_info WHERE Enabled > 0"))
{
do
{
uint32 mapId = (*result)[0].Get<uint32>();
uint32 phaseMask = (*result)[1].Get<uint32>();
ZoneDifficultyNerfData data;
int8 mode = (*result)[6].Get<int8>();

if (sZoneDifficulty->HasNormalMode(mode))
{
data.HealingNerfPct = (*result)[2].Get<float>();
Expand Down

0 comments on commit a83a683

Please sign in to comment.