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

Serializer will now smartly send over network CArtifact* and CHero*. Unified handling of items stored in vector.

Started making support for Black Market / Artifact merchant.
This commit is contained in:
Michał W. Urbańczyk
2010-06-26 16:02:10 +00:00
parent 627a1a5905
commit ec6342d9a7
20 changed files with 367 additions and 278 deletions

View File

@@ -94,7 +94,7 @@ void CVCMIServer::newGame(CConnection *c)
StartInfo startInfoCpy = *si;
gh.init(si,rand());
c->setGS(gh.gs);
c->addStdVecItems(gh.gs);
CConnection* cc; //tcp::socket * ss;
for(int i=0; i<clients; i++)
@@ -114,7 +114,7 @@ void CVCMIServer::newGame(CConnection *c)
continue;
}
cc = new CConnection(s,NAME);
cc->setGS(gh.gs);
cc->addStdVecItems(gh.gs);
}
gh.conns.insert(cc);
}
@@ -201,7 +201,7 @@ void CVCMIServer::loadGame( CConnection *c )
tlog0 <<"Reading handlers"<<std::endl;
lf >> (gh.gs);
c->setGS(gh.gs);
c->addStdVecItems(gh.gs);
tlog0 <<"Reading gamestate"<<std::endl;
}
@@ -230,7 +230,7 @@ void CVCMIServer::loadGame( CConnection *c )
continue;
}
cc = new CConnection(s,NAME);
cc->setGS(gh.gs);
cc->addStdVecItems(gh.gs);
}
gh.conns.insert(cc);
}