Пример #1
0
    public override bool Init(InitBaseData initData, Action callback = null)
    {
        var data = initData as InitOtherPlayerData;

        foreach (var item in data.TitleList)
        {
            if (TitleList.ContainsKey(item.Key))
            {
                TitleList[item.Key] = item.Value;
            }
            else
            {
                TitleList.Add(item.Key, item.Value);
            }
        }
        AllianceName = data.AllianceName;

        RobotId = data.RobotId;

        if (!base.Init(initData))
        {
            return(false);
        }
        serverId  = data.ServerId;
        AreaState = data.AreaState;

        var tbPvpRule = Table.GetPVPRule(GameLogic.Instance.Scene.TableScene.PvPRule);

        if (tbPvpRule.NameColorRule == (int)NameColorRule.FightingEachOther && GameLogic.Instance.Scene.TableScene.IsHideName == 1)
        {
            Name = GameUtils.GetDictionaryText(220697 + RoleId);
        }
        return(true);
    }
Пример #2
0
 private void SetTitle(int id, int value)
 {
     if (TitleList.ContainsKey(id))
     {
         TitleList[id] = value;
     }
     else
     {
         TitleList.Add(id, value);
     }
     NameBoardUpdate();
 }