1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-15 20:03:15 +02:00

fix build

This commit is contained in:
AlexVinS
2014-06-24 15:23:37 +04:00
parent 3b8d0e44d4
commit b371c7ef74
3 changed files with 16 additions and 3 deletions

View File

@@ -1527,7 +1527,7 @@ struct ObstaclesRemoved : public CPackForClient //3014
}
};
struct DLL_LINKAGE CatapultAttack : public CPackForClient //3015
struct CatapultAttack : public CPackForClient //3015
{
struct AttackInfo
{
@@ -1542,8 +1542,9 @@ struct DLL_LINKAGE CatapultAttack : public CPackForClient //3015
h & destinationTile & attackedPart & damageDealt;
}
};
DLL_LINKAGE CatapultAttack();
DLL_LINKAGE ~CatapultAttack();
CatapultAttack() {type = 3015;}
DLL_LINKAGE void applyGs(CGameState *gs);
void applyCl(CClient *cl);

View File

@@ -37,7 +37,7 @@ struct DLL_LINKAGE CPack
logNetwork->errorStream() << "CPack serialized... this should not happen!";
}
void applyGs(CGameState *gs) { }
DLL_LINKAGE virtual std::string toString() const { return boost::str(boost::format("{CPack: type '%d'}") % type); }
virtual std::string toString() const { return boost::str(boost::format("{CPack: type '%d'}") % type); }
};
std::ostream & operator<<(std::ostream & out, const CPack * pack);

View File

@@ -1495,6 +1495,18 @@ DLL_LINKAGE void ObstaclesRemoved::applyGs( CGameState *gs )
}
}
DLL_LINKAGE CatapultAttack::CatapultAttack()
{
type = 3015;
}
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