| 4099 | } |
| 4100 | |
| 4101 | int Item::getMaxStackLimit(int player) const |
| 4102 | { |
| 4103 | if ( !shouldItemStack(player, true) ) |
| 4104 | { |
| 4105 | return 1; |
| 4106 | } |
| 4107 | |
| 4108 | int maxStack = 100; |
| 4109 | if ( itemTypeIsThrownBall(this->type) ) |
| 4110 | { |
| 4111 | maxStack = QUIVER_MAX_AMMO_QTY - 1; |
| 4112 | } |
| 4113 | else if ( itemCategory(this) == THROWN || itemCategory(this) == GEM ) |
| 4114 | { |
| 4115 | maxStack = THROWN_GEM_MAX_STACK_QTY; |
| 4116 | } |
| 4117 | else if ( itemTypeIsQuiver(this->type) ) |
| 4118 | { |
| 4119 | maxStack = QUIVER_MAX_AMMO_QTY - 1; |
| 4120 | } |
| 4121 | else if ( type == TOOL_METAL_SCRAP || type == TOOL_MAGIC_SCRAP ) |
| 4122 | { |
| 4123 | maxStack = SCRAP_MAX_STACK_QTY - 1; |
| 4124 | } |
| 4125 | |
| 4126 | return maxStack; |
| 4127 | } |
| 4128 | |
| 4129 | ItemStackResult getItemStackingBehaviorIndividualItemCheck(const int player, Item* itemToCheck, Item* itemDestinationStack, int& newQtyForCheckedItem, int& newQtyForDestItem) |
| 4130 | { |
no test coverage detected