EliteAffixPlugin menu

User Tag List

Results 1 to 1 of 1
  1. #1
    knight84's Avatar Active Member
    Reputation
    19
    Join Date
    Mar 2017
    Posts
    270
    Thanks G/R
    24/18
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    EliteAffixPlugin

    Hello guys,

    how can i Customize the Affix Names from the EliteAffixPlugin; for example:

    Arcane into ARC


    i have tryed with the TCT Sheet but it dont work for me



    Here is the code from EliteAffixPlugin (something is already changed from the Original)

    using System.Collections.Generic;
    using System.Linq;
    using Turbo.Plugins.Default;

    namespace Turbo.Plugins.BM
    {

    public class EliteAffixPlugin : BasePlugin, IInGameWorldPainter
    {

    public WorldDecoratorCollection WeakDecorator { get; set; }
    public Dictionary<MonsterAffix, WorldDecoratorCollection> AffixDecorators { get; set; }
    public Dictionary<MonsterAffix, string> CustomAffixNames { get; set; }
    public Dictionary<MonsterAffix, string> CustomAffixNamesShort { get; set; }

    public EliteAffixPlugin()
    {
    Enabled = true;
    Order = 20000;
    }

    public override void Load(IController hud)
    {
    base.Load(hud);

    AffixDecorators = new Dictionary<MonsterAffix, WorldDecoratorCollection>();
    CustomAffixNames = new Dictionary<MonsterAffix, string>();
    CustomAffixNamesShort = new Dictionary<MonsterAffix, string>();

    var WeakBorderBrush = Hud.Render.CreateBrush(128, 0, 0, 0, 1);
    var WeakTextFont = Hud.Render.CreateFont("tahoma", 6f, 255, 221, 221, 34, true, false, 100, 0, 0, 0, true);

    var importantBorderBrush = Hud.Render.CreateBrush(90, 0, 0, 0, 1);
    var importantTextFont = Hud.Render.CreateFont("tahoma", 7f, 255, 255, 255, 255, true, false, 100, 0, 0, 0, true);


    AffixDecorators.Add(MonsterAffix.Arcane, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = importantBorderBrush,
    TextFont = importantTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 240, 0, 240, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Desecrator, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Electrified, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = importantBorderBrush,
    TextFont = importantTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 0, 0, 255, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.FireChains, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = importantBorderBrush,
    TextFont = importantTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 255, 0, 0, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Frozen, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.FrozenPulse, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Jailer, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Juggernaut, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = importantBorderBrush,
    TextFont = importantTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 139, 69, 19, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Molten, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = importantBorderBrush,
    TextFont = importantTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 255, 192, 0, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Mortar, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Orbiter, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Plagued, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Poison, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Reflect, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Thunderstorm, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Waller, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Knockback, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.ExtraHealth, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Nightmarish, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Shielding, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = importantBorderBrush,
    TextFont = importantTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 128, 128, 128, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Wormhole, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = importantBorderBrush,
    TextFont = importantTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 0, 255, 0, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Illusionist, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = importantBorderBrush,
    TextFont = importantTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 141, 180, 226, 0),
    }
    ));


    AffixDecorators.Add(MonsterAffix.HealthLink, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Fast, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Teleporter, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Vampiric, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Vortex, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Avenger, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.Horde, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));
    AffixDecorators.Add(MonsterAffix.MissileDampening, new WorldDecoratorCollection(
    new GroundLabelDecorator(Hud)
    {
    BorderBrush = WeakBorderBrush,
    TextFont = WeakTextFont,
    BackgroundBrush = Hud.Render.CreateBrush(178, 50, 50, 50, 0),
    }
    ));




    }

    public void PaintWorld(WorldLayer layer)
    {
    var monsters = Hud.Game.AliveMonsters;

    foreach (var monster in monsters)
    {
    if (monster.SummonerAcdDynamicId == 0)
    {
    if (monster.Rarity == ActorRarity.Normal || monster.Rarity == ActorRarity.Boss || ((monster.Rarity == ActorRarity.Unique) && (monster.SnoMonster.Priority < MonsterPriority.keywarden)))
    {
    foreach (var snoMonsterAffix in monster.AffixSnoList)
    {
    WorldDecoratorCollection decorator;
    if (!AffixDecorators.TryGetValue(snoMonsterAffix.Affix, out decorator)) continue;

    string affixName = null;

    if (!monster.IsOnScreen)
    {
    if (CustomAffixNames.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNames[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }
    else
    {
    if (CustomAffixNamesShort.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNamesShort[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }

    decorator.Paint(layer, monster, monster.FloorCoordinate, affixName);
    }
    }



    if (monster.Rarity == ActorRarity.Champion)
    {

    foreach (var snoMonsterAffix in monster.AffixSnoList)
    {
    WorldDecoratorCollection decorator;
    if (!AffixDecorators.TryGetValue(snoMonsterAffix.Affix, out decorator)) continue;
    string affixName = null;

    if (!monster.IsOnScreen)
    {
    if (CustomAffixNames.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNames[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }
    else
    {
    if (CustomAffixNamesShort.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNamesShort[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }
    decorator.Paint(layer, monster, monster.FloorCoordinate, affixName);
    }

    }



    if (monster.Rarity == ActorRarity.Rare)
    {

    foreach (var snoMonsterAffix in monster.AffixSnoList)
    {
    WorldDecoratorCollection decorator;
    if (!AffixDecorators.TryGetValue(snoMonsterAffix.Affix, out decorator)) continue;
    string affixName = null;

    if (!monster.IsOnScreen)
    {
    if (CustomAffixNames.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNames[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }
    else
    {
    if (CustomAffixNamesShort.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNamesShort[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }
    decorator.Paint(layer, monster, monster.FloorCoordinate, affixName);
    }

    }



    if (monster.SnoMonster.Priority == MonsterPriority.keywarden)
    {

    foreach (var snoMonsterAffix in monster.AffixSnoList)
    {
    WorldDecoratorCollection decorator;
    if (!AffixDecorators.TryGetValue(snoMonsterAffix.Affix, out decorator)) continue;
    string affixName = null;

    if (!monster.IsOnScreen)
    {
    if (CustomAffixNames.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNames[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }
    else
    {
    if (CustomAffixNamesShort.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNamesShort[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }
    decorator.Paint(layer, monster, monster.FloorCoordinate, affixName);
    }

    }

    if (monster.Rarity == ActorRarity.RareMinion)
    {

    foreach (var snoMonsterAffix in monster.AffixSnoList)
    {

    if (!AffixDecorators.TryGetValue(snoMonsterAffix.Affix, out WorldDecoratorCollection decorator)) continue;
    string affixName = null;

    if (!monster.IsOnScreen)
    {
    if (CustomAffixNames.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNames[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }
    else
    {
    if (CustomAffixNamesShort.ContainsKey(snoMonsterAffix.Affix))
    {
    affixName = CustomAffixNamesShort[snoMonsterAffix.Affix];
    }
    else
    {
    affixName = snoMonsterAffix.NameLocalized;
    }
    }
    decorator.Paint(layer, monster, monster.FloorCoordinate, affixName);
    }

    }


    }
    }
    //end
    }
    }
    }

    EliteAffixPlugin
All times are GMT -5. The time now is 08:56 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search