aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp
index 473a01a106d..cecff8f52dc 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp
@@ -81,15 +81,37 @@ struct TRINITY_DLL_DECL instance_gnomeregan : public ScriptedInstance
{
case GO_CAVE_IN_LEFT:
uiCaveInLeftGUID = pGo->GetGUID();
- HandleGameObject(NULL,false,pGo);
+ if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == NOT_STARTED)
+ HandleGameObject(NULL,false,pGo);
break;
case GO_CAVE_IN_RIGHT:
uiCaveInRightGUID = pGo->GetGUID();
- HandleGameObject(NULL,false,pGo);
+ if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == NOT_STARTED)
+ HandleGameObject(NULL,false,pGo);
break;
}
}
+ void SetData(uint32 uiType, uint32 uiData)
+ {
+ switch(uiType)
+ {
+ case TYPE_EVENT:
+ m_auiEncounter[0] = uiData; break;
+ if (uiData == DONE)
+ SaveToDB();
+ break;
+ }
+ }
+
+ uint32 GetData(uint32 uiType, uint32 uiData)
+ {
+ switch(uiType)
+ {
+ case TYPE_EVENT: return m_auiEncounter[0];
+ }
+ }
+
uint64 GetData64(uint32 uiType)
{
switch(uiType)