Ejemplo n.º 1
0
        public override void CompleteAchievement(string name)
        {
            //IL_000c: Unknown result type (might be due to invalid IL or missing references)
            IRailPlayerAchievement myPlayerAchievement = GetMyPlayerAchievement();

            if (myPlayerAchievement != null)
            {
                myPlayerAchievement.MakeAchievement(name);
            }
        }
Ejemplo n.º 2
0
        private void SaveAchievement()
        {
            //IL_0010: Unknown result type (might be due to invalid IL or missing references)
            IRailPlayerAchievement myPlayerAchievement = GetMyPlayerAchievement();

            if (myPlayerAchievement != null)
            {
                myPlayerAchievement.AsyncStoreAchievement("");
            }
        }
Ejemplo n.º 3
0
        public override bool IsAchievementCompleted(string name)
        {
            bool                   flag              = false;
            RailResult             railResult        = (RailResult)1;
            IRailPlayerAchievement playerAchievement = this.GetMyPlayerAchievement();

            if (playerAchievement != null)
            {
                railResult = playerAchievement.HasAchieved(name, out flag);
            }
            return(flag && railResult == 0);
        }
Ejemplo n.º 4
0
 private IRailPlayerAchievement GetMyPlayerAchievement()
 {
     if (this._playerAchievement == null)
     {
         IRailAchievementHelper achievementHelper = rail_api.RailFactory().RailAchievementHelper();
         if (achievementHelper != null)
         {
             RailID railId = new RailID();
             ((RailComparableID)railId).id_ = 0L;
             this._playerAchievement        = achievementHelper.CreatePlayerAchievement(railId);
         }
     }
     return(this._playerAchievement);
 }
Ejemplo n.º 5
0
 private IRailPlayerAchievement GetMyPlayerAchievement()
 {
     //IL_0016: Unknown result type (might be due to invalid IL or missing references)
     //IL_001c: Expected O, but got Unknown
     if (_playerAchievement == null)
     {
         IRailAchievementHelper val = rail_api.RailFactory().RailAchievementHelper();
         if (val != null)
         {
             RailID val2 = new RailID();
             ((RailComparableID)val2).id_ = 0uL;
             _playerAchievement           = val.CreatePlayerAchievement(val2);
         }
     }
     return(_playerAchievement);
 }
Ejemplo n.º 6
0
        public override void Initialize()
        {
            // ISSUE: method pointer
            this._callbackHelper.RegisterCallback((RAILEventID)2001, new RailEventCallBackHandler(RailEventCallBack));
            // ISSUE: method pointer
            this._callbackHelper.RegisterCallback((RAILEventID)2101, new RailEventCallBackHandler(RailEventCallBack));
            IRailPlayerStats       myPlayerStats     = this.GetMyPlayerStats();
            IRailPlayerAchievement playerAchievement = this.GetMyPlayerAchievement();

            if (myPlayerStats == null || playerAchievement == null)
            {
                return;
            }
            myPlayerStats.AsyncRequestStats("");
            playerAchievement.AsyncRequestAchievement("");
            while (!this._areStatsReceived && !this._areAchievementReceived)
            {
                CoreSocialModule.RailEventTick();
                Thread.Sleep(10);
            }
        }
Ejemplo n.º 7
0
        public override bool IsAchievementCompleted(string name)
        {
            //IL_0003: Unknown result type (might be due to invalid IL or missing references)
            //IL_0012: Unknown result type (might be due to invalid IL or missing references)
            //IL_0017: Unknown result type (might be due to invalid IL or missing references)
            //IL_001b: Unknown result type (might be due to invalid IL or missing references)
            //IL_001d: Invalid comparison between Unknown and I4
            bool                   flag = false;
            RailResult             val  = (RailResult)1;
            IRailPlayerAchievement myPlayerAchievement = GetMyPlayerAchievement();

            if (myPlayerAchievement != null)
            {
                val = myPlayerAchievement.HasAchieved(name, out flag);
            }
            if (flag)
            {
                return((int)val == 0);
            }
            return(false);
        }
Ejemplo n.º 8
0
        public override void Initialize()
        {
            //IL_0012: Unknown result type (might be due to invalid IL or missing references)
            //IL_001c: Expected O, but got Unknown
            //IL_002e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0038: Expected O, but got Unknown
            //IL_0052: Unknown result type (might be due to invalid IL or missing references)
            //IL_005e: Unknown result type (might be due to invalid IL or missing references)
            _callbackHelper.RegisterCallback((RAILEventID)2001, new RailEventCallBackHandler(RailEventCallBack));
            _callbackHelper.RegisterCallback((RAILEventID)2101, new RailEventCallBackHandler(RailEventCallBack));
            IRailPlayerStats       myPlayerStats       = GetMyPlayerStats();
            IRailPlayerAchievement myPlayerAchievement = GetMyPlayerAchievement();

            if (myPlayerStats != null && myPlayerAchievement != null)
            {
                myPlayerStats.AsyncRequestStats("");
                myPlayerAchievement.AsyncRequestAchievement("");
                while (!_areStatsReceived && !_areAchievementReceived)
                {
                    CoreSocialModule.RailEventTick();
                    Thread.Sleep(10);
                }
            }
        }