Hello everyone, I recently ran into the problem that the modifier given to the hero via addon_game_mode does not have a visual display. That is, the damage is added, but the inscription is not visible. How it should be: 100+25, how it written: 100, but the damage is 125
addon_game_mode:
local players = PlayerResource:GetPlayerCount()
for i = 0, players do
if PlayerResource:HasSelectedHero(i) then
local player_id = PlayerResource:GetPlayer(i)
local hero = PlayerResource:GetSelectedHeroEntity(i)
if hero:GetTeamNumber() == attacker:GetTeamNumber() then
hero:AddNewModifier(nil, nil, "modifier_damage_fire", {})
end
end
end
addon_init
LinkLuaModifier("modifier_damage_fire", "modifiers/modifier_damage_fire", LUA_MODIFIER_MOTION_NONE)
modifier
modifier_damage_fire = class({})
function modifier_damage_fire:IsHidden() return false end
function modifier_damage_fire:RemoveOnDeath() return false end
function modifier_damage_fire:IsPermanent() return true end
function modifier_damage_fire:IsPurgable() return false end
function modifier_damage_fire:IsPurgeException() return false end
function modifier_damage_fire:DeclareFunctions()
return
{
MODIFIER_PROPERTY_BASEDAMAGEOUTGOING_PERCENTAGE,
}
end
function modifier_damage_fire:GetModifierBaseDamageOutgoing_Percentage()
return 25
end