Scripts/Ulduar: Fix a comple of issues with Flame Leviathan's towers
* Fix tower count being set to 0 once the first tower is destroyed due to bad logic * Prevent towers from reducing counter twice (caused by event being sent twice by the gameobject when destroyed)
This commit is contained in:
1 parent
35497c479f
commit
da74aa526a
1 file changed
+23
-16
@@ -482,40 +482,47 @@ class boss_flame_leviathan : public CreatureScript
|
||||
if (action && action <= 4) // Tower destruction, debuff leviathan loot and reduce active tower count
|
||||
{
|
||||
if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2 | LOOT_MODE_HARD_MODE_3 | LOOT_MODE_HARD_MODE_4) && ActiveTowersCount == 4)
|
||||
{
|
||||
me->RemoveLootMode(LOOT_MODE_HARD_MODE_4);
|
||||
--ActiveTowersCount;
|
||||
}
|
||||
|
||||
if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2 | LOOT_MODE_HARD_MODE_3) && ActiveTowersCount == 3)
|
||||
{
|
||||
me->RemoveLootMode(LOOT_MODE_HARD_MODE_3);
|
||||
--ActiveTowersCount;
|
||||
}
|
||||
|
||||
if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2) && ActiveTowersCount == 2)
|
||||
{
|
||||
me->RemoveLootMode(LOOT_MODE_HARD_MODE_2);
|
||||
--ActiveTowersCount;
|
||||
}
|
||||
|
||||
if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1) && ActiveTowersCount == 1)
|
||||
{
|
||||
me->RemoveLootMode(LOOT_MODE_HARD_MODE_1);
|
||||
--ActiveTowersCount;
|
||||
}
|
||||
}
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case ACTION_TOWER_OF_STORM_DESTROYED:
|
||||
towerOfStorms = false;
|
||||
if (towerOfStorms)
|
||||
{
|
||||
towerOfStorms = false;
|
||||
--ActiveTowersCount;
|
||||
}
|
||||
break;
|
||||
case ACTION_TOWER_OF_FROST_DESTROYED:
|
||||
towerOfFrost = false;
|
||||
if (towerOfFrost)
|
||||
{
|
||||
towerOfFrost = false;
|
||||
--ActiveTowersCount;
|
||||
}
|
||||
break;
|
||||
case ACTION_TOWER_OF_FLAMES_DESTROYED:
|
||||
towerOfFlames = false;
|
||||
if (towerOfFlames)
|
||||
{
|
||||
towerOfFlames = false;
|
||||
--ActiveTowersCount;
|
||||
}
|
||||
break;
|
||||
case ACTION_TOWER_OF_LIFE_DESTROYED:
|
||||
towerOfLife = false;
|
||||
if (towerOfLife)
|
||||
{
|
||||
towerOfLife = false;
|
||||
--ActiveTowersCount;
|
||||
}
|
||||
break;
|
||||
case ACTION_START_HARD_MODE: // Activate hard-mode enable all towers, apply buffs on leviathan
|
||||
ActiveTowers = true;
|
||||
|
||||
Reference in new issue
Block a user