This project is read-only.

Default Glyphs and Talents

Topics: Rawr.Base, Rawr.Base.Buffs
Apr 5, 2009 at 8:01 PM
Edited Apr 5, 2009 at 8:26 PM
I just checked in the ability for models to specify default buffs and glyphs (if using the new system) for character loaded from the Armory.

How to implement them yourself? There is a new virtual method in CalculationsBase, that is called whenever a character is imported from armory.
public virtual void SetDefaults(Character character)
You override that, and use it to set Buffs/Glyphs. The following is how Retribution does it.

        public override void SetDefaults(Character character)
character.ActiveBuffs.Add(Buff.GetBuffByName("Blessing of Might"));
character.ActiveBuffs.Add(Buff.GetBuffByName("Improved Blessing of Might"));
character.ActiveBuffs.Add(Buff.GetBuffByName("Blessing of Kings"));
character.ActiveBuffs.Add(Buff.GetBuffByName("Mark of the Wild"));
character.ActiveBuffs.Add(Buff.GetBuffByName("Windfury Totem"));

character.PaladinTalents.GlyphOfJudgement = true;
character.PaladinTalents.GlyphOfConsecration = true;
character.PaladinTalents.GlyphOfSenseUndead = true;
character.PaladinTalents.GlyphOfExorcism = true;
You can also set Glyphs on a conditional basis. Like give the user ideal Arcane Glyphs if they are specced into Arcane Barrage.

If you are getting a null reference exception on line 1256 in Character.cs, that means you mispelled a Buffs name.
Apr 5, 2009 at 8:34 PM
Very nice.