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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user