fix map padding, parse rule violations protocol opts
This commit is contained in:
		
							parent
							
								
									ab4dc91d90
								
							
						
					
					
						commit
						bc7f22d395
					
				|  | @ -117,10 +117,10 @@ namespace Proto { | ||||||
|         GameServerChannels = 171, |         GameServerChannels = 171, | ||||||
|         GameServerOpenChannel = 172, |         GameServerOpenChannel = 172, | ||||||
|         GameServerPrivateChannel = 173, |         GameServerPrivateChannel = 173, | ||||||
|         GameServerRuleViolation = 174, // absolate in last tibia?
 |         GameServerRuleViolationChannel = 174, // absolate in last tibia?
 | ||||||
|         GameServerRuleViolation1 = 175, // absolate in last tibia?
 |         GameServerRuleViolationRemove = 175, // absolate in last tibia?
 | ||||||
|         GameServerRuleViolation2 = 176, // absolate in last tibia?
 |         GameServerRuleViolationCancel = 176, // absolate in last tibia?
 | ||||||
|         GameServerRuleViolation3 = 177, // absolate in last tibia?
 |         GameServerRuleViolationLock = 177, // absolate in last tibia?
 | ||||||
|         GameServerOpenOwnChannel = 178, |         GameServerOpenOwnChannel = 178, | ||||||
|         GameServerCloseChannel = 179, |         GameServerCloseChannel = 179, | ||||||
|         GameServerMessage = 180, |         GameServerMessage = 180, | ||||||
|  |  | ||||||
|  | @ -156,7 +156,6 @@ private: | ||||||
|     void parseChannelList(InputMessage& msg); |     void parseChannelList(InputMessage& msg); | ||||||
|     void parseOpenChannel(InputMessage& msg); |     void parseOpenChannel(InputMessage& msg); | ||||||
|     void parseOpenPrivatePlayerChat(InputMessage& msg); |     void parseOpenPrivatePlayerChat(InputMessage& msg); | ||||||
|     void parseOpenRuleViolation(InputMessage& msg); |  | ||||||
|     void parseCreatePrivateChannel(InputMessage& msg); |     void parseCreatePrivateChannel(InputMessage& msg); | ||||||
|     void parseClosePrivateChannel(InputMessage& msg); |     void parseClosePrivateChannel(InputMessage& msg); | ||||||
|     void parseSafeTradeRequest(InputMessage& msg); |     void parseSafeTradeRequest(InputMessage& msg); | ||||||
|  |  | ||||||
|  | @ -198,11 +198,16 @@ void ProtocolGame::parseMessage(InputMessage& msg) | ||||||
|             case Proto::GameServerPrivateChannel: |             case Proto::GameServerPrivateChannel: | ||||||
|                 parseOpenPrivatePlayerChat(msg); |                 parseOpenPrivatePlayerChat(msg); | ||||||
|                 break; |                 break; | ||||||
|             case Proto::GameServerRuleViolation: |             case Proto::GameServerRuleViolationChannel: | ||||||
|             case Proto::GameServerRuleViolation1: |                 msg.getU16(); | ||||||
|             case Proto::GameServerRuleViolation2: |                 break; | ||||||
|             case Proto::GameServerRuleViolation3: |             case Proto::GameServerRuleViolationRemove: | ||||||
|                 parseOpenRuleViolation(msg); |                 msg.getString(); | ||||||
|  |                 break; | ||||||
|  |             case Proto::GameServerRuleViolationCancel: | ||||||
|  |                 msg.getString(); | ||||||
|  |                 break; | ||||||
|  |             case Proto::GameServerRuleViolationLock: | ||||||
|                 break; |                 break; | ||||||
|             case Proto::GameServerOpenOwnChannel: |             case Proto::GameServerOpenOwnChannel: | ||||||
|                 parseCreatePrivateChannel(msg); |                 parseCreatePrivateChannel(msg); | ||||||
|  | @ -783,11 +788,6 @@ void ProtocolGame::parseOpenPrivatePlayerChat(InputMessage& msg) | ||||||
|     msg.getString(); // name
 |     msg.getString(); // name
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void ProtocolGame::parseOpenRuleViolation(InputMessage& msg) |  | ||||||
| { |  | ||||||
|     msg.getU16(); // a
 |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void ProtocolGame::parseCreatePrivateChannel(InputMessage& msg) | void ProtocolGame::parseCreatePrivateChannel(InputMessage& msg) | ||||||
| { | { | ||||||
|     msg.getU16(); // channel id
 |     msg.getU16(); // channel id
 | ||||||
|  |  | ||||||
|  | @ -82,10 +82,7 @@ TilePtr UIMap::getTile(const Point& mousePos) | ||||||
| void UIMap::onGeometryChange(const Rect& oldRect, const Rect& newRect) | void UIMap::onGeometryChange(const Rect& oldRect, const Rect& newRect) | ||||||
| { | { | ||||||
|     Rect mapRect = newRect.expanded(-1); |     Rect mapRect = newRect.expanded(-1); | ||||||
|     mapRect.addTop(m_paddingTop); |     mapRect.add(-m_paddingTop, -m_paddingLeft, -m_paddingBottom, -m_paddingRight); | ||||||
|     mapRect.addLeft(m_paddingLeft); |  | ||||||
|     mapRect.addBottom(-m_paddingBottom); |  | ||||||
|     mapRect.addRight(-m_paddingRight); |  | ||||||
|     Size mapSize(g_map.getVibibleSize().width() * Map::NUM_TILE_PIXELS, g_map.getVibibleSize().height() * Map::NUM_TILE_PIXELS); |     Size mapSize(g_map.getVibibleSize().width() * Map::NUM_TILE_PIXELS, g_map.getVibibleSize().height() * Map::NUM_TILE_PIXELS); | ||||||
|     mapSize.scale(mapRect.size(), Fw::KeepAspectRatio); |     mapSize.scale(mapRect.size(), Fw::KeepAspectRatio); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Eduardo Bart
						Eduardo Bart