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