Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void DoTinks() {
- HudList.HudListRowAccessor tinkerListRow = AutoImbueList[0];
- HudStaticText item = (HudStaticText)tinkerListRow[1];
- HudStaticText sal = (HudStaticText)tinkerListRow[2];
- HudStaticText salID = (HudStaticText)tinkerListRow[4];
- HudStaticText itemID = (HudStaticText)tinkerListRow[5];
- Logger.Debug("AutoTinker: applying " + sal.Text.ToString() + ": " + salID.Text.ToString() + " to " + item.Text.ToString() + ": " + itemID.Text.ToString());
- if (!int.TryParse(itemID.Text.ToString(), out intItemId)) {
- Util.WriteToChat("AutoImbue: Something went wrong, unable to parse item to work with.");
- return;
- }
- if (!int.TryParse(salID.Text.ToString(), out intSalvId)) {
- Util.WriteToChat("AutoImbue: Something went wrong, unable to parse salvage to work with.");
- return;
- }
- if (intItemId != 0) {
- currentItemName = Util.GetObjectName(intItemId);
- }
- if (intSalvId != 0) {
- currentSalvageWK = Math.Round(Globals.Core.WorldFilter[intSalvId].Values(DoubleValueKey.SalvageWorkmanship), 2);
- currentSalvage = Util.GetObjectName(intSalvId).Replace(" Salvage","").Replace(" (100)","");
- }
- if (!tinking) {
- Util.WriteToChat(Globals.Core.WorldFilter[intSalvId].Values(DoubleValueKey.SalvageWorkmanship).ToString());
- Globals.Core.Actions.SelectItem(intSalvId);
- int currentSelection = Globals.Core.Actions.CurrentSelection;
- if (Globals.Core.Actions.CurrentSelection == intSalvId) {
- //CoreManager.Current.EchoFilter.ServerDispatch += EchoFilter_ServerDispatch;
- UBHelper.ConfirmationRequest.ConfirmationRequestEvent += UBHelper_ConfirmationRequest;
- //Globals.Core.WorldFilter.ReleaseObject += Current_ReleaseObject;
- Globals.Core.Actions.ApplyItem(intSalvId, intItemId);
- tinking = true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement