Beispiel #1
0
        private static void DumpItems(IEnumerable <DiaItem> items, double iType)
        {
            var diaItems = items as IList <DiaItem> ?? items.ToList();

            Logger.Log("Items found: {0}", diaItems.Count());
            foreach (DiaItem o in diaItems)
            {
                if (!o.IsValid)
                {
                    continue;
                }

                string attributesFound = "";

                foreach (ActorAttributeType aType in Enum.GetValues(typeof(ActorAttributeType)))
                {
                    if (IgnoreActorAttributeTypes.Contains(aType))
                    {
                        continue;
                    }
                    iType = GetAttribute(iType, o, aType);
                    if (iType > 0)
                    {
                        attributesFound += aType.ToString() + "=" + iType + ", ";
                    }
                }

                try
                {
                    Logger.Log("\nItem ActorSNO: {0} Name: {1} Type: {2} Radius: {3:0.00} Position: {4} ({5}) Distance: {6:0} Animation: {7} AppearanceSNO: {8} has Attributes: {9}\n\n",
                               o.ActorSNO, o.Name, o.ActorInfo.GizmoType, o.CollisionSphere.Radius, StringUtils.GetProfileCoordinates(o.Position), StringUtils.GetSimplePosition(o.Position), o.Distance, o.CommonData.CurrentAnimation, o.AppearanceSNO, attributesFound);
                }
                catch { }
            }
        }
Beispiel #2
0
        private static void DumpPlayers(IEnumerable <DiaPlayer> players)
        {
            var diaPlayers = players as IList <DiaPlayer> ?? players.ToList();

            Logger.Log("Players found: {0}", diaPlayers.Count());
            HashSet <string> scannedAttributes = new HashSet <string>();

            foreach (DiaPlayer o in diaPlayers)
            {
                if (!o.IsValid)
                {
                    continue;
                }

                string       attributesFound = "";
                const string propertiesFound = "";

                foreach (ActorAttributeType aType in Enum.GetValues(typeof(ActorAttributeType)))
                {
                    if (IgnoreActorAttributeTypes.Contains(aType))
                    {
                        continue;
                    }
                    if (scannedAttributes.Contains(aType.ToString()))
                    {
                        continue;
                    }

                    double aat = o.CommonData.GetAttribute <int>(aType);

                    if (aat == 0d || aat == -1d || aat == double.NaN || aat == double.MinValue || aat == double.MaxValue)
                    {
                        continue;
                    }

                    if (aat.ToString(CultureInfo.InvariantCulture) == "NaN")
                    {
                        continue;
                    }
                    scannedAttributes.Add(aType.ToString());

                    attributesFound += aType.ToString() + "=" + aat + ", ";
                }

                //propertiesFound = ReadProperties<DiaPlayer>(o, null);

                try
                {
                    Logger.Log("\nPlayer ActorSNO: {0} Name: {1} Type: {2} Radius: {3:0.00} Position: {4} ({5}) RActorGUID: {6} ACDGuid: {7} SummonerId: {8} " +
                               "SummonedByAcdId: {9} Animation: {10} isHidden: {11} SNOApperance: {12} has Attributes: {13}\nProperties:\n{14}\n\n",
                               o.ActorSNO, o.Name, o.ActorInfo.GizmoType, o.CollisionSphere.Radius, StringUtils.GetProfileCoordinates(o.Position), StringUtils.GetSimplePosition(o.Position),
                               o.RActorGuid, o.ACDGuid, o.SummonerId, o.SummonedByACDId,
                               o.CommonData.CurrentAnimation, o.IsHidden, o.ActorInfo.SNOApperance, attributesFound, propertiesFound);
                }
                catch { }
            }
        }
Beispiel #3
0
        private static double DumpGizmos(IEnumerable <DiaGizmo> gizmos, double iType)
        {
            Logger.Log("Gizmos found: {0}", gizmos.Count());
            foreach (DiaGizmo o in gizmos)
            {
                if (!o.IsValid)
                {
                    continue;
                }

                if (o.ActorInfo.GizmoType == Zeta.Game.Internals.SNO.GizmoType.Trigger)
                {
                    continue;
                }

                if (o.ActorInfo.GizmoType == Zeta.Game.Internals.SNO.GizmoType.Checkpoint)
                {
                    continue;
                }

                string attributesFound = "";

                foreach (ActorAttributeType aType in Enum.GetValues(typeof(ActorAttributeType)))
                {
                    if (IgnoreActorAttributeTypes.Contains(aType))
                    {
                        continue;
                    }
                    iType = GetAttribute(iType, o, aType);
                    if (iType > 0)
                    {
                        attributesFound += aType.ToString() + "=" + iType + ", ";
                    }
                }

                if (o is GizmoBanner)
                {
                    var banner = (GizmoBanner)o;
                    attributesFound += "BannerIndex=" + banner.BannerPlayerIndex + ", ";
                    attributesFound += "BannerACDId=" + banner.BannerACDId + ", ";
                    attributesFound += "BannerCPlayerACDGuid=" + banner.BannerPlayer.ACDGuid + ", ";
                    attributesFound += "IsBannerUsable=" + banner.IsBannerUsable + ", ";
                    attributesFound += "IsBannerPlayerInCombat=" + banner.IsBannerPlayerInCombat + ", ";
                    attributesFound += "IsMyBanner=" + (banner.BannerPlayer.ACDGuid == ZetaDia.Me.ACDGuid).ToString() + ", ";
                }

                try
                {
                    Logger.Log("\nGizmo ActorSNO: {0} Name: {1} Type: {2} Radius: {3:0.00} Position: {4} ({5}) Distance: {6:0} Animation: {7} AppearanceSNO: {8} has Attributes: {9}\n\n",
                               o.ActorSNO, o.Name, o.ActorInfo.GizmoType, o.CollisionSphere.Radius, StringUtils.GetProfileCoordinates(o.Position), StringUtils.GetSimplePosition(o.Position), o.Distance, o.CommonData.CurrentAnimation, o.AppearanceSNO, attributesFound);
                }
                catch { }
            }
            return(iType);
        }
Beispiel #4
0
        private static double DumpObjects(IEnumerable <DiaObject> objects, double iType)
        {
            Logger.Log("Objects found: {0}", objects.Count());
            foreach (DiaObject o in objects)
            {
                if (!o.IsValid)
                {
                    continue;
                }

                string attributesFound = "";

                foreach (ActorAttributeType aType in Enum.GetValues(typeof(ActorAttributeType)))
                {
                    if (IgnoreActorAttributeTypes.Contains(aType))
                    {
                        continue;
                    }
                    try
                    {
                        iType = GetAttribute(iType, o, aType);
                    }
                    catch { }

                    if (iType > 0)
                    {
                        attributesFound += aType.ToString() + "=" + iType + ", ";
                    }
                }

                Vector3 myPos = ZetaDia.Me.Position;
                try
                {
                    Logger.Log("\nObject ActorSNO: {0} Name: {1} Type: {2} Radius: {3:0.00} Position: {4} ({5}) Animation: {6} Distance: {7:0.0} has Attributes: {8}\n\n",
                               o.ActorSNO, o.Name, o.ActorType, o.CollisionSphere.Radius, StringUtils.GetProfileCoordinates(o.Position), StringUtils.GetSimplePosition(o.Position), o.CommonData.CurrentAnimation, o.Position.Distance(myPos),
                               attributesFound);
                }
                catch { }
            }
            return(iType);
        }
Beispiel #5
0
        private static double DumpUnits(IEnumerable <DiaUnit> units, double iType)
        {
            Logger.Debug("Units found: {0}", units.Count());
            foreach (DiaUnit o in units)
            {
                if (!o.IsValid)
                {
                    continue;
                }

                string attributesFound = "";

                foreach (ActorAttributeType aType in Enum.GetValues(typeof(ActorAttributeType)))
                {
                    if (IgnoreActorAttributeTypes.Contains(aType))
                    {
                        continue;
                    }
                    iType = GetAttribute(iType, o, aType);
                    if (iType > 0)
                    {
                        attributesFound += aType.ToString() + "=" + iType + ", ";
                    }
                }

                string propertiesFound = ReadProperties(o, null);

                try
                {
                    Logger.Log("\nUnit ActorSNO: {0} Name: {1} Type: {2} Radius: {7:0.00} Position: {3} ({4}) Animation: {5} has Attributes:\n{6}\nProperties:\n{8}\n\n",
                               o.ActorSNO, o.Name, o.ActorInfo.GizmoType, StringUtils.GetProfileCoordinates(o.Position),
                               StringUtils.GetSimplePosition(o.Position),
                               o.CommonData.CurrentAnimation, attributesFound, o.CollisionSphere.Radius, propertiesFound);
                }
                catch { }
            }
            return(iType);
        }