diff --git a/data/sql/updates/pending_db_world/za-hostage-bandaid.sql b/data/sql/updates/pending_db_world/za-hostage-bandaid.sql new file mode 100644 index 000000000..b4da9f879 --- /dev/null +++ b/data/sql/updates/pending_db_world/za-hostage-bandaid.sql @@ -0,0 +1 @@ +UPDATE `conditions` SET `ConditionValue1` = 17 WHERE `SourceTypeOrReferenceId` = 10 AND `SourceGroup` IN (35100, 35101, 35102) AND `ConditionTypeOrReference` = 13 AND `ConditionValue2` IN (1, 2, 3, 4); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index f86186b40..f743f017a 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -103,6 +103,7 @@ public: LoadBossBoundaries(boundaries); LoadDoorData(doorData); LoadSummonData(summonData); + _chestLooted = 0; for (uint8 i = 0; i < RAND_VENDOR; ++i) RandVendor[i] = NOT_STARTED; @@ -200,6 +201,8 @@ public: else if (data == DONE) _akilzonGauntlet = DONE; } + else if (type == DATA_CHEST_LOOTED) + ++_chestLooted; } void StartAkilzonGauntlet() @@ -320,6 +323,8 @@ public: return RandVendor[1]; else if (type == TYPE_AKILZON_GAUNTLET) return _akilzonGauntlet; + else if (type == DATA_CHEST_LOOTED) + return _chestLooted; return 0; } @@ -330,6 +335,7 @@ public: } private: + uint16 _chestLooted; uint32 RandVendor[RAND_VENDOR]; GuidSet AkilzonTrash; EncounterState _akilzonGauntlet = NOT_STARTED; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index ddb9bc6fd..83034d117 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -290,13 +290,17 @@ public: creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP); + creature->GetInstanceScript()->SetData(DATA_CHEST_LOOTED, 0); + float x, y, z; creature->GetPosition(x, y, z); for (uint8 i = 0; i < 4; ++i) { if (HostageEntry[i] == creature->GetEntry()) { - creature->SummonGameObject(ChestEntry[i], x - 2, y, z, 0, 0, 0, 0, 0, 0); + GameObject* obj = creature->SummonGameObject(ChestEntry[i], x - 2, y, z, 0, 0, 0, 0, 0, 0); + if (obj) + obj->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); break; } } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h index 8ed6eb131..341f97f65 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h @@ -41,7 +41,8 @@ enum DataTypes DATA_HARRISON_JONES = 13, TYPE_AKILZON_GAUNTLET = 14, DATA_LOOKOUT = 15, - DATA_ZULJIN_GATE = 16 + DATA_ZULJIN_GATE = 16, + DATA_CHEST_LOOTED = 17 // Used for hostage loot DB conditions }; enum CreatureIds