Exemple #1
0
        public Player(Pointer playerTarget)
        {
            activePtr = playerTarget.Clone();

            Pointer playerEntity = playerTarget.Adjust(4);

            switch (GameHook.CurrentVersion)
            {
            case GameVersion.TFE: {
                namePtr = playerEntity.AddOffsets(0x310, 0x0);

                startTimeUnixPtr  = playerEntity.AddOffsets(0xAC0);
                levelStartTimePtr = playerEntity.AddOffsets(0xAC8);

                LevelStats = new PlayerStats(playerEntity.AddOffsets(0x1240));
                GameStats  = new PlayerStats(playerEntity.AddOffsets(0x1268));
                break;
            }

            case GameVersion.TSE: {
                namePtr = playerEntity.AddOffsets(0x310, 0x0);

                startTimeUnixPtr  = playerEntity.AddOffsets(0xC38);
                levelStartTimePtr = playerEntity.AddOffsets(0xC40);

                LevelStats = new PlayerStats(playerEntity.AddOffsets(0x2584));
                GameStats  = new PlayerStats(playerEntity.AddOffsets(0x25AC));
                break;
            }

            case GameVersion.REVOLUTION: {
                namePtr = playerEntity.AddOffsets(0x368, 0x0);

                startTimeUnixPtr  = playerEntity.AddOffsets(0xC2C);
                levelStartTimePtr = playerEntity.AddOffsets(0xC34);

                LevelStats = new PlayerStats(playerEntity.AddOffsets(0x2B20));
                GameStats  = new PlayerStats(playerEntity.AddOffsets(0x2B90));
                break;
            }
            }
        }