BuyArmyAction.cpp 714 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * BattleAction.cpp, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #include "StdInc.h"
  11. #include "BuyArmyAction.h"
  12. #include "../../VCAI.h"
  13. #include "../../Goals/CompleteQuest.h"
  14. #include "../../../../lib/mapping/CMap.h" //for victory conditions
  15. extern boost::thread_specific_ptr<CCallback> cb;
  16. extern boost::thread_specific_ptr<VCAI> ai;
  17. namespace AIPathfinding
  18. {
  19. void BuyArmyAction::execute(const CGHeroInstance * hero) const
  20. {
  21. ai->recruitCreatures(hero->visitedTown, hero);
  22. }
  23. std::string BuyArmyAction::toString() const
  24. {
  25. return "Buy Army";
  26. }
  27. }