Patch to add "squechlWarnings/verboseWarnings"

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
fallen
Noob
Noob
Posts: 7
Joined: 06 Apr 2008, 09:01
Noob?: Yes
Location: near respawn at Prontera

Patch to add "squechlWarnings/verboseWarnings"

#1 Post by fallen »

When running a combo monk/champ or a Taekwon-class character, it is really annoying seeing dozens of lines with "Skill Chain Combo failed (Requirement)" or "Skill Counter failed (Requirement)" when trying to do combos (also applies to ganker rogues, "Skill Steal failed (Requirement)")

I made a simple patch that adds the same functionality as squelchDomains into warning messages (I shamelessly cut/pasted the squelch code from sub message and changed the variable names :P)

Code: Select all

Index: Log.pm
===================================================================
--- Log.pm      (revision 6665)
+++ Log.pm      (working copy)
@@ -288,10 +289,13 @@
 # Prints a warning message. It warns the user that a possible non-fatal error has occured or will occur.
 # See the description for Log.pm for more details about the parameters.
 sub warning {
+       my ($message, $domain, $level) = @_;
+       $level = 5 if existsInList($config{squelchWarnings}, $domain);
+       $level = 0 if existsInList($config{verboseWarnings}, $domain);
        return processMsg("warning",
-               $_[0],
-               $_[1],
-               $_[2],
+               $message,
+               $domain,
+               $level,
                $warningVerbosity,
                \%warningConsole,
                \%warningFiles);
Usage on config.txt:

Code: Select all

squelchWarnings skill
Image

kali
OpenKore Monk
OpenKore Monk
Posts: 457
Joined: 04 Apr 2008, 10:10

Re: Patch to add "squechlWarnings/verboseWarnings"

#2 Post by kali »

Moved to commit queue

(seriously, someone needs to commit all of these already X_X)

How about you fallen, wanna take up the challenge?
Got your topic trashed by a mod?

Trashing topics is one click, and moving a topic to its proper forum is a lot harder. You expend the least effort in deciding where to post, mods expend the least effort by trashing.

Have a nice day.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: Patch to add "squechlWarnings/verboseWarnings"

#3 Post by kLabMouse »

kali wrote:Moved to commit queue

(seriously, someone needs to commit all of these already X_X)

How about you fallen, wanna take up the challenge?
"fallen" is good. ;)
fallen May-be you can/could join OpenKore Dev team?

Locked