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); |             root->LinkEndChild(elem); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         std::string savePath = g_resources.getRealPath(fileName); |         if(!doc.SaveFile("data"+fileName)) | ||||||
|         if(!doc.SaveFile(savePath)) |             stdext::throw_exception(stdext::format("failed to save spawns XML %s: %s", fileName, doc.ErrorDesc())); | ||||||
|             stdext::throw_exception(stdext::format("failed to save spawns XML %s: %s", savePath, doc.ErrorDesc())); |  | ||||||
|     } catch(std::exception& e) { |     } catch(std::exception& e) { | ||||||
|         g_logger.error(stdext::format("Failed to save '%s': %s", fileName, e.what())); |         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); |             root->LinkEndChild(elem); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         std::string savePath = g_resources.getRealPath(fileName); |         if(!doc.SaveFile("data"+fileName)) | ||||||
|         if(!doc.SaveFile(savePath)) |             stdext::throw_exception(stdext::format("failed to save houses XML %s: %s", fileName, doc.ErrorDesc())); | ||||||
|             stdext::throw_exception(stdext::format("failed to save houses XML %s: %s", savePath, doc.ErrorDesc())); |  | ||||||
|     } catch(std::exception& e) { |     } catch(std::exception& e) { | ||||||
|         g_logger.error(stdext::format("Failed to save '%s': %s", fileName, e.what())); |         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) |                                 if((_flags & TILESTATE_REFRESH) == TILESTATE_REFRESH) | ||||||
|                                     flags |= TILESTATE_REFRESH; |                                     flags |= TILESTATE_REFRESH; | ||||||
| 
 | 
 | ||||||
|  |                                 if((_flags & TILESTATE_HOUSE) == TILESTATE_HOUSE) | ||||||
|  |                                     flags |= TILESTATE_HOUSE; | ||||||
|                                 break; |                                 break; | ||||||
|                             } |                             } | ||||||
|                             case OTBM_ATTR_ITEM: { |                             case OTBM_ATTR_ITEM: { | ||||||
|  |  | ||||||
|  | @ -119,7 +119,7 @@ public: | ||||||
| 
 | 
 | ||||||
|     void setHouseId(uint32 hid) { m_houseId = hid; } |     void setHouseId(uint32 hid) { m_houseId = hid; } | ||||||
|     uint32 getHouseId() { return m_houseId; } |     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>(); } |     TilePtr asTile() { return static_self_cast<Tile>(); } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Sam
						Sam