mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 16:39:08 +01:00
Scripts/Hyjal: Change boss state management from SetData to SetBossState
This commit is contained in:
@@ -82,13 +82,13 @@ public:
|
||||
Initialize();
|
||||
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_ANETHERONEVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_ANETHERON, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_ANETHERONEVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_ANETHERON, IN_PROGRESS);
|
||||
|
||||
Talk(SAY_ONAGGRO);
|
||||
}
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
{
|
||||
hyjal_trashAI::JustDied(killer);
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_ANETHERONEVENT, DONE);
|
||||
instance->SetBossState(DATA_ANETHERON, DONE);
|
||||
Talk(SAY_ONDEATH);
|
||||
}
|
||||
|
||||
@@ -177,7 +177,6 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
class npc_towering_infernal : public CreatureScript
|
||||
@@ -197,12 +196,10 @@ public:
|
||||
ImmolationTimer = 5000;
|
||||
CheckTimer = 5000;
|
||||
instance = creature->GetInstanceScript();
|
||||
AnetheronGUID = instance->GetGuidData(DATA_ANETHERON);
|
||||
}
|
||||
|
||||
uint32 ImmolationTimer;
|
||||
uint32 CheckTimer;
|
||||
ObjectGuid AnetheronGUID;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset() override
|
||||
@@ -235,14 +232,11 @@ public:
|
||||
{
|
||||
if (CheckTimer <= diff)
|
||||
{
|
||||
if (AnetheronGUID)
|
||||
Creature* boss = instance->GetCreature(DATA_ANETHERON);
|
||||
if (!boss || boss->isDead())
|
||||
{
|
||||
Creature* boss = ObjectAccessor::GetCreature(*me, AnetheronGUID);
|
||||
if (!boss || boss->isDead())
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
CheckTimer = 5000;
|
||||
} else CheckTimer -= diff;
|
||||
@@ -260,7 +254,6 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
// 38196 - Vampiric Aura
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
{
|
||||
if (CheckTimer <= diff)
|
||||
{
|
||||
if (Creature* Archimonde = ObjectAccessor::GetCreature(*me, ArchimondeGUID))
|
||||
if (Creature* Archimonde = instance->GetCreature(DATA_ARCHIMONDE))
|
||||
{
|
||||
if (Archimonde->HealthBelowPct(2) || !Archimonde->IsAlive())
|
||||
DoCast(me, SPELL_DENOUEMENT_WISP);
|
||||
|
||||
@@ -86,13 +86,13 @@ public:
|
||||
Initialize();
|
||||
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_AZGALOREVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_AZGALOR, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_AZGALOREVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_AZGALOR, IN_PROGRESS);
|
||||
|
||||
Talk(SAY_ONAGGRO);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
{
|
||||
hyjal_trashAI::JustDied(killer);
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_AZGALOREVENT, DONE);
|
||||
instance->SetBossState(DATA_AZGALOR, DONE);
|
||||
Talk(SAY_ONDEATH);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,13 +82,13 @@ public:
|
||||
Initialize();
|
||||
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_KAZROGALEVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_KAZROGAL, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_KAZROGALEVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_KAZROGAL, IN_PROGRESS);
|
||||
Talk(SAY_ONAGGRO);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
{
|
||||
hyjal_trashAI::JustDied(killer);
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_KAZROGALEVENT, DONE);
|
||||
instance->SetBossState(DATA_KAZROGAL, DONE);
|
||||
DoPlaySoundToSet(me, SOUND_ONDEATH);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,13 +77,13 @@ public:
|
||||
Initialize();
|
||||
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_RAGEWINTERCHILL, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_RAGEWINTERCHILL, IN_PROGRESS);
|
||||
Talk(SAY_ONAGGRO);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
{
|
||||
hyjal_trashAI::JustDied(killer);
|
||||
if (IsEvent)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, DONE);
|
||||
instance->SetBossState(DATA_RAGEWINTERCHILL, DONE);
|
||||
Talk(SAY_ONDEATH);
|
||||
}
|
||||
|
||||
@@ -162,7 +162,6 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_rage_winterchill()
|
||||
|
||||
@@ -115,14 +115,14 @@ class npc_jaina_proudmoore : public CreatureScript
|
||||
if (EventBegun)
|
||||
return false;
|
||||
|
||||
uint32 RageEncounter = GetInstanceData(DATA_RAGEWINTERCHILLEVENT);
|
||||
uint32 AnetheronEncounter = GetInstanceData(DATA_ANETHERONEVENT);
|
||||
if (RageEncounter == NOT_STARTED)
|
||||
uint32 RageEncounter = instance->GetBossState(DATA_RAGEWINTERCHILL);
|
||||
uint32 AnetheronEncounter = instance->GetBossState(DATA_ANETHERON);
|
||||
if (RageEncounter != DONE && RageEncounter != IN_PROGRESS)
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_ITEM_BEGIN_ALLY_MID, GOSSIP_ITEM_BEGIN_ALLY_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, 9168, me->GetGUID());
|
||||
}
|
||||
else if (RageEncounter == DONE && AnetheronEncounter == NOT_STARTED)
|
||||
else if (RageEncounter == DONE && AnetheronEncounter != DONE && AnetheronEncounter != IN_PROGRESS)
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_ITEM_ANETHERON_MID, GOSSIP_ITEM_ANETHERON_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
SendGossipMenuFor(player, 9380, me->GetGUID());
|
||||
@@ -194,18 +194,18 @@ class npc_thrall : public CreatureScript
|
||||
if (EventBegun)
|
||||
return false;
|
||||
|
||||
uint32 AnetheronEvent = GetInstanceData(DATA_ANETHERONEVENT);
|
||||
uint32 AnetheronEvent = instance->GetBossState(DATA_ANETHERON);
|
||||
// Only let them start the Horde phases if Anetheron is dead.
|
||||
if (AnetheronEvent == DONE && GetInstanceData(DATA_ALLIANCE_RETREAT))
|
||||
{
|
||||
uint32 KazrogalEvent = GetInstanceData(DATA_KAZROGALEVENT);
|
||||
uint32 AzgalorEvent = GetInstanceData(DATA_AZGALOREVENT);
|
||||
if (KazrogalEvent == NOT_STARTED)
|
||||
uint32 KazrogalEvent = instance->GetBossState(DATA_KAZROGAL);
|
||||
uint32 AzgalorEvent = instance->GetBossState(DATA_AZGALOR);
|
||||
if (KazrogalEvent != DONE && AzgalorEvent != IN_PROGRESS)
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_ITEM_BEGIN_HORDE_MID, GOSSIP_ITEM_BEGIN_HORDE_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, 9225, me->GetGUID());
|
||||
}
|
||||
else if (KazrogalEvent == DONE && AzgalorEvent == NOT_STARTED)
|
||||
else if (KazrogalEvent == DONE && AzgalorEvent != DONE && AzgalorEvent != IN_PROGRESS)
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_ITEM_AZGALOR_MID, GOSSIP_ITEM_AZGALOR_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
SendGossipMenuFor(player, 9396, me->GetGUID());
|
||||
@@ -260,7 +260,7 @@ class npc_tyrande_whisperwind : public CreatureScript
|
||||
|
||||
bool OnGossipHello(Player* player) override
|
||||
{
|
||||
uint32 AzgalorEvent = GetInstanceData(DATA_AZGALOREVENT);
|
||||
uint32 AzgalorEvent = instance->GetBossState(DATA_AZGALOR);
|
||||
|
||||
// Only let them get item if Azgalor is dead.
|
||||
if (AzgalorEvent == DONE && !player->HasItemCount(ITEM_TEAR_OF_GODDESS))
|
||||
|
||||
@@ -27,27 +27,23 @@ uint32 const EncounterCount = 5;
|
||||
|
||||
enum HYDataTypes
|
||||
{
|
||||
DATA_RAGEWINTERCHILL = 0,
|
||||
DATA_ANETHERON = 1,
|
||||
DATA_ANETHERONEVENT = 2,
|
||||
DATA_ARCHIMONDE = 3,
|
||||
DATA_ARCHIMONDEEVENT = 4,
|
||||
DATA_AZGALOR = 5,
|
||||
DATA_AZGALOREVENT = 6,
|
||||
DATA_JAINAPROUDMOORE = 7,
|
||||
DATA_KAZROGAL = 8,
|
||||
DATA_KAZROGALEVENT = 9,
|
||||
DATA_RAGEWINTERCHILL = 10,
|
||||
DATA_RAGEWINTERCHILLEVENT = 11,
|
||||
DATA_THRALL = 12,
|
||||
DATA_TYRANDEWHISPERWIND = 13,
|
||||
DATA_TRASH = 14,
|
||||
DATA_RESET_TRASH_COUNT = 15,
|
||||
DATA_ALLIANCE_RETREAT = 16,
|
||||
DATA_HORDE_RETREAT = 17,
|
||||
DATA_RAIDDAMAGE = 18,
|
||||
DATA_RESET_RAIDDAMAGE = 19,
|
||||
TYPE_RETREAT = 20,
|
||||
DATA_CHANNEL_TARGET = 21
|
||||
DATA_KAZROGAL = 2,
|
||||
DATA_AZGALOR = 3,
|
||||
DATA_ARCHIMONDE = 4,
|
||||
|
||||
DATA_JAINAPROUDMOORE = 5,
|
||||
DATA_THRALL = 6,
|
||||
DATA_TYRANDEWHISPERWIND = 7,
|
||||
DATA_TRASH = 8,
|
||||
DATA_RESET_TRASH_COUNT = 9,
|
||||
DATA_ALLIANCE_RETREAT = 10,
|
||||
DATA_HORDE_RETREAT = 11,
|
||||
DATA_RAIDDAMAGE = 12,
|
||||
DATA_RESET_RAIDDAMAGE = 13,
|
||||
TYPE_RETREAT = 14,
|
||||
DATA_CHANNEL_TARGET = 15
|
||||
};
|
||||
|
||||
enum HYWorldStateIds
|
||||
|
||||
@@ -903,15 +903,6 @@ void hyjalAI::JustDied(Unit* /*killer*/)
|
||||
RespawnTimer = 120000;
|
||||
Talk(DEATH);
|
||||
Summons.DespawnAll();//despawn all wave's summons
|
||||
//reset encounter if boss is despawned (ex: thrall is killed, boss despawns, event stucks at inprogress)
|
||||
if (instance->GetData(DATA_RAGEWINTERCHILLEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_RAGEWINTERCHILLEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_ANETHERONEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_ANETHERONEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_KAZROGALEVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_KAZROGALEVENT, NOT_STARTED);
|
||||
if (instance->GetData(DATA_AZGALOREVENT) == IN_PROGRESS)
|
||||
instance->SetData(DATA_AZGALOREVENT, NOT_STARTED);
|
||||
instance->SetData(DATA_RESET_RAIDDAMAGE, 0);//reset damage on die
|
||||
}
|
||||
|
||||
|
||||
@@ -46,8 +46,16 @@ enum Yells
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ NPC_CHANNEL_TARGET, DATA_CHANNEL_TARGET },
|
||||
{ 0, 0 } // END
|
||||
{ RAGE_WINTERCHILL, DATA_RAGEWINTERCHILL },
|
||||
{ ANETHERON, DATA_ANETHERON },
|
||||
{ KAZROGAL, DATA_KAZROGAL },
|
||||
{ AZGALOR, DATA_AZGALOR },
|
||||
{ ARCHIMONDE, DATA_ARCHIMONDE },
|
||||
{ JAINA, DATA_JAINAPROUDMOORE },
|
||||
{ THRALL, DATA_THRALL },
|
||||
{ TYRANDE, DATA_TYRANDEWHISPERWIND },
|
||||
{ NPC_CHANNEL_TARGET, DATA_CHANNEL_TARGET },
|
||||
{ 0, 0 } // END
|
||||
};
|
||||
|
||||
class instance_hyjal : public InstanceMapScript
|
||||
@@ -65,8 +73,8 @@ public:
|
||||
instance_mount_hyjal_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
RaidDamage = 0;
|
||||
Trash = 0;
|
||||
@@ -76,15 +84,6 @@ public:
|
||||
ArchiYell = false;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for (uint8 i = 0; i < EncounterCount; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) override
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
@@ -107,101 +106,30 @@ public:
|
||||
m_uiAncientGemGUID.push_back(go->GetGUID());
|
||||
break;
|
||||
}
|
||||
|
||||
InstanceScript::OnGameObjectCreate(go);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case RAGE_WINTERCHILL:
|
||||
RageWinterchill = creature->GetGUID();
|
||||
break;
|
||||
case ANETHERON:
|
||||
Anetheron = creature->GetGUID();
|
||||
break;
|
||||
case KAZROGAL:
|
||||
Kazrogal = creature->GetGUID();
|
||||
break;
|
||||
case AZGALOR:
|
||||
Azgalor = creature->GetGUID();
|
||||
break;
|
||||
case ARCHIMONDE:
|
||||
Archimonde = creature->GetGUID();
|
||||
if (GetData(DATA_AZGALOREVENT) != DONE)
|
||||
if (GetBossState(DATA_AZGALOR) != DONE)
|
||||
{
|
||||
creature->SetVisible(false);
|
||||
creature->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
break;
|
||||
case JAINA:
|
||||
JainaProudmoore = creature->GetGUID();
|
||||
break;
|
||||
case THRALL:
|
||||
Thrall = creature->GetGUID();
|
||||
break;
|
||||
case TYRANDE:
|
||||
TyrandeWhisperwind = creature->GetGUID();
|
||||
break;
|
||||
case NPC_CHANNEL_TARGET:
|
||||
WorldtreeChannelTarget = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
|
||||
InstanceScript::OnCreatureCreate(creature);
|
||||
}
|
||||
|
||||
ObjectGuid GetGuidData(uint32 identifier) const override
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
case DATA_RAGEWINTERCHILL: return RageWinterchill;
|
||||
case DATA_ANETHERON: return Anetheron;
|
||||
case DATA_KAZROGAL: return Kazrogal;
|
||||
case DATA_AZGALOR: return Azgalor;
|
||||
case DATA_ARCHIMONDE: return Archimonde;
|
||||
case DATA_JAINAPROUDMOORE: return JainaProudmoore;
|
||||
case DATA_THRALL: return Thrall;
|
||||
case DATA_TYRANDEWHISPERWIND: return TyrandeWhisperwind;
|
||||
case DATA_CHANNEL_TARGET: return WorldtreeChannelTarget;
|
||||
}
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_RAGEWINTERCHILLEVENT:
|
||||
m_auiEncounter[0] = data;
|
||||
break;
|
||||
case DATA_ANETHERONEVENT:
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
case DATA_KAZROGALEVENT:
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
case DATA_AZGALOREVENT:
|
||||
m_auiEncounter[3] = data;
|
||||
if (data == DONE)
|
||||
{
|
||||
instance->LoadGrid(5581.49f, -3445.63f);
|
||||
if (Creature* archimonde = instance->GetCreature(Archimonde))
|
||||
{
|
||||
archimonde->SetVisible(true);
|
||||
archimonde->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
if (!ArchiYell)
|
||||
{
|
||||
ArchiYell = true;
|
||||
archimonde->AI()->Talk(YELL_ARCHIMONDE_INTRO);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DATA_ARCHIMONDEEVENT:
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
case DATA_RESET_TRASH_COUNT:
|
||||
Trash = 0;
|
||||
break;
|
||||
@@ -245,35 +173,52 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
TC_LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data);
|
||||
TC_LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data);
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
bool SetBossState(uint32 id, EncounterState state) override
|
||||
{
|
||||
if (!InstanceScript::SetBossState(id, state))
|
||||
return false;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
case DATA_AZGALOR:
|
||||
if (state == DONE)
|
||||
{
|
||||
instance->LoadGrid(5581.49f, -3445.63f);
|
||||
if (Creature* archimonde = GetCreature(DATA_ARCHIMONDE))
|
||||
{
|
||||
archimonde->SetVisible(true);
|
||||
archimonde->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' '
|
||||
<< m_auiEncounter[3] << ' ' << m_auiEncounter[4]
|
||||
<< ' ' << allianceRetreat << ' ' << hordeRetreat
|
||||
<< ' ' << RaidDamage;
|
||||
|
||||
str_data = saveStream.str();
|
||||
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
if (!ArchiYell)
|
||||
{
|
||||
ArchiYell = true;
|
||||
archimonde->AI()->Talk(YELL_ARCHIMONDE_INTRO);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ReadSaveDataMore(std::istringstream& loadStream) override
|
||||
{
|
||||
loadStream >> allianceRetreat >> hordeRetreat >> RaidDamage;
|
||||
}
|
||||
|
||||
void WriteSaveDataMore(std::ostringstream& saveStream) override
|
||||
{
|
||||
saveStream << allianceRetreat << ' ' << hordeRetreat << ' ' << RaidDamage;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_RAGEWINTERCHILLEVENT: return m_auiEncounter[0];
|
||||
case DATA_ANETHERONEVENT: return m_auiEncounter[1];
|
||||
case DATA_KAZROGALEVENT: return m_auiEncounter[2];
|
||||
case DATA_AZGALOREVENT: return m_auiEncounter[3];
|
||||
case DATA_ARCHIMONDEEVENT: return m_auiEncounter[4];
|
||||
case DATA_TRASH: return Trash;
|
||||
case DATA_ALLIANCE_RETREAT: return allianceRetreat;
|
||||
case DATA_HORDE_RETREAT: return hordeRetreat;
|
||||
@@ -282,41 +227,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData() override
|
||||
{
|
||||
return str_data;
|
||||
}
|
||||
|
||||
void Load(char const* in) override
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> allianceRetreat >> hordeRetreat >> RaidDamage;
|
||||
for (uint8 i = 0; i < EncounterCount; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as IN_PROGRESS - reset it instead.
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint32 m_auiEncounter[EncounterCount];
|
||||
std::string str_data;
|
||||
GuidList m_uiAncientGemGUID;
|
||||
ObjectGuid RageWinterchill;
|
||||
ObjectGuid Anetheron;
|
||||
ObjectGuid Kazrogal;
|
||||
ObjectGuid Azgalor;
|
||||
ObjectGuid Archimonde;
|
||||
ObjectGuid JainaProudmoore;
|
||||
ObjectGuid Thrall;
|
||||
ObjectGuid TyrandeWhisperwind;
|
||||
ObjectGuid WorldtreeChannelTarget;
|
||||
ObjectGuid HordeGate;
|
||||
ObjectGuid ElfGate;
|
||||
uint32 Trash;
|
||||
|
||||
Reference in New Issue
Block a user