public virtual string PlayerWholeName(Actor actor)
        {
            var name = string.Empty;

            if (FlagOperate.HasFlag((int)NameFlag, (int)InstanceActorNameFlag.SvrId))
            {
                name += PlayerSvrName(actor);
            }

            // name += PlayerName(actor);

            if (FlagOperate.HasFlag((int)NameFlag, (int)InstanceActorNameFlag.Totem))
            {
                //name += PlayerTotemName(actor);
            }

            string replaceName = DBInstanceTypeControl.Instance.GetReplaceOtherPlayerName(InstanceManager.Instance.InstanceType, InstanceManager.Instance.InstanceSubType);

            if (replaceName == null || replaceName == "")
            {
                name = actor.UserName;
                ActorHelper.GetPKColorName(actor.NameColor, ref name, false);
            }
            else
            {
                name = replaceName;
                name = string.Format("{0}", name);
            }


            return(name);
        }
        public virtual string LocalPlayerWholeName(LocalPlayer actor)
        {
            var name = string.Empty;

            if (FlagOperate.HasFlag((int)NameFlag, (int)InstanceActorNameFlag.Society))
            {
                name += LocalPlayerSocietyName(actor);
            }

            if (FlagOperate.HasFlag((int)NameFlag, (int)InstanceActorNameFlag.SvrId))
            {
                name += PlayerSvrName(actor);
            }

            // name += LocalPlayerName(actor);

            name = actor.UserName;

            if (FlagOperate.HasFlag((int)NameFlag, (int)InstanceActorNameFlag.Totem))
            {
                // name += LocalPlayerTotemName(actor);
            }

            uint nameColor = PKModeManagerEx.Instance.LocalPlayerNameColor;

            ActorHelper.GetPKColorName(nameColor, ref name, true);

            return(name);
        }
Beispiel #3
0
        /// <summary>
        /// 获取角色在不同副本中的名字
        /// </summary>
        public static string GetInstColorName(Actor act, string name)
        {
            //bool isRedName = SceneHelp.Instance.IsInWildInstance() && act.IsRedName;
            //bool isGrayName = SceneHelp.Instance.IsInWildInstance() && act.IsGrayName;

            Monster monster = act as Monster;

            if (act.UnitType == EUnitType.UNITTYPE_MONSTER && monster != null)
            {
                string colorText = monster.GetMonsterColorStr();

                name = "[" + colorText + "]" + name + "[-]";
            }

            ActorHelper.GetPKColorName(act.NameColor, ref name, act is LocalPlayer);

            return(name);
        }