mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix(Scripts/Zul'Aman): Band-Aid fix for hostage loot. (#21060)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user