Class BattleNetClient
Inheritance
Inherited Members
Namespace: Asgard3.Core.BattleNetClient
Assembly: Asgard3.Core.dll
Syntax
public class BattleNetClient
Constructors
| Improve this Doc View SourceBattleNetClient(ConnectionSettings)
Creates a new BattleNetClient.
Declaration
public BattleNetClient(ConnectionSettings set)
Parameters
Type | Name | Description |
---|---|---|
ConnectionSettings | set | The settings for the client. |
Fields
| Improve this Doc View SourceWardenHandler
Declaration
public IWarden WardenHandler
Field Value
Type | Description |
---|---|
IWarden |
Properties
| Improve this Doc View SourceAutomaticReconnect
Should the client reconnect automatically to battle.net.
Declaration
public bool AutomaticReconnect { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
BnetCheckRevision
Declaration
public Asgard3CheckRevision BnetCheckRevision { get; set; }
Property Value
Type | Description |
---|---|
Asgard3CheckRevision |
ClanList
The current Clan Members List for this BattleNetClient.
Declaration
public List<BattleNetClanUser> ClanList { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<BattleNetClanUser> |
ConnectectionRequestedTime
Declaration
public DateTime ConnectectionRequestedTime { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
ConnectedBnetRemoteEndpoint
Declaration
public EndPoint ConnectedBnetRemoteEndpoint { get; }
Property Value
Type | Description |
---|---|
System.Net.EndPoint |
ConnectedTime
Declaration
public DateTime ConnectedTime { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
CurrentChannel
Declaration
public string CurrentChannel { get; }
Property Value
Type | Description |
---|---|
System.String |
CurrentClan
The current clan name for this BattleNetClient. (If the client is not connected or is not in a clan it will return null.)
Declaration
public string CurrentClan { get; }
Property Value
Type | Description |
---|---|
System.String |
FiltersTriggedTime
Declaration
public DateTime FiltersTriggedTime { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
FiltersTrigger
Declaration
public bool FiltersTrigger { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
FriendsList
The current Friends List for this BattleNetClient.
Declaration
public List<BattleNetFriendUser> FriendsList { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<BattleNetFriendUser> |
IdleTime
Declaration
public TimeSpan IdleTime { get; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
IsConnected
Returns true if the client is connected to battle.net.
Declaration
public bool IsConnected { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInitializing
Declaration
public bool IsInitializing { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsOperator
Returns if the bot has operator status or not.
Declaration
public bool IsOperator { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsRealmConnected
Declaration
public bool IsRealmConnected { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LastTalkTime
Declaration
public DateTime LastTalkTime { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
MessagesFiltered
Declaration
public long MessagesFiltered { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
ModerateFiltersDetected
Declaration
public int ModerateFiltersDetected { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MyTimer
Declaration
public Timer MyTimer { get; }
Property Value
Type | Description |
---|---|
System.Timers.Timer |
QueueSystem
Declaration
public IQueue QueueSystem { get; set; }
Property Value
Type | Description |
---|---|
IQueue |
Settings
Gets the ConnectionSettings for this BattleNetClient.
Declaration
public ConnectionSettings Settings { get; set; }
Property Value
Type | Description |
---|---|
ConnectionSettings |
UniqueUserName
The Unique Username for this BattleNetClient. (Will return null if not connected.)
Declaration
public string UniqueUserName { get; }
Property Value
Type | Description |
---|---|
System.String |
UserList
Declaration
public UserDatabase UserList { get; set; }
Property Value
Type | Description |
---|---|
UserDatabase |
Methods
| Improve this Doc View SourceClanCreationInvitationResponse(BattleNetClanCreationArgs, Byte)
Declaration
public void ClanCreationInvitationResponse(BattleNetClanCreationArgs args, byte status)
Parameters
Type | Name | Description |
---|---|---|
BattleNetClanCreationArgs | args | |
System.Byte | status |
ClanInvitationResponse(Int32, Int32, String, BattleNetClanInvationResponses)
Responds to a battle.net clan invitation.
Declaration
public void ClanInvitationResponse(int cookie, int clantag, string inviter, BattleNetClanInvationResponses rsp)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | cookie | The cookie of the request. |
System.Int32 | clantag | The clan tag. |
System.String | inviter | The person who sent the invitation. |
BattleNetClanInvationResponses | rsp | The response to the invitation. |
Connect()
Starts the connection sequence.
Declaration
public void Connect()
CreateClan(BattleNetClanInviteMultiple)
Declaration
public void CreateClan(BattleNetClanInviteMultiple args)
Parameters
Type | Name | Description |
---|---|---|
BattleNetClanInviteMultiple | args |
Disconnect()
Disconnectes all sockets and stops all timers related to the connections that were open.
Declaration
public void Disconnect()
EnqueueBnetPacket(BattleNetPacketID, DataBuffer)
Declaration
public void EnqueueBnetPacket(BattleNetPacketID packetId, DataBuffer dataBuffer)
Parameters
Type | Name | Description |
---|---|---|
BattleNetPacketID | packetId | |
DataBuffer | dataBuffer |
EnqueueMessage(String)
Will add a message to the queue if one has been set otherwise will just send the message right away.
Declaration
public void EnqueueMessage(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to be added to the queue. |
GetIconsFile(Int64, String)
Declaration
public void GetIconsFile(long filetime, string filename)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | filetime | |
System.String | filename |
OverrideBattleNetPacket(BattleNetPacketID, ParseCallback)
Override the default handling of a battle.net packet.
Declaration
public ParseCallback OverrideBattleNetPacket(BattleNetPacketID packet, ParseCallback pc)
Parameters
Type | Name | Description |
---|---|---|
BattleNetPacketID | packet | The packet to override. |
ParseCallback | pc | The method to handle the packet. |
Returns
Type | Description |
---|---|
ParseCallback | The default handler so you can restore it on plugin unload. |
OverrideBnlsPacket(BnlsPacketID, ParseCallback)
Override the default handling of a bnls packet.
Declaration
public ParseCallback OverrideBnlsPacket(BnlsPacketID packet, ParseCallback pc)
Parameters
Type | Name | Description |
---|---|---|
BnlsPacketID | packet | The packet to override. |
ParseCallback | pc | The method to handle the packet. |
Returns
Type | Description |
---|---|
ParseCallback | The default handler so you can restore it on plugin unload. |
RealmCreateCharacter(Int32, Int16, String)
Realm create character
Declaration
public void RealmCreateCharacter(int class, short flags, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | class | the class of the character |
System.Int16 | flags | the flags of the character |
System.String | name | the name of the character |
RealmDeleteCharacter(String)
Declaration
public void RealmDeleteCharacter(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
RealmReconnect()
Reconnect Realm
Declaration
public void RealmReconnect()
RealmRepickCharacter()
Begins the repick part for realm.
Declaration
public void RealmRepickCharacter()
RequestProfile(String, BattleNetProfileRequestType)
Request a users profile from battle.net
Declaration
public void RequestProfile(string username, BattleNetProfileRequestType profile)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The username of the user. |
BattleNetProfileRequestType | profile | The type of profile your want returned. |
SelectCharacter(String)
Select which character to login as
Declaration
public void SelectCharacter(string characterName)
Parameters
Type | Name | Description |
---|---|---|
System.String | characterName | The character name |
SelectRealm(String)
Select which realm to connect to
Declaration
public void SelectRealm(string realmTitle)
Parameters
Type | Name | Description |
---|---|---|
System.String | realmTitle | The realm name |
SendBnetMessage(String)
Sends a message to battle.net.
Declaration
public void SendBnetMessage(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Message to send to battle.net |
SendBnetPacket(BattleNetPacketID, DataBuffer)
Sends a packet to battle.net
Declaration
public void SendBnetPacket(BattleNetPacketID packetid, DataBuffer data)
Parameters
Type | Name | Description |
---|---|---|
BattleNetPacketID | packetid | Battle.net packet id. (enumBNETEvents) |
DataBuffer | data | The databuffer containing the data to be sent to battle.net (MBNCSUtil.DataBuffer) |
SendBnlsPacket(BnlsPacketID, DataBuffer)
Sends a packet to the BNLS server.
Declaration
public void SendBnlsPacket(BnlsPacketID packet, DataBuffer data)
Parameters
Type | Name | Description |
---|---|---|
BnlsPacketID | packet | BNLS packet id. (enumBNLSEvents) |
DataBuffer | data | The databuffer containing the data to be sent to the BNLS server (MBNCSUtil.DataBuffer) |
SendRealmPacket(BattleNetRealmID, DataBuffer)
Sends a packet to the REALM server.
Declaration
public void SendRealmPacket(BattleNetRealmID packet, DataBuffer data)
Parameters
Type | Name | Description |
---|---|---|
BattleNetRealmID | packet | REALM packet id. (BattleNetRealmID) |
DataBuffer | data | The databuffer containing the data to be sent to the REALM server (MBNCSUtil.DataBuffer) |
WriteProfile(BattleNetProfile)
Writes a battle.net profile.
Declaration
public void WriteProfile(BattleNetProfile profile)
Parameters
Type | Name | Description |
---|---|---|
BattleNetProfile | profile | The profile to be written. |
Events
| Improve this Doc View SourceHandleBattleNetChatEvents
Handles battle.net chat events.
Declaration
public event BattleNetClient.DelegateHandleBattleNetChatEvents HandleBattleNetChatEvents
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleBattleNetChatEvents |
HandleBattleNetClanEvents
Passes all battle.net clan event information.
Declaration
public event BattleNetClient.DelegateHandleBattleNetClanEvents HandleBattleNetClanEvents
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleBattleNetClanEvents |
HandleBattleNetFriendEvents
Passes all battle.net friends information.
Declaration
public event BattleNetClient.DelegateHandleBattleNetFriendEvents HandleBattleNetFriendEvents
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleBattleNetFriendEvents |
HandleBattleNetLogonEvents
Passes battle.net logon information (Not the actual data just that the login was accepted or the cdkey failed.)
Declaration
public event BattleNetClient.DelegateHandleBattleNetLogonEvents HandleBattleNetLogonEvents
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleBattleNetLogonEvents |
HandleBattleNetProfile
Passes requested battle.net profiles.
Declaration
public event BattleNetClient.DelegateHandleBattleNetProfile HandleBattleNetProfile
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleBattleNetProfile |
HandleCoreError
Declaration
public event BattleNetClient.DelegateHandleCoreError HandleCoreError
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleCoreError |
HandleMessageBox
Declaration
public event BattleNetClient.DelegateMessageBox HandleMessageBox
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateMessageBox |
HandleMessageSentToBnet
When ever there is a message sent to bnet this event is fired.
Declaration
public event BattleNetClient.DelegateHandleMessageSentToBnet HandleMessageSentToBnet
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleMessageSentToBnet |
HandleNewsEvent
Declaration
public event BattleNetClient.DelegateHandleNewsEventArgs HandleNewsEvent
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleNewsEventArgs |
HandleRealmCharList
Declaration
public event BattleNetClient.DelegateHandleRealmCharList HandleRealmCharList
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleRealmCharList |
HandleRealmInformation
Declaration
public event BattleNetClient.DelegateHandleRealmInformation HandleRealmInformation
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleRealmInformation |
HandleRealmList
Declaration
public event BattleNetClient.DelegateHandleRealmList HandleRealmList
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleRealmList |
HandleSaveEvent
Declaration
public event BattleNetClient.DelegateHandleSaveSettings HandleSaveEvent
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleSaveSettings |
HandleSocketData
Passes the raw data for every packet that goes through the connection.
Declaration
public event BattleNetClient.DelegateHandleSocketData HandleSocketData
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleSocketData |
HandleSocketDataV2
Passes the raw data for every packet that goes through the connection.
Declaration
public event BattleNetClient.DelegateHandleSocketDataV2 HandleSocketDataV2
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateHandleSocketDataV2 |
HandleSocketEvent
Passes socket events such as BNLS Connecting and BNET connected and such.
Declaration
public event BattleNetClient.DelegateSocketEvent HandleSocketEvent
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateSocketEvent |
HandleUserFiltered
Passes socket events such as BNLS Connecting and BNET connected and such.
Declaration
public event BattleNetClient.DelegateBattleNetFilteredUser HandleUserFiltered
Event Type
Type | Description |
---|---|
BattleNetClient.DelegateBattleNetFilteredUser |