Skip to content

Commit ff27630

Browse files
author
LocalIdentity
committed
Restrict Generals Cry clones by their attack time
Generals Cry clones need to finish their attack before you cast General's Cry again or else they be be despawned before their attack animation finishes. Technically it should use the contact point of the animation but since we do not support that yet this is the only way to handle it. It also then allows some time for the clone to move too without despawning
1 parent 521e8aa commit ff27630

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Modules/CalcMirages.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,15 @@ function calcs.mirages(env)
382382
if env.player.mainSkill.skillTypes[SkillType.Channel] then
383383
mirageSpawnTime = mirageSpawnTime + 1
384384
else
385-
mirageSpawnTime = mirageSpawnTime
386-
env.player.mainSkill.skillData.timeOverride = 1
385+
env.player.mainSkill.skillData.hitTimeOverride = 1
387386
end
388387

389388
-- This is so that it's consistent with the info message but removing this could make it more accurate numbers wise
390389
mirageSpawnTime = round(mirageSpawnTime, 2)
391390

392-
-- Scale dps with GC's cooldown
391+
-- Scale dps with GC's cooldown / attack time
392+
-- TODO This should use the contact point of the animation instead of the total attack time
393+
cooldown = m_max(cooldown, mainSkillOutputCache.HitTime or mainSkillOutputCache.Time)
393394
env.player.mainSkill.skillModList:NewMod("DPS", "MORE", (1 / cooldown - 1) * 100, "General's Cry Cooldown")
394395

395396
-- Does not use player resources

0 commit comments

Comments
 (0)