Ejemplo n.º 1
0
 public DebuffObj(int id, int spell, int icon, D3DObj d3dObj)
 {
     Id        = id;
     Spell     = spell;
     Icon      = icon;
     D3DObject = d3dObj;
 }
Ejemplo n.º 2
0
        private void _processPlayerAdd(Player player)
        {
            bool    enemy       = player.Enemy;
            HudList playersView = enemy ? _enemyListView : _friendlyListView;
            int     icon        = enemy ? EnemyIcon : FriendlyIcon;
            D3DObj  playerIcon  = CoreManager.Current.D3DService.MarkObjectWithShape(player.Id, D3DShape.Sphere, Color.Red.ToArgb());

            playerIcon.Scale(enemy ? 0.3f : 0.3f);
            playerIcon.Anchor(player.Id, 0.2f, 0.0f, 0.0f, 2.5f);
            playerIcon.Color = enemy ? Color.FromArgb(200, Color.Red).ToArgb() : Color.FromArgb(220, Color.LightBlue).ToArgb();
            playerIcon.OrientToCamera(true);
            _playerIcons.Add(_playerIconFactory(player.Id, playerIcon));

            HudList.HudListRowAccessor row = playersView.AddRow();
            ((HudPictureBox)row[0]).Image     = icon;
            ((HudStaticText)row[1]).Text      = player.Name;
            ((HudStaticText)row[1]).TextColor = enemy ? Color.Red : Color.LightBlue;

            if (!enemy)
            {
                ((HudStaticText)row[1]).TextColor = Color.LightGreen;
                ((HudPictureBox)row[2]).Image     = 100670841;
                ((HudPictureBox)row[3]).Image     = 100670842;
            }
        }
Ejemplo n.º 3
0
        private void _playerManager_PlayerUpdated(object sender, Player player)
        {
            try
            {
                PlayerIcon playerIcon = _playerIcons.Find(icon => icon.Id == player.Id);
                float      fade       = player.LowHealth ? 0.2f : 0;
                playerIcon.Icon.PFade = fade;

                Predicate <DebuffObj> debuffed = obj => obj.Id == player.Id;
                foreach (var obj in _debuffObjects.FindAll(debuffed))
                {
                    obj.D3DObject.Visible = false;
                    obj.D3DObject.Dispose();
                    _debuffObjects.Remove(obj);
                }

                int index = 0;
                foreach (DebuffInformation info in player.Debuffs)
                {
                    int spell = info.Spell;
                    if (info.MapDebuffToIcon(spell) != null && WorldObjectService.IsValidObject(player.Id))
                    {
                        int    icon = (int)info.MapDebuffToIcon(spell);
                        D3DObj obj  = CoreManager.Current.D3DService.MarkObjectWithIcon(player.Id, icon);
                        float  dz   = _globals.Host.Actions.Underlying.ObjectHeight(player.Id) + ((float)0 * 0.5f);
                        obj.Scale(0.5f);
                        obj.Anchor(player.Id, 0.2f, 0.0f, 0.0f, dz);
                        obj.PBounce   = 0.0f;
                        obj.Autoscale = false;
                        obj.HBounce   = 0.0f;
                        obj.OrientToCamera(true);
                        obj.POrbit = 2f;
                        obj.ROrbit = 0.5f;
                        obj.AnimationPhaseOffset = index * ((2f / 8f));
                        obj.Visible = true;
                        DebuffObj debuffObj = _debuffObjFactory(
                            player.Id,
                            info.Spell,
                            icon,
                            obj);

                        _debuffObjects.Add(debuffObj);
                        ++index;
                    }
                }
            } catch (Exception ex) { _logger.Error(ex); }
        }
Ejemplo n.º 4
0
 public static D3DObj CreateD3DObject(HUDControl pc, int targetID, int icon)
 {
     try
     {
         float  num    = lib.MyHost.Underlying.Hooks.ObjectHeight(targetID);
         D3DObj d3DObj = lib.MyCore.D3DService.NewD3DObj();
         d3DObj.SetIcon(icon);
         d3DObj.Anchor(targetID, 0.2f, 0f, 0f, num - pc.CurrentProfile.MonsterHeightOffset);
         d3DObj.Scale(pc.CurrentProfile.FloatingDebuffSizeF);
         d3DObj.ROrbit = 0f;
         d3DObj.OrientToCamera(true);
         d3DObj.Visible = true;
         return(d3DObj);
     }
     catch (Exception ex) { Repo.RecordException(ex); }
     return(null);
 }
Ejemplo n.º 5
0
        public static void Dispose()
        {
            RemoteLogInstance = 0;
            versid            = false;
            moncheck          = 0;
            authtype          = null;

            AdminAuth = false;
            UserAuth  = false;
            Logger    = null;

            AuthIds = null;
            LocKey  = null;
            status  = 0;

            MyHost = null;
            MyCore = null;

            OnDowntime    = null;
            OnDowntime2   = null;
            DistanceCheck = null;

            MyName   = null;
            MyServer = null;
            MyID     = 0;

            DFTEXT             = null;
            DF2TEXT            = null;
            PointArrow         = null;
            LastSelected       = 0;
            CurrentStance      = 0;
            WrongStanceCounter = 0;

            Enemies = null;
            Friends = null;

            vpcounter = 0;
            reason    = null;
            logging   = false;

            CurrentStance      = 0;
            WrongStanceCounter = 0;
            FailCounter        = 0;

            Ticker        = 0;
            Range         = 0;
            Timer         = 0;
            Comps         = 0;
            logoffcounter = 0;
            LastID        = 0;
            Slots         = 0;

            Width  = 0;
            Height = 0;
            X      = 0;
            Y      = 0;

            warspell = 0;
            streak   = 0;
            vuln     = 0;

            Element   = 0;
            Mode      = 0;
            Behaviour = 0;

            vtank = false;
        }
Ejemplo n.º 6
0
 public PlayerIcon(int id, D3DObj icon)
 {
     Id   = id;
     Icon = icon;
 }