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

Redid stack artifacts. Broken save compatibility. Added serializer support for boost::variant and sending CStackInstace* over network by implicitly passing IDs. Moved seeds and checksum to StartInfo. Various minor changes.

This commit is contained in:
Michał W. Urbańczyk
2012-04-14 02:20:22 +00:00
parent d55d48b978
commit 722ec55384
31 changed files with 529 additions and 640 deletions

View File

@@ -210,30 +210,29 @@ void RebalanceStacks::applyCl( CClient *cl )
void PutArtifact::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(al.hero->tempOwner, artifactPut, al);
INTERFACE_CALL_IF_PRESENT(al.owningPlayer(), artifactPut, al);
}
void EraseArtifact::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(al.hero->tempOwner, artifactRemoved, al);
INTERFACE_CALL_IF_PRESENT(al.owningPlayer(), artifactRemoved, al);
}
void MoveArtifact::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(src.hero->tempOwner, artifactMoved, src, dst);
if (src.hero.get() && dst.hero.get())
if(src.hero->tempOwner != dst.hero->tempOwner)
INTERFACE_CALL_IF_PRESENT(src.hero->tempOwner, artifactMoved, src, dst);
INTERFACE_CALL_IF_PRESENT(src.owningPlayer(), artifactMoved, src, dst);
if(src.owningPlayer() != dst.owningPlayer())
INTERFACE_CALL_IF_PRESENT(src.owningPlayer(), artifactMoved, src, dst);
}
void AssembledArtifact::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(al.hero->tempOwner, artifactAssembled, al);
INTERFACE_CALL_IF_PRESENT(al.owningPlayer(), artifactAssembled, al);
}
void DisassembledArtifact::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(al.hero->tempOwner, artifactDisassembled, al);
INTERFACE_CALL_IF_PRESENT(al.owningPlayer(), artifactDisassembled, al);
}
void HeroVisit::applyCl( CClient *cl )