public static bool IsTargetable(ActorCommonData acd) { if (acd.x000_Id == -1) { return(false); } return(acd.GetAttributeValue(AttributeId.Invulnerable) < 1 && acd.GetAttributeValue(AttributeId.Stealthed) < 1 && acd.GetAttributeValue(AttributeId.Burrowed) < 1 && acd.GetAttributeValue(AttributeId.Untargetable) == 0); }
public static bool isBuff(int SnoPowerID, int AttribId, ActorCommonData acd) { try { acd.TakeSnapshot(); if (acd.x000_Id != -1) { return((int)acd.GetAttributeValue((AttributeId)AttribId, SnoPowerID) > 0); } acd.FreeSnapshot(); return(false); } catch { return(false); } }
public static int getBuffCount(int SnoPowerID, int AttribId, ActorCommonData acd) { try { acd.TakeSnapshot(); if (acd.x000_Id != -1) { return((int)acd.GetAttributeValue((AttributeId)AttribId, SnoPowerID)); } acd.FreeSnapshot(); return(0); } catch { return(0); } }
public static double get_HitpointsPercentage(ActorCommonData monster) { try { double currentHitpoints = monster.x188_Hitpoints; double totalHitpoints = monster.GetAttributeValue(AttributeId.HitpointsMaxTotal); double currentPercentage = currentHitpoints / totalHitpoints * 100; return(currentPercentage); } catch (Exception) { return(0); } }
public static bool isEliteIllusionist(ActorCommonData monster) { try { //if (hasAffix_Illusionist(monster)) //{ // A_Handler.Log.LogEntry.addLogEntry("------------------------------------------------------"); // A_Handler.Log.LogEntry.addLogEntry("Illusionist Affix : " + hasAffix_Illusionist(monster)); // A_Handler.Log.LogEntry.addLogEntry("SummonedByACDID : " + monster.GetAttributeValue(AttributeId.SummonedByACDID)); // A_Handler.Log.LogEntry.addLogEntry("SummonedByAutocast : " + monster.GetAttributeValue(AttributeId.SummonedByAutocast)); // A_Handler.Log.LogEntry.addLogEntry("SummonedBySNO : " + monster.GetAttributeValue(AttributeId.SummonedBySNO)); // A_Handler.Log.LogEntry.addLogEntry("SummonerID : " + monster.GetAttributeValue(AttributeId.SummonerID)); // A_Handler.Log.LogEntry.addLogEntry("Illusion : " + monster.GetAttributeValue(AttributeId.Illusion)); //} //return false; return(monster.GetAttributeValue(AttributeId.SummonedByACDID) != -1); //if summoned illu this is != -1 } catch (Exception) { return(false); } }
public static bool IsRare(ActorCommonData acd) { return((int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Rare4 || (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Rare5 || (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Rare6); }
public static bool IsMagic(ActorCommonData acd) { return((int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Magic1 || (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Magic2 || (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Magic3); }
public static bool IsWhite(ActorCommonData acd) { return((int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Inferior || (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Normal || (int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Superior); }
public static bool IsLegendary(ActorCommonData acd) { return((int)acd.GetAttributeValue(AttributeId.ItemQualityLevel) == (int)ItemQuality.Legendary); }
public static bool IsAncient(ActorCommonData acd) { return((int)acd.GetAttributeValue(AttributeId.AncientRank) == 1); }
private static double GetItemSeed(ActorCommonData ItemAcd) { return(ItemAcd.GetAttributeValue(Enigma.D3.Enums.AttributeId.Seed)); }