Ejemplo n.º 1
0
ResourceManager::ResourceManager(Database* database,uint32 zoneId, bool writeResourceMaps, std::string zoneName) :
    mDatabase(database),
    mZoneId(zoneId),
	mZoneName(zoneName),
	mWriteResourceMaps(writeResourceMaps),
    mDBAsyncPool(sizeof(RMAsyncContainer))
{
    // init our tree with a root
    ResourceCategory* rootCat = new ResourceCategory();
    rootCat->setId(1);
    rootCat->setName("Resource");
    rootCat->setDescriptor("resource");
    rootCat->setParentId(0);
    mResourceCategoryMap.insert(std::make_pair(1,rootCat));

    //the tutorial will not assign us a db so we cannot load resources
    //this way we will save the resources and time but still have a resourcemanager for our lowlevelID lookups
    if(!database)
        return;

    _setupDatabindings();

    // load resource types
    mDatabase->executeSqlAsync(this,new(mDBAsyncPool.ordered_malloc()) RMAsyncContainer(RMQuery_ResourceTypes),
                               "SELECT id,category_id,namefile_name,type_name,type_swg,tang,bazaar_catID,type FROM %s.resource_template ORDER BY id",mDatabase->galaxy());
 
}
Ejemplo n.º 2
0
HarvesterFactory::HarvesterFactory(Database* database) : FactoryBase(database)
{

    _setupDatabindings();
}
Ejemplo n.º 3
0
CellFactory::CellFactory(swganh::app::SwganhKernel*	kernel) : FactoryBase(kernel)
{
    _setupDatabindings();
}
Ejemplo n.º 4
0
BadgeRegionFactory::BadgeRegionFactory(Database* database) : FactoryBase(database)
{
	_setupDatabindings();
}
Ejemplo n.º 5
0
DatapadFactory::DatapadFactory(Database* database) : FactoryBase(database)
{
    mWaypointFactory = WaypointFactory::Init(mDatabase);

    _setupDatabindings();
}
Ejemplo n.º 6
0
TicketCollectorFactory::TicketCollectorFactory(Database* database) : FactoryBase(database)
{
    _setupDatabindings();
}
Ejemplo n.º 7
0
VehicleControllerFactory::VehicleControllerFactory(Database* database) : FactoryBase(database)
{
    _setupDatabindings();
}
ContainerObjectFactory::ContainerObjectFactory(Database* database) : FactoryBase(database)
{
    _setupDatabindings();
}
Ejemplo n.º 9
0
ShuttleFactory::ShuttleFactory(Database* database) : FactoryBase(database)
{
    _setupDatabindings();
}
Ejemplo n.º 10
0
PersistentNpcFactory::PersistentNpcFactory(Database* database) : FactoryBase(database)
{
    _setupDatabindings();
}
Ejemplo n.º 11
0
InventoryFactory::InventoryFactory(Database* database) : FactoryBase(database)
{
	mTangibleFactory = TangibleFactory::Init(mDatabase);

	_setupDatabindings();
}
Ejemplo n.º 12
0
WaypointFactory::WaypointFactory(Database* database) : FactoryBase(database)
{
    _setupDatabindings();
}
Ejemplo n.º 13
0
NonPersistentItemFactory::NonPersistentItemFactory(Database* database) : FactoryBase(database)
{
    _setupDatabindings();
}
Ejemplo n.º 14
0
HouseFactory::HouseFactory(Database* database) : FactoryBase(database)
{

    _setupDatabindings();
    mCellFactory = CellFactory::Init(mDatabase);
}
Ejemplo n.º 15
0
BuildingFactory::BuildingFactory(swganh::app::SwganhKernel*	kernel) : FactoryBase(kernel)
{
    mCellFactory = CellFactory::Init(kernel);

    _setupDatabindings();
}
Ejemplo n.º 16
0
CellFactory::CellFactory(Database* database) : FactoryBase(database)
{
    _setupDatabindings();
}
Ejemplo n.º 17
0
BuildingFactory::BuildingFactory(Database* database) : FactoryBase(database)
{
    mCellFactory = CellFactory::Init(mDatabase);

    _setupDatabindings();
}
Ejemplo n.º 18
0
TerminalFactory::TerminalFactory(Database* database) : FactoryBase(database)
{
    _setupDatabindings();
}