Openkore.com

OpenKore Forums
It is currently 15 Dec 2017, 02:21

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Patch to add config options for supressing misses
PostPosted: 15 Apr 2009, 14:49 
Offline
Noob
Noob

Joined: 15 Apr 2009, 14:41
Posts: 1
On a high-flee char it's much cleaner to supress enemy misses so you can see easier when you get hit. I added config options to hide misses:

Code:
--- src/Network/Receive.pm   2009-04-15 12:31:16.000000000 -0600
+++ src/Network/Receive.pm   2009-04-15 13:06:52.000000000 -0600
@@ -831,7 +831,9 @@ sub actor_action {
      Misc::checkValidity("actor_action (attack 3)");

      if ($args->{sourceID} eq $accountID) {
-         message("$status $msg", $totalDamage > 0 ? "attackMon" : "attackMonMiss");
+         if ($totalDamage > 0 || !$config{hidePlayerMisses}) {
+            message("$status $msg", $totalDamage > 0 ? "attackMon" : "attackMonMiss");
+         }
         if ($startedattack) {
            $monstarttime = time();
            $monkilltime = time();
@@ -842,7 +844,9 @@ sub actor_action {
         Misc::checkValidity("actor_action (attack 5)");

      } elsif ($args->{targetID} eq $accountID) {
-         message("$status $msg", $args->{damage} > 0 ? "attacked" : "attackedMiss");
+         if ($args->{damage} > 0 || !$config{hideEnemyMisses}) {
+            message("$status $msg", $args->{damage} > 0 ? "attacked" : "attackedMiss");
+         }
         if ($args->{damage} > 0) {
            $damageTaken{$source->{name}}{attack} += $args->{damage};
         }
@@ -5338,7 +5342,12 @@ sub skill_use {
         'disp' => \$disp
      });

-   message $disp, $domain, 1;
+   if ($args->{targetID} eq $accountID && ($args->{damage} > 0 || !$config{hideEnemyMisses})) {
+      message $disp, $domain, 1;
+   }
+   elsif ($args->{sourceID} eq $accountID && ($args->{damage} > 0 || !$config{hidePlayerMisses})) {
+      message $disp, $domain, 1;
+   }

   if ($args->{targetID} eq $accountID && $args->{damage} > 0) {
      $damageTaken{$source->{name}}{$skill->getName()} += $args->{damage};


Sample config.txt usage:
Code:
hideEnemyMisses 1
hidePlayerMisses 0


Top
 Profile  
 
 Post subject: Re: Patch to add config options for supressing misses
PostPosted: 24 May 2009, 13:14 
Offline
Plain Yogurt
Plain Yogurt
User avatar

Joined: 04 Apr 2008, 09:49
Posts: 82
would squelchDomains be different with this patch?
im confused... :roll:

_________________
Image
DARKest Ninja


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group