diff --git a/msu/hooks/skills/skill.nut b/msu/hooks/skills/skill.nut index 08293817d..b79ff9627 100644 --- a/msu/hooks/skills/skill.nut +++ b/msu/hooks/skills/skill.nut @@ -440,6 +440,18 @@ }); ::MSU.QueueBucket.VeryLate.push(function() { + ::MSU.MH.hookTree("scripts/skills/skill", function(q) { + q.getTooltip = @(__original) function() + { + local ret = __original(); + if (!::MSU.isNull(this.getContainer()) && !::MSU.isNull(this.getContainer().getActor())) + { + this.getContainer().onQueryTooltip(this, ret); + } + return ret; + } + }); + ::MSU.MH.hook("scripts/skills/skill", function(q) { foreach (func in ::MSU.Skills.PreviewApplicableFunctions) { diff --git a/msu/hooks/ui/screens/tooltip/tooltip_events.nut b/msu/hooks/ui/screens/tooltip/tooltip_events.nut index 6f99822ab..388e5e700 100644 --- a/msu/hooks/ui/screens/tooltip/tooltip_events.nut +++ b/msu/hooks/ui/screens/tooltip/tooltip_events.nut @@ -9,31 +9,6 @@ return ret; } - q.general_querySkillTooltipData = @(__original) function( _entityId, _skillId ) - { - local ret = __original(_entityId, _skillId); - - if (ret != null) - { - local skill = ::Tactical.getEntityByID(_entityId).getSkills().getSkillByID(_skillId); - skill.getContainer().onQueryTooltip(skill, ret); - } - - return ret; - } - - q.general_queryStatusEffectTooltipData = @(__original) function( _entityId, _statusEffectId ) - { - local ret = __original(_entityId, _statusEffectId); - if (ret != null) - { - local statusEffect = ::Tactical.getEntityByID(_entityId).getSkills().getSkillByID(_statusEffectId); - statusEffect.getContainer().onQueryTooltip(statusEffect, ret); - } - - return ret; - } - q.onQueryMSUTooltipData <- function( _data ) { return ::MSU.System.Tooltips.getTooltip(_data.modId, _data.elementId).getUIData(_data);