mirror of
https://github.com/vcmi/vcmi.git
synced 2025-05-13 22:06:58 +02:00
Partially done resources.
This commit is contained in:
parent
b226540775
commit
fa5079809f
@ -814,12 +814,13 @@ void CTerrainRect::clickLeft(tribool down)
|
|||||||
int3 mp = whichTileIsIt();
|
int3 mp = whichTileIsIt();
|
||||||
if ((mp.x<0) || (mp.y<0))
|
if ((mp.x<0) || (mp.y<0))
|
||||||
return;
|
return;
|
||||||
|
bool mres;
|
||||||
if (currentPath)
|
if (currentPath)
|
||||||
{
|
{
|
||||||
if ( (currentPath->endPos()) == mp)
|
if ( (currentPath->endPos()) == mp)
|
||||||
{ //move
|
{ //move
|
||||||
CPath sended(*currentPath); //temporary path - engine will operate on it
|
CPath sended(*currentPath); //temporary path - engine will operate on it
|
||||||
LOCPLINT->cb->moveHero( ((const CGHeroInstance*)LOCPLINT->adventureInt->selection.selected)->type->ID,&sended,1,0);
|
mres = LOCPLINT->cb->moveHero( ((const CGHeroInstance*)LOCPLINT->adventureInt->selection.selected)->type->ID,&sended,1,0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -830,7 +831,8 @@ void CTerrainRect::clickLeft(tribool down)
|
|||||||
const CGHeroInstance * currentHero = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].first;
|
const CGHeroInstance * currentHero = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].first;
|
||||||
int3 bufpos = currentHero->getPosition(false);
|
int3 bufpos = currentHero->getPosition(false);
|
||||||
//bufpos.x-=1;
|
//bufpos.x-=1;
|
||||||
currentPath = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].second = CGI->pathf->getPath(bufpos,mp,currentHero,1);
|
if (mres)
|
||||||
|
currentPath = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].second = CGI->pathf->getPath(bufpos,mp,currentHero,1);
|
||||||
|
|
||||||
//if (LOCPLINT->objsToBlit.size()==0)
|
//if (LOCPLINT->objsToBlit.size()==0)
|
||||||
//{
|
//{
|
||||||
|
110
CCallback.cpp
110
CCallback.cpp
@ -116,56 +116,79 @@ bool CCallback::moveHero(int ID, CPath * path, int idtype, int pathType)
|
|||||||
{ //performing move
|
{ //performing move
|
||||||
hero->movement-=CGI->mh->getCost(stpos, endpos, hero);
|
hero->movement-=CGI->mh->getCost(stpos, endpos, hero);
|
||||||
|
|
||||||
int heroSight = hero->getSightDistance();
|
std::vector< CGObjectInstance * > vis = CGI->mh->getVisitableObjs(CHeroInstance::convertPosition(curd.dst,false));
|
||||||
|
bool blockvis = false;
|
||||||
|
for (int pit = 0; pit<vis.size();pit++)
|
||||||
|
if (vis[pit]->blockVisit)
|
||||||
|
blockvis = true;
|
||||||
|
|
||||||
int xbeg = stpos.x - heroSight - 2;
|
if (!blockvis)
|
||||||
if(xbeg < 0)
|
|
||||||
xbeg = 0;
|
|
||||||
|
|
||||||
int xend = stpos.x + heroSight + 2;
|
|
||||||
if(xend >= CGI->ac->map.width)
|
|
||||||
xend = CGI->ac->map.width;
|
|
||||||
|
|
||||||
int ybeg = stpos.y - heroSight - 2;
|
|
||||||
if(ybeg < 0)
|
|
||||||
ybeg = 0;
|
|
||||||
|
|
||||||
int yend = stpos.y + heroSight + 2;
|
|
||||||
if(yend >= CGI->ac->map.height)
|
|
||||||
yend = CGI->ac->map.height;
|
|
||||||
|
|
||||||
for(int xd=xbeg; xd<xend; ++xd) //revealing part of map around heroes
|
|
||||||
{
|
{
|
||||||
for(int yd=ybeg; yd<yend; ++yd)
|
curd.successful = true;
|
||||||
|
int heroSight = hero->getSightDistance();
|
||||||
|
|
||||||
|
int xbeg = stpos.x - heroSight - 2;
|
||||||
|
if(xbeg < 0)
|
||||||
|
xbeg = 0;
|
||||||
|
|
||||||
|
int xend = stpos.x + heroSight + 2;
|
||||||
|
if(xend >= CGI->ac->map.width)
|
||||||
|
xend = CGI->ac->map.width;
|
||||||
|
|
||||||
|
int ybeg = stpos.y - heroSight - 2;
|
||||||
|
if(ybeg < 0)
|
||||||
|
ybeg = 0;
|
||||||
|
|
||||||
|
int yend = stpos.y + heroSight + 2;
|
||||||
|
if(yend >= CGI->ac->map.height)
|
||||||
|
yend = CGI->ac->map.height;
|
||||||
|
|
||||||
|
for(int xd=xbeg; xd<xend; ++xd) //revealing part of map around heroes
|
||||||
{
|
{
|
||||||
int deltaX = (hero->getPosition(false).x-xd)*(hero->getPosition(false).x-xd);
|
for(int yd=ybeg; yd<yend; ++yd)
|
||||||
int deltaY = (hero->getPosition(false).y-yd)*(hero->getPosition(false).y-yd);
|
{
|
||||||
if(deltaX+deltaY<hero->getSightDistance()*hero->getSightDistance())
|
int deltaX = (hero->getPosition(false).x-xd)*(hero->getPosition(false).x-xd);
|
||||||
gs->players[player].fogOfWarMap[xd][yd][hero->getPosition(false).z] = 1;
|
int deltaY = (hero->getPosition(false).y-yd)*(hero->getPosition(false).y-yd);
|
||||||
|
if(deltaX+deltaY<hero->getSightDistance()*hero->getSightDistance())
|
||||||
|
gs->players[player].fogOfWarMap[xd][yd][hero->getPosition(false).z] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hero->pos = curd.dst;
|
||||||
|
int nn=0; //number of interfece of currently browsed player
|
||||||
|
for(std::map<int, PlayerState>::iterator j=CGI->state->players.begin(); j!=CGI->state->players.end(); ++j)//CGI->state->players.size(); ++j) //for testing
|
||||||
|
{
|
||||||
|
if (j->first > PLAYER_LIMIT)
|
||||||
|
break;
|
||||||
|
if(j->second.fogOfWarMap[stpos.x-1][stpos.y][stpos.z] || j->second.fogOfWarMap[endpos.x-1][endpos.y][endpos.z])
|
||||||
|
{ //player should be notified
|
||||||
|
CGI->playerint[j->second.serial]->heroMoved(curd);
|
||||||
|
}
|
||||||
|
++nn;
|
||||||
|
}
|
||||||
|
for (int iii=0; iii<vis.size(); iii++) //if object is visitable we call onHeroVisit
|
||||||
|
{
|
||||||
|
if(gs->checkFunc(vis[iii]->ID,"heroVisit")) //script function
|
||||||
|
gs->objscr[vis[iii]->ID]["heroVisit"]->onHeroVisit(vis[iii],curd.ho->subID);
|
||||||
|
if(vis[iii]->state) //hard-coded function
|
||||||
|
vis[iii]->state->onHeroVisit(vis[iii],curd.ho->subID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
hero->pos = curd.dst;
|
|
||||||
int nn=0; //number of interfece of currently browsed player
|
|
||||||
for(std::map<int, PlayerState>::iterator j=CGI->state->players.begin(); j!=CGI->state->players.end(); ++j)//CGI->state->players.size(); ++j) //for testing
|
|
||||||
{
|
{
|
||||||
if (j->first > PLAYER_LIMIT)
|
curd.successful = false;
|
||||||
break;
|
CGI->playerint[gs->players[hero->getOwner()].serial]->heroMoved(curd);
|
||||||
if(j->second.fogOfWarMap[stpos.x-1][stpos.y][stpos.z] || j->second.fogOfWarMap[endpos.x-1][endpos.y][endpos.z])
|
for (int iii=0; iii<vis.size(); iii++) //if object is visitable we call onHeroVisit
|
||||||
{ //player should be notified
|
{
|
||||||
CGI->playerint[j->second.serial]->heroMoved(curd);
|
if (vis[iii]->blockVisit)
|
||||||
|
{
|
||||||
|
if(gs->checkFunc(vis[iii]->ID,"heroVisit")) //script function
|
||||||
|
gs->objscr[vis[iii]->ID]["heroVisit"]->onHeroVisit(vis[iii],curd.ho->subID);
|
||||||
|
if(vis[iii]->state) //hard-coded function
|
||||||
|
vis[iii]->state->onHeroVisit(vis[iii],curd.ho->subID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
++nn;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
std::vector< CGObjectInstance * > vis = CGI->mh->getVisitableObjs(hero->getPosition(false));
|
|
||||||
for (int iii=0; iii<vis.size(); iii++)
|
|
||||||
{
|
|
||||||
if(gs->checkFunc(vis[iii]->ID,"heroVisit"))
|
|
||||||
gs->objscr[vis[iii]->ID]["heroVisit"]->onHeroVisit(vis[iii],curd.ho->subID);
|
|
||||||
if(vis[iii]->state)
|
|
||||||
vis[iii]->state->onHeroVisit(vis[iii],curd.ho->subID);
|
|
||||||
//std::cout<< CGI->objh->objects[vis[iii]->ID].name<<std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -407,6 +430,7 @@ int CScriptCallback::getDate(int mode)
|
|||||||
void CScriptCallback::giveResource(int player, int which, int val)
|
void CScriptCallback::giveResource(int player, int which, int val)
|
||||||
{
|
{
|
||||||
gs->players[player].resources[which]+=val;
|
gs->players[player].resources[which]+=val;
|
||||||
|
CGI->playerint[gs->players[player].serial]->receivedResource(which,val);
|
||||||
}
|
}
|
||||||
void CLuaCallback::registerFuncs(lua_State * L)
|
void CLuaCallback::registerFuncs(lua_State * L)
|
||||||
{
|
{
|
||||||
|
10
CCallback.h
10
CCallback.h
@ -15,6 +15,7 @@ struct HeroMoveDetails
|
|||||||
int3 src, dst; //source and destination points
|
int3 src, dst; //source and destination points
|
||||||
CGHeroInstance * ho; //object instance of this hero
|
CGHeroInstance * ho; //object instance of this hero
|
||||||
int owner;
|
int owner;
|
||||||
|
bool successful;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCallback
|
class CCallback
|
||||||
@ -56,13 +57,18 @@ class CScriptCallback
|
|||||||
public:
|
public:
|
||||||
CGameState * gs;
|
CGameState * gs;
|
||||||
|
|
||||||
|
//get info
|
||||||
static int3 getPos(CGObjectInstance * ob);
|
static int3 getPos(CGObjectInstance * ob);
|
||||||
static void changePrimSkill(int ID, int which, int val);
|
|
||||||
void showInfoDialog(int player, std::string text, std::vector<SComponent*> * components);
|
|
||||||
int getHeroOwner(int heroID);
|
int getHeroOwner(int heroID);
|
||||||
int getSelectedHero();
|
int getSelectedHero();
|
||||||
int getDate(int mode=0);
|
int getDate(int mode=0);
|
||||||
|
|
||||||
|
//do sth
|
||||||
|
static void changePrimSkill(int ID, int which, int val);
|
||||||
|
void showInfoDialog(int player, std::string text, std::vector<SComponent*> * components);
|
||||||
void giveResource(int player, int which, int val);
|
void giveResource(int player, int which, int val);
|
||||||
|
|
||||||
|
//friends
|
||||||
friend void initGameState(CGameInfo * cgi);
|
friend void initGameState(CGameInfo * cgi);
|
||||||
};
|
};
|
||||||
class CLuaCallback : public CScriptCallback
|
class CLuaCallback : public CScriptCallback
|
||||||
|
@ -21,6 +21,7 @@ public:
|
|||||||
virtual void heroCreated(const CGHeroInstance*)=0{};
|
virtual void heroCreated(const CGHeroInstance*)=0{};
|
||||||
virtual void heroPrimarySkillChanged(const CGHeroInstance * hero, int which, int val)=0{};
|
virtual void heroPrimarySkillChanged(const CGHeroInstance * hero, int which, int val)=0{};
|
||||||
virtual void heroMoved(const HeroMoveDetails & details)=0;
|
virtual void heroMoved(const HeroMoveDetails & details)=0;
|
||||||
|
virtual void receivedResource(int type, int val){};
|
||||||
};
|
};
|
||||||
class CAIHandler
|
class CAIHandler
|
||||||
{
|
{
|
||||||
|
54
CLua.cpp
54
CLua.cpp
@ -444,4 +444,58 @@ void CMines::newTurn ()
|
|||||||
vv = 1000;
|
vv = 1000;
|
||||||
cb->giveResource(ourObjs[i]->tempOwner,ourObjs[i]->subID,vv);
|
cb->giveResource(ourObjs[i]->tempOwner,ourObjs[i]->subID,vv);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CPickable::newObject(CGObjectInstance *os)
|
||||||
|
{
|
||||||
|
os->blockVisit = true;
|
||||||
|
}
|
||||||
|
void CPickable::onHeroVisit(CGObjectInstance *os, int heroID)
|
||||||
|
{
|
||||||
|
switch(os->ID)
|
||||||
|
{
|
||||||
|
case 79:
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
switch(os->subID)
|
||||||
|
{
|
||||||
|
case 6:
|
||||||
|
val = 500 + (rand()%6)*100;
|
||||||
|
break;
|
||||||
|
case 0: case 2:
|
||||||
|
val = 6 + (rand()%5);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
val = 3 + (rand()%3);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
cb->giveResource(cb->getHeroOwner(heroID),os->subID,val);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CGI->mh->removeObject(os);
|
||||||
|
}
|
||||||
|
std::string CPickable::hoverText(CGObjectInstance *os)
|
||||||
|
{
|
||||||
|
switch (os->ID)
|
||||||
|
{
|
||||||
|
case 79:
|
||||||
|
return CGI->objh->restypes[os->subID];
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
return CGI->arth->artifacts[os->subID].name;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return CGI->objh->objects[os->defInfo->id].name;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::vector<int> CPickable::yourObjects() //returns IDs of objects which are handled by script
|
||||||
|
{
|
||||||
|
std::vector<int> ret(3);
|
||||||
|
ret.push_back(79); //resource
|
||||||
|
ret.push_back(5); //artifact
|
||||||
|
ret.push_back(101); //treasure chest / commander stone
|
||||||
|
return ret;
|
||||||
}
|
}
|
12
CLua.h
12
CLua.h
@ -127,5 +127,17 @@ class CMines : public CCPPObjectScript //flaggable, and giving resource at each
|
|||||||
std::string hoverText(CGObjectInstance *os);
|
std::string hoverText(CGObjectInstance *os);
|
||||||
void newTurn ();
|
void newTurn ();
|
||||||
|
|
||||||
|
friend void initGameState(CGameInfo * cgi);
|
||||||
|
};
|
||||||
|
|
||||||
|
class CPickable : public CCPPObjectScript //pickable - resources, artifacts, etc
|
||||||
|
{
|
||||||
|
CPickable(CScriptCallback * CB):CCPPObjectScript(CB){};
|
||||||
|
|
||||||
|
void newObject(CGObjectInstance *os);
|
||||||
|
void onHeroVisit(CGObjectInstance *os, int heroID);
|
||||||
|
std::string hoverText(CGObjectInstance *os);
|
||||||
|
std::vector<int> yourObjects(); //returns IDs of objects which are handled by script
|
||||||
|
|
||||||
friend void initGameState(CGameInfo * cgi);
|
friend void initGameState(CGameInfo * cgi);
|
||||||
};
|
};
|
3
CMT.cpp
3
CMT.cpp
@ -222,11 +222,10 @@ void initGameState(CGameInfo * cgi)
|
|||||||
csc->gs = cgi->state;
|
csc->gs = cgi->state;
|
||||||
handleCPPObjS(&scripts,new CVisitableOPH(csc));
|
handleCPPObjS(&scripts,new CVisitableOPH(csc));
|
||||||
handleCPPObjS(&scripts,new CVisitableOPW(csc));
|
handleCPPObjS(&scripts,new CVisitableOPW(csc));
|
||||||
|
handleCPPObjS(&scripts,new CPickable(csc));
|
||||||
handleCPPObjS(&scripts,new CMines(csc));
|
handleCPPObjS(&scripts,new CMines(csc));
|
||||||
//created map
|
//created map
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/****************************LUA OBJECT SCRIPTS************************************************/
|
/****************************LUA OBJECT SCRIPTS************************************************/
|
||||||
std::vector<std::string> * lf = CLuaHandler::searchForScripts("scripts/lua/objects"); //files
|
std::vector<std::string> * lf = CLuaHandler::searchForScripts("scripts/lua/objects"); //files
|
||||||
for (int i=0; i<lf->size(); i++)
|
for (int i=0; i<lf->size(); i++)
|
||||||
|
@ -67,7 +67,7 @@ SComponent::SComponent(Etype Type, int Subtype, int Val)
|
|||||||
subtitle = oss.str();
|
subtitle = oss.str();
|
||||||
break;
|
break;
|
||||||
case resource:
|
case resource:
|
||||||
//description = CGI->generaltexth->arraytxt[2+Subtype];
|
description = CGI->generaltexth->allTexts[242];
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << Val;
|
oss << Val;
|
||||||
subtitle = oss.str();
|
subtitle = oss.str();
|
||||||
@ -388,13 +388,61 @@ inline void delObjRect(const int & x, const int & y, const int & z, const int &
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int getDir(int3 src, int3 dst)
|
||||||
|
{
|
||||||
|
int ret = -1;
|
||||||
|
if(dst.x+1 == src.x && dst.y+1 == src.y) //tl
|
||||||
|
{
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
|
else if(dst.x == src.x && dst.y+1 == src.y) //t
|
||||||
|
{
|
||||||
|
ret = 2;
|
||||||
|
}
|
||||||
|
else if(dst.x-1 == src.x && dst.y+1 == src.y) //tr
|
||||||
|
{
|
||||||
|
ret = 3;
|
||||||
|
}
|
||||||
|
else if(dst.x-1 == src.x && dst.y == src.y) //r
|
||||||
|
{
|
||||||
|
ret = 4;
|
||||||
|
}
|
||||||
|
else if(dst.x-1 == src.x && dst.y-1 == src.y) //br
|
||||||
|
{
|
||||||
|
ret = 5;
|
||||||
|
}
|
||||||
|
else if(dst.x == src.x && dst.y-1 == src.y) //b
|
||||||
|
{
|
||||||
|
ret = 6;
|
||||||
|
}
|
||||||
|
else if(dst.x+1 == src.x && dst.y-1 == src.y) //bl
|
||||||
|
{
|
||||||
|
ret = 7;
|
||||||
|
}
|
||||||
|
else if(dst.x+1 == src.x && dst.y == src.y) //l
|
||||||
|
{
|
||||||
|
ret = 8;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
void CPlayerInterface::heroMoved(const HeroMoveDetails & details)
|
void CPlayerInterface::heroMoved(const HeroMoveDetails & details)
|
||||||
{
|
{
|
||||||
adventureInt->minimap.draw();
|
adventureInt->minimap.draw();
|
||||||
//initializing objects and performing first step of move
|
//initializing objects and performing first step of move
|
||||||
CGHeroInstance * ho = details.ho; //object representing this hero
|
CGHeroInstance * ho = details.ho; //object representing this hero
|
||||||
int3 hp = details.src;
|
int3 hp = details.src;
|
||||||
|
if (!details.successful)
|
||||||
|
{
|
||||||
|
ho->moveDir = getDir(details.src,details.dst);
|
||||||
|
ho->isStanding = true;
|
||||||
|
adventureInt->heroList.draw();
|
||||||
|
if (adventureInt->terrain.currentPath)
|
||||||
|
{
|
||||||
|
delete adventureInt->terrain.currentPath;
|
||||||
|
adventureInt->terrain.currentPath = NULL;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (adventureInt->terrain.currentPath) //&& hero is moving
|
if (adventureInt->terrain.currentPath) //&& hero is moving
|
||||||
{
|
{
|
||||||
@ -1197,6 +1245,11 @@ void CPlayerInterface::heroPrimarySkillChanged(const CGHeroInstance * hero, int
|
|||||||
adventureInt->infoBar.draw();
|
adventureInt->infoBar.draw();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CPlayerInterface::receivedResource(int type, int val)
|
||||||
|
{
|
||||||
|
adventureInt->resdatabar.draw();
|
||||||
|
}
|
||||||
void CPlayerInterface::showInfoDialog(std::string text, std::vector<SComponent*> & components)
|
void CPlayerInterface::showInfoDialog(std::string text, std::vector<SComponent*> & components)
|
||||||
{
|
{
|
||||||
adventureInt->hide(); //dezaktywacja starego interfejsu
|
adventureInt->hide(); //dezaktywacja starego interfejsu
|
||||||
|
@ -159,6 +159,7 @@ public:
|
|||||||
void heroKilled(const CGHeroInstance*);
|
void heroKilled(const CGHeroInstance*);
|
||||||
void heroCreated(const CGHeroInstance*);
|
void heroCreated(const CGHeroInstance*);
|
||||||
void heroPrimarySkillChanged(const CGHeroInstance * hero, int which, int val);
|
void heroPrimarySkillChanged(const CGHeroInstance * hero, int which, int val);
|
||||||
|
void receivedResource(int type, int val);
|
||||||
|
|
||||||
SDL_Surface * infoWin(const void * specific); //specific=0 => draws info about selected town/hero //TODO - gdy sie dorobi sensowna hierarchie klas ins. to wywalic tego brzydkiego void*
|
SDL_Surface * infoWin(const void * specific); //specific=0 => draws info about selected town/hero //TODO - gdy sie dorobi sensowna hierarchie klas ins. to wywalic tego brzydkiego void*
|
||||||
void handleEvent(SDL_Event * sEvent);
|
void handleEvent(SDL_Event * sEvent);
|
||||||
|
@ -59,6 +59,16 @@ void CObjectHandler::loadObjects()
|
|||||||
temp = temp.substr(1,temp.length()-2);
|
temp = temp.substr(1,temp.length()-2);
|
||||||
mines[i++].second = temp;
|
mines[i++].second = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buf = CGameInfo::mainObj->bitmaph->getTextFile("RESTYPES.TXT");
|
||||||
|
it=0;
|
||||||
|
while (it<buf.length()-1)
|
||||||
|
{
|
||||||
|
CGeneralTextHandler::loadToIt(temp,buf,it,3);
|
||||||
|
restypes.push_back(temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,6 +283,7 @@ CGObjectInstance::CGObjectInstance()
|
|||||||
//state = NULL;
|
//state = NULL;
|
||||||
defObjInfoNumber = -1;
|
defObjInfoNumber = -1;
|
||||||
tempOwner = 254;
|
tempOwner = 254;
|
||||||
|
blockVisit = false;
|
||||||
}
|
}
|
||||||
CGObjectInstance::~CGObjectInstance()
|
CGObjectInstance::~CGObjectInstance()
|
||||||
{
|
{
|
||||||
@ -297,7 +308,7 @@ CGObjectInstance::CGObjectInstance(const CGObjectInstance & right)
|
|||||||
defInfo = right.defInfo;
|
defInfo = right.defInfo;
|
||||||
info = right.info;
|
info = right.info;
|
||||||
defObjInfoNumber = right.defObjInfoNumber;
|
defObjInfoNumber = right.defObjInfoNumber;
|
||||||
blockVisit = false;
|
blockVisit = right.blockVisit;
|
||||||
//state = new CLuaObjectScript(right.state->);
|
//state = new CLuaObjectScript(right.state->);
|
||||||
//*state = *right.state;
|
//*state = *right.state;
|
||||||
//state = right.state;
|
//state = right.state;
|
||||||
|
@ -450,7 +450,8 @@ public:
|
|||||||
|
|
||||||
std::vector<std::string> advobtxt;
|
std::vector<std::string> advobtxt;
|
||||||
std::vector<std::string> xtrainfo;
|
std::vector<std::string> xtrainfo;
|
||||||
std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event
|
std::vector<std::string> restypes;
|
||||||
|
std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user