I need to get some house items using database query.
I have made some changes on TFS 3.42 pl2 :
iomapserialize.h:
i have change:
to:
iomapserialize.cpp:
i have change:
to:
i have change:
to:
In function
i have change:
to:
And i have problem, because it doesn't work. After save or restart values on house_id = 0.
Whats wrong ?
Meaby is other way to get all items from specific house?
Thanks for help and sorry for my bad english...
I have made some changes on TFS 3.42 pl2 :
Code:
ALTER TABLE `tiles` ADD `house_id` INT( 10 ) UNSIGNED NOT NULL
iomapserialize.h:
i have change:
Code:
bool saveTile(Database* db, uint32_t tileId, const Tile* tile);
Code:
bool saveTile(Database* db, uint32_t tileId, const Tile* tile, uint32_t house_id);
iomapserialize.cpp:
i have change:
Code:
bool IOMapSerialize::saveTile(Database* db, uint32_t tileId, const Tile* tile)
Code:
bool IOMapSerialize::saveTile(Database* db, uint32_t tileId, const Tile* tile, uint32_t house_id)
i have change:
Code:
query << "INSERT INTO `tiles` (`id`, `world_id`, `x`, `y`, `z`) VALUES " << "(" << tileId << ", " << g_config.getNumber(ConfigManager::WORLD_ID);
query << ", " << tilePosition.x << ", " << tilePosition.y << ", " << tilePosition.z << ")";
Code:
query << "INSERT INTO `tiles` (`id`, `world_id`, `x`, `y`, `z`, `house_id`) VALUES " << "(" << tileId << ", " << g_config.getNumber(ConfigManager::WORLD_ID);
query << ", " << tilePosition.x << ", " << tilePosition.y << ", " << tilePosition.z << ", " << house_id << ")";
In function
Code:
bool IOMapSerialize::saveMapRelational(Map* map)
i have change:
Code:
saveTile(db, ++tileId, *tit);
Code:
saveTile(db, ++tileId, *tit, it->second->getHouseId());
And i have problem, because it doesn't work. After save or restart values on house_id = 0.
Whats wrong ?
Meaby is other way to get all items from specific house?
Thanks for help and sorry for my bad english...