public void Initialize() { if (this.myInitialized) { return; } if (this.Spells.Length == 1) { this.mySpells = SpellBook.GenerateForGuild(); } else { this.mySpells = SpellBook.FromDatabase(this.Spells); } if (this.Stats != string.Empty) { this.ParseStats(); } this.myFightStats.AddBase(EffectEnum.AddForce, this.Level); this.myFightStats.AddBase(EffectEnum.AddSagesse, this.myStats.GetTotal(EffectEnum.AddSagesse)); this.myFightStats.AddBase(EffectEnum.AddIntelligence, this.Level); this.myFightStats.AddBase(EffectEnum.AddChance, this.Level); this.myFightStats.AddBase(EffectEnum.AddAgilite, this.Level); this.myFightStats.AddBase(EffectEnum.AddReduceDamagePourcentNeutre, (int)Math.Floor((double)this.Level / 2)); this.myFightStats.AddBase(EffectEnum.AddReduceDamagePourcentFeu, (int)Math.Floor((double)this.Level / 2)); this.myFightStats.AddBase(EffectEnum.AddReduceDamagePourcentEau, (int)Math.Floor((double)this.Level / 2)); this.myFightStats.AddBase(EffectEnum.AddReduceDamagePourcentAir, (int)Math.Floor((double)this.Level / 2)); this.myFightStats.AddBase(EffectEnum.AddReduceDamagePourcentTerre, (int)Math.Floor((double)this.Level / 2)); this.myFightStats.AddBase(EffectEnum.AddEsquivePA, (int)Math.Floor((double)this.Level / 2)); this.myFightStats.AddBase(EffectEnum.AddEsquivePM, (int)Math.Floor((double)this.Level / 2)); this.PatternSpells = new CachedString(new Func <String>(() => { return(string.Join("|", this.mySpells.GetMySpells().Values.Select(x => x.Id + ";" + x.Level))); })); /* * SpellBook.SpellInfo curSpell in mySpells.GetSpellInfos()*/ this.myInitialized = true; }