diff options
| author | Shauren <shauren.trinity@gmail.com> | 2011-02-03 22:20:40 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2011-02-03 22:20:40 +0100 |
| commit | c2b0bcbd6c8155812857523681cd787059cd9bf9 (patch) | |
| tree | b325612ecdddbb1235c676a862435c83374f95cf /src/server/scripts | |
| parent | 7ea8bad07f64ed5886130fcc8016c0c72a32758e (diff) | |
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
Diffstat (limited to 'src/server/scripts')
7 files changed, 11 insertions, 23 deletions
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 6a35982b74a..ae86a16fae9 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -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..."); diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp index f458084e9b2..0e72c048a03 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp @@ -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."); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 8f8cde5bb31..1a48ab455e3 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -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; diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp index ffa48d8846b..f5291af6620 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp @@ -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); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 758bb92a1aa..c739364d23d 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -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) diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp index 73c933301f7..51b75f19f7e 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp @@ -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); diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index 031bfa33bd9..a0d5eb3d173 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -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(); |
