Skip to content

Latest commit

 

History

History
25 lines (23 loc) · 645 Bytes

README.md

File metadata and controls

25 lines (23 loc) · 645 Bytes

DiabloInterfaceAPI

API for making requests to DiabloInterface.

Example

Get name of the armor the player has equipped.

using (var client = new DiabloInterfaceConnection("DiabloInterfaceItems"))
{
    var request = new ItemRequest(ItemRequest.Slot.Armor);
    var response = client.Request(request);
    
    if (!response.IsValid)
    {
        Console.WriteLine("Invalid request.");
    }
    else if (!response.Success)
    {
        Console.WriteLine("No armor equipped.");
    }
    else
    {
        Console.WriteLine("Item name: {0}", response.Items[0].ItemName);
    }
}