2007-06-09 05:32:43 +03:00
|
|
|
#include "stdafx.h"
|
2007-06-08 22:56:35 +03:00
|
|
|
#include "CAbilityHandler.h"
|
2007-08-04 22:01:22 +03:00
|
|
|
#include "CGameInfo.h"
|
|
|
|
#include "CGeneralTextHandler.h"
|
2007-06-08 22:56:35 +03:00
|
|
|
void CAbilityHandler::loadAbilities()
|
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("SSTRAITS.TXT");
|
|
|
|
int it=0;
|
2007-06-08 22:56:35 +03:00
|
|
|
std::string dump;
|
2007-08-04 22:01:22 +03:00
|
|
|
for(int i=0; i<2; ++i)
|
2007-06-08 22:56:35 +03:00
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
CGeneralTextHandler::loadToIt(dump,buf,it,3);
|
2007-06-08 22:56:35 +03:00
|
|
|
}
|
2007-08-04 22:01:22 +03:00
|
|
|
for (int i=0; i<SKILL_QUANTITY; i++)
|
2007-06-08 22:56:35 +03:00
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
CAbility * nab = new CAbility; //new skill, that will be read
|
|
|
|
CGeneralTextHandler::loadToIt(nab->name,buf,it,4);
|
|
|
|
CGeneralTextHandler::loadToIt(nab->basicText,buf,it,4);
|
|
|
|
CGeneralTextHandler::loadToIt(nab->advText,buf,it,4);
|
|
|
|
CGeneralTextHandler::loadToIt(nab->expText,buf,it,3);
|
2007-07-16 17:42:44 +03:00
|
|
|
nab->idNumber = abilities.size();
|
2007-06-08 22:56:35 +03:00
|
|
|
abilities.push_back(nab);
|
|
|
|
}
|
|
|
|
}
|