Darkonig
05-22-2007, 05:34 AM
There are some items that show stackable in their pictures and in the database that simply do not stack properly in game. I traced this back to an incorrect implementation of the IsStackable method and here is the diff for the fix which replaces the method body that guesses if it is stackable and just returns whether the database record claims it is stackable.
cvs diff -- Item.cpp (in directory M:\cvswork\EQEmuCVS\Source\common\)
Index: Item.cpp
================================================== =================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/common/Item.cpp,v
retrieving revision 1.23
diff -r1.23 Item.cpp
183,202c183
< //This function may not be right, but I think these are the itemtypes
< //that can be stacked
< bool result=false;
< if (m_item) {
< switch (m_item->ItemType) {
< case ItemTypeFood:
< case ItemTypeDrink:
< case ItemTypeBandage:
< case ItemTypeThrowingv2:
< case ItemTypeArrow:
< case ItemTypeFishingBait:
< case ItemTypeStackable:
< case ItemTypeAlcohol:
< case ItemTypeAugmentSolvent:
< case ItemTypeAugmentDistill:
< result=true;
< }
< }
<
< return result;
---
> return m_item->Stackable;
cvs diff -- Item.cpp (in directory M:\cvswork\EQEmuCVS\Source\common\)
Index: Item.cpp
================================================== =================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/common/Item.cpp,v
retrieving revision 1.23
diff -r1.23 Item.cpp
183,202c183
< //This function may not be right, but I think these are the itemtypes
< //that can be stacked
< bool result=false;
< if (m_item) {
< switch (m_item->ItemType) {
< case ItemTypeFood:
< case ItemTypeDrink:
< case ItemTypeBandage:
< case ItemTypeThrowingv2:
< case ItemTypeArrow:
< case ItemTypeFishingBait:
< case ItemTypeStackable:
< case ItemTypeAlcohol:
< case ItemTypeAugmentSolvent:
< case ItemTypeAugmentDistill:
< result=true;
< }
< }
<
< return result;
---
> return m_item->Stackable;