Beispiel #1
0
        public HealthBar(EntityWrapper entity, HealthBarSettings settings)
        {
            Entity = entity;
            // If ignored entity found, skip
            foreach (string _entity in IgnoreEntitiesList)
            {
                if (entity.Path.Contains(_entity))
                {
                    return;
                }
            }
            if (entity.HasComponent <Player>())
            {
                Type     = CreatureType.Player;
                Settings = settings.Players;
                IsValid  = true;
            }
            else if (entity.HasComponent <Monster>())
            {
                IsValid = true;
                if (entity.IsHostile)
                {
                    isHostile = true;
                    switch (entity.GetComponent <ObjectMagicProperties>().Rarity)
                    {
                    case MonsterRarity.White:
                        Type     = CreatureType.Normal;
                        Settings = settings.NormalEnemy;
                        break;

                    case MonsterRarity.Magic:
                        Type     = CreatureType.Magic;
                        Settings = settings.MagicEnemy;
                        break;

                    case MonsterRarity.Rare:
                        Settings = settings.RareEnemy;
                        Type     = CreatureType.Rare;
                        break;

                    case MonsterRarity.Unique:
                        Settings = settings.UniqueEnemy;
                        Type     = CreatureType.Unique;
                        break;
                    }
                }
                else
                {
                    Type     = CreatureType.Minion;
                    Settings = settings.Minions;
                }
            }
            Life   = Entity.GetComponent <Life>();
            lastHp = GetFullHp();
        }
Beispiel #2
0
 public SettingsHub()
 {
     MenuSettings = new MenuSettings();
     DpsMeterSettings = new DpsMeterSettings();
     MapIconsSettings = new MapIconsSettings();
     ItemAlertSettings = new ItemAlertSettings();
     AdvancedTooltipSettings = new AdvancedTooltipSettings();
     MonsterTrackerSettings = new MonsterTrackerSettings();
     PoiTrackerSettings = new PoiTrackerSettings();
     PreloadAlertSettings = new PreloadAlertSettings();
     XpRateSettings = new XpRateSettings();
     HealthBarSettings = new HealthBarSettings();
     InventoryPreviewSettings = new InventoryPreviewSettings();
     KillCounterSettings = new KillCounterSettings();
 }
Beispiel #3
0
        public HealthBar(EntityWrapper entity, HealthBarSettings settings)
        {
            Entity = entity;
            if (entity.HasComponent <Player>())
            {
                Type     = CreatureType.Player;
                Settings = settings.Players;
                IsValid  = true;
            }
            else if (entity.HasComponent <Monster>())
            {
                IsValid = true;
                if (entity.IsHostile)
                {
                    isHostile = true;
                    switch (entity.GetComponent <ObjectMagicProperties>().Rarity)
                    {
                    case MonsterRarity.White:
                        Type     = CreatureType.Normal;
                        Settings = settings.NormalEnemy;
                        break;

                    case MonsterRarity.Magic:
                        Type     = CreatureType.Magic;
                        Settings = settings.MagicEnemy;
                        break;

                    case MonsterRarity.Rare:
                        Settings = settings.RareEnemy;
                        Type     = CreatureType.Rare;
                        break;

                    case MonsterRarity.Unique:
                        Settings = settings.UniqueEnemy;
                        Type     = CreatureType.Unique;
                        break;
                    }
                }
                else
                {
                    Type     = CreatureType.Minion;
                    Settings = settings.Minions;
                }
            }
        }
Beispiel #4
0
 public HealthBar(EntityWrapper entity, HealthBarSettings settings)
 {
     Entity = entity;
     if (entity.HasComponent<Player>())
     {
         Type = CreatureType.Player;
         Settings = settings.Players;
         IsValid = true;
     }
     else if (entity.HasComponent<Monster>())
     {
         IsValid = true;
         if (entity.IsHostile)
         {
             isHostile = true;
             switch (entity.GetComponent<ObjectMagicProperties>().Rarity)
             {
                 case MonsterRarity.White:
                     Type = CreatureType.Normal;
                     Settings = settings.NormalEnemy;
                     break;
                 case MonsterRarity.Magic:
                     Type = CreatureType.Magic;
                     Settings = settings.MagicEnemy;
                     break;
                 case MonsterRarity.Rare:
                     Settings = settings.RareEnemy;
                     Type = CreatureType.Rare;
                     break;
                 case MonsterRarity.Unique:
                     Settings = settings.UniqueEnemy;
                     Type = CreatureType.Unique;
                     break;
             }
         }
         else
         {
             Type = CreatureType.Minion;
             Settings = settings.Minions;
         }
     }
     Life = Entity.GetComponent<Life>();
     lastHp = GetFullHp();
 }