Fix a stackpos bug in 9.6

This commit is contained in:
Eduardo Bart 2012-07-26 03:19:22 -03:00
parent c795eb91ab
commit 98c279c10b
4 changed files with 7 additions and 9 deletions

View File

@ -41,7 +41,7 @@
Creature::Creature() : Thing()
{
m_id = 1;
m_id = 0;
m_healthPercent = 100;
m_speed = 200;
m_direction = Otc::South;

View File

@ -226,7 +226,8 @@ namespace Proto {
ClientMarketBrowse = 245, // 944
ClientMarketCreate = 246, // 944
ClientMarketCancel = 247, // 944
ClientMarketAccept = 248 // 944
ClientMarketAccept = 248, // 944
ClientAnswerModalDialog = 249 // 960
};
enum ServerSpeakType {

View File

@ -442,13 +442,7 @@ void ProtocolGame::parseMapMoveWest(const InputMessagePtr& msg)
void ProtocolGame::parseUpdateTile(const InputMessagePtr& msg)
{
Position tilePos = getPosition(msg);
int thingId = msg->peekU16();
if(thingId == 0xFF01) {
msg->getU16();
} else {
setTileDescription(msg, tilePos);
msg->getU16();
}
setTileDescription(msg, tilePos);
}
void ProtocolGame::parseTileAddThing(const InputMessagePtr& msg)

View File

@ -163,6 +163,9 @@ ThingPtr Tile::addThing(const ThingPtr& thing, int stackPos)
return nullptr;
}
if(stackPos == 255)
stackPos = -1;
// the items stackpos follows this order:
// 0 - ground
// 1 - ground borders