void Player::pack(OutputFrame::Ptr frame) const { frame->setType(ft03_Player); frame->packInt(id); frame->packString(name); frame->packString("Human"); frame->packInt64(getModTime()); }
void Order::describeOrder(OutputFrame::Ptr f) const { f->setType(ft02_OrderDesc); f->packInt(type); f->packString(name); f->packString(description); f->packInt(parameters.size()); std::for_each( parameters.begin(), parameters.end(), boost::bind( &OrderParameter::packOrderDescFrame, _1, f ) ); f->packInt64(descmodtime); }
void Category::pack(OutputFrame::Ptr frame) const{ frame->setType(ft03_Category); frame->packInt(id); frame->packInt64(getModTime()); //timestamp frame->packString(name); frame->packString(desc); }
bool AsyncTimeRemaining::createFrame(OutputFrame::Ptr f) { f->setType(ft02_Time_Remaining); f->packInt(rtime); if(f->getVersion() >= fv0_4){ f->packInt(why); //reason f->packInt(Game::getGame()->getTurnNumber()); f->packString(Game::getGame()->getTurnName()); } return true; }
void Message::pack(OutputFrame::Ptr frame) const { if (frame->getVersion() == fv0_2) { frame->packInt(1); frame->packInt(0); } else { frame->packInt(0); } frame->packString(name); frame->packString(desc); if (frame->getVersion() > fv0_2) { frame->packInt(turn_number); frame->packInt(references.size()); for (References::iterator itcurr = references.begin(); itcurr != references.end(); ++itcurr) { frame->packInt((*itcurr).first); frame->packInt((*itcurr).second); } } }
void PropertyValue::packFrame(OutputFrame::Ptr frame) const{ frame->packInt(propid); frame->packString(display); }