<commit_before>﻿using Tibia.Addresses;

namespace Tibia
{
    public partial class Version
    {
        public static void SetVersion900()
        {
            BattleList.Start = 0x642e28;
            BattleList.StepCreatures = 0xac;
            BattleList.MaxCreatures = 1300;
            BattleList.End = BattleList.Start + (BattleList.StepCreatures * BattleList.MaxCreatures);

            Client.StartTime = 0x80fb20;

            //RecvStream + 0x10
            Client.SocketStruct = 0x7c8cf0;
            Client.RecvPointer = 0x5ba5f8;
            Client.SendPointer = 0x5ba624;
            Client.LastRcvPacket = 0x7c44d0;
            Client.DecryptCall = 0x45d775;
            Client.ParserFunc = 0x45d740;
            Client.XTeaKey = Addresses.Client.SocketStruct + 0x2c;
            Client.GetNextPacketCall = 0x45d775;
            // Same as Client.DecryptCall = ParserFunc + 0x35
            Client.RecvStream = 0x7c8d0c;
            Client.FrameRatePointer = 0x7cce04;
            Client.FrameRateCurrentOffset = 0x60;
            Client.FrameRateLimitOffset = 0x58;
            Client.MultiClient = 0x50cf44;
            Client.MultiClientJMP = 0xeb;
            Client.MultiClientJNZ = 0x75;
            Client.Status = 0x7cc2bc;
            Client.SafeMode = 0x7c9144;
            Client.FollowMode = Client.SafeMode + 4;
            Client.AttackMode = Client.FollowMode + 4;
            Client.ActionState = 0x7cc31c;
            Client.ActionStateFreezer = 0x51fa70;
            Client.ActionStateOriginal = new byte[] {
	0xa3,
	0x0,
	0x0,
	0x0,
	0x0,
	0xc3,
	0xcc,
	0xcc,
	0xcc,
	0xcc,
	0xcc
};
            Client.ActionStateFreezed = new byte[] {
	0xc7,
	0x5,
	0x0,
	0x0,
	0x0,
	0x0,
	0x7,
	0x0,
	0x0,
	0x0,
	0xc3
};
            //Client.LastMSGText = 0x80CD60;
            Client.LastMSGAuthor = Client.LastMSGText - 0x28;
            Client.StatusbarText = 0x80fb40;
            Client.StatusbarTime = Client.StatusbarText - 8;
            Client.ClickId = 0x7cc35c;
            Client.ClickCount = Client.ClickId + 4;
            Client.ClickZ = Client.ClickId - 0x68;
            Client.SeeId = Client.ClickId + 12;
            Client.SeeCount = Client.SeeId + 4;
            Client.SeeZ = Client.SeeId - 0x68;
            Client.ClickContextMenuItemId = Client.SeeId;
            //Client.ClickContextMenuItemGroundId = ?
            Client.ClickContextMenuCreatureId = Client.ClickContextMenuItemId + 0xc;
            Client.LoginServerStart = 0x7c3c58;
            Client.StepLoginServer = 112;
            Client.DistancePort = 100;
            Client.MaxLoginServers = 10;
            Client.RSA = 0x5ba990;
            Client.LoginCharList = 0x7cc270;
            Client.LoginCharListLength = Client.LoginCharList + 4;
            Client.LoginSelectedChar = Client.LoginCharList - 4;
            // Client.GameWindowRectPointer = &H67969C
            // Client.GameWindowBar = &H80DB10
            Client.DatPointer = 0x7c8d3c;
            Client.EventTriggerPointer = 0x521580;
            Client.DialogPointer = 0x67ea24;
            Client.DialogLeft = 0x14;
            Client.DialogTop = 0x18;
            Client.DialogWidth = 0x1c;
            Client.DialogHeight = 0x20;
            Client.DialogCaption = 0x50;
            Client.LoginAccountNum = 0;
            Client.LoginPassword = Client.LoginCharList + 8;
            Client.LoginAccount = Client.LoginPassword + 32;
            Client.LoginPatch = 0;
            Client.LoginPatch2 = 0;
            Client.LoginPatchOrig = new byte[] {
	0xe8,
	0xd,
	0x1d,
	0x9,
	0x0
};
            Client.LoginPatchOrig2 = new byte[] {
	0xe8,
	0xc8,
	0x15,
	0x9,
	0x0
};

            Container.Start = 0x67c170;
            Container.StepContainer = 492;
            Container.StepSlot = 12;
            Container.MaxContainers = 16;
            Container.MaxStack = 100;
            Container.DistanceIsOpen = 0;
            Container.DistanceId = 4;
            Container.DistanceName = 16;
            Container.DistanceVolume = 48;
            Container.DistanceAmount = 56;
            Container.DistanceItemId = 60;
            Container.DistanceItemCount = 64;
            Container.End = Container.Start + (Container.MaxContainers * Container.StepContainer);

            ContextMenus.AddContextMenuPtr = 0x4539e0;
            ContextMenus.OnClickContextMenuPtr = 0x450560;
            //  ContextMenus.OnClickContextMenuVf = &H5BED28
            ContextMenus.AddSetOutfitContextMenu = 0x45490f;
            ContextMenus.AddPartyActionContextMenu = 0x454824;
            ContextMenus.AddCopyNameContextMenu = 0x4549a1;
            ContextMenus.AddTradeWithContextMenu = 0x454589;
            ContextMenus.AddLookContextMenu = 0x45443f;

            Creature.DistanceId = 0;
            Creature.DistanceType = 3;
            Creature.DistanceName = 4;
            Creature.DistanceX = 36;
            Creature.DistanceY = 40;
            Creature.DistanceZ = 44;<commit_msg>Thanks to petitcoeur I also adds ContextMenus.OnClickContextMenuVf.<commit_after>﻿using Tibia.Addresses;

namespace Tibia
{
    public partial class Version
    {
        public static void SetVersion900()
        {
            BattleList.Start = 0x642e28;
            BattleList.StepCreatures = 0xac;
            BattleList.MaxCreatures = 1300;
            BattleList.End = BattleList.Start + (BattleList.StepCreatures * BattleList.MaxCreatures);

            Client.StartTime = 0x80fb20;

            //RecvStream + 0x10
            Client.SocketStruct = 0x7c8cf0;
            Client.RecvPointer = 0x5ba5f8;
            Client.SendPointer = 0x5ba624;
            Client.LastRcvPacket = 0x7c44d0;
            Client.DecryptCall = 0x45d775;
            Client.ParserFunc = 0x45d740;
            Client.XTeaKey = Addresses.Client.SocketStruct + 0x2c;
            Client.GetNextPacketCall = 0x45d775;
            // Same as Client.DecryptCall = ParserFunc + 0x35
            Client.RecvStream = 0x7c8d0c;
            Client.FrameRatePointer = 0x7cce04;
            Client.FrameRateCurrentOffset = 0x60;
            Client.FrameRateLimitOffset = 0x58;
            Client.MultiClient = 0x50cf44;
            Client.MultiClientJMP = 0xeb;
            Client.MultiClientJNZ = 0x75;
            Client.Status = 0x7cc2bc;
            Client.SafeMode = 0x7c9144;
            Client.FollowMode = Client.SafeMode + 4;
            Client.AttackMode = Client.FollowMode + 4;
            Client.ActionState = 0x7cc31c;
            Client.ActionStateFreezer = 0x51fa70;
            Client.ActionStateOriginal = new byte[] {
	0xa3,
	0x0,
	0x0,
	0x0,
	0x0,
	0xc3,
	0xcc,
	0xcc,
	0xcc,
	0xcc,
	0xcc
};
            Client.ActionStateFreezed = new byte[] {
	0xc7,
	0x5,
	0x0,
	0x0,
	0x0,
	0x0,
	0x7,
	0x0,
	0x0,
	0x0,
	0xc3
};
            //Client.LastMSGText = 0x80CD60;
            Client.LastMSGAuthor = Client.LastMSGText - 0x28;
            Client.StatusbarText = 0x80fb40;
            Client.StatusbarTime = Client.StatusbarText - 8;
            Client.ClickId = 0x7cc35c;
            Client.ClickCount = Client.ClickId + 4;
            Client.ClickZ = Client.ClickId - 0x68;
            Client.SeeId = Client.ClickId + 12;
            Client.SeeCount = Client.SeeId + 4;
            Client.SeeZ = Client.SeeId - 0x68;
            Client.ClickContextMenuItemId = Client.SeeId;
            //Client.ClickContextMenuItemGroundId = ?
            Client.ClickContextMenuCreatureId = Client.ClickContextMenuItemId + 0xc;
            Client.LoginServerStart = 0x7c3c58;
            Client.StepLoginServer = 112;
            Client.DistancePort = 100;
            Client.MaxLoginServers = 10;
            Client.RSA = 0x5ba990;
            Client.LoginCharList = 0x7cc270;
            Client.LoginCharListLength = Client.LoginCharList + 4;
            Client.LoginSelectedChar = Client.LoginCharList - 4;
            // Client.GameWindowRectPointer = &H67969C
            // Client.GameWindowBar = &H80DB10
            Client.DatPointer = 0x7c8d3c;
            Client.EventTriggerPointer = 0x521580;
            Client.DialogPointer = 0x67ea24;
            Client.DialogLeft = 0x14;
            Client.DialogTop = 0x18;
            Client.DialogWidth = 0x1c;
            Client.DialogHeight = 0x20;
            Client.DialogCaption = 0x50;
            Client.LoginAccountNum = 0;
            Client.LoginPassword = Client.LoginCharList + 8;
            Client.LoginAccount = Client.LoginPassword + 32;
            Client.LoginPatch = 0;
            Client.LoginPatch2 = 0;
            Client.LoginPatchOrig = new byte[] {
	0xe8,
	0xd,
	0x1d,
	0x9,
	0x0
};
            Client.LoginPatchOrig2 = new byte[] {
	0xe8,
	0xc8,
	0x15,
	0x9,
	0x0
};

            Container.Start = 0x67c170;
            Container.StepContainer = 492;
            Container.StepSlot = 12;
            Container.MaxContainers = 16;
            Container.MaxStack = 100;
            Container.DistanceIsOpen = 0;
            Container.DistanceId = 4;
            Container.DistanceName = 16;
            Container.DistanceVolume = 48;
            Container.DistanceAmount = 56;
            Container.DistanceItemId = 60;
            Container.DistanceItemCount = 64;
            Container.End = Container.Start + (Container.MaxContainers * Container.StepContainer);

            ContextMenus.AddContextMenuPtr = 0x4539e0;
            ContextMenus.OnClickContextMenuPtr = 0x450560;
            ContextMenus.OnClickContextMenuVf = 0x5BFD48;
            ContextMenus.AddSetOutfitContextMenu = 0x45490f;
            ContextMenus.AddPartyActionContextMenu = 0x454824;
            ContextMenus.AddCopyNameContextMenu = 0x4549a1;
            ContextMenus.AddTradeWithContextMenu = 0x454589;
            ContextMenus.AddLookContextMenu = 0x45443f;

            Creature.DistanceId = 0;
            Creature.DistanceType = 3;
            Creature.DistanceName = 4;
            Creature.DistanceX = 36;
            Creature.DistanceY = 40;
            Creature.DistanceZ = 44;
{'fraction_non_alphanumeric': 0.07975152790301573, 'fraction_numerical': 0.0704338242661056, 'mean_word_length': 1.8824718452209068, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4428994', 'n_tokens_mistral': 3498, 'n_tokens_neox': 3108, 'n_words': 523}