aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author_manuel_ <none@none>2010-01-18 13:02:24 -0300
committer_manuel_ <none@none>2010-01-18 13:02:24 -0300
commit06e776b8d87098854d4461bf66527912d8b5ee4d (patch)
tree074bdea6c0546c6b9ab4f736de8a377b0b372b26 /src
parent2b5f1f359b956ceac9b87114a94c7d61f95f6512 (diff)
Gnomeregan: Now instance saves the event.
--HG-- branch : trunk
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)