public static void InitializeAllTreasureAchievement() { EBin eBin = PersistenSingleton <EventEngine> .Instance.eBin; EMinigame.lastGWldItemGet0 = eBin.getVarManually(47304); EMinigame.lastGWldItemGet0 &= 16777215; }
private static void SetGroupingOpponentId() { Int32 num = EMinigame.quadmistOpponentId; if (num != 558002) { if (num != 908009) { if (num == 1306002) { goto IL_42; } if (num != 1908006) { if (num != 2106002) { return; } goto IL_42; } } EBin eBin = PersistenSingleton <EventEngine> .Instance.eBin; Int32 varManually = eBin.getVarManually(94708); EMinigame.quadmistOpponentId = 908009; if (varManually >= 51) { EMinigame.quadmistOpponentId += 255; } return; } IL_42: EMinigame.quadmistOpponentId = 558002; }
public static void ChanbaraBonusPoints(Obj s1, EBin eBin) { if (FF9StateSystem.Common.FF9.fldMapNo == 64 && s1.sid == 4 && s1.ip == 223) { Int32 num = eBin.getVarManually(12505); num += num / 10 * 3; EMinigame.GetEncoreChanbaraAchievement(num); eBin.setVarManually(12505, num); } }
private void ff9ShutdownStateFieldMap() { FF9StateFieldMap map = FF9StateSystem.Field.FF9Field.loc.map; FF9Snd.ff9fieldsound_stopall_mapsndeffect((Int32)this.FF9.fldMapNo); EBin eBin = this.ee.eBin; Int32 varManually = eBin.getVarManually(6357); switch (map.nextMode) { case 1: this.FF9.fldMapNo = map.nextMapNo; break; case 2: this.FF9.btlMapNo = map.nextMapNo; FF9StateSystem.Battle.battleMapIndex = (Int32)this.FF9.btlMapNo; this.FF9Sys.mode = 2; this.FF9Sys.prevMode = 1; break; case 3: this.FF9.wldMapNo = map.nextMapNo; this.FF9.wldLocNo = (Int16)EventEngineUtils.eventIDToMESID[(Int32)this.FF9.wldMapNo]; this.FF9Sys.mode = 3; this.FF9Sys.prevMode = 1; break; case 4: { AllSoundDispatchPlayer allSoundDispatchPlayer = SoundLib.GetAllSoundDispatchPlayer(); allSoundDispatchPlayer.FF9SOUND_SNDEFFECT_STOP_ALL(null); allSoundDispatchPlayer.FF9SOUND_SNDEFFECTRES_STOPCURRENT(); allSoundDispatchPlayer.FF9SOUND_STREAM_STOP(); break; } case 7: { AllSoundDispatchPlayer allSoundDispatchPlayer2 = SoundLib.GetAllSoundDispatchPlayer(); allSoundDispatchPlayer2.FF9SOUND_SNDEFFECT_STOP_ALL(null); allSoundDispatchPlayer2.FF9SOUND_SNDEFFECTRES_STOPCURRENT(); allSoundDispatchPlayer2.FF9SOUND_STREAM_STOP(); this.FF9Sys.mode = 7; this.FF9Sys.prevMode = 1; break; } case 9: { Int32 currentMusicId = FF9Snd.GetCurrentMusicId(); if (currentMusicId != -1) { FF9Snd.ff9fldsnd_song_suspend(currentMusicId); } FF9Snd.ff9fieldSoundSuspendAllResidentSndEffect(); AllSoundDispatchPlayer allSoundDispatchPlayer3 = SoundLib.GetAllSoundDispatchPlayer(); allSoundDispatchPlayer3.FF9SOUND_STREAM_STOP(); break; } } }
public static void SetViviSpeed(Obj s1, EBin eBin) { if (FF9StateSystem.Common.FF9.fldMapNo == 1850 && s1.sid == 15) { if (s1.ip == 1445 || s1.ip == 1497) { Int32 varManually = eBin.getVarManually(9429); eBin.setVarManually(9429, Configuration.Hacks.HippaulRacingViviSpeed); } else if (s1.ip == 1595) { Int32 num = eBin.getVarManually(9429); if (num != 0 && num < 5) { num = 5; eBin.setVarManually(9429, num); } } } }
public static void DigUpKupoAchievement() { EBin eBin = PersistenSingleton <EventEngine> .Instance.eBin; Int32 varManually = eBin.getVarManually(833508); if (FF9StateSystem.Common.FF9.fldMapNo == 1421 && EMinigame.lastGFFossilMog != varManually && varManually == 1) { AchievementManager.ReportAchievement(AcheivementKey.Kuppo, 1); EMinigame.lastGFFossilMog = varManually; } }
private static Int32 CountVisitedSandyBeach() { EBin eBin = PersistenSingleton <EventEngine> .Instance.eBin; Int32 num = 0; for (Int32 i = 0; i < EMinigame.numOfSandyBeach; i++) { Int32 varManually = eBin.getVarManually(219364 + i * 256); if (varManually == 1) { num++; } } return(num); }
private static Int32 CountOpenedTreasure() { EBin eBin = PersistenSingleton <EventEngine> .Instance.eBin; Int32 varManually = eBin.getVarManually(47304); Int32 num = 0; for (Int32 i = 0; i < num; i++) { Int32 num2 = varManually >> i & 1; if (num2 == 1) { num++; } } return(num); }
public static void AllTreasureAchievement() { if (PersistenSingleton <SceneDirector> .Instance.CurrentScene != SceneDirector.WorldMapSceneName) { return; } Boolean flag = false; EBin eBin = PersistenSingleton <EventEngine> .Instance.eBin; Int32 num = eBin.getVarManually(47304); num &= 16777215; Int32 num2 = EMinigame.CountOpenedTreasure(); if (EMinigame.lastGWldItemGet0 != num && num == 16777215) { flag = true; } if (flag) { AchievementManager.ReportAchievement(AcheivementKey.AllTreasure, EMinigame.numOfTreasures); } EMinigame.lastGWldItemGet0 = num; }
private void FF9FieldMapMain(Int32 MapNo) { EBin eBin = this.ee.eBin; Int32 varManually = eBin.getVarManually(6357); if ((this.FF9.attr & 256u) == 0u) { if (!MBG.IsNull) { Singleton<fldfmv>.Instance.ff9fieldFMVService(); } if ((this.FF9.attr & 2u) == 0u) { Int32 varManually2 = eBin.getVarManually(6357); if (varManually2 != this.prevPrg) { this.prevPrg = varManually2; if (varManually2 != 1 || this.FF9.fldMapNo != 50) { if (this.FF9.fldMapNo != 150 || varManually2 != 5) { if (this.FF9.fldMapNo != 404) { if (this.FF9.fldMapNo == 404) { } } } } } Int32 num = this.ee.ServiceEvents(); HonoluluFieldMain.eventEngineRunningCount++; this.updatePlayerObj(); switch (num) { case 3: this.FF9Sys.attr |= 8u; this.FF9FieldMap.nextMode = 2; this.fieldmap.ff9fieldInternalBattleEncountStart(); this.ee.BackupPosObjData(); FF9StateSystem.Battle.isDebug = false; FF9StateSystem.Battle.mappingBattleIDWithMapList = false; NGUIDebug.Clear(); break; case 4: if (this.FF9FieldMap.nextMapNo == 16000) { this.FF9FieldMap.nextMode = 4; this.FF9Sys.attr |= 2u; } else { this.FF9FieldMap.nextMode = 1; this.FF9Sys.attr |= 8u; } break; case 5: this.FF9FieldMap.nextMode = 3; this.FF9Sys.attr |= 2u; break; case 7: this.FF9FieldMap.nextMode = 9; this.FF9Sys.attr |= 2u; break; case 8: this.FF9FieldMap.nextMode = 7; this.FF9Sys.attr |= 2u; this.FF9.attr |= 2u; PersistenSingleton<EventEngine>.Instance.eTb.InitMessage(); PersistenSingleton<UIManager>.Instance.SetMenuControlEnable(false); this.shutdownField(); EventService.OpenGameOver(); break; } } if ((this.FF9.attr & 4u) == 0u && this.fieldmap != (UnityEngine.Object)null) { this.fieldmap.ff9fieldCharService(); } if ((this.FF9.attr & 8u) == 0u && FF9StateSystem.Common.FF9.fldMapNo != 70 && this.fieldmap.walkMesh != null) { this.fieldmap.walkMesh.BGI_simService(); } if ((this.FF9Field.attr & 16u) == 0u) { vib.VIB_service(); } if ((this.FF9Field.attr & 8u) == 0u) { this.fieldmap.rainRenderer.ServiceRain(); } Boolean flag = !MBG.IsNull && MBG.Instance.isFMV55D; if ((this.FF9Field.attr & 2048u) == 0u || flag) { SceneDirector.ServiceFade(); } if ((this.FF9Field.attr & 4u) == 0u) { this.fieldmap.ff9fieldInternalBattleEncountService(); } } this.ff9fieldInternalLoopEnd(); UInt32 num2 = this.FF9Sys.attr & 15u; if (num2 != 0u) { if (this.ff9fieldDiscCondition()) { this.FF9FieldMap.nextMode = 1; this.FF9FieldMap.nextMapNo = (Int16)PersistenSingleton<EventEngine>.Instance.GetFldMapNoAfterChangeDisc(); } this.shutdownField(); switch (this.FF9FieldMap.nextMode) { case 1: SceneDirector.Replace("FieldMap", SceneTransition.FadeOutToBlack_FadeIn, false); break; case 2: if (FF9StateSystem.Common.FF9.fldMapNo == 1663) { Int32 varManually3 = PersistenSingleton<EventEngine>.Instance.eBin.getVarManually(EBin.SC_COUNTER_SVR); Int32 varManually4 = PersistenSingleton<EventEngine>.Instance.eBin.getVarManually(EBin.MAP_INDEX_SVR); if (varManually3 == 6950 && varManually4 == 40) { global::Debug.Log("Force close all dialog for <SQEX> #3105"); PersistenSingleton<UIManager>.Instance.Dialogs.CloseAll(); } } SFX_Rush.SetCenterPosition(0); SceneDirector.Replace("BattleMap", SceneTransition.SwirlInBlack, true); break; case 3: SceneDirector.Replace("WorldMap", SceneTransition.FadeOutToBlack_FadeIn, false); break; case 4: SceneDirector.Replace("Ending", SceneTransition.FadeOutToBlack_FadeIn, false); break; case 9: SceneDirector.Replace("QuadMist", SceneTransition.FadeOutToBlack_FadeIn, true); break; } } }
public static void InitializeDigUpKupoAchievement() { EBin eBin = PersistenSingleton <EventEngine> .Instance.eBin; EMinigame.lastGFFossilMog = eBin.getVarManually(833508); }