コード例 #1
0
        private void LoadListView()
        {
            listView.Items.Clear();

            AddRow(LazyRaider.Me.Guid, "-ME-", LazyRaider.Me.Class.ToString(), LazyRaider.GetGroupRoleAssigned(LazyRaider.Me).ToString(), LazyRaider.Me.MaxHealth.ToString());

            if (StyxWoW.IsInGame && StyxWoW.Me != null)
            {
                ObjectManager.Update();

                LazyRaider.Dlog("-- Group Count: {0}", LazyRaider.GroupMemberInfos.Count());

                foreach (WoWPartyMember pm in LazyRaider.GroupMemberInfos)
                {
                    if (pm == null || pm.Guid == LazyRaider.Me.Guid)
                    {
                        continue;
                    }

                    WoWPlayer p      = pm.ToPlayer();
                    string    sName  = p == null ? "-out of range-" : p.Name;
                    string    sRole  = LazyRaider.GetGroupRoleAssigned(pm).ToString();
                    string    sClass = p == null ? "-n/a-" : p.Class.ToString();
                    LazyRaider.Dlog("-- Group Member: {0}.{1:X3} hp={2} is {3}", sClass, pm.Guid, pm.HealthMax, sRole);

                    AddRow(pm.Guid, sName, sClass, sRole, pm.HealthMax.ToString());
                }
            }

            this.listView.ListViewItemSorter = new ListViewItemComparer(2);
            listView.Sort();
            btnSetLeader.Enabled = true;
        }
コード例 #2
0
        public static void Clear()
        {
            LazyRaider.Dlog("Tank.Clear:  cleared tank");

            RaFHelper.ClearLeader();
            Tank.Guid = 0;
        }
コード例 #3
0
        public static void SetAsLeader(ulong guidNew)
        {
            WoWPlayer p = null;

            Tank.Guid = guidNew;

            if (Tank.Guid != 0)
            {
                p = Tank.Current.ToPlayer();
            }

            if (p == null)
            {
                LazyRaider.Dlog("Tank.SetAsLeader:  out of range and cannot resolve {0}", LazyRaider.Safe_UnitName(Tank.Current));
                RaFHelper.ClearLeader();
            }
            else
            {
                LazyRaider.Dlog("Tank.SetAsLeader:  setting tank {0}", LazyRaider.Safe_UnitName(p));
                RaFHelper.SetLeader(p);
                invalidDelegate = new ObjectInvalidateDelegate(RaFLeader_OnInvalidate);
                RaFHelper.Leader.OnInvalidate += invalidDelegate;
            }
        }
コード例 #4
0
 public static void RaFLeader_OnInvalidate()
 {
     LazyRaider.Dlog("RaFLeader_OnInvalidate: tank reference now invalid, resetting");
     RaFHelper.ClearLeader();
     invalidDelegate = null;
 }