DB/Creature: The instance_encounters extra flag (CREATURE_FLAG_EXTRA_DUNGEON_BOSS) now properly propagates to all difficulty entries (not just difficulty 0).

Port From (https://github.com/TrinityCore/TrinityCore/commit/6455f1c256e566da43d55583bca9c94c0d3139ce)
This commit is contained in:
hondacrx
2019-08-17 13:08:46 -04:00
parent 1e4b1366c2
commit 835c67483b
2 changed files with 12 additions and 7 deletions
+1 -6
View File
@@ -2585,12 +2585,6 @@ namespace Game.Entities
GetVehicleKit().RelocatePassengers();
}
public bool IsDungeonBoss()
{
CreatureTemplate cinfo = Global.ObjectMgr.GetCreatureTemplate(GetEntry());
return cinfo != null && (cinfo.FlagsExtra.HasAnyFlag(CreatureFlagsExtra.DungeonBoss));
}
public float GetAggroRange(Unit target)
{
// Determines the aggro range for creatures (usually pets), used mainly for aggressive pet target selection.
@@ -2879,6 +2873,7 @@ namespace Game.Entities
{
return GetCreatureTemplate().InhabitType.HasAnyFlag(InhabitType.Air);
}
public bool IsDungeonBoss() { return (GetCreatureTemplate().FlagsExtra.HasAnyFlag(CreatureFlagsExtra.DungeonBoss); }
public void SetReactState(ReactStates st)
{
+11 -1
View File
@@ -5167,7 +5167,17 @@ namespace Game
continue;
}
creatureInfo.FlagsExtra |= CreatureFlagsExtra.DungeonBoss;
break;
for (byte diff = 0; diff < SharedConst.MaxCreatureDifficulties; ++diff)
{
uint diffEntry = creatureInfo.DifficultyEntry[diff];
if (diffEntry != 0)
{
CreatureTemplate diffInfo = GetCreatureTemplate(diffEntry);
if (diffInfo != null)
diffInfo.FlagsExtra |= CreatureFlagsExtra.DungeonBoss;
}
}
break;
}
case EncounterCreditType.CastSpell:
if (!Global.SpellMgr.HasSpellInfo(creditEntry))