fix some items not being rendered in npc trade
This commit is contained in:
parent
53bbde0b48
commit
d3665efbb2
|
@ -73,7 +73,10 @@ void Item::draw(const Point& dest, float scaleFactor, bool animate)
|
|||
yPattern = m_position.y % getNumPatternsY();
|
||||
zPattern = m_position.z % getNumPatternsZ();
|
||||
} else if(isStackable() && getNumPatternsX() == 4 && getNumPatternsY() == 2) {
|
||||
if(m_countOrSubType < 5) {
|
||||
if(m_countOrSubType <= 0) {
|
||||
xPattern = 0;
|
||||
yPattern = 0;
|
||||
} else if(m_countOrSubType < 5) {
|
||||
xPattern = m_countOrSubType-1;
|
||||
yPattern = 0;
|
||||
} else if(m_countOrSubType < 10) {
|
||||
|
|
|
@ -506,8 +506,11 @@ void ProtocolGame::parseOpenNpcTrade(InputMessage& msg)
|
|||
std::vector<std::tuple<ItemPtr, std::string, int, int, int>> items;
|
||||
int listCount = msg.getU8();
|
||||
for(int i = 0; i < listCount; ++i) {
|
||||
ItemPtr item = Item::create(msg.getU16());
|
||||
item->setCountOrSubType(msg.getU8());
|
||||
uint16 itemId = msg.getU16();
|
||||
uint8 count = msg.getU8();
|
||||
|
||||
ItemPtr item = Item::create(itemId);
|
||||
item->setCountOrSubType(count);
|
||||
|
||||
std::string name = msg.getString();
|
||||
int weight = msg.getU32();
|
||||
|
|
Loading…
Reference in New Issue