This project is read-only.

Guild.Member.Character.Specialization returns null

Feb 21, 2013 at 1:22 PM
At charspec.Name, it returns an error saying object reference not set to instance of object, using the immediate window (or mousing over charspec = member.Character.Specialization; the Specialization field is null.
            Guild myGuild = new Guild();
            myGuild = global.myClient.GetGuild(global.mySettings.Realm, global.mySettings.Guild, GuildFields.Members);
            foreach (GuildMembership member in myGuild.Members)
                Specialization charspec = new Specialization();
                charspec = member.Character.Specialization;
                sSql.Append("INSERT INTO GUILDMEMBERSHIP \n");
                sSql.Append("VALUES (");
                sSql.Append(member.Character.Name + ", ");
                sSql.Append(member.Character.Guild + ", ");
                sSql.Append(member.Character.Realm + ", ");
                sSql.Append(member.Character.Race + ", ");
                sSql.Append(member.Character.Level + ", ");
                sSql.Append(charspec.Name + ", ");
                sSql.Append(member.Character.Faction + ", ");
Feb 21, 2013 at 11:56 PM

The character information GetGuild API doesn't include talent information, since they are also not returned from Blizzard guild API (

In order to get character talent information (and other character information like mounts, pets, gear, etc), you will need to use the GetCharacter API for each character.

This is by design. Basically each call in the API maps to a call in Blizzard's API. If Blizzard's API require you to make two calls, then you need to make two calls to WOWSharp library API. The reason I made this choice, is for the developer using the library to be able to easily know how many requests he made to the Blizzard's servers since they are expensive in terms of performance (there is a delay for HTTP requests) and also Blizzard limits the number of requests for day.