mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Instances: Implemented DungeonEncounter.dbc for creating completed encounters mask to use in packets
Core/Dungeon Finder: Implemented new way of giving random dungeon rewards, linked to DungeonEncounter.dbc
This commit is contained in:
@@ -102,7 +102,6 @@ public:
|
||||
{ "item_enchantment_template", SEC_ADMINISTRATOR, true, &HandleReloadItemEnchantementsCommand, "", NULL },
|
||||
{ "item_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesItemCommand, "", NULL },
|
||||
{ "item_set_names", SEC_ADMINISTRATOR, true, &HandleReloadItemSetNamesCommand, "", NULL },
|
||||
{ "lfg_dungeon_encounters", SEC_ADMINISTRATOR, true, &HandleReloadLfgEncountersCommand, "", NULL },
|
||||
{ "lfg_dungeon_rewards", SEC_ADMINISTRATOR, true, &HandleReloadLfgRewardsCommand, "", NULL },
|
||||
{ "locales_achievement_reward", SEC_ADMINISTRATOR, true, &HandleReloadLocalesAchievementRewardCommand, "", NULL },
|
||||
{ "locales_creature", SEC_ADMINISTRATOR, true, &HandleReloadLocalesCreatureCommand, "", NULL },
|
||||
@@ -1164,14 +1163,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadLfgEncountersCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading dungeon encounter lfg associations...");
|
||||
sLFGMgr->LoadDungeonEncounters();
|
||||
handler->SendGlobalGMSysMessage("DB table `lfg_dungeon_encounters` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleReloadLfgRewardsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading lfg dungeon rewards...");
|
||||
|
||||
@@ -237,6 +237,7 @@ public:
|
||||
case 5:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me);
|
||||
pInstance->SetData(TYPE_RING_OF_LAW,DONE);
|
||||
sLog->outDebug("TSCR: npc_grimstone: event reached end and set complete.");
|
||||
}
|
||||
|
||||
@@ -138,7 +138,11 @@ public:
|
||||
break;
|
||||
case TYPE_MAIDEN: m_auiEncounter[2] = uiData; break;
|
||||
case TYPE_OPTIONAL_BOSS: m_auiEncounter[3] = uiData; break;
|
||||
case TYPE_OPERA: m_auiEncounter[4] = uiData; break;
|
||||
case TYPE_OPERA:
|
||||
m_auiEncounter[4] = uiData;
|
||||
if (uiData == DONE)
|
||||
UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, 16812, NULL);
|
||||
break;
|
||||
case TYPE_CURATOR: m_auiEncounter[5] = uiData; break;
|
||||
case TYPE_ARAN: m_auiEncounter[6] = uiData; break;
|
||||
case TYPE_TERESTIAN: m_auiEncounter[7] = uiData; break;
|
||||
|
||||
@@ -107,7 +107,7 @@ class boss_majordomo : public CreatureScript
|
||||
|
||||
if (!me->FindNearestCreature(NPC_FLAMEWAKER_HEALER, 100.0f) && !me->FindNearestCreature(NPC_FLAMEWAKER_ELITE, 100.0f))
|
||||
{
|
||||
//instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry());
|
||||
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry());
|
||||
me->setFaction(35);
|
||||
me->AI()->EnterEvadeMode();
|
||||
DoScriptText(SAY_DEFEAT, me);
|
||||
|
||||
@@ -395,16 +395,6 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 GetCompletedEncounterMask() const
|
||||
{
|
||||
uint32 mask = 0;
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (GetBossState(i) == DONE)
|
||||
mask |= 1 << i;
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch (type)
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
|
||||
void DoAction(const int32 action)
|
||||
{
|
||||
if (action != ACTION_SET_NORMAL_EVENTS)
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
|
||||
if (summon->GetEntry() != NPC_PLANAR_ANOMALY)
|
||||
return;
|
||||
|
||||
|
||||
summon->CombatStop(true);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
summon->GetMotionMaster()->MoveRandom(100.0f);
|
||||
|
||||
@@ -315,11 +315,13 @@ public:
|
||||
switch(type)
|
||||
{
|
||||
case DATA_1ST_BOSS_EVENT:
|
||||
UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, CREATURE_EREKEM, NULL);
|
||||
m_auiEncounter[0] = data;
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
break;
|
||||
case DATA_2ND_BOSS_EVENT:
|
||||
UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, CREATURE_MORAGG, NULL);
|
||||
m_auiEncounter[1] = data;
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
|
||||
Reference in New Issue
Block a user