@@ -75,14 +75,15 @@ class mod_zone_difficulty_unitscript : public UnitScript
75
75
if (matchingPhase != -1 )
76
76
{
77
77
Map* map = target->GetMap ();
78
- if (sZoneDifficulty ->HasNormalMode (mode))
78
+ uint32 instanceId = map->GetInstanceId ();
79
+ bool isMythicMode = sZoneDifficulty ->MythicmodeInstanceData [instanceId];
80
+
81
+ if (!isMythicMode && sZoneDifficulty ->HasNormalMode (mode))
79
82
absorb = scaleAbsorb (absorb, sZoneDifficulty ->NerfInfo [mapId][matchingPhase].AbsorbNerfPct );
80
83
81
- if (sZoneDifficulty ->HasMythicmode (mode) && sZoneDifficulty ->MythicmodeInstanceData [target->GetMap ()->GetInstanceId ()])
82
- {
84
+ if (isMythicMode && sZoneDifficulty ->HasMythicmode (mode))
83
85
if (map->IsRaid () || (map->IsHeroic () && map->IsDungeon ()))
84
86
absorb = scaleAbsorb (absorb, sZoneDifficulty ->NerfInfo [mapId][matchingPhase].AbsorbNerfPctHard );
85
- }
86
87
}
87
88
else if (sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].Enabled > 0 && nerfInDuel)
88
89
absorb = scaleAbsorb (absorb, sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].AbsorbNerfPct );
@@ -178,17 +179,18 @@ class mod_zone_difficulty_unitscript : public UnitScript
178
179
if (matchingPhase != -1 )
179
180
{
180
181
Map* map = target->GetMap ();
181
- if (sZoneDifficulty ->HasNormalMode (mode))
182
+ uint32 instanceId = map->GetInstanceId ();
183
+ bool isMythicMode = sZoneDifficulty ->MythicmodeInstanceData [instanceId];
184
+
185
+ if (!isMythicMode && sZoneDifficulty ->HasNormalMode (mode))
182
186
heal = heal * sZoneDifficulty ->NerfInfo [mapId][matchingPhase].HealingNerfPct ;
183
187
184
- if (sZoneDifficulty -> HasMythicmode (mode) && sZoneDifficulty ->MythicmodeInstanceData [map-> GetInstanceId ()] )
188
+ if (isMythicMode && sZoneDifficulty ->HasMythicmode (mode) )
185
189
if (map->IsRaid () || (map->IsHeroic () && map->IsDungeon ()))
186
190
heal = heal * sZoneDifficulty ->NerfInfo [mapId][matchingPhase].HealingNerfPctHard ;
187
191
}
188
192
else if (sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].Enabled > 0 && nerfInDuel)
189
- {
190
193
heal = heal * sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].HealingNerfPct ;
191
- }
192
194
}
193
195
}
194
196
}
@@ -234,19 +236,19 @@ class mod_zone_difficulty_unitscript : public UnitScript
234
236
{
235
237
int8 mode = sZoneDifficulty ->NerfInfo [mapId][matchingPhase].Enabled ;
236
238
Map* map = target->GetMap ();
239
+ uint32 instanceId = map->GetInstanceId ();
240
+ bool isMythicMode = sZoneDifficulty ->MythicmodeInstanceData [instanceId];
237
241
238
- if (sZoneDifficulty ->HasNormalMode (mode))
242
+ if (!isMythicMode && sZoneDifficulty ->HasNormalMode (mode))
239
243
damage = damage * sZoneDifficulty ->NerfInfo [mapId][matchingPhase].SpellDamageBuffPct ;
240
244
241
- if (sZoneDifficulty -> HasMythicmode (mode) && sZoneDifficulty ->MythicmodeInstanceData [map-> GetInstanceId ()] )
245
+ if (isMythicMode && sZoneDifficulty ->HasMythicmode (mode) )
242
246
if (map->IsRaid () || (map->IsHeroic () && map->IsDungeon ()))
243
247
damage = damage * sZoneDifficulty ->NerfInfo [mapId][matchingPhase].SpellDamageBuffPctHard ;
244
248
}
245
249
else if (sZoneDifficulty ->ShouldNerfInDuels (target))
246
- {
247
250
if (sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].Enabled > 0 )
248
251
damage = damage * sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].SpellDamageBuffPct ;
249
- }
250
252
251
253
if (sZoneDifficulty ->IsDebugInfoEnabled && attacker)
252
254
if (Player* player = attacker->ToPlayer ())
@@ -309,19 +311,19 @@ class mod_zone_difficulty_unitscript : public UnitScript
309
311
{
310
312
int8 mode = sZoneDifficulty ->NerfInfo [mapId][matchingPhase].Enabled ;
311
313
Map* map = target->GetMap ();
314
+ uint32 instanceId = map->GetInstanceId ();
315
+ bool isMythicMode = sZoneDifficulty ->MythicmodeInstanceData [instanceId];
312
316
313
- if (sZoneDifficulty ->HasNormalMode (mode))
317
+ if (!isMythicMode && sZoneDifficulty ->HasNormalMode (mode))
314
318
damage = damage * sZoneDifficulty ->NerfInfo [mapId][matchingPhase].SpellDamageBuffPct ;
315
319
316
- if (sZoneDifficulty -> HasMythicmode (mode) && sZoneDifficulty ->MythicmodeInstanceData [map-> GetInstanceId ()] )
320
+ if (isMythicMode && sZoneDifficulty ->HasMythicmode (mode) )
317
321
if (map->IsRaid () || (map->IsHeroic () && map->IsDungeon ()))
318
322
damage = damage * sZoneDifficulty ->NerfInfo [mapId][matchingPhase].SpellDamageBuffPctHard ;
319
323
}
320
324
else if (sZoneDifficulty ->ShouldNerfInDuels (target))
321
- {
322
325
if (sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].Enabled > 0 )
323
326
damage = damage * sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].SpellDamageBuffPct ;
324
- }
325
327
326
328
if (sZoneDifficulty ->IsDebugInfoEnabled && target)
327
329
if (Player* player = target->ToPlayer ()) // Pointless check? Perhaps.
@@ -351,19 +353,19 @@ class mod_zone_difficulty_unitscript : public UnitScript
351
353
{
352
354
int8 mode = sZoneDifficulty ->NerfInfo [mapId][matchingPhase].Enabled ;
353
355
Map* map = target->GetMap ();
356
+ uint32 instanceId = map->GetInstanceId ();
357
+ bool isMythicMode = sZoneDifficulty ->MythicmodeInstanceData [instanceId];
354
358
355
- if (sZoneDifficulty ->HasNormalMode (mode))
359
+ if (!isMythicMode && sZoneDifficulty ->HasNormalMode (mode))
356
360
damage = damage * sZoneDifficulty ->NerfInfo [mapId][matchingPhase].MeleeDamageBuffPct ;
357
361
358
- if (sZoneDifficulty -> HasMythicmode (mode) && sZoneDifficulty ->MythicmodeInstanceData [target-> GetMap ()-> GetInstanceId ()] )
362
+ if (isMythicMode && sZoneDifficulty ->HasMythicmode (mode) )
359
363
if (map->IsRaid () || (map->IsHeroic () && map->IsDungeon ()))
360
364
damage = damage * sZoneDifficulty ->NerfInfo [mapId][matchingPhase].MeleeDamageBuffPctHard ;
361
365
}
362
366
else if (sZoneDifficulty ->ShouldNerfInDuels (target))
363
- {
364
367
if (sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].Enabled > 0 )
365
368
damage = damage * sZoneDifficulty ->NerfInfo [DUEL_INDEX][0 ].MeleeDamageBuffPct ;
366
- }
367
369
}
368
370
}
369
371
0 commit comments