1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

- removed creature-related code from ModHandler

- new towns can be loaded as mods
 - removed separate DefInfos for towns\capitals
 - a bit simpler handling of adventure map def's
This commit is contained in:
Ivan Savenko
2012-11-13 11:52:23 +00:00
parent c336abcf4a
commit f7915d9e61
21 changed files with 391 additions and 445 deletions

View File

@@ -403,11 +403,11 @@ void NewStructures::applyCl( CClient *cl )
{
if(id== EBuilding::CAPITOL) //fort or capitol
{
town->defInfo = GS(cl)->capitols[town->subID];
town->defInfo = const_cast<CGDefInfo*>(CGI->dobjinfo->capitols[town->subID].get());
}
if(id == EBuilding::FORT)
{
town->defInfo = GS(cl)->forts[town->subID];
town->defInfo = const_cast<CGDefInfo*>(CGI->dobjinfo->gobjs[Obj::TOWN][town->subID].get());
}
if(vstd::contains(cl->playerint,town->tempOwner))
cl->playerint[town->tempOwner]->buildChanged(town,id,1);
@@ -420,7 +420,7 @@ void RazeStructures::applyCl (CClient *cl)
{
if (id == 13) //fort or capitol
{
town->defInfo = GS(cl)->forts[town->subID];
town->defInfo = const_cast<CGDefInfo*>(CGI->dobjinfo->gobjs[Obj::TOWN][town->subID].get());
}
if(vstd::contains (cl->playerint,town->tempOwner))
cl->playerint[town->tempOwner]->buildChanged (town,id,2);