1
Vote

.GetGuild not setting properties and .GetCharacter not using properties

description

The following code is not working in v0.5.1 of the DLL:
{{
  Kralizek.WoWArmoryParser.Guild _armoryGuild;
  _armoryGuild = Kralizek.WoWArmoryParser.ArmoryParser.GetGuild(_roster.Guild_Server, _roster.Guild_Name, this.KralizekRegion(_roster.Guild_Region_Enum)) ;
 
  foreach (Kralizek.WoWArmoryParser.GuildMember _armoryChar in _armoryGuild.Members) {
    bool _changed = false;
    Kralizek.WoWArmoryParser.Character _armoryCharInfo = null;
    _armoryCharInfo = _armoryChar.GetCharacter();
  }
}}
 
When I was stepping through in the debugger, the code was properly iterating through the .GuildMember collection members, but the .GetCharacter() method was returning an empty object. Digging about with the watcher, the Realm was not being set in the Guild object.
 
In order to get it to work, I had to do the following:
{{
  Kralizek.WoWArmoryParser.Guild _armoryGuild;
  _armoryGuild = Kralizek.WoWArmoryParser.ArmoryParser.GetGuild(_roster.Guild_Server, _roster.Guild_Name, this.KralizekRegion(_roster.Guild_Region_Enum)) ;
  _armoryGuild.Realm = _roster.Guild_Server;
  _armoryGuild.Name = _roster.Guild_Name;
  _armoryGuild.Region = this.KralizekRegion(_roster.Guild_Region_Enum);
}}
 
I was still running into some issues with the .GetCharacter(), so I changed the call to do the following:
{{
      _armoryCharInfo = Kralizek.WoWArmoryParser.ArmoryParser.GetCharacter(_roster.Guild_Server, _armoryChar.Name, this.KralizekRegion(_roster.Guild_Region_Enum));
}}
 
So my code block now looks like the following:
{{
  Kralizek.WoWArmoryParser.Guild _armoryGuild;
  _armoryGuild = Kralizek.WoWArmoryParser.ArmoryParser.GetGuild(_roster.Guild_Server, _roster.Guild_Name, this.KralizekRegion(_roster.Guild_Region_Enum)) ;
  _armoryGuild.Realm = _roster.Guild_Server;
  _armoryGuild.Name = _roster.Guild_Name;
  _armoryGuild.Region = this.KralizekRegion(_roster.Guild_Region_Enum);
 
  foreach (Kralizek.WoWArmoryParser.GuildMember _armoryChar in _armoryGuild.Members) {
      _armoryCharInfo = Kralizek.WoWArmoryParser.ArmoryParser.GetCharacter(_roster.Guild_Server, _armoryChar.Name, this.KralizekRegion(_roster.Guild_Region_Enum));
}}
 
But it would be nice to have the constructor set the properties again and get rid of the extra code and have .GetCharacter() work again. :)

comments

CSimpkins wrote Dec 26, 2007 at 3:45 PM

Well, the multi-line code markup didn't work as expected. Hopefully that all makes sense.

Kralizek wrote Dec 30, 2007 at 9:51 PM

they changed the guild-info structure.

fixing

CSimpkins wrote Dec 31, 2007 at 7:11 PM

I noticed a lot of wierdness with Armory over the past week - any idea when it might calm down, or what's causing it?

wrote Feb 12, 2013 at 9:32 PM