Exemplo n.º 1
0
    public void createSelf(string uid, string nickname, int style, int money, int rmb, string mainCardUid, long exp, int maxLevel, long vipExp, int[] vipAwardSids,
                           int lastLevelupRewardSid, int executionPve, int executionPveMax, long executionPveSpeed, int executionPvp, int executionPvpMax, long executionPvpSpeed,
                           int executionChv, int executionChvMax, long executionChvSpeed,
                           int storePve, int storePveMax, long storePveSpeed,
                           int winNum, int winNumDay, int winRankDay, int honorLevel, int honor, string guildId, string guildName, int firendsNum, int titleId,
                           int arenaScore, int activeScore, long serverTime, int star, int merit, int hightPoint, int battlePlayVelocity, int prestige, int ladderRank, int onlineTime,
                           bool canFrist, int guildFightPower, int guildFightPowerMax)
    {
        //先同步时间
        ServerTimeKit.initTime(serverTime, Time.realtimeSinceStartup, onlineTime);


        if (self == null)
        {
            self = new User();
        }

        self.uid = uid;
        //		//添加守护天使信息,如果存在不添加
        if (PlayerPrefs.GetString(PlayerPrefsComm.ANGEL_USER_NAME + self.uid) == "")
        {
            PlayerPrefs.SetString(PlayerPrefsComm.ANGEL_USER_NAME + self.uid, "not");
        }
        self.nickname = nickname;
        self.style    = style;
        self.updateMoney(money);
        self.updateRMB(rmb);
        self.mainCardUid = mainCardUid;
        self.updateExp(exp);
        self.maxLevel = maxLevel;
        self.updateVipExp(vipExp);
        if (self.getVipLevel() > 0 && PlayerPrefs.GetString(PlayerPrefsComm.VIP_EXCHANGE_TIP) != self.uid)
        {
            PlayerPrefs.SetString(PlayerPrefsComm.VIP_EXCHANGE_TIP, "ok");
        }
        else
        {
            PlayerPrefs.SetString(PlayerPrefsComm.VIP_EXCHANGE_TIP, "not");
        }
        self.updateVipRewardLevel(vipAwardSids);
        self.updateLevelupRewardLastSid(lastLevelupRewardSid);
        self.setPvEPoint(executionPve);
        self.setPvEPointMax(executionPveMax);

        //executionPveSpeed:上次回复的时间点和现在时间点的差值
        self.setPveFirstTime(UserManager.PVE_SPEED - executionPveSpeed);
        self.setPvPPoint(executionPvp);
        self.setPvPPointMax(executionPvpMax);
        self.setPvpFirstTime(UserManager.PVP_SPEED - executionPvpSpeed);
        self.setChvPoint(executionChv);
        self.setChvPointMax(executionChvMax);
        self.setChvFirstTime(UserManager.CHV_SPEED - executionChvSpeed);
        self.setStorePvEPoint(storePve);
        self.setStorePvEPointMax(storePveMax);
        self.setStorePveFirstTime(MountsConfigManager.Instance.getPveSpeed() - storePveSpeed);

        self.winNum      = winNum;
        self.winNumDay   = winNumDay;
        self.winRankDay  = winRankDay;
        self.honorLevel  = honorLevel;
        self.honor       = honor;
        self.guildId     = guildId;
        self.guildName   = guildName;
        self.firendsNum  = firendsNum;
        self.titleId     = titleId;
        self.arenaScore  = arenaScore;
        self.activeScore = activeScore;
        self.merit       = merit;
        self.startCountdown();
        self.star = star;
        self.practiceHightPoint = hightPoint;
        self.setBattlePlayVelocity(battlePlayVelocity);
        self.prestige = prestige;
        self.updateLadderRank(ladderRank);
        RechargeManagerment.Instance.canFirst = canFrist;
        self.guildFightPower    = guildFightPower;
        self.guildFightPowerMax = guildFightPowerMax;
    }