public int getSynergie() { // DateTime deb = DateTime.Now; int syn = 0; // Console.WriteLine("Competence = " + Name); for (int i = 0; i < (int)CompType.Maximum; i++) { NubiaCompetence c = mOwner.Competences[(CompType)i]; if (c is NullCompetence) { continue; } if (c == null) { continue; } else if (c.SynergieTab == null) { continue; } else if (c.SynergieTab.Length == 0) { continue; } for (int s = 0; s < c.SynergieTab.Length; s++) { if (c.SynergieTab[s] == CType && c.getPureMaitrise() >= 5) { syn += 2; } } } // Console.WriteLine("Calcul synergie de {0} en {1}ms", Name, (DateTime.Now - deb).TotalMilliseconds); return(syn); }
private void LearnCompetence(CompType comp, bool msgDisplay) { if (!mCompetences.ContainsKey(comp)) { NubiaCompetence c = null; switch (comp) { case CompType.Minage: c = new CompMinage(mOwner); break; case CompType.Buchage: c = new CompBuchage(mOwner); break; case CompType.Acrobaties: c = new CompAcrobatie(mOwner); break; case CompType.ArtMagie: c = new CompArtMagie(mOwner); break; case CompType.Bluff: c = new CompBluff(mOwner); break; // case CompType.Brassage: c = new compbra case CompType.Chimie: c = new CompChimie(mOwner); break; case CompType.Concentration: c = new CompConcentration(mOwner); break; case CompType.Couture: c = new CompCouture(mOwner); break; case CompType.Crochetage: c = new CompCrochetage(mOwner); break; //case CompType.Cuisine: c = new compcui case CompType.Deguisement: c = new CompDeguisement(mOwner); break; case CompType.DeplacementSilencieux: c = new CompDeplacementSilencieux(mOwner); break; case CompType.Desamorcage: c = new CompDesamorcage(mOwner); break; case CompType.Detection: c = new CompDetection(mOwner); break; case CompType.Diplomatie: c = new CompDiplomatie(mOwner); break; case CompType.Discretion: c = new CompDiscretion(mOwner); break; case CompType.Dressage: c = new CompDressage(mOwner); break; case CompType.Ebenisterie: c = new CompEbenisterie(mOwner); break; case CompType.Equilibre: c = new CompEquilibre(mOwner); break; case CompType.Equitation: c = new CompEquitation(mOwner); break; case CompType.Erudition: c = new CompErudition(mOwner); break; case CompType.Escalade: c = new CompEscalade(mOwner); break; case CompType.Escamotage: c = new CompEscamotage(mOwner); break; case CompType.Estimation: c = new CompEstimation(mOwner); break; case CompType.Evasion: c = new CompEvasion(mOwner); break; case CompType.Forge: c = new CompForge(mOwner); break; case CompType.Fouille: c = new CompFouille(mOwner); break; case CompType.Ingenierie: c = new CompIngenieurie(mOwner); break; case CompType.Intimidation: c = new CompIntimidation(mOwner); break; //case CompType.Peche case CompType.PerceptionAuditive: c = new CompPerceptionAuditive(mOwner); break; case CompType.PremiersSecours: c = new CompPremierSecours(mOwner); break; case CompType.Psychologie: c = new CompPsychologie(mOwner); break; case CompType.Renseignements: c = new CompPsychologie(mOwner); break; case CompType.Representation: c = new CompRepresentation(mOwner); break; case CompType.Saut: c = new CompSaut(mOwner); break; case CompType.Survie: c = new CompSurvie(mOwner); break; case CompType.UtilisationObjetsMagiques: c = new CompUtilisationObjetMagique(mOwner); break; case CompType.VoleVoile: c = new CompVolVoile(mOwner); break; case CompType.Agriculture: c = new CompAgriculture(mOwner); break; case CompType.Chirurgie: c = new CompChirurgie(mOwner); break; } if (c != null && !mCompetences.ContainsKey(c.CType)) { if (msgDisplay) { mOwner.SendMessage("Vous apprennez une nouvelle compétence: " + c.Name); } mCompetences.Add(c.CType, c); } } }