fix(Scripts/Zul'Aman): Band-Aid fix for hostage loot. (#21060)
This commit is contained in:
@@ -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);
|
||||||
@@ -103,6 +103,7 @@ public:
|
|||||||
LoadBossBoundaries(boundaries);
|
LoadBossBoundaries(boundaries);
|
||||||
LoadDoorData(doorData);
|
LoadDoorData(doorData);
|
||||||
LoadSummonData(summonData);
|
LoadSummonData(summonData);
|
||||||
|
_chestLooted = 0;
|
||||||
|
|
||||||
for (uint8 i = 0; i < RAND_VENDOR; ++i)
|
for (uint8 i = 0; i < RAND_VENDOR; ++i)
|
||||||
RandVendor[i] = NOT_STARTED;
|
RandVendor[i] = NOT_STARTED;
|
||||||
@@ -200,6 +201,8 @@ public:
|
|||||||
else if (data == DONE)
|
else if (data == DONE)
|
||||||
_akilzonGauntlet = DONE;
|
_akilzonGauntlet = DONE;
|
||||||
}
|
}
|
||||||
|
else if (type == DATA_CHEST_LOOTED)
|
||||||
|
++_chestLooted;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartAkilzonGauntlet()
|
void StartAkilzonGauntlet()
|
||||||
@@ -320,6 +323,8 @@ public:
|
|||||||
return RandVendor[1];
|
return RandVendor[1];
|
||||||
else if (type == TYPE_AKILZON_GAUNTLET)
|
else if (type == TYPE_AKILZON_GAUNTLET)
|
||||||
return _akilzonGauntlet;
|
return _akilzonGauntlet;
|
||||||
|
else if (type == DATA_CHEST_LOOTED)
|
||||||
|
return _chestLooted;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -330,6 +335,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
uint16 _chestLooted;
|
||||||
uint32 RandVendor[RAND_VENDOR];
|
uint32 RandVendor[RAND_VENDOR];
|
||||||
GuidSet AkilzonTrash;
|
GuidSet AkilzonTrash;
|
||||||
EncounterState _akilzonGauntlet = NOT_STARTED;
|
EncounterState _akilzonGauntlet = NOT_STARTED;
|
||||||
|
|||||||
@@ -290,13 +290,17 @@ public:
|
|||||||
|
|
||||||
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||||
|
|
||||||
|
creature->GetInstanceScript()->SetData(DATA_CHEST_LOOTED, 0);
|
||||||
|
|
||||||
float x, y, z;
|
float x, y, z;
|
||||||
creature->GetPosition(x, y, z);
|
creature->GetPosition(x, y, z);
|
||||||
for (uint8 i = 0; i < 4; ++i)
|
for (uint8 i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
if (HostageEntry[i] == creature->GetEntry())
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ enum DataTypes
|
|||||||
DATA_HARRISON_JONES = 13,
|
DATA_HARRISON_JONES = 13,
|
||||||
TYPE_AKILZON_GAUNTLET = 14,
|
TYPE_AKILZON_GAUNTLET = 14,
|
||||||
DATA_LOOKOUT = 15,
|
DATA_LOOKOUT = 15,
|
||||||
DATA_ZULJIN_GATE = 16
|
DATA_ZULJIN_GATE = 16,
|
||||||
|
DATA_CHEST_LOOTED = 17 // Used for hostage loot DB conditions
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CreatureIds
|
enum CreatureIds
|
||||||
|
|||||||
Reference in New Issue
Block a user