Core/Loot: Set loot dungeon encounter id before generating
Port From (https://github.com/TrinityCore/TrinityCore/commit/5f1a4cf9044d9ad65b49eb859ec36e1f62c2be10)
This commit is contained in:
@@ -16,18 +16,15 @@
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Framework.IO;
|
||||
using Game.AI;
|
||||
using Game.DataStorage;
|
||||
using Game.Entities;
|
||||
using Game.Groups;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Scenarios;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Game.Maps
|
||||
{
|
||||
@@ -703,6 +700,15 @@ namespace Game.Maps
|
||||
{
|
||||
return id < bosses.Count ? bosses[id].GetDungeonEncounterForDifficulty(instance.GetDifficultyID()) : null;
|
||||
}
|
||||
|
||||
public DungeonEncounterRecord GetBossDungeonEncounter(Creature creature)
|
||||
{
|
||||
BossAI bossAi = (BossAI)creature.GetAI();
|
||||
if (bossAi != null)
|
||||
return GetBossDungeonEncounter(bossAi.GetBossId());
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual bool CheckAchievementCriteriaMeet(uint criteria_id, Player source, Unit target = null, uint miscvalue1 = 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user