CAbilityHandler.cpp 775 B

12345678910111213141516171819202122232425
  1. #include "stdafx.h"
  2. #include "CAbilityHandler.h"
  3. #include "CGameInfo.h"
  4. #include "CGeneralTextHandler.h"
  5. #include "CLodHandler.h"
  6. void CAbilityHandler::loadAbilities()
  7. {
  8. std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("SSTRAITS.TXT");
  9. int it=0;
  10. std::string dump;
  11. for(int i=0; i<2; ++i)
  12. {
  13. CGeneralTextHandler::loadToIt(dump,buf,it,3);
  14. }
  15. for (int i=0; i<SKILL_QUANTITY; i++)
  16. {
  17. CAbility * nab = new CAbility; //new skill, that will be read
  18. CGeneralTextHandler::loadToIt(nab->name,buf,it,4);
  19. CGeneralTextHandler::loadToIt(nab->basicText,buf,it,4);
  20. CGeneralTextHandler::loadToIt(nab->advText,buf,it,4);
  21. CGeneralTextHandler::loadToIt(nab->expText,buf,it,3);
  22. nab->idNumber = abilities.size();
  23. abilities.push_back(nab);
  24. }
  25. }