public void OnDiff(BaseModelDiff.DiffStatus diff) { if (Utility.IsExist(diff.present)) { presentNum = diff.present[0]; DirtyPresentNum(); } }
public void OnDiff(BaseModelDiff.DiffStatus diff) { if (Utility.IsExist(diff.gathering)) { gathering = diff.gathering[0]; Dirty(); } }
public void OnDiff(BaseModelDiff.DiffStatus diff) { bool flag = false; if (Utility.IsExist(diff.views)) { BaseModelDiff.DiffStatus.Views views = diff.views[0]; userStatus.sex = views.sex; userStatus.faceId = views.faceId; userStatus.hairId = views.hairId; userStatus.hairColorId = views.hairColorId; userStatus.skinId = views.skinId; userStatus.voiceId = views.voiceId; flag = true; } if (Utility.IsExist(diff.grow)) { BaseModelDiff.DiffStatus.Grow grow = diff.grow[0]; if ((int)userStatus.level < grow.level) { if ((int)userStatus.level < MonoBehaviourSingleton <GlobalSettingsManager> .I.unlockEventLevel && grow.level >= MonoBehaviourSingleton <GlobalSettingsManager> .I.unlockEventLevel) { GameSaveData.instance.showUnlockQuestEvent = true; } Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Add("value", grow.level); MonoBehaviourSingleton <GoWrapManager> .I.trackEvent("reach_level", "Gameplay", dictionary); } userStatus.level = grow.level; userStatus.exp = grow.exp; userStatus.expPrev = grow.expPrev; userStatus.expNext = grow.expNext; userStatus.hp = grow.hp; userStatus.atk = grow.atk; userStatus.def = grow.def; userStatus.maxFollow = grow.maxFollow; flag = true; } if (Utility.IsExist(diff.money)) { userStatus.money = diff.money[0]; flag = true; if (MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName() != "InGameScene" && MonoBehaviourSingleton <SmithManager> .IsValid()) { MonoBehaviourSingleton <SmithManager> .I.CreateBadgeData(true); } } if (Utility.IsExist(diff.crystal)) { if (userStatus.crystal > diff.crystal[0]) { int num = userStatus.crystal - diff.crystal[0]; GameSaveData.instance.spent25Gems += num; } userStatus.crystal = diff.crystal[0]; flag = true; } if (Utility.IsExist(diff.eSetNo)) { userStatus.eSetNo = diff.eSetNo[0]; flag = true; } if (Utility.IsExist(diff.titleId)) { userStatus.titleId = diff.titleId[0]; flag = true; } if (Utility.IsExist(diff.capacity)) { BaseModelDiff.DiffStatus.Capacity capacity = diff.capacity[0]; userStatus.maxEquipItem = capacity.maxEquipItem; userStatus.maxSkillItem = capacity.maxSkillItem; flag = true; } if (Utility.IsExist(diff.tutorialStep)) { userStatus.tutorialStep = diff.tutorialStep[0]; flag = true; if (userStatus.tutorialStep == 4) { MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_mission_end, "Tutorial"); } else if (userStatus.tutorialStep == 7) { MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_weapon_crafting, "Tutorial"); } else if (userStatus.tutorialStep == 8) { MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_weapon_equip, "Tutorial"); } } if (Utility.IsExist(diff.tutorialBit)) { long oldTutorialBit = 0L; if (userStatus.tutorialBit != null) { oldTutorialBit = userStatus.TutorialBit; } userStatus.tutorialBit = diff.tutorialBit[0]; flag = true; if (CheckTutorialBitUnlock(TUTORIAL_MENU_BIT.GACHA1, oldTutorialBit)) { MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_monster_gacha, "Tutorial"); } else if (CheckTutorialBitUnlock(TUTORIAL_MENU_BIT.GACHA_QUEST_BATTLE_RESULT, oldTutorialBit)) { MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_monster_gacha_fight, "Tutorial"); } else if (CheckTutorialBitUnlock(TUTORIAL_MENU_BIT.GACHA2, oldTutorialBit)) { MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_magi_gacha, "Tutorial"); } else if (CheckTutorialBitUnlock(TUTORIAL_MENU_BIT.SKILL_EQUIP, oldTutorialBit)) { MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_magi_equip, "Tutorial"); } else if (CheckTutorialBitUnlock(TUTORIAL_MENU_BIT.CLAIM_REWARD, oldTutorialBit)) { MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_crystal_claimed, "Tutorial"); } else if (CheckTutorialBitUnlock(TUTORIAL_MENU_BIT.FORGE_ITEM, oldTutorialBit)) { GameSaveData.instance.SetPushTrackEquipTutorial(true); MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_weapon_crafting, "Tutorial"); } else if (CheckTutorialBitUnlock(TUTORIAL_MENU_BIT.AFTER_GACHA2, oldTutorialBit)) { MonoBehaviourSingleton <NativeGameService> .I.SignInFirstTime(); MonoBehaviourSingleton <GoWrapManager> .I.trackTutorialStep(TRACK_TUTORIAL_STEP_BIT.tutorial_equip_end, "Tutorial"); } if (MonoBehaviourSingleton <UIManager> .IsValid() && MonoBehaviourSingleton <UIManager> .I.tutorialMessage != null) { MonoBehaviourSingleton <UIManager> .I.tutorialMessage.SetErrorResendQuestGachaFlag(); } } if (Utility.IsExist(diff.tutorialQuestId)) { userStatus.tutorialQuestId = diff.tutorialQuestId[0]; flag = true; } if (Utility.IsExist(diff.researchLv)) { userStatus.researchLv = diff.researchLv[0]; flag = true; } if (Utility.IsExist(diff.questGrade)) { userStatus.questGrade = diff.questGrade[0]; flag = true; } if (Utility.IsExist(diff.fieldGrade)) { userStatus.fieldGrade = diff.fieldGrade[0]; flag = true; } if (Utility.IsExist(diff.showEquip)) { BaseModelDiff.DiffStatus.ShowEquip showEquip = diff.showEquip[0]; userStatus.armorUniqId = showEquip.armorUniqId; userStatus.helmUniqId = showEquip.helmUniqId; userStatus.armUniqId = showEquip.armUniqId; userStatus.legUniqId = showEquip.legUniqId; userStatus.showHelm = showEquip.showHelm; flag = true; } if (Utility.IsExist(diff.fairyNum)) { userStatus.fairyNum = diff.fairyNum[0]; flag = true; } if (Utility.IsExist(diff.maxEquipItemTargetNum)) { userStatus.maxEquipItemTargetNum = diff.maxEquipItemTargetNum[0]; flag = true; } if (flag) { DirtyUserStatus(); } }