wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src dialogs.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src dialogs.cpp
Date: Wed, 14 Sep 2005 19:21:01 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/09/14 23:21:01

Modified files:
        src            : dialogs.cpp 

Log message:
        made amla advancements bypass normal levelling-up code to fix bugs 
associated with amla

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/dialogs.cpp.diff?tr1=1.107&tr2=1.108&r1=text&r2=text

Patches:
Index: wesnoth/src/dialogs.cpp
diff -u wesnoth/src/dialogs.cpp:1.107 wesnoth/src/dialogs.cpp:1.108
--- wesnoth/src/dialogs.cpp:1.107       Sun Aug 21 17:56:28 2005
+++ wesnoth/src/dialogs.cpp     Wed Sep 14 23:21:01 2005
@@ -1,4 +1,4 @@
-/* $Id: dialogs.cpp,v 1.107 2005/08/21 17:56:28 gruikya Exp $ */
+/* $Id: dialogs.cpp,v 1.108 2005/09/14 23:21:01 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -136,12 +136,15 @@
                        SDL_Delay(30);
                }
        }
-
-       const std::string& chosen_unit = choice < options.size() ? 
options[choice] : u->second.type().id();
-       ::advance_unit(info,units,loc,chosen_unit);
+
+       if(choice < options.size()) {
+               const std::string& chosen_unit = choice < options.size() ? 
options[choice] : u->second.type().id();
+               ::advance_unit(info,units,loc,chosen_unit);
+       }
 
        u = units.find(loc);
-       if(u != units.end() && choice >= options.size()) {
+       if(u != units.end() && choice >= options.size()) {
+               u->second.get_experience(-u->second.experience()); //reset xp 
to 0
                u->second.add_modification("advance",*mod_options[choice - 
options.size()]);
        }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]