runelite-client: Don't recurse from editing an item composition
This commit is contained in:
@@ -52,6 +52,7 @@ import static net.runelite.api.ItemID.*;
|
|||||||
import net.runelite.api.SpritePixels;
|
import net.runelite.api.SpritePixels;
|
||||||
import net.runelite.api.events.GameStateChanged;
|
import net.runelite.api.events.GameStateChanged;
|
||||||
import net.runelite.client.callback.ClientThread;
|
import net.runelite.client.callback.ClientThread;
|
||||||
|
import net.runelite.api.events.PostItemComposition;
|
||||||
import net.runelite.http.api.item.ItemClient;
|
import net.runelite.http.api.item.ItemClient;
|
||||||
import net.runelite.http.api.item.ItemPrice;
|
import net.runelite.http.api.item.ItemPrice;
|
||||||
|
|
||||||
@@ -226,6 +227,12 @@ public class ItemManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe
|
||||||
|
public void onPostItemComposition(PostItemComposition event)
|
||||||
|
{
|
||||||
|
itemCompositions.put(event.getItemComposition().getId(), event.getItemComposition());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Look up an item's price
|
* Look up an item's price
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -521,10 +521,6 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
if (option != null)
|
if (option != null)
|
||||||
{
|
{
|
||||||
itemComposition.setShiftClickActionIndex(option);
|
itemComposition.setShiftClickActionIndex(option);
|
||||||
|
|
||||||
// Update our cached item composition too
|
|
||||||
ItemComposition ourItemComposition = itemManager.getItemComposition(itemComposition.getId());
|
|
||||||
ourItemComposition.setShiftClickActionIndex(option);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user