fix map padding, parse rule violations protocol opts

This commit is contained in:
Eduardo Bart 2012-01-10 00:46:20 -02:00
parent ab4dc91d90
commit bc7f22d395
4 changed files with 15 additions and 19 deletions

View File

@ -117,10 +117,10 @@ namespace Proto {
GameServerChannels = 171,
GameServerOpenChannel = 172,
GameServerPrivateChannel = 173,
GameServerRuleViolation = 174, // absolate in last tibia?
GameServerRuleViolation1 = 175, // absolate in last tibia?
GameServerRuleViolation2 = 176, // absolate in last tibia?
GameServerRuleViolation3 = 177, // absolate in last tibia?
GameServerRuleViolationChannel = 174, // absolate in last tibia?
GameServerRuleViolationRemove = 175, // absolate in last tibia?
GameServerRuleViolationCancel = 176, // absolate in last tibia?
GameServerRuleViolationLock = 177, // absolate in last tibia?
GameServerOpenOwnChannel = 178,
GameServerCloseChannel = 179,
GameServerMessage = 180,

View File

@ -156,7 +156,6 @@ private:
void parseChannelList(InputMessage& msg);
void parseOpenChannel(InputMessage& msg);
void parseOpenPrivatePlayerChat(InputMessage& msg);
void parseOpenRuleViolation(InputMessage& msg);
void parseCreatePrivateChannel(InputMessage& msg);
void parseClosePrivateChannel(InputMessage& msg);
void parseSafeTradeRequest(InputMessage& msg);

View File

@ -198,11 +198,16 @@ void ProtocolGame::parseMessage(InputMessage& msg)
case Proto::GameServerPrivateChannel:
parseOpenPrivatePlayerChat(msg);
break;
case Proto::GameServerRuleViolation:
case Proto::GameServerRuleViolation1:
case Proto::GameServerRuleViolation2:
case Proto::GameServerRuleViolation3:
parseOpenRuleViolation(msg);
case Proto::GameServerRuleViolationChannel:
msg.getU16();
break;
case Proto::GameServerRuleViolationRemove:
msg.getString();
break;
case Proto::GameServerRuleViolationCancel:
msg.getString();
break;
case Proto::GameServerRuleViolationLock:
break;
case Proto::GameServerOpenOwnChannel:
parseCreatePrivateChannel(msg);
@ -783,11 +788,6 @@ void ProtocolGame::parseOpenPrivatePlayerChat(InputMessage& msg)
msg.getString(); // name
}
void ProtocolGame::parseOpenRuleViolation(InputMessage& msg)
{
msg.getU16(); // a
}
void ProtocolGame::parseCreatePrivateChannel(InputMessage& msg)
{
msg.getU16(); // channel id

View File

@ -82,10 +82,7 @@ TilePtr UIMap::getTile(const Point& mousePos)
void UIMap::onGeometryChange(const Rect& oldRect, const Rect& newRect)
{
Rect mapRect = newRect.expanded(-1);
mapRect.addTop(m_paddingTop);
mapRect.addLeft(m_paddingLeft);
mapRect.addBottom(-m_paddingBottom);
mapRect.addRight(-m_paddingRight);
mapRect.add(-m_paddingTop, -m_paddingLeft, -m_paddingBottom, -m_paddingRight);
Size mapSize(g_map.getVibibleSize().width() * Map::NUM_TILE_PIXELS, g_map.getVibibleSize().height() * Map::NUM_TILE_PIXELS);
mapSize.scale(mapRect.size(), Fw::KeepAspectRatio);