private void SetupWorldClient(byte[] encryptionKey, uint accountId, ulong timestamp) { WorldClient = new WorldClient(encryptionKey, accountId, timestamp, SocketFactory); WorldClient.OnConnectSuccess += GenerateEventHandler <EventArgs>(HandleWorldConnectSuccess); WorldClient.OnDisconnect += GenerateEventHandler <EventArgs>(HandleWorldDisconnect); WorldClient.OnWorldEnterSuccess += GenerateEventHandler <FinalWorldEnterData>(HandleWorldEnterSuccess); WorldClient.OnInstanceListSuccess += GenerateEventHandler <List <InstanceInfo> >(HandleInstanceListSuccess); WorldClient.OnDistrictListSuccess += GenerateEventHandler <List <DistrictInfo> >(HandleDistrictListSuccess); WorldClient.OnDistrictReserveSuccess += GenerateEventHandler <ReserveInfo>(HandleDistrictReserveSuccess); WorldClient.OnDistrictReserveFailed += GenerateEventHandler <int>(HandleDistrictReserveFailed); WorldClient.OnDistrictEnterSuccess += GenerateEventHandler <DistrictEnterInfo>(HandleDistrictEnterSuccess); WorldClient.OnDistrictEnterFailed += GenerateEventHandler <int>(HandleDistrictEnterFailed); WorldClient.OnGetClanInfoSuccess += GenerateEventHandler <ClanInfo>(HandleGetClanInfoSuccess); WorldClient.OnGetClanMOTDSuccess += GenerateEventHandler <string>(HandleGetClanMOTDSuccess); WorldClient.OnGetFriendlistSuccess += GenerateEventHandler <FriendlistInfo>(HandleGetFriendlistSuccess); WorldClient.OnGetIgnorelistSuccess += GenerateEventHandler <IgnorelistInfo>(HandleGetIgnorelistSuccess); WorldClient.OnGetChallengesSuccess += GenerateEventHandler <ChallengesInfo>(HandleGetChallengesSuccess); WorldClient.OnGetVoiceChannelSuccess += GenerateEventHandler <VoiceChannelInfo>(HandleGetVoiceChannelSuccess); WorldClient.OnGetMailInfoSuccess += GenerateEventHandler <MailInfo>(HandleGetMailInfoSuccess); DistrictMap = null; ClanInfo = null; ClanMOTD = null; Friends = null; Ignores = null; Challenges = null; VoiceChannel = null; MailInfo = null; }
private void HandleGetChallengesSuccess(object sender, ChallengesInfo e) { Challenges = e; }