public MonsterAilmentEventArgs(Ailment mAilment) { Name = mAilment.Name; Duration = mAilment.Duration; MaxDuration = mAilment.MaxDuration; Buildup = mAilment.Buildup; MaxBuildup = mAilment.MaxBuildup; Counter = mAilment.Counter; }
private void GetMonsterAilments() { if (!this.IsAlive) { return; } if (Ailments.Count > 0) { foreach (Ailment status in Ailments) { if (status.Address == 0) { continue; } float maxBuildup = Math.Max(0, Scanner.READ_FLOAT(status.Address + 0x1C8)); float currentBuildup = Math.Max(0, Scanner.READ_FLOAT(status.Address + 0x1B8)); float maxDuration = Math.Max(0, Scanner.READ_FLOAT(status.Address + 0x19C)); float currentDuration = Math.Max(0, Scanner.READ_FLOAT(status.Address + 0x1F8)); byte counter = Scanner.READ_BYTE(status.Address + 0x200); status.SetAilmentInfo(status.ID, currentDuration, maxDuration, currentBuildup, maxBuildup, counter); } } else { Int64 StatusAddress = Scanner.READ_LONGLONG(MonsterAddress + 0x78); StatusAddress = Scanner.READ_LONGLONG(StatusAddress + 0x57A8); Int64 aHolder = StatusAddress; while (aHolder != 0) { aHolder = Scanner.READ_LONGLONG(aHolder + 0x10); if (aHolder != 0) { StatusAddress = aHolder; } } Int64 StatusPtr = StatusAddress + 0x40; while (StatusPtr != 0x0) { Int64 MonsterInStatus = Scanner.READ_LONGLONG(StatusPtr + 0x188); if (MonsterInStatus == MonsterAddress) { int ID = Scanner.READ_INT(StatusPtr + 0x198); System.Xml.XmlNode AilmentInfo = MonsterData.GetAilmentByIndex(ID); bool IsSkippable = AilmentInfo == null ? true : AilmentInfo.Attributes["Skip"].Value == "True"; if (IsSkippable && !UserSettings.PlayerConfig.HunterPie.Debug.ShowUnknownStatuses) { StatusPtr = Scanner.READ_LONGLONG(StatusPtr + 0x18); continue; } else { float maxBuildup = Math.Max(0, Scanner.READ_FLOAT(StatusPtr + 0x1C8)); float currentBuildup = Math.Max(0, Scanner.READ_FLOAT(StatusPtr + 0x1B8)); float maxDuration = Math.Max(0, Scanner.READ_FLOAT(StatusPtr + 0x19C)); float currentDuration = Math.Max(0, Scanner.READ_FLOAT(StatusPtr + 0x1F8)); byte counter = Scanner.READ_BYTE(StatusPtr + 0x200); Ailment mAilment = new Ailment { Address = StatusPtr }; mAilment.SetAilmentInfo(ID, currentDuration, maxDuration, currentBuildup, maxBuildup, counter); Ailments.Add(mAilment); } } StatusPtr = Scanner.READ_LONGLONG(StatusPtr + 0x18); } } }