Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/focusframe #108

Merged
merged 3 commits into from
Aug 8, 2014
Merged

Bugfix/focusframe #108

merged 3 commits into from
Aug 8, 2014

Conversation

Crowdedlight
Copy link
Contributor

FocusFrame removes unit when it gets destroyed so you'll never have a target you can't unfocus.
FocusFrame remember target on reloadUI.

Fixes #106

Crowdedlight added a commit that referenced this pull request Aug 8, 2014
@Crowdedlight Crowdedlight merged commit 1f4a75c into vikinghug:development Aug 8, 2014

function VikingUnitFrames:OnUnitDestroyed(unit)
local DestroyedUnit = unit
local FocusUnit = GameLib:GetPlayerUnit():GetAlternateTarget()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when zoning GameLib:GetPlayerUnit() is nil for a second or so. it makes this bug out when using recall.
fix:

local PlayerUnit = GameLib:GetPlayerUnit()
if PlayerUnit ~= nil then
  local FocusUnit = PlayerUnit:GetAlternateTarget()
  if DestroyedUnit == FocusUnit then
    FocusUnit:SetAlternateTarget(nil)
  end
end

@Crowdedlight
Copy link
Contributor Author

gotcha. Getting fix in now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant