Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. private void DoTinks() {
  2. HudList.HudListRowAccessor tinkerListRow = AutoImbueList[0];
  3. HudStaticText item = (HudStaticText)tinkerListRow[1];
  4. HudStaticText sal = (HudStaticText)tinkerListRow[2];
  5. HudStaticText salID = (HudStaticText)tinkerListRow[4];
  6. HudStaticText itemID = (HudStaticText)tinkerListRow[5];
  7.  
  8.  
  9. Logger.Debug("AutoTinker: applying " + sal.Text.ToString() + ": " + salID.Text.ToString() + " to " + item.Text.ToString() + ": " + itemID.Text.ToString());
  10. if (!int.TryParse(itemID.Text.ToString(), out intItemId)) {
  11. Util.WriteToChat("AutoImbue: Something went wrong, unable to parse item to work with.");
  12. return;
  13. }
  14.  
  15. if (!int.TryParse(salID.Text.ToString(), out intSalvId)) {
  16. Util.WriteToChat("AutoImbue: Something went wrong, unable to parse salvage to work with.");
  17. return;
  18. }
  19.  
  20. if (intItemId != 0) {
  21. currentItemName = Util.GetObjectName(intItemId);
  22. }
  23.  
  24. if (intSalvId != 0) {
  25. currentSalvageWK = Math.Round(Globals.Core.WorldFilter[intSalvId].Values(DoubleValueKey.SalvageWorkmanship), 2);
  26. currentSalvage = Util.GetObjectName(intSalvId).Replace(" Salvage","").Replace(" (100)","");
  27. }
  28.  
  29. if (!tinking) {
  30. Util.WriteToChat(Globals.Core.WorldFilter[intSalvId].Values(DoubleValueKey.SalvageWorkmanship).ToString());
  31. Globals.Core.Actions.SelectItem(intSalvId);
  32. int currentSelection = Globals.Core.Actions.CurrentSelection;
  33. if (Globals.Core.Actions.CurrentSelection == intSalvId) {
  34. //CoreManager.Current.EchoFilter.ServerDispatch += EchoFilter_ServerDispatch;
  35. UBHelper.ConfirmationRequest.ConfirmationRequestEvent += UBHelper_ConfirmationRequest;
  36.  
  37. //Globals.Core.WorldFilter.ReleaseObject += Current_ReleaseObject;
  38. Globals.Core.Actions.ApplyItem(intSalvId, intItemId);
  39. tinking = true;
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement