mail[Wesnoth-commits] r33653 - /trunk/src/callable_objects.cpp


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

Header


Content

Posted by dragonking on March 14, 2009 - 21:45:
Author: dragonking
Date: Sat Mar 14 21:45:48 2009
New Revision: 33653

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33653&view=rev
Log:
Fix formula attacks member bug

Modified:
    trunk/src/callable_objects.cpp

Modified: trunk/src/callable_objects.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/callable_objects.cpp?rev=33653&r1=33652&r2=33653&view=diff
==============================================================================
--- trunk/src/callable_objects.cpp (original)
+++ trunk/src/callable_objects.cpp Sat Mar 14 21:45:48 2009
@@ -113,16 +113,15 @@
        } else if(key == "number_of_attacks") {
                return variant(att_.num_attacks());
        } else if(key == "special") {
-               std::string specials = att_.weapon_specials(true);
-
-               if(specials == "") {
-                       std::vector<variant> res;
-                       return variant( &res );
-               }
-
-               std::vector< std::string > string_vector = utils::split( 
specials );
-
-               return convert_vector( string_vector );
+                std::vector<t_string> specials = att_.special_tooltips(true);
+
+                std::vector<variant> res;
+
+                for( std::vector<t_string>::iterator i = specials.begin(); i 
!= specials.end() && i+1 != specials.end(); i=i+2) {
+                    res.push_back( variant( i->base_str() ) );
+                }
+
+               return variant(&res);
        }
 
        return variant();




Related Messages


Powered by MHonArc, Updated Sat Mar 14 22:20:17 2009