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:
@@ -2585,12 +2585,6 @@ namespace Game.Entities
|
|||||||
GetVehicleKit().RelocatePassengers();
|
GetVehicleKit().RelocatePassengers();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsDungeonBoss()
|
|
||||||
{
|
|
||||||
CreatureTemplate cinfo = Global.ObjectMgr.GetCreatureTemplate(GetEntry());
|
|
||||||
return cinfo != null && (cinfo.FlagsExtra.HasAnyFlag(CreatureFlagsExtra.DungeonBoss));
|
|
||||||
}
|
|
||||||
|
|
||||||
public float GetAggroRange(Unit target)
|
public float GetAggroRange(Unit target)
|
||||||
{
|
{
|
||||||
// Determines the aggro range for creatures (usually pets), used mainly for aggressive pet target selection.
|
// 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);
|
return GetCreatureTemplate().InhabitType.HasAnyFlag(InhabitType.Air);
|
||||||
}
|
}
|
||||||
|
public bool IsDungeonBoss() { return (GetCreatureTemplate().FlagsExtra.HasAnyFlag(CreatureFlagsExtra.DungeonBoss); }
|
||||||
|
|
||||||
public void SetReactState(ReactStates st)
|
public void SetReactState(ReactStates st)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5167,7 +5167,17 @@ namespace Game
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
creatureInfo.FlagsExtra |= CreatureFlagsExtra.DungeonBoss;
|
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:
|
case EncounterCreditType.CastSpell:
|
||||||
if (!Global.SpellMgr.HasSpellInfo(creditEntry))
|
if (!Global.SpellMgr.HasSpellInfo(creditEntry))
|
||||||
|
|||||||
Reference in New Issue
Block a user