void Mouse::popState() { if (_states.size() == 0) return; if (_states.size() == 1) { _setType(Cursor::NONE); } else { _setType(_states.at(_states.size() - 2)); } _states.pop_back(); }
void Packet::_setHeader(uint16 wType) { _setType(wType); _setSize(_wpos); uint32_t crc = make_crc32(_dataBuffer(), _dataSize()); _setCRC(crc); }
WalkerPrefect::WalkerPrefect( CityPtr city ) : ServiceWalker( city, Service::S_PREFECT ), _d( new Impl ) { _setType( WT_PREFECT ); _d->water = 0; _d->action = Impl::patrol; _setGraphic( WG_PREFECT ); setName( NameGenerator::rand( NameGenerator::male ) ); }
MarketKid::MarketKid(PlayerCityPtr city ) : Human( city ), _d( new Impl ) { _d->delay = 0; _d->birthTime = 0; _d->basket.setCapacity( defaultCapacity ); _setType( walker::marketKid ); setName( NameGenerator::rand( NameGenerator::male ) ); }
Emigrant::Emigrant( CityPtr city ) : Immigrant( city ) { CitizenGroup peoples; peoples[ CitizenGroup::matureMin ] = 2; peoples[ CitizenGroup::childMin ] = 2; setPeoples( peoples ); _setType( WT_EMIGRANT ); _setGraphic( WG_PUSHER2 ); }
MarketLadyHelper::MarketLadyHelper( CityPtr city ) : Walker( city ), _d( new Impl ) { _d->delay = 0; _d->birthTime = 0; _d->basket._maxQty = 100; _setGraphic( WG_MARKETLADY_HELPER ); _setType( WT_MARKETLADY_HELPER ); setName( NameGenerator::rand( NameGenerator::male ) ); }
CartPusher::CartPusher( CityPtr city ) : Walker( city ), _d( new Impl ) { _setGraphic( WG_PUSHER ); _setType( WT_CART_PUSHER ); _d->producerBuilding = NULL; _d->consumerBuilding = NULL; _d->maxDistance = 25; _d->stock._maxQty = 400; setName( NameGenerator::rand( NameGenerator::male ) ); }
CartSupplier::CartSupplier( CityPtr city ) : Walker( city ), _d( new Impl ) { _setGraphic( WG_PUSHER ); _setType( WT_CART_PUSHER ); _d->storageBuildingPos = TilePos( -1, -1 ); _d->baseBuildingPos = TilePos( -1, -1 ); _d->maxDistance = 25; _d->city = city; setName( NameGenerator::rand( NameGenerator::male ) ); }
FileInfo::FileInfo(const std::string& path) : _path(path), _type(OTHER) { #ifdef WIN32 std::replace(_path.begin(), _path.end(), '/', '\\'); if (_path[_path.size() - 1] == '\\') _path += '*'; #endif _setGood(); _setType(); _setSize(); _setLastTimeAccess(); _setListDir(); }
MarketLady::MarketLady( CityPtr city ) : Walker( city ), _d( new Impl ) { _setGraphic( WG_MARKETLADY ); _setType( WT_MARKETLADY ); _d->maxDistance = 25; _d->basket.setMaxQty(800); // this is a big basket! _d->basket.setMaxQty(Good::wheat, 800); _d->basket.setMaxQty(Good::fruit, 800); _d->basket.setMaxQty(Good::vegetable, 800); _d->basket.setMaxQty(Good::meat, 800); _d->basket.setMaxQty(Good::fish, 800); _d->basket.setMaxQty(Good::pottery, 300); _d->basket.setMaxQty(Good::furniture, 300); _d->basket.setMaxQty(Good::oil, 300); _d->basket.setMaxQty(Good::wine, 300); setName( NameGenerator::rand( NameGenerator::male ) ); }
void Mouse::pushState(Cursor state) { _setType(state); _states.push_back(state); }
void Mouse::pushState(unsigned int state) { _setType(state); _states.push_back(state); }
Soldier::Soldier( CityPtr city ) : Walker( city ) { _setType( WT_SOLDIER ); _setGraphic( WG_HORSEMAN ); }
Docker::Docker( PlayerCityPtr city ) : CartPusher( city ) { _setType( walker::docker ); stock().setCapacity( bigCart ); }