Skip to content

Instantly share code, notes, and snippets.

@phl0w
Created June 15, 2012 21:19
Show Gist options
  • Select an option

  • Save phl0w/2938760 to your computer and use it in GitHub Desktop.

Select an option

Save phl0w/2938760 to your computer and use it in GitHub Desktop.
/**
* @param item
* @return The integer of the widget equipment slot if found, otherwise -1.
*/
public static int isWearing(int item) {
for (int slot : WIDGET_EQUIPMENT_ALL) {
if (Widgets.get(WIDGET, WIDGET_EQUIPMENT_ALL[slot]).getChildId() == item) {
return WIDGET_EQUIPMENT_ALL[slot];
}
}
return -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment