Merge branch 'master' of https://github.com/edubart/otclient
This commit is contained in:
		
						commit
						8230bf2af4
					
				|  | @ -266,9 +266,8 @@ void CreatureManager::saveSpawns(const std::string& fileName) | |||
|             root->LinkEndChild(elem); | ||||
|         } | ||||
| 
 | ||||
|         std::string savePath = g_resources.getRealPath(fileName); | ||||
|         if(!doc.SaveFile(savePath)) | ||||
|             stdext::throw_exception(stdext::format("failed to save spawns XML %s: %s", savePath, doc.ErrorDesc())); | ||||
|         if(!doc.SaveFile("data"+fileName)) | ||||
|             stdext::throw_exception(stdext::format("failed to save spawns XML %s: %s", fileName, doc.ErrorDesc())); | ||||
|     } catch(std::exception& e) { | ||||
|         g_logger.error(stdext::format("Failed to save '%s': %s", fileName, e.what())); | ||||
|     } | ||||
|  |  | |||
|  | @ -178,9 +178,8 @@ void HouseManager::save(const std::string& fileName) | |||
|             root->LinkEndChild(elem); | ||||
|         } | ||||
| 
 | ||||
|         std::string savePath = g_resources.getRealPath(fileName); | ||||
|         if(!doc.SaveFile(savePath)) | ||||
|             stdext::throw_exception(stdext::format("failed to save houses XML %s: %s", savePath, doc.ErrorDesc())); | ||||
|         if(!doc.SaveFile("data"+fileName)) | ||||
|             stdext::throw_exception(stdext::format("failed to save houses XML %s: %s", fileName, doc.ErrorDesc())); | ||||
|     } catch(std::exception& e) { | ||||
|         g_logger.error(stdext::format("Failed to save '%s': %s", fileName, e.what())); | ||||
|     } | ||||
|  |  | |||
|  | @ -137,6 +137,8 @@ void Map::loadOtbm(const std::string& fileName) | |||
|                                 if((_flags & TILESTATE_REFRESH) == TILESTATE_REFRESH) | ||||
|                                     flags |= TILESTATE_REFRESH; | ||||
| 
 | ||||
|                                 if((_flags & TILESTATE_HOUSE) == TILESTATE_HOUSE) | ||||
|                                     flags |= TILESTATE_HOUSE; | ||||
|                                 break; | ||||
|                             } | ||||
|                             case OTBM_ATTR_ITEM: { | ||||
|  |  | |||
|  | @ -119,7 +119,7 @@ public: | |||
| 
 | ||||
|     void setHouseId(uint32 hid) { m_houseId = hid; } | ||||
|     uint32 getHouseId() { return m_houseId; } | ||||
|     bool isHouseTile() const { return (m_flags & TILESTATE_HOUSE) == TILESTATE_HOUSE; } | ||||
|     bool isHouseTile() const { return m_houseId != 0 && (m_flags & TILESTATE_HOUSE) == TILESTATE_HOUSE; } | ||||
| 
 | ||||
|     TilePtr asTile() { return static_self_cast<Tile>(); } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Sam
						Sam