Narayan
Member
- Joined
- Oct 26, 2010
- Messages
- 405
- Reaction score
- 2
I'm trying to open a mailbox and get all mail via a plugin however the code im using locks the wow screen until I stop the plugin manually. Does anyone have any suggestions?
PHP:
WoWGameObject mailbox =
ObjectManager.GetObjectsOfType<WoWGameObject>().Where(o => o.SubType == WoWGameObjectType.Mailbox)
.OrderBy(o => o.Distance).FirstOrDefault();
if (mailbox != null)
{
// Interact
Logging.Write("MILLER: Mailbox found, interacting");
mailbox.Interact();
}
else
{
Logging.Write("MILLER: Mailbox not found");
}
using (new FrameLock())
{
// Open Mail
Logging.Write("MILLER: Opening All Mail");
MailFrame.Instance.OpenAllMail();
Logging.Write("MILLER: Done opening mail");
}