mail[Wesnoth-commits] r34204 - in /trunk: changelog src/unit_abilities.cpp src/unit_types.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by soliton . de on March 28, 2009 - 07:58:
Author: soliton
Date: Sat Mar 28 07:58:24 2009
New Revision: 34204

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34204&view=rev
Log:
* Fixed bug #13257: Attack dialog always uses the active name of a weapon 
special

Modified:
    trunk/changelog
    trunk/src/unit_abilities.cpp
    trunk/src/unit_types.hpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=34204&r1=34203&r2=34204&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sat Mar 28 07:58:24 2009
@@ -25,6 +25,9 @@
      via floating popups on the specified hex
    * Added run_file FormulaAI function to allow running .fai scripts directly
      from in-game console
+ * User interface:
+   * Fixed bug #13257: Attack dialog always uses the active name of a weapon
+     special
  * WML Engine:
    * Added [show_objectives] tag (part of bug #13042)
    * Made moveto events set $x2,$y2 to the source hex. (bug #13140)

Modified: trunk/src/unit_abilities.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_abilities.cpp?rev=34204&r1=34203&r2=34204&view=diff
==============================================================================
--- trunk/src/unit_abilities.cpp (original)
+++ trunk/src/unit_abilities.cpp Sat Mar 28 07:58:24 2009
@@ -637,7 +637,7 @@
             i_end = list_map.end(); i != i_end; ++i) {
                for (config::child_list::const_iterator j = i->second.begin(),
                     j_end = i->second.end(); j != j_end; ++j) {
-                       char const *s = (force || special_active(**j, true, 
true))
+                       char const *s = (force || special_active(**j, true))
                                ? "name" : "name_inactive";
                        std::string const &name = (**j)[s];
 
@@ -658,7 +658,7 @@
  * cfg: a weapon special WML structure
  *
  */
-bool attack_type::special_active(const config& cfg,bool self,bool report) 
const
+bool attack_type::special_active(const config& cfg, bool self) const
 {
 //     log_scope("special_active");
        assert(unitmap_ != NULL);
@@ -676,7 +676,7 @@
        }
 
        if(attacker_) {
-               if (!report) {
+               {
                        std::string const &active = cfg["active_on"];
                        if (!active.empty() && active != "offense")
                                return false;
@@ -701,7 +701,7 @@
                        }
                }
        } else {
-               if (!report) {
+               {
                        std::string const &active = cfg["active_on"];
                        if (!active.empty() && active != "defense")
                                return false;

Modified: trunk/src/unit_types.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.hpp?rev=34204&r1=34203&r2=34204&view=diff
==============================================================================
--- trunk/src/unit_types.hpp (original)
+++ trunk/src/unit_types.hpp Sat Mar 28 07:58:24 2009
@@ -82,7 +82,7 @@
        /*
         * cfg: a weapon special WML structure
         */
-       bool special_active(const config& cfg,bool self,bool report=false) 
const;
+       bool special_active(const config& cfg, bool self) const;
        bool special_affects_opponent(const config& cfg) const;
        bool special_affects_self(const config& cfg) const;
 




Related Messages


Powered by MHonArc, Updated Sat Mar 28 08:40:25 2009