Merge pull request #2625 from Owain94/upstream-2605
This commit is contained in:
@@ -267,20 +267,25 @@ public class ItemManager
|
||||
*/
|
||||
public int getItemPrice(int itemID, boolean ignoreUntradeableMap)
|
||||
{
|
||||
final int realId = canonicalize(itemID);
|
||||
|
||||
if (realId == ItemID.COINS_995)
|
||||
if (itemID == ItemID.COINS_995)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (realId == ItemID.PLATINUM_TOKEN)
|
||||
if (itemID == ItemID.PLATINUM_TOKEN)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
|
||||
ItemDefinition itemComposition = getItemDefinition(itemID);
|
||||
if (itemComposition.getNote() != -1)
|
||||
{
|
||||
itemID = itemComposition.getLinkedNoteId();
|
||||
}
|
||||
itemID = WORN_ITEMS.getOrDefault(itemID, itemID);
|
||||
|
||||
if (!ignoreUntradeableMap)
|
||||
{
|
||||
UntradeableItemMapping p = UntradeableItemMapping.map(ItemVariationMapping.map(realId));
|
||||
UntradeableItemMapping p = UntradeableItemMapping.map(ItemVariationMapping.map(itemID));
|
||||
if (p != null)
|
||||
{
|
||||
return getItemPrice(p.getPriceID()) * p.getQuantity();
|
||||
@@ -288,7 +293,7 @@ public class ItemManager
|
||||
}
|
||||
|
||||
int price = 0;
|
||||
for (int mappedID : ItemMapping.map(realId))
|
||||
for (int mappedID : ItemMapping.map(itemID))
|
||||
{
|
||||
ItemPrice ip = itemPrices.get(mappedID);
|
||||
if (ip != null)
|
||||
|
||||
Reference in New Issue
Block a user