URL:
  <http://gna.org/bugs/?19545>

                 Summary: [unstore_unit] can advance units only once
                 Project: Battle for Wesnoth
            Submitted by: elvish_hunter
            Submitted on: mer 14 mar 2012 09:36:41 GMT
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: fendrin
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: trunk and 1.10.1
        Operating System: All

    _______________________________________________________

Details:

It was reported here:
http://forums.wesnoth.org/viewtopic.php?f=21&t=36292#p522605
that, if a unit with enough experience to advance twice or more is unstored,
[unstore_unit] can fire the advancement only once.
With my basic C++ knowledge, I found that the following patch (that I'm
copypasting, as it's just a line) enables [unstore_unit] to advance units
until they no longer have enough XP to do so.


Index: src/game_events.cpp
===================================================================
--- src/game_events.cpp (revisione 53519)
+++ src/game_events.cpp (copia locale)
@@ -2278,7 +2278,7 @@
                        }
 
                        const int side = controller->current_side();
-                       if (advance &&
+                       while (advance &&
                            
unit_helper::will_certainly_advance(resources::units->find(loc)))
                        {
                                int total_opt = 
unit_helper::number_of_possible_advances(u);


However, as I'm not a real C++ coder, I'm assigning this patch to fendrin, as
we agreed on IRC.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?19545>

_______________________________________________
  Messaggio inviato con/da Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to