Make examineplugin stop running getItemComposition on executor thread (#461)
This commit is contained in:
@@ -412,6 +412,20 @@ public class ItemManager
|
||||
return price;
|
||||
}
|
||||
|
||||
public int getAlchValue(ItemComposition composition)
|
||||
{
|
||||
if (composition.getId() == ItemID.COINS_995)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (composition.getId() == ItemID.PLATINUM_TOKEN)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
|
||||
return (int) Math.max(1, composition.getPrice() * HIGH_ALCHEMY_CONSTANT);
|
||||
}
|
||||
|
||||
public int getAlchValue(int itemID)
|
||||
{
|
||||
if (itemID == ItemID.COINS_995)
|
||||
|
||||
@@ -322,7 +322,7 @@ public class ExaminePlugin extends Plugin
|
||||
quantity = Math.max(1, quantity);
|
||||
int itemCompositionPrice = itemComposition.getPrice();
|
||||
final int gePrice = itemManager.getItemPrice(id);
|
||||
final int alchPrice = itemCompositionPrice <= 0 ? 0 : itemManager.getAlchValue(id);
|
||||
final int alchPrice = itemCompositionPrice <= 0 ? 0 : itemManager.getAlchValue(itemComposition);
|
||||
|
||||
if (gePrice > 0 || alchPrice > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user