2007-06-09 05:32:43 +03:00
|
|
|
#include "stdafx.h"
|
2007-06-07 23:16:19 +03:00
|
|
|
#include "CArtHandler.h"
|
2007-08-04 22:01:22 +03:00
|
|
|
#include "CGameInfo.h"
|
|
|
|
#include "CGeneralTextHandler.h"
|
2007-06-07 23:16:19 +03:00
|
|
|
|
|
|
|
void CArtHandler::loadArtifacts()
|
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("ARTRAITS.TXT");
|
|
|
|
int it=0;
|
2007-06-07 23:16:19 +03:00
|
|
|
std::string dump;
|
2007-08-04 22:01:22 +03:00
|
|
|
for(int i=0; i<2; ++i)
|
2007-06-07 23:16:19 +03:00
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
CGeneralTextHandler::loadToIt(dump,buf,it,3);
|
2007-06-07 23:16:19 +03:00
|
|
|
}
|
2007-08-04 22:01:22 +03:00
|
|
|
for (int i=0; i<ARTIFACTS_QUANTITY; i++)
|
2007-06-07 23:16:19 +03:00
|
|
|
{
|
|
|
|
CArtifact nart;
|
2007-08-04 22:01:22 +03:00
|
|
|
std::string pom;
|
|
|
|
CGeneralTextHandler::loadToIt(nart.name,buf,it,4);
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
nart.price=atoi(pom.c_str());
|
|
|
|
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.spellBook=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.warMachine4=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.warMachine3=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.warMachine2=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.warMachine1=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.misc5=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.misc4=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.misc3=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.misc2=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.misc1=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.feet=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.lRing=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.rRing=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.torso=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.lHand=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.rHand=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.neck=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.shoulders=true;
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
if (pom.length())
|
|
|
|
nart.head=true;
|
|
|
|
|
|
|
|
CGeneralTextHandler::loadToIt(pom,buf,it,4);
|
|
|
|
switch (pom[0])
|
2007-06-07 23:16:19 +03:00
|
|
|
{
|
2007-08-04 22:01:22 +03:00
|
|
|
case 'S':
|
|
|
|
nart.aClass=EartClass::SartClass;
|
2007-06-07 23:16:19 +03:00
|
|
|
break;
|
2007-08-04 22:01:22 +03:00
|
|
|
case 'T':
|
|
|
|
nart.aClass=EartClass::TartClass;
|
2007-06-07 23:16:19 +03:00
|
|
|
break;
|
2007-08-04 22:01:22 +03:00
|
|
|
case 'N':
|
|
|
|
nart.aClass=EartClass::NartClass;
|
2007-06-07 23:16:19 +03:00
|
|
|
break;
|
2007-08-04 22:01:22 +03:00
|
|
|
case 'J':
|
|
|
|
nart.aClass=EartClass::JartClass;
|
2007-06-07 23:16:19 +03:00
|
|
|
break;
|
2007-08-04 22:01:22 +03:00
|
|
|
case 'R':
|
|
|
|
nart.aClass=EartClass::RartClass;
|
2007-06-07 23:16:19 +03:00
|
|
|
break;
|
|
|
|
}
|
2007-08-04 22:01:22 +03:00
|
|
|
CGeneralTextHandler::loadToIt(nart.description,buf,it,3);
|
|
|
|
nart.id=artifacts.size();
|
2007-06-08 17:58:04 +03:00
|
|
|
|
2007-08-04 22:01:22 +03:00
|
|
|
artifacts.push_back(nart);
|
2007-06-07 23:16:19 +03:00
|
|
|
}
|
2007-06-08 17:58:04 +03:00
|
|
|
}
|