2008-01-09 17:21:31 +00:00
|
|
|
#include "../stdafx.h"
|
2007-06-08 19:56:35 +00:00
|
|
|
#include "CAbilityHandler.h"
|
2007-08-30 10:11:53 +00:00
|
|
|
#include "../CGameInfo.h"
|
2007-08-04 19:01:22 +00:00
|
|
|
#include "CGeneralTextHandler.h"
|
2007-08-29 12:18:31 +00:00
|
|
|
#include "CLodHandler.h"
|
2008-01-15 18:50:52 +00:00
|
|
|
#include "CDefHandler.h"
|
|
|
|
|
2007-06-08 19:56:35 +00:00
|
|
|
void CAbilityHandler::loadAbilities()
|
|
|
|
{
|
2008-06-12 21:08:04 +00:00
|
|
|
std::string buf = CGI->bitmaph->getTextFile("SSTRAITS.TXT");
|
2007-08-04 19:01:22 +00:00
|
|
|
int it=0;
|
2007-06-08 19:56:35 +00:00
|
|
|
std::string dump;
|
2007-08-04 19:01:22 +00:00
|
|
|
for(int i=0; i<2; ++i)
|
2007-06-08 19:56:35 +00:00
|
|
|
{
|
2008-06-13 08:16:51 +00:00
|
|
|
loadToIt(dump,buf,it,3);
|
2007-06-08 19:56:35 +00:00
|
|
|
}
|
2007-08-04 19:01:22 +00:00
|
|
|
for (int i=0; i<SKILL_QUANTITY; i++)
|
2007-06-08 19:56:35 +00:00
|
|
|
{
|
2007-08-04 19:01:22 +00:00
|
|
|
CAbility * nab = new CAbility; //new skill, that will be read
|
2008-08-13 00:44:31 +00:00
|
|
|
nab->infoTexts.resize(3);
|
2008-06-13 08:16:51 +00:00
|
|
|
loadToIt(nab->name,buf,it,4);
|
2008-08-13 00:44:31 +00:00
|
|
|
loadToIt(nab->infoTexts[0],buf,it,4);
|
|
|
|
loadToIt(nab->infoTexts[1],buf,it,4);
|
|
|
|
loadToIt(nab->infoTexts[2],buf,it,3);
|
2007-07-16 14:42:44 +00:00
|
|
|
nab->idNumber = abilities.size();
|
2007-06-08 19:56:35 +00:00
|
|
|
abilities.push_back(nab);
|
|
|
|
}
|
2008-06-12 06:45:51 +00:00
|
|
|
abils32 = CDefHandler::giveDef("SECSK32.DEF");
|
|
|
|
abils44 = CDefHandler::giveDef("SECSKILL.DEF");
|
|
|
|
abils82 = CDefHandler::giveDef("SECSK82.DEF");
|
2008-01-15 18:50:52 +00:00
|
|
|
|
2008-06-12 21:08:04 +00:00
|
|
|
buf = CGI->bitmaph->getTextFile("SKILLLEV.TXT");
|
2008-01-15 18:50:52 +00:00
|
|
|
it=0;
|
|
|
|
for(int i=0; i<6; ++i)
|
|
|
|
{
|
|
|
|
std::string buffo;
|
2008-06-13 08:16:51 +00:00
|
|
|
loadToIt(buffo,buf,it,3);
|
2008-01-15 18:50:52 +00:00
|
|
|
levels.push_back(buffo);
|
|
|
|
}
|
2007-06-08 19:56:35 +00:00
|
|
|
}
|