SideInBattle.cpp 620 B

1234567891011121314151617181920212223242526
  1. /*
  2. * SideInBattle.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 "SideInBattle.h"
  12. #include "../mapObjects/CArmedInstance.h"
  13. VCMI_LIB_NAMESPACE_BEGIN
  14. void SideInBattle::init(const CGHeroInstance * Hero, const CArmedInstance * Army)
  15. {
  16. hero = Hero;
  17. armyObject = Army;
  18. color = armyObject->getOwner();
  19. if(color == PlayerColor::UNFLAGGABLE)
  20. color = PlayerColor::NEUTRAL;
  21. }
  22. VCMI_LIB_NAMESPACE_END