1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

CGHeroInstance* can be serialized over network even when hero has been defeated. Strongly typed hero type ID introduced.

Should fix #1260.
This commit is contained in:
Michał W. Urbańczyk
2013-05-18 22:30:48 +00:00
parent f95e6c233b
commit be7c2bd07f
19 changed files with 113 additions and 75 deletions

View File

@@ -239,6 +239,7 @@ void DisassembledArtifact::applyCl( CClient *cl )
void HeroVisit::applyCl( CClient *cl )
{
assert(hero);
INTERFACE_CALL_IF_PRESENT(hero->tempOwner, heroVisit, hero, obj, starting);
}
@@ -487,7 +488,7 @@ void SetHeroesInTown::applyCl( CClient *cl )
void HeroRecruited::applyCl( CClient *cl )
{
CGHeroInstance *h = GS(cl)->map->heroes.back();
CGHeroInstance *h = GS(cl)->map->heroesOnMap.back();
if(h->subID != hid)
{
logNetwork->errorStream() << "Something wrong with hero recruited!";