aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorclick <none@none>2010-10-25 01:39:18 +0200
committerclick <none@none>2010-10-25 01:39:18 +0200
commit989f696d1e3b3d201f6ad27070d567cf49e93eeb (patch)
tree5de8c46e49f93253951467c065f8715848ac8402 /src
parentb3f60aee2d01f567cc475f940c4149bc8a9d7060 (diff)
Core/Scripts: Fix chest respawn exploit in Hellfire Rampart - origjnal fix by Gyullo (thanks)
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
index f43d7b8013d..7c754ba2d09 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
@@ -41,6 +41,7 @@ class instance_ramparts : public InstanceMapScript
uint32 m_auiEncounter[MAX_ENCOUNTER];
uint64 m_uiChestNGUID;
uint64 m_uiChestHGUID;
+ bool spawned;
void Initialize()
{
@@ -70,13 +71,19 @@ class instance_ramparts : public InstanceMapScript
switch(uiType)
{
case TYPE_VAZRUDEN:
- if (uiData == DONE && m_auiEncounter[1] == DONE)
+ if (uiData == DONE && m_auiEncounter[1] == DONE && !spawned)
+ {
DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS);
+ spawned = true;
+ }
m_auiEncounter[0] = uiData;
break;
case TYPE_NAZAN:
- if (uiData == DONE && m_auiEncounter[0] == DONE)
+ if (uiData == DONE && m_auiEncounter[0] == DONE && !spawned)
+ {
DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS);
+ spawned = true;
+ }
m_auiEncounter[1] = uiData;
break;
}