/// <summary> /// The title value, shown over player's head. /// </summary> /// <param name="source">The player looking.</param> /// <param name="player">The title owner.</param> /// <returns>The title value.</returns> public override string GetValue(GamePlayer source, GamePlayer player) { if (player.Champion && player.ChampionLevel > 0) { return(LanguageMgr.TryTranslateOrDefault(source, string.Format("!CL Title {0}!", player.ChampionLevel), string.Format("Titles.CL.Level{0}", player.ChampionLevel))); } return(string.Empty); }
/// <summary> /// The title value, shown over player's head. /// </summary> /// <param name="source">The player looking.</param> /// <param name="player">The title owner.</param> /// <returns>The title value.</returns> public override string GetValue(GamePlayer source, GamePlayer player) { if (player.MLGranted && player.MLLevel > 0) { // try get player ML Number int mlline = GetPlayerMLLine(player); return(LanguageMgr.TryTranslateOrDefault(source, string.Format("!ML Title {0}!", mlline), string.Format("Titles.ML.Line{0}", mlline))); } return(LanguageMgr.TryTranslateOrDefault(source, "!None!", "DetailDisplayHandler.HandlePacket.None")); }
public String GetTitle(GamePlayer player, int skillLevel) { string profession = LanguageMgr.TryTranslateOrDefault(player, "!Profession!", Profession); try { return(LanguageMgr.TryTranslateOrDefault(player, "!None {0}!", GetTitleFormat(skillLevel), profession)); } catch { return("<you may want to check your Crafting.txt language file>"); } }
public virtual string GetTitle(GamePlayer player, int level) { // Clamp level in 5 by 5 steps - 50 is the max available translation for now int clamplevel = Math.Min(50, (level / 5) * 5); string none = LanguageMgr.TryTranslateOrDefault(player, "!None!", "PlayerClass.GetTitle.none"); if (clamplevel > 0) { return(LanguageMgr.TryTranslateOrDefault(player, string.Format("!{0}!", m_name), string.Format("PlayerClass.{0}.GetTitle.{1}", m_name, clamplevel))); } return(none); }
/// <summary> /// The title value, shown over player's head. /// </summary> /// <param name="source">The player looking.</param> /// <param name="player">The title owner.</param> /// <returns>The title value.</returns> public override string GetValue(GamePlayer source, GamePlayer player) { if (player.CraftingPrimarySkill == eCraftingSkill.NoCrafting || !player.CraftingSkills.ContainsKey(player.CraftingPrimarySkill)) { return(string.Format(LanguageMgr.TryTranslateOrDefault(source, "!BasicCrafting!", "Crafting.Name.BasicCrafting"))); } var craftingSkill = CraftingMgr.getSkillbyEnum(player.CraftingPrimarySkill); var profession = craftingSkill as AbstractProfession; if (profession == null) { return(craftingSkill.Name); } return(profession.GetTitle(source, player.CraftingSkills[player.CraftingPrimarySkill])); }
protected static string TryTranslate(string value, GamePlayer source) { return(LanguageMgr.TryTranslateOrDefault(source, string.Format("!{0}!", value), value)); }
/// <summary> /// The title value, shown over player's head. /// </summary> /// <param name="source">The player looking.</param> /// <param name="player">The title owner.</param> /// <returns>The title value.</returns> public override string GetValue(GamePlayer source, GamePlayer player) { return(LanguageMgr.TryTranslateOrDefault(source, "!Level {0}!", "Titles.Level.Level20", player.Level)); }
/// <summary> /// The title description, shown in "Titles" window. /// </summary> /// <param name="player">The title owner.</param> /// <returns>The title description.</returns> public override string GetDescription(GamePlayer player) { return(LanguageMgr.TryTranslateOrDefault(player, "!Level 20+!", "Titles.Level.Level20Info")); }