diff --git a/Razor/HotKeys/Misc.cs b/Razor/HotKeys/Misc.cs index 2ae97780..ce4da1ab 100644 --- a/Razor/HotKeys/Misc.cs +++ b/Razor/HotKeys/Misc.cs @@ -42,6 +42,7 @@ public static void Initialize() HotKey.Add(HKCategory.Misc, LocString.LastObj, new HotKeyCallback(LastObj)); HotKey.Add(HKCategory.Misc, LocString.AllNames, new HotKeyCallback(AllNames)); HotKey.Add(HKCategory.Misc, LocString.AllCorpses, new HotKeyCallback(AllCorpses)); + HotKey.Add(HKCategory.Misc, LocString.OpenAllCorpses, new HotKeyCallback(OpenAllCorpses)); HotKey.Add(HKCategory.Misc, LocString.AllMobiles, new HotKeyCallback(AllMobiles)); HotKey.Add(HKCategory.Misc, LocString.Dismount, new HotKeyCallback(Dismount)); @@ -245,6 +246,19 @@ private static void AllCorpses() } } + private static void OpenAllCorpses() + { + foreach (Item i in World.Items.Values) + { + if (i.IsCorpse && + Utility.InRange(i.Position, World.Player.Position, Config.GetInt("CorpseRange")) && + World.Player != null && World.Player.Visible) + { + PlayerData.DoubleClick(i); + } + } + } + private static void AllMobiles() { bool textFlags = Config.GetBool("LastTargTextFlags"); diff --git a/Razor/UI/Languages.cs b/Razor/UI/Languages.cs index dfc14691..08cbea39 100644 --- a/Razor/UI/Languages.cs +++ b/Razor/UI/Languages.cs @@ -593,6 +593,7 @@ public enum LocString : int ResumeScriptMessage, PauseScriptMessage, ScriptFinishedStopwatch, + OpenAllCorpses, __End } diff --git a/etc/Language/Razor_lang.enu b/etc/Language/Razor_lang.enu index 83adfdac..3da3d125 100644 --- a/etc/Language/Razor_lang.enu +++ b/etc/Language/Razor_lang.enu @@ -829,4 +829,5 @@ InputBox::ok=&OK 2123=> Pause Current Script 2124=Script resuming from line {0} 2125=Script pausing on line {0} -2126=Script '{0}' finished ({1}ms) \ No newline at end of file +2126=Script '{0}' finished ({1}ms) +2127=Open All Corpses \ No newline at end of file