mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Loot: Set loot dungeon encounter id before generating
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "RBAC.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptReloadMgr.h"
|
||||
#include "SmartEnum.h"
|
||||
#include "SpellMgr.h"
|
||||
@@ -729,6 +730,14 @@ DungeonEncounterEntry const* InstanceScript::GetBossDungeonEncounter(uint32 id)
|
||||
return id < bosses.size() ? bosses[id].GetDungeonEncounterForDifficulty(instance->GetDifficultyID()) : nullptr;
|
||||
}
|
||||
|
||||
DungeonEncounterEntry const* InstanceScript::GetBossDungeonEncounter(Creature const* creature) const
|
||||
{
|
||||
if (BossAI const* bossAi = dynamic_cast<BossAI const*>(creature->GetAI()))
|
||||
return GetBossDungeonEncounter(bossAi->GetBossId());
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= nullptr*/, uint32 /*miscvalue1*/ /*= 0*/)
|
||||
{
|
||||
TC_LOG_ERROR("misc", "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
|
||||
|
||||
Reference in New Issue
Block a user