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:
Shauren committed 2011-02-03 22:20:40 +01:00
1 parent 7ea8bad07f
commit c2b0bcbd6c
33 files changed
+941 -152

No files matched your search

@@ -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();