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

Reduced number of #include's in headers. May break compilation on Win

since some net packs now need DLL_LINKAGE
This commit is contained in:
Ivan Savenko
2014-06-25 17:11:07 +03:00
parent 3b0ecee678
commit 32240da34e
40 changed files with 241 additions and 159 deletions

View File

@@ -14,6 +14,8 @@
#include "CGameState.h"
#include "BattleState.h"
#include "CTownHandler.h"
#include "mapping/CMapInfo.h"
#include "StartInfo.h"
/*
* NetPacksLib.cpp, part of VCMI engine
@@ -60,6 +62,18 @@ DLL_LINKAGE void SetSecSkill::applyGs( CGameState *gs )
hero->setSecSkillLevel(which, val, abs);
}
DLL_LINKAGE SelectMap::~SelectMap()
{
if(free)
delete mapInfo;
}
DLL_LINKAGE UpdateStartOptions::~UpdateStartOptions()
{
if(free)
delete options;
}
DLL_LINKAGE void SetCommanderProperty::applyGs(CGameState *gs)
{
CCommanderInstance * commander = gs->getHero(heroid)->commander;
@@ -1501,7 +1515,7 @@ DLL_LINKAGE CatapultAttack::~CatapultAttack()
DLL_LINKAGE void CatapultAttack::applyGs( CGameState *gs )
{
if(gs->curB && gs->curB->siege != CGTownInstance::NONE) //if there is a battle and it's a siege
if(gs->curB && gs->curB->town && gs->curB->town->fortLevel() != CGTownInstance::NONE) //if there is a battle and it's a siege
{
for(const auto &it :attackedParts)
{