//CMyProfile - [2020-04-13 11:57:46]
#ifndef _CMYPROFILE_H_
#define _CMYPROFILE_H_

#include "common.h"
#include "TStageOperation.h"
#include "CDataBase.h"
#include "CFTTSerialize.h"
#include "CProfileStats.h"
#include "CGameSettings.h"
#include "CSideStoryProfile.h"
#include "CStoryProfile.h"
#include "CCurrency.h"

/*
001CCBB4 CMyProfile::CMyProfile()
001CCC14 CMyProfile::~CMyProfile()
0011977C CMyProfile::SetInstallSourceTracker(char const*)
00119788 CMyProfile::SetInstallSourceCampaign(char const*)
0012C8AC CMyProfile::SetAllowLevelSelectVideoAds(bool)
0012CA3C CMyProfile::SetStageClubTeam(int,int)
00131D60 CMyProfile::GetPossibleStartingClubs(int,int *,int)
00131D6C CMyProfile::GetPossibleNewClubs(int,bool,int,int *,int,ELeague,bool,bool)
00152D88 CMyProfile::EnergyIncrease(int,bool)
00153B40 CMyProfile::UpdateTermsOfServiceID(int)
001CCC3A CMyProfile::Shutdown()
001CCC60 CMyProfile::GetProfileStages()
001CCC80 CMyProfile::InitialiseSaveFiles()
001CCCB4 CMyProfile::DoLoadOnBoot(bool &)
001CCDC0 CMyProfile::SetIsSideStory(bool,bool)
001CCE94 CMyProfile::LoadDiskData()
001CD040 CMyProfile::LoadCloudDataWithVersion(bool,bool)
001CD09C CMyProfile::LoadCloudData(bool)
001CD238 CMyProfile::SetAllDefaults()
001CD42C CMyProfile::LoadLocalData()
001CD442 CMyProfile::ReInitialiseSideStory(int)
001CD454 CMyProfile::UpdateFacebookAchievements()
001CD480 CMyProfile::FacebookLoginCompleteWithAnalytics(int,wchar_t *)
001CD484 CMyProfile::FacebookLoginComplete(int,wchar_t *)
001CD508 CMyProfile::FacebookLoginCompleteWithReward(int,wchar_t *)
001CD544 CMyProfile::FacebookGetFriendsComplete(int)
001CD55C CMyProfile::AttemptSave(ESaveMode)
001CD570 CMyProfile::Stage460Fix()
001CD644 CMyProfile::GetStagesComplete(int)
001CD656 CMyProfile::GetHaveChangedTeamOnStage(int)
001CD660 CMyProfile::SetPostStageOperation(TStageOperation)
001CD694 CMyProfile::GetGameVersionFromProfile()
001CD6F0 CMyProfile::SetLargestPurchase(int)
001CD6FA CMyProfile::IncrementNumberOfPurchases()
001CD706 CMyProfile::SetFirstStagePurchase(int)
001CD710 CMyProfile::ResetSidePolaroidDates()
001CD728 CMyProfile::ResetMainPolaroidDates()
001CD740 CMyProfile::UpdateCB(int,void *)
001CD758 CMyProfile::SetFacebookToken(char *,int)
001CD75E CMyProfile::CloudDelete(void (*)(int))
001CD768 CMyProfile::ShouldDoCloudSave()
001CD7E0 CMyProfile::GetStagesStars(int)
001CD7F4 CMyProfile::AddCloudSaveRecord()
001CD854 CMyProfile::UpdateSaveLoadTime()
001CD870 CMyProfile::CheckSave()
001CD890 CMyProfile::Save(ESaveMode)
001CDAA0 CMyProfile::UnlockSeason(int,bool,bool)
001CDAC2 CMyProfile::ResetAllFeats()
001CDAD0 CMyProfile::ResetNotificationRewards()
001CDAEC CMyProfile::GetPostStageOperation()
001CDB10 CMyProfile::ClearPostStageOperation()
001CDB30 CMyProfile::SetTutorialMessageShown(int,bool)
001CDB52 CMyProfile::GetSeasonComplete(int)
001CDB64 CMyProfile::IncStageAttempts(int)
001CDB76 CMyProfile::GetStageComplete(int)
001CDB90 CMyProfile::GetStageNumber(int)
001CDBFC CMyProfile::GetStageStars(int)
001CDC0E CMyProfile::GetStageScore(int)
001CDC20 CMyProfile::GetStageAttempts(int)
001CDC32 CMyProfile::CountPacksWithAllStars()
001CDC40 CMyProfile::SetRatedGameVersion(int)
001CDC64 CMyProfile::SetSkinColour(int)
001CDC74 CMyProfile::GetSkinColour()
001CDC84 CMyProfile::SetHeadType(int)
001CDC94 CMyProfile::GetHeadType()
001CDCA4 CMyProfile::SetHairColour(int)
001CDCB4 CMyProfile::GetHairColour()
001CDCC4 CMyProfile::SetHairStyle(int)
001CDCD4 CMyProfile::GetHairStyle()
001CDCE4 CMyProfile::SetFacialHair(int)
001CDCF4 CMyProfile::GetFacialHair()
001CDD04 CMyProfile::SetBootColour(int)
001CDD14 CMyProfile::GetBootColour()
001CDD24 CMyProfile::SetBodyType(int)
001CDD5C CMyProfile::GetBodyType()
001CDD90 CMyProfile::SetShirtLength(int)
001CDDC8 CMyProfile::GetShirtLength()
001CDDFC CMyProfile::SetShirtNumber(int)
001CDE0C CMyProfile::GetShirtNumber()
001CDE1C CMyProfile::SetPlayerName(wchar_t const*)
001CDE30 CMyProfile::GetPlayerName()
001CDE40 CMyProfile::SetPlayerInitialised()
001CDE58 CMyProfile::GetPlayerInitialised()
001CDE68 CMyProfile::SetHaveAskedToRate()
001CDE88 CMyProfile::CheckRestoreEnergy()
001CDEB4 CMyProfile::FoundEasterEgg(int)
001CDEF0 CMyProfile::EasterEggAlreadyFound(int)
001CDF0E CMyProfile::SetStartUpMessageViewedID(int)
001CDF14 CMyProfile::GetAreGettingMoreStars()
001CDF24 CMyProfile::SetAreGettingMoreStars(bool)
001CDF34 CMyProfile::GetTotalNumberOfStars()
001CDF3C CMyProfile::GetEffectiveStarsPurchased()
001CDF58 CMyProfile::AddEffectiveStarsPurchased(int)
001CDF74 CMyProfile::GetSeasonUnlockStars(int)
001CDFE4 CMyProfile::GetSeasonUnlockCost(int)
001CE050 CMyProfile::IsSeasonUnlocked(int)
001CE062 CMyProfile::IsSeasonComplete(int)
001CE074 CMyProfile::SetNotificationRewards()
001CE076 CMyProfile::SetupSideStory()
001CE094 CMyProfile::SetSideStoryComplete(bool)
001CE0AC CMyProfile::GetActiveSideStoryID()
001CE0CC CMyProfile::SetNationalTeam(int)
001CE0F8 CMyProfile::GetNationalTeam()
001CE108 CMyProfile::CheckNotificationRewards()
001CE10A CMyProfile::HaveSetRewardNotifications()
001CE10E CMyProfile::RewardForNotification(int)
001CE138 CMyProfile::NeedToCheckNotifications()
001CE16C CMyProfile::CalculateAndCheckNotificationRewards()
001CE2B8 CMyProfile::GetAllowLevelSelectVideoAds()
001CE2C6 CMyProfile::ResetUnlimitedEnergy()
001CE2EE CMyProfile::HaveUnlimitedEnergy()
001CE350 CMyProfile::SetEndOfUnlimitedEnergyTime()
001CE3A0 CMyProfile::EnergyUse(int)
001CE3B4 CMyProfile::GetSizeOfProfile()
001CE3C8 CMyProfile::SetFeatComplete(int,bool)
001CE408 CMyProfile::IsUserCheat()
001CE40C CMyProfile::GetUserType()
001CE470 CMyProfile::SetAllowCloud(bool)
001CE478 CMyProfile::GetFeatComplete(int)
001CE480 CMyProfile::EnergyMessageCB(int,void *)
001CE63C CMyProfile::BuyEnergyCallback(int,void *)
001CE648 CMyProfile::DisplayEnergyMessage()
001CE79C CMyProfile::GetConfigFileCreditReimburseID()
001CE7A0 CMyProfile::SetConfigFileCreditReimburseID(int)
001CE7A4 CMyProfile::GetPolaroidDate(int)
001CE7B8 CMyProfile::SetPolaroidDate(int,uchar,uchar)
001CE7D8 CMyProfile::GetPromotionPurchase(int)
001CE7FA CMyProfile::HaveActiveTriggeredPromotion()
001CE82E CMyProfile::AddPromotionPurchase(int)
001CE85A CMyProfile::SetupPromotionPurchase(int)
001CE8FA CMyProfile::AnotherTriggeredPromotionShowingOrBlocking(int)
001CE934 CMyProfile::IsSideStoryInitialised()
001CE944 CMyProfile::HaveCompletedSideQuest()
001CE94A CMyProfile::GetNumMedals(EMedal_Type)
001CE954 CMyProfile::IncrementMedalType(EMedal_Type,int)
001CE9E0 CMyProfile::DecrementMedalType(EMedal_Type)
001CEA28 CMyProfile::ShowUpdateMessageBox()
001CEA7C CMyProfile::ResetProfile()
001CECD8 CMyProfile::SetupPushNotifications()
001D898C CMyProfile::UseRewind()
*/
//-------------------------------------------------------------------------------------------------
#pragma pack(1)
class TProfileData {
public:
  TProfileData();                             //001CCC00
  ~TProfileData();                            //001CCC24
  void Serialize(CFTTSerialize &pSerialize);  //001CC950

public:
  //size 3154
  CProfileStats m_ProfileStats;
  CGameSettings m_CGameSettings_2b80;
  //char filed_2b84[0x220];
  int filed_2DA4;
  int Attempts;
  int HaveAskedToRateCount;
  char filed_2DB0[2];
  wchar_t filed_2DB2[128];
  wchar_t filed_2EB2[128];
  bool filed_2FB2;
  bool filed_2FB3;
  int filed_2FB4[8];
  int filed_2FD4;
  bool filed_2FD8;
  char filed_2FD9[64];
  char filed_3019[3];
  long filed_301C;
  long filed_3020;
  unsigned int filed_3024;
  unsigned int curSystime_3028;
  long leftUnlimitedEnergyTime_302c;
  int filed_3030;
  int filed_3034;
  bool filed_3038;
  char filed_3039[3];
  unsigned int filed_303c;
  long filed_3040;
  char InstallSourceCampaign[128];
  char InstallSourceTracker[128];
  float filed_3144;
  unsigned int filed_3148;
  unsigned char TermsOfServiceID;
  char filed_314d[3];
  time_t filed_3150;
};
#pragma pack()

enum EUserType {
  EUserType_0,
  EUserType_1,
  EUserType_2,
  EUserType_3,
  EUserType_4
};

enum EUserABTest {
  EUserABTest_0,
  EUserABTest_1,
  EUserABTest_2,
  EUserABTest_3,
  EUserABTest_4
};

struct TSidePolaroidDates {
  unsigned char v_0;
  unsigned char v_1;
  long v_4;
  unsigned char v_8;
  unsigned char v_9;
  long v_c;
  long v_10;
};

class TProfileDataCloud {
public:
  void Serialize(CFTTSerialize &pSerialize);  //001CC2E4
public:
  unsigned short StartUpMessageViewedID_0;
  unsigned short field_2;
  EUserType field_4;
  EUserABTest field_8;
  bool bHaveUnlimitedEnergy_c;
  char field_d;
  char field_e;
  char field_f;
  unsigned int Credits_10;
  unsigned int iPurchasedCredits_14;
  unsigned int field_18;
  unsigned short field_1c;
  unsigned short FirstStagePurchase_1e;
  unsigned char NumberOfPurchases_20;
  char field_21;
  char field_22;
  char field_23;
  unsigned int EffectiveStarsPurchased_24;
  bool field_28;
  char field_29;
  char field_2a;
  char field_2b;
  unsigned int field_2c;
  unsigned int TutorialMessageShown_30;
  bool field_34;
  bool field_35;
  bool field_36;
  bool field_37;
  unsigned int field_38;
  bool field_3c;
  bool AreGettingMoreStars_StoryProfile_3d;
  bool AreGettingMoreStars_SideStoryProfile_3e;
  char field_3f;
  long field_40;
  unsigned char field_44;
  char field_45;
  char field_46;
  char field_47;
  unsigned int ConfigFileCreditReimburseID_48;
  bool field_4c;
  char field_4d;
  char field_4e;
  char field_4f;
  TStageOperation field_50;
  TStageOperation field_100;
  bool AllFeats_1b0[87];
  char field_207;
  long UnlimitedEnergyTime_208;
  long field_20c;
  bool AllowLevelSelectVideoAds_210;
  char field_211;
  char field_212;
  char field_213;
  int DeviceIDHash_214;
  int DateTime_218;
  int DeviceIDHash1_21c;
  int DateTime1_220;
  int DeviceIDHash2_224;
  int DateTime2_228;
  int DeviceIDHash3_22c;
  int DateTime3_230;
  unsigned char MainPolaroidDates_234[130];
  unsigned char SidePolaroidDates_2b6[20];
  TSidePolaroidDates field_2CC[20];
  int field_45C[5];
  bool field_470[16];
  int NumMedals_480[5];
};

//-------------------------------------------------------------------------------------------------
enum ESaveMode {
  ESaveMode_0,
  ESaveMode_1,
  ESaveMode_2,
  ESaveMode_3,
  ESaveMode_4,
  ESaveMode_5,
  ESaveMode_6,
  ESaveMode_7,
};
//-------------------------------------------------------------------------------------------------
enum EMedal_Type {
  EMedal_Type_unk=-1,
  EMedal_Type_0,
  EMedal_Type_1,
  EMedal_Type_2,
  EMedal_Type_3,
  EMedal_Type_4,
  EMedal_Type_5,
};
//-------------------------------------------------------------------------------------------------
class CMyProfile {
public:
  CMyProfile();                                                              //001CCBB4
  ~CMyProfile();                                                             //001CCC14
  void SetInstallSourceTracker(const char *);                                //0011977C
  void SetInstallSourceCampaign(char const *);                               //00119788
  void SetAllowLevelSelectVideoAds(bool);                                    //0012C8AC
  void SetStageClubTeam(int, int);                                           //0012CA3C
  int GetPossibleStartingClubs(int, int *, int);                             //00131D60
  int GetPossibleNewClubs(int, bool, int, int *, int, ELeague, bool, bool);  //00131D6C
  void EnergyIncrease(int, bool);                                            //00152D88
  void UpdateTermsOfServiceID(int);                                          //00153B40
  void Shutdown();                                                           //001CCC3A
  /*wyc 这个地方的返回值类型     CStoryProfile, CSideStoryProfile 其中的一个类型也就是说可能有父子关系*/
  CStoryProfileStages *GetProfileStages();                  //001CCC60
  static void InitialiseSaveFiles();                        //001CCC80
  int DoLoadOnBoot(bool &);                                 //001CCCB4
  void SetIsSideStory(bool, bool);                          //001CCDC0
  int LoadDiskData();                                       //001CCE94
  void LoadCloudDataWithVersion(bool, bool);                //001CD040
  void LoadCloudData(bool);                                 //001CD09C
  void SetAllDefaults();                                    //001CD238
  void LoadLocalData();                                     //001CD42C
  void ReInitialiseSideStory(int);                          //001CD442
  void UpdateFacebookAchievements();                        //001CD454
  void FacebookLoginCompleteWithAnalytics(int, wchar_t *);  //001CD480
  void FacebookLoginComplete(int, wchar_t *);               //001CD484
  void FacebookLoginCompleteWithReward(int, wchar_t *);     //001CD508
  void FacebookGetFriendsComplete(int);                     //001CD544
  void AttemptSave(ESaveMode);                              //001CD55C
  static void Stage460Fix();                                //001CD570
  int GetStagesComplete(int);                               //001CD644
  int GetHaveChangedTeamOnStage(int);                       //001CD656
  void SetPostStageOperation(TStageOperation);              //001CD660
  int GetGameVersionFromProfile();                          //001CD694
  void SetLargestPurchase(int);                             //001CD6F0
  void IncrementNumberOfPurchases();                        //001CD6FA
  void SetFirstStagePurchase(int);                          //001CD706
  void ResetSidePolaroidDates();                            //001CD710
  void ResetMainPolaroidDates();                            //001CD728
  void UpdateCB(int, void *);                               //001CD740
  void SetFacebookToken(char *, int);                       //001CD758
  static void CloudDelete(void (*)(int));                   //001CD75E
  void ShouldDoCloudSave();                                 //001CD768
  int GetStagesStars(int);                                  //001CD7E0
  void AddCloudSaveRecord();                                //001CD7F4
  void UpdateSaveLoadTime();                                //001CD854
  void CheckSave();                                         //001CD870
  int Save(ESaveMode);                                      //001CD890
  void UnlockSeason(int, bool, bool);                       //001CDAA0
  void ResetAllFeats();                                     //001CDAC2
  void ResetNotificationRewards();                          //001CDAD0
  TStageOperation GetPostStageOperation();                  //001CDAEC
  void ClearPostStageOperation();                           //001CDB10
  void SetTutorialMessageShown(int, bool);                  //001CDB30
  int GetSeasonComplete(int);                               //001CDB52
  void IncStageAttempts(int);                               //001CDB64
  int GetStageComplete(int);                                //001CDB76
  int GetStageNumber(int);                                  //001CDB90
  int GetStageStars(int);                                   //001CDBFC
  int GetStageScore(int);                                   //001CDC0E
  int GetStageAttempts(int);                                //001CDC20
  int CountPacksWithAllStars();                             //001CDC32
  void SetRatedGameVersion(int);                            //001CDC40
  void SetSkinColour(int);                                  //001CDC64
  uchar GetSkinColour();                                    //001CDC74
  void SetHeadType(int);                                    //001CDC84
  uchar GetHeadType();                                      //001CDC94
  void SetHairColour(int);                                  //001CDCA4
  uchar GetHairColour();                                    //001CDCB4
  void SetHairStyle(int);                                   //001CDCC4
  uchar GetHairStyle();                                     //001CDCD4
  void SetFacialHair(int);                                  //001CDCE4
  uchar GetFacialHair();                                    //001CDCF4
  void SetBootColour(int);                                  //001CDD04
  uchar GetBootColour();                                    //001CDD14
  void SetBodyType(int);                                    //001CDD24
  uchar GetBodyType();                                      //001CDD5C
  void SetShirtLength(int);                                 //001CDD90
  uchar GetShirtLength();                                   //001CDDC8
  void SetShirtNumber(int);                                 //001CDDFC
  uchar GetShirtNumber();                                   //001CDE0C
  void SetPlayerName(wchar_t const *);                      //001CDE1C
  wchar_t const *GetPlayerName();                           //001CDE30
  void SetPlayerInitialised();                              //001CDE40
  bool GetPlayerInitialised();                              //001CDE58
  void SetHaveAskedToRate();                                //001CDE68
  void CheckRestoreEnergy();                                //001CDE88
  void FoundEasterEgg(int);                                 //001CDEB4
  int EasterEggAlreadyFound(int);                           //001CDEF0
  void SetStartUpMessageViewedID(int);                      //001CDF0E
  int GetAreGettingMoreStars();                             //001CDF14
  void SetAreGettingMoreStars(bool);                        //001CDF24
  int GetTotalNumberOfStars();                              //001CDF34
  int GetEffectiveStarsPurchased();                         //001CDF3C
  void AddEffectiveStarsPurchased(int);                     //001CDF58
  int GetSeasonUnlockStars(int);                            //001CDF74
  int GetSeasonUnlockCost(int);                             //001CDFE4
  int IsSeasonUnlocked(int);                                //001CE050
  int IsSeasonComplete(int);                                //001CE062
  void SetNotificationRewards();                            //001CE074
  void SetupSideStory();                                    //001CE076
  void SetSideStoryComplete(bool);                          //001CE094
  int GetActiveSideStoryID();                               //001CE0AC
  void SetNationalTeam(int);                                //001CE0CC
  uint16 GetNationalTeam();                                 //001CE0F8
  void CheckNotificationRewards();                          //001CE108
  void HaveSetRewardNotifications();                        //001CE10A
  void RewardForNotification(int);                          //001CE10E
  void NeedToCheckNotifications();                          //001CE138
  int CalculateAndCheckNotificationRewards();               //001CE16C
  bool GetAllowLevelSelectVideoAds();                       //001CE2B8
  void ResetUnlimitedEnergy();                              //001CE2C6
  bool HaveUnlimitedEnergy();                               //001CE2EE
  void SetEndOfUnlimitedEnergyTime();                       //001CE350
  void EnergyUse(int);                                      //001CE3A0
  long GetSizeOfProfile();                                  //001CE3B4
  void SetFeatComplete(int, bool);                          //001CE3C8
  int IsUserCheat();                                        //001CE408
  int GetUserType();                                        //001CE40C
  void SetAllowCloud(bool);                                 //001CE470
  bool GetFeatComplete(int);                                //001CE478
  void EnergyMessageCB(int, void *);                        //001CE480
  void BuyEnergyCallback(int, void *);                      //001CE63C
  void DisplayEnergyMessage();                              //001CE648
  uint GetConfigFileCreditReimburseID();                    //001CE79C
  void SetConfigFileCreditReimburseID(int);                 //001CE7A0
  uchar *GetPolaroidDate(int);                              //001CE7A4
  void SetPolaroidDate(int, uchar, uchar);                  //001CE7B8
  int GetPromotionPurchase(int);                            //001CE7D8
  int HaveActiveTriggeredPromotion();                       //001CE7FA
  void AddPromotionPurchase(int);                           //001CE82E
  int SetupPromotionPurchase(int);                          //001CE85A
  int AnotherTriggeredPromotionShowingOrBlocking(int);      //001CE8FA
  bool IsSideStoryInitialised();                            //001CE934
  bool HaveCompletedSideQuest();                            //001CE944
  int GetNumMedals(EMedal_Type);                            //001CE94A
  void IncrementMedalType(EMedal_Type, int);                //001CE954
  void DecrementMedalType(EMedal_Type);                     //001CE9E0
  int ShowUpdateMessageBox();                               //001CEA28
  static void ResetProfile();                               //001CEA7C
  void SetupPushNotifications();                            //001CECD8
  void UseRewind();                                         //001D898C

public:
  volatile int field_0;
  TProfileDataCloud m_TProfileDataCloud;
  TProfileData m_TProfileData;              //offset  0x498
  CStoryProfile *pCStoryProfile;            //offset 0x35ec
  CSideStoryProfile *pCSideStoryProfile;    //offset 0x35F0
  bool isCanSave;
  char field_35f5;
  char field_35f6;
  char field_35f7;
  time_t DateTime_35f8;
  int field_35fc;
  int isShowUpdateMessageBox;
  bool isSideStory;

public:
  static bool ms_bLoading;
};
extern CMyProfile MP_cMyProfile;
void ReviewRequestCB(int , void *);
//-------------------------------------------------------------------------------------------------
#endif  //_CMYPROFILE_H_