1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Moved hero pool logic to the separate files

This commit is contained in:
Ivan Savenko
2023-07-11 15:16:02 +03:00
parent 1c55835b8b
commit 19ace6a849
26 changed files with 535 additions and 365 deletions

View File

@@ -11,6 +11,8 @@
#include "ServerNetPackVisitors.h"
#include "CGameHandler.h"
#include "HeroPoolProcessor.h"
#include "../lib/IGameCallback.h"
#include "../lib/mapObjects/CGTownInstance.h"
#include "../lib/gameState/CGameState.h"
@@ -251,7 +253,7 @@ void ApplyGhNetPackVisitor::visitHireHero(HireHero & pack)
if(town && PlayerRelations::ENEMIES == gh.getPlayerRelations(obj->tempOwner, gh.getPlayerAt(pack.c)))
gh.throwAndComplain(&pack, "Can't buy hero in enemy town!");
result = gh.hireHero(obj, pack.hid, pack.player);
result = gh.heroPool->hireHero(obj, pack.hid, pack.player);
}
void ApplyGhNetPackVisitor::visitBuildBoat(BuildBoat & pack)