void UnitFactory::addMissileBuffer( NetBuffer &netbuf,
                                    const string &filename,
                                    const string &name,
                                    const string &fullname,
                                    int faction,
                                    const string &modifications,
                                    const ClientState &curr_state,
                                    const float damage,
                                    float phasedamage,
                                    float time,
                                    float radialeffect,
                                    float radmult,
                                    float detonation_radius,
                                    ObjSerial netcreate )
{
    netbuf.addChar( ZoneMgr::AddMissile );
    netbuf.addSerial( netcreate );
    netbuf.addString( filename );
    netbuf.addString( name );
    netbuf.addString( fullname );

    netbuf.addInt32( faction );
    netbuf.addString( modifications );
    netbuf.addFloat( damage );
    netbuf.addFloat( phasedamage );
    netbuf.addFloat( time );
    netbuf.addFloat( radialeffect );
    netbuf.addFloat( radmult );
    netbuf.addFloat( detonation_radius );
    if (netbuf.version() <= 4951)
        netbuf.addTransformation( curr_state.getTransformation() );
    else
        netbuf.addClientState( curr_state );
}
void UnitFactory::addUnitBuffer( NetBuffer &netbuf,
                                 const string &filename,
                                 const string &name,
                                 const string &fullname,
                                 bool SubUnit,
                                 int faction,
                                 std::string customizedUnit,
                                 const ClientState &curr_state,
                                 Flightgroup *flightgroup,
                                 int fg_subnumber,
                                 string *netxml,
                                 ObjSerial netcreate )
{
    netbuf.addChar( ZoneMgr::AddUnit );
    assert( netcreate != 0 );           //crash if we are doing something stupid :)
    netbuf.addSerial( netcreate );
    netbuf.addString( filename );
    netbuf.addString( name );
    netbuf.addString( fullname );
    netbuf.addChar( SubUnit );
    netbuf.addInt32( faction );
    netbuf.addString( flightgroup != NULL ? flightgroup->name : std::string( "Object" ) );
    netbuf.addString( customizedUnit );
    netbuf.addInt32( fg_subnumber );
    if (netbuf.version() <= 4951)
        netbuf.addTransformation( curr_state.getTransformation() );
    else
        netbuf.addClientState( curr_state );
}