Ejemplo n.º 1
0
        // Token: 0x060025D4 RID: 9684 RVA: 0x000B1830 File Offset: 0x000AFA30
        public static BaseServerAchievement Instantiate(ServerAchievementIndex serverAchievementIndex)
        {
            AchievementDef achievementDef = AchievementManager.GetAchievementDef(serverAchievementIndex);

            if (achievementDef == null || achievementDef.serverTrackerType == null)
            {
                return(null);
            }
            BaseServerAchievement baseServerAchievement = (BaseServerAchievement)Activator.CreateInstance(achievementDef.serverTrackerType);

            baseServerAchievement.achievementDef = achievementDef;
            return(baseServerAchievement);
        }
Ejemplo n.º 2
0
        public void RpcGrantAchievement(ServerAchievementIndex serverAchievementIndex)
        {
            LocalUser localUser = this.networkUser.localUser;

            if (localUser != null)
            {
                UserAchievementManager userAchievementManager = AchievementManager.GetUserAchievementManager(localUser);
                if (userAchievementManager == null)
                {
                    return;
                }
                userAchievementManager.HandleServerAchievementCompleted(serverAchievementIndex);
            }
        }
Ejemplo n.º 3
0
        // Token: 0x060026C8 RID: 9928 RVA: 0x000B25F0 File Offset: 0x000B07F0
        public void CallRpcGrantAchievement(ServerAchievementIndex serverAchievementIndex)
        {
            if (!NetworkServer.active)
            {
                Debug.LogError("RPC Function RpcGrantAchievement called on client.");
                return;
            }
            NetworkWriter networkWriter = new NetworkWriter();

            networkWriter.Write(0);
            networkWriter.Write((short)((ushort)2));
            networkWriter.WritePackedUInt32((uint)ServerAchievementTracker.kRpcRpcGrantAchievement);
            networkWriter.Write(base.GetComponent <NetworkIdentity>().netId);
            GeneratedNetworkCode._WriteServerAchievementIndex_None(networkWriter, serverAchievementIndex);
            this.SendRPCInternal(networkWriter, 0, "RpcGrantAchievement");
        }
Ejemplo n.º 4
0
        // Token: 0x060026C1 RID: 9921 RVA: 0x000B24D4 File Offset: 0x000B06D4
        private void SetAchievementTracked(ServerAchievementIndex serverAchievementIndex, bool shouldTrack)
        {
            BaseServerAchievement baseServerAchievement = this.achievementTrackers[serverAchievementIndex.intValue];

            if (shouldTrack == (baseServerAchievement != null))
            {
                return;
            }
            if (shouldTrack)
            {
                BaseServerAchievement baseServerAchievement2 = BaseServerAchievement.Instantiate(serverAchievementIndex);
                baseServerAchievement2.serverAchievementTracker           = this;
                this.achievementTrackers[serverAchievementIndex.intValue] = baseServerAchievement2;
                baseServerAchievement2.OnInstall();
                return;
            }
            baseServerAchievement.OnUninstall();
            this.achievementTrackers[serverAchievementIndex.intValue] = null;
        }
Ejemplo n.º 5
0
		// Token: 0x060027A7 RID: 10151 RVA: 0x000B8B03 File Offset: 0x000B6D03
		public static void _WriteServerAchievementIndex_None(NetworkWriter writer, ServerAchievementIndex value)
		{
			writer.WritePackedUInt32((uint)value.intValue);
		}