private void BandageHeakMobileTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid) { Assistant.Mobile mobile = Assistant.World.FindMobile(serial); if (mobile == null) { if (showagentmessageCheckBox.Checked) { RazorEnhanced.Misc.SendMessage("Invalid Target!", false); } RazorEnhanced.BandageHeal.AddLog("Invalid Target!"); return; } if (mobile.Serial.IsMobile) { if (showagentmessageCheckBox.Checked) { RazorEnhanced.Misc.SendMessage("Bandage Heal target set to: " + mobile.Name, false); } RazorEnhanced.BandageHeal.AddLog("Bandage Heal target set to: " + mobile.Name); BandageHeal.TargetSerial = mobile.Serial; RazorEnhanced.Settings.General.WriteInt("BandageHealtargetLabel", mobile.Serial); } else { if (showagentmessageCheckBox.Checked) { RazorEnhanced.Misc.SendMessage("Invalid Target!", false); } RazorEnhanced.Scavenger.AddLog("Invalid Target!"); } }
private static void GetInfoTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid) { Assistant.Item assistantItem = Assistant.World.FindItem(serial); if (assistantItem != null && assistantItem.Serial.IsItem) { Assistant.Engine.MainWindow.BeginInvoke((MethodInvoker) delegate { RazorEnhanced.UI.EnhancedItemInspector inspector = new RazorEnhanced.UI.EnhancedItemInspector(assistantItem); inspector.TopMost = true; inspector.Show(); }); } else { Assistant.Mobile assistantMobile = Assistant.World.FindMobile(serial); if (assistantMobile != null && assistantMobile.Serial.IsMobile) { Assistant.Engine.MainWindow.BeginInvoke((MethodInvoker) delegate { RazorEnhanced.UI.EnhancedMobileInspector inspector = new RazorEnhanced.UI.EnhancedMobileInspector(assistantMobile); inspector.TopMost = true; inspector.Show(); }); } } }
private void targetbuttonChoseBodyHue(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid) { Assistant.Mobile mob = Assistant.World.FindMobile(serial); if (mob != null) { targethueGridView.Invoke((MethodInvoker) delegate { targethueGridView.Rows.Add(new object[] { "0x" + mob.Hue.ToString("X4") }); }); } }
internal static void GetInfoTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid) { if (loc) // Target on ground or static { Engine.MainWindow.SafeAction(s => { RazorEnhanced.UI.EnhancedStaticInspector inspector = new RazorEnhanced.UI.EnhancedStaticInspector(pt); inspector.TopMost = true; inspector.Show(); }); } else // Target item or mobile { Assistant.Item assistantItem = Assistant.World.FindItem(serial); if (assistantItem != null && assistantItem.Serial.IsItem) { Engine.MainWindow.SafeAction(s => { RazorEnhanced.UI.EnhancedItemInspector inspector = new RazorEnhanced.UI.EnhancedItemInspector(assistantItem); inspector.TopMost = true; inspector.Show(); }); } else { Assistant.Mobile assistantMobile = Assistant.World.FindMobile(serial); if (assistantMobile != null && assistantMobile.Serial.IsMobile) { Assistant.Engine.MainWindow.SafeAction(s => { RazorEnhanced.UI.EnhancedMobileInspector inspector = new RazorEnhanced.UI.EnhancedMobileInspector(assistantMobile); inspector.TopMost = true; inspector.Show(); }); } } } }
internal EnhancedMobileInspector(Assistant.Mobile mobileTarg) { InitializeComponent(); m_mobile = mobileTarg; MaximizeBox = false; }