From dea5031d837cab62a2ec23954a3ca210de0b45cc Mon Sep 17 00:00:00 2001 From: dannuic Date: Tue, 7 Apr 2026 23:35:16 -0500 Subject: [PATCH 1/6] WIP attempts at zoning in --- common/patches/tob.cpp | 18 +- utils/patches/patch_TOB.conf | 438 +++++++++++++++++------------------ 2 files changed, 229 insertions(+), 227 deletions(-) diff --git a/common/patches/tob.cpp b/common/patches/tob.cpp index 1f578a296..98d59d786 100644 --- a/common/patches/tob.cpp +++ b/common/patches/tob.cpp @@ -1017,16 +1017,14 @@ namespace TOB /* s32 ZoneType; - s16 ZoneId; - s16 ZoneInstance; + s32 ZoneId; float ZoneExpModifier; s32 GroupLvlExpRelated; s32 FilterID; s32 Unknown1; */ buffer.WriteInt32(emu->ztype); - buffer.WriteInt16(emu->zone_id); - buffer.WriteInt16(emu->zone_instance); + buffer.WriteInt32(emu->zone_id); buffer.WriteFloat(emu->zone_exp_multiplier); buffer.WriteInt32(0); buffer.WriteInt32(0); @@ -1202,6 +1200,7 @@ namespace TOB u8 bNoEncumber; u8 Unknown6; u8 Unknown7; + u8 Unknown7a; */ buffer.WriteUInt8(1); buffer.WriteUInt8(0); @@ -1209,6 +1208,7 @@ namespace TOB buffer.WriteUInt8(0); buffer.WriteUInt8(0); buffer.WriteUInt8(0); + buffer.WriteUInt8(0); /* u8 bNoLevitate; @@ -3088,8 +3088,10 @@ namespace TOB buffer.WriteFloat(SpawnSize - 0.7f); } + buffer.WriteFloat(1.0f); // This has something to do with collisions, generally between 1.0-1.1 + /* - EqGuid HashKey; + EqGuid HashKey; -- this is actually uint64 in the client */ buffer.WriteUInt32(emu->CharacterGuid.Id); buffer.WriteUInt16(emu->CharacterGuid.WorldId); @@ -3142,7 +3144,7 @@ namespace TOB buffer.WriteFloat(1.0f); buffer.WriteInt32(-1); - if (emu->DestructibleObject || emu->class_ == Class::LDoNTreasure) + if (emu->DestructibleObject || emu->class_ == Class::LDoNTreasure) // flags & interactiveobject { /* char InteractiveObjectModelName[]; @@ -4580,11 +4582,11 @@ namespace TOB SerializeItemDefinition(buffer, item); //u32 RealEstateArrayCount; - buffer.WriteInt32(0); + // buffer.WriteInt32(0); //s32 RealEstateArray[RealEstateArrayCount]; //bool bRealEstateItemPlaceable; - buffer.WriteInt8(0); + // buffer.WriteInt8(0); //u32 SubContentSize; uint32 subitem_count = 0; diff --git a/utils/patches/patch_TOB.conf b/utils/patches/patch_TOB.conf index e3b5c7f4b..24b9e0241 100644 --- a/utils/patches/patch_TOB.conf +++ b/utils/patches/patch_TOB.conf @@ -58,17 +58,17 @@ OP_SendExeChecksum=0x0000 OP_SendBaseDataChecksum=0x0000 # Zone in opcodes -OP_AckPacket=0x77c9 -OP_ZoneEntry=0x784a -OP_ReqNewZone=0x3895 -OP_NewZone=0x4341 -OP_ZoneSpawns=0x17d9 -OP_PlayerProfile=0x1c76 -OP_TimeOfDay=0x3736 -OP_LevelUpdate=0x0eb2 -OP_Stamina=0x1563 -OP_RequestClientZoneChange=0x0191 -OP_ZoneChange=0x17a3 +OP_AckPacket=0x776d +OP_ZoneEntry=0x713d +OP_ReqNewZone=0x1ccc +OP_NewZone=0x5ec0 +OP_ZoneSpawns=0x6cd9 +OP_PlayerProfile=0x08bf +OP_TimeOfDay=0x5503 +OP_LevelUpdate=0x54bf +OP_Stamina=0x3b01 +OP_RequestClientZoneChange=0x7a59 +OP_ZoneChange=0x4816 OP_LockoutTimerInfo=0x0000 OP_ZoneServerReady=0x0000 OP_ZoneInUnknown=0x0000 @@ -76,35 +76,35 @@ OP_LogoutReply=0x0000 OP_PreLogoutReply=0x0000 # Required to fully log in -OP_SpawnAppearance=0x4eb0 -OP_ChangeSize=0x2fdc -OP_Weather=0x6fe6 -OP_ReqClientSpawn=0x6732 -OP_SpawnDoor=0x4273 -OP_GroundSpawn=0x49c5 -OP_SendZonepoints=0x279f -OP_BlockedBuffs=0x4fdb -OP_RemoveBlockedBuffs=0x53cd -OP_ClearBlockedBuffs=0x5752 -OP_WorldObjectsSent=0x2879 -OP_SendExpZonein=0x02b4 -OP_SendAATable=0x5f30 -OP_ClearAA=0x3498 +OP_SpawnAppearance=0x513a +OP_ChangeSize=0x1ed0 +OP_Weather=0x1e6d +OP_ReqClientSpawn=0x6a27 +OP_SpawnDoor=0x532b +OP_GroundSpawn=0x14c7 +OP_SendZonepoints=0x21a2 +OP_BlockedBuffs=0x0f6f +OP_RemoveBlockedBuffs=0x4471 +OP_ClearBlockedBuffs=0x27ce +OP_WorldObjectsSent=0x4f32 +OP_SendExpZonein=0x7267 +OP_SendAATable=0x22bd +OP_ClearAA=0x6093 OP_ClearLeadershipAbilities=0x0000 #removed; leadership abilities are baked in and always on -OP_RespondAA=0x4c67 -OP_UpdateAA=0x3b30 -OP_SendAAStats=0x7d65 #i'll be honest i think this was removed at some point but this is the op at the spot in the list -OP_AAExpUpdate=0x642f #need to look into whether this has changed; exp did -OP_ExpUpdate=0x611d -OP_HPUpdate=0x775c -OP_ManaChange=0x700f +OP_RespondAA=0x4449 +OP_UpdateAA=0x1655 +OP_SendAAStats=0x7416 #i'll be honest i think this was removed at some point but this is the op at the spot in the list +OP_AAExpUpdate=0x04c3 #need to look into whether this has changed; exp did +OP_ExpUpdate=0x0e55 +OP_HPUpdate=0x2723 +OP_ManaChange=0x08f6 OP_TGB=0x0000 #removed; tgb is baked in and always on -OP_SpecialMesg=0x7d93 -OP_CharInventory=0x21d6 -OP_WearChange=0x44c0 -OP_ClientUpdate=0x3a4b -OP_ClientReady=0x0831 -OP_SetServerFilter=0x6b7f +OP_SpecialMesg=0x08bd +OP_CharInventory=0x15b4 +OP_WearChange=0x5897 +OP_ClientUpdate=0x1615 +OP_ClientReady=0x666f +OP_SetServerFilter=0x5a35 # Guild Opcodes OP_GuildsList=0x0000 @@ -164,76 +164,76 @@ OP_GMNameChange=0x0000 OP_GMLastName=0x0000 # Misc Opcodes -OP_QueryUCSServerStatus=0x2570 +OP_QueryUCSServerStatus=0x7093 OP_InspectRequest=0x0000 OP_InspectAnswer=0x0000 OP_InspectMessageUpdate=0x0000 -OP_BeginCast=0x31f9 -OP_ColoredText=0x0f3c -OP_ConsentResponse=0x3229 -OP_MemorizeSpell=0x1d31 -OP_LinkedReuse=0x7a8e -OP_SwapSpell=0x63c7 -OP_CastSpell=0x325b -OP_Consider=0x53e3 -OP_FormattedMessage=0x7f7f -OP_SimpleMessage=0x1943 -OP_Buff=0x6ce5 -OP_Illusion=0x5a3f -OP_MoneyOnCorpse=0x39d3 -OP_RandomReply=0x6603 -OP_DenyResponse=0x3f2c -OP_SkillUpdate=0x6735 -OP_GMTrainSkillConfirm=0x6fbc -OP_RandomReq=0x528a -OP_Death=0x429a -OP_GMTraining=0x7c7a -OP_GMEndTraining=0x3ec6 -OP_GMTrainSkill=0x54e1 -OP_Animation=0x79c7 -OP_Begging=0x7ded -OP_Consent=0x44fc -OP_ConsentDeny=0x3df9 -OP_AutoFire=0x5280 +OP_BeginCast=0x34b1 +OP_ColoredText=0x1743 +OP_ConsentResponse=0x74b3 +OP_MemorizeSpell=0x6af0 +OP_LinkedReuse=0x5683 +OP_SwapSpell=0x32cc +OP_CastSpell=0x1d63 +OP_Consider=0x4568 +OP_FormattedMessage=0x29b4 +OP_SimpleMessage=0x5b2d +OP_Buff=0x2427 +OP_Illusion=0x7fb0 +OP_MoneyOnCorpse=0x6f63 +OP_RandomReply=0x1234 +OP_DenyResponse=0x339b +OP_SkillUpdate=0x0149 +OP_GMTrainSkillConfirm=0x3365 +OP_RandomReq=0x0313 +OP_Death=0x1e90 +OP_GMTraining=0x3d75 +OP_GMEndTraining=0x1bf2 +OP_GMTrainSkill=0x1525 +OP_Animation=0x3807 +OP_Begging=0x217b +OP_Consent=0x6c66 +OP_ConsentDeny=0x5343 +OP_AutoFire=0x2583 OP_PetCommands=0x0000 OP_PetCommandState=0x0000 OP_PetHoTT=0x0000 -OP_DeleteSpell=0x4281 +OP_DeleteSpell=0x5d53 OP_Surname=0x0000 OP_ClearSurname=0x0000 OP_FaceChange=0x0000 OP_SetFace=0x0000 -OP_SenseHeading=0x6fcf -OP_Action=0x4c13 -OP_ConsiderCorpse=0x6092 -OP_HideCorpse=0x3f5c -OP_CorpseDrag=0x234d -OP_CorpseDrop=0x4342 -OP_Bug=0x770b +OP_SenseHeading=0x2ff2 +OP_Action=0x7d28 +OP_ConsiderCorpse=0x2f98 +OP_HideCorpse=0x2623 +OP_CorpseDrag=0x7200 +OP_CorpseDrop=0x2a53 +OP_Bug=0x2846 OP_Feedback=0x0000 -OP_Report=0x5bcf -OP_Damage=0x7d07 -OP_ChannelMessage=0x6adc -OP_Assist=0x51f1 -OP_AssistGroup=0x3f23 -OP_MoveCoin=0x4e6a -OP_ZonePlayerToBind=0x5643 +OP_Report=0x6b73 +OP_Damage=0x5b42 +OP_ChannelMessage=0x7622 +OP_Assist=0x51a0 +OP_AssistGroup=0x4879 +OP_MoveCoin=0x1987 +OP_ZonePlayerToBind=0x1860 OP_KeyRing=0x0000 -OP_WhoAllRequest=0x2a09 -OP_WhoAllResponse=0x6404 -OP_FriendsWho=0x75a2 -OP_ConfirmDelete=0x4dd0 -OP_Logout=0x771d -OP_Rewind=0x2b19 -OP_TargetCommand=0x3b18 -OP_Hide=0x1cdf -OP_Jump=0x6fa0 -OP_Camp=0x326f +OP_WhoAllRequest=0x3328 +OP_WhoAllResponse=0x4dfd +OP_FriendsWho=0x3547 +OP_ConfirmDelete=0x14a8 +OP_Logout=0x46f8 +OP_Rewind=0x898a +OP_TargetCommand=0x46bf +OP_Hide=0x4f10 +OP_Jump=0x2b69 +OP_Camp=0x4fe0 OP_Emote=0x0000 -OP_SetRunMode=0x1449 -OP_BankerChange=0x2a33 -OP_TargetMouse=0x5741 -OP_MobHealth=0x5b77 +OP_SetRunMode=0x3b78 +OP_BankerChange=0x0fa6 +OP_TargetMouse=0x7f48 +OP_MobHealth=0x445e OP_InitialMobHealth=0x0000 # Unused? OP_TargetHoTT=0x0000 OP_TargetBuffs=0x0000 @@ -242,59 +242,59 @@ OP_XTargetRequest=0x0000 OP_XTargetAutoAddHaters=0x0000 OP_XTargetOpen=0x0000 OP_XTargetOpenResponse=0x0000 -OP_BuffCreate=0x27a1 -OP_BuffRemoveRequest=0x4507 -OP_DeleteSpawn=0x7712 -OP_AutoAttack=0x3f03 -OP_AutoAttack2=0x1c31 -OP_Consume=0x5ef7 -OP_MoveItem=0x11e3 -OP_MoveMultipleItems=0x5205 -OP_DeleteItem=0x0150 -OP_DeleteCharge=0x1b7e -OP_ItemPacket=0x7d43 +OP_BuffCreate=0x754c +OP_BuffRemoveRequest=0x0c06 +OP_DeleteSpawn=0x33fa +OP_AutoAttack=0x3ced +OP_AutoAttack2=0x1824 +OP_Consume=0x2d2d +OP_MoveItem=0x121c +OP_MoveMultipleItems=0x6bf7 +OP_DeleteItem=0x29e6 +OP_DeleteCharge=0x4bef +OP_ItemPacket=0x0fb6 OP_ItemLinkResponse=0x0000 OP_ItemLinkClick=0x0000 OP_ItemPreview=0x0000 -OP_NewSpawn=0x3ea8 -OP_Track=0x5351 -OP_TrackTarget=0x611a -OP_TrackUnknown=0x2c7a -OP_ClickDoor=0x733c -OP_MoveDoor=0x567c -OP_RemoveAllDoors=0x73e8 -OP_EnvDamage=0x1ffd -OP_BoardBoat=0x7015 -OP_LeaveBoat=0x2486 -OP_ControlBoat=0x166f -OP_Forage=0x4c52 -OP_SafeFallSuccess=0x6690 +OP_NewSpawn=0x053d +OP_Track=0x24c2 +OP_TrackTarget=0x0941 +OP_TrackUnknown=0x0f55 +OP_ClickDoor=0x1678 +OP_MoveDoor=0x6e1d +OP_RemoveAllDoors=0x01df +OP_EnvDamage=0x2dbe +OP_BoardBoat=0x0c52 +OP_LeaveBoat=0x6097 +OP_ControlBoat=0x79ad +OP_Forage=0x5b12 +OP_SafeFallSuccess=0x6341 OP_RezzComplete=0x0000 OP_RezzRequest=0x0000 OP_RezzAnswer=0x0000 OP_Shielding=0x0000 OP_RequestDuel=0x0000 OP_MobRename=0x0000 -OP_AugmentItem=0x3a1b +OP_AugmentItem=0x322a OP_WeaponEquip1=0x0000 -OP_PlayerStateAdd=0x2178 -OP_PlayerStateRemove=0x178e -OP_ApplyPoison=0x55b9 -OP_Save=0x6da2 +OP_PlayerStateAdd=0x0e05 +OP_PlayerStateRemove=0x0ec0 +OP_ApplyPoison=0x7216 +OP_Save=0x667f OP_TestBuff=0x0000 OP_CustomTitles=0x0000 -OP_Split=0x7f6e -OP_YellForHelp=0x5fc9 +OP_Split=0x3ea6 +OP_YellForHelp=0x1330 OP_LoadSpellSet=0x0000 OP_Bandolier=0x0000 OP_PotionBelt=0x0000 OP_DuelDecline=0x0000 OP_DuelAccept=0x0000 -OP_SaveOnZoneReq=0x3bfe -OP_ReadBook=0x51af +OP_SaveOnZoneReq=0x16e3 +OP_ReadBook=0x165a OP_Dye=0x0000 -OP_InterruptCast=0x1d71 -OP_AAAction=0x71BB +OP_InterruptCast=0x5313 +OP_AAAction=0x48fb OP_LeadershipExpToggle=0x0000 #removed, these act as if all purchased now OP_LeadershipExpUpdate=0x0000 #removed, these act as if all purchased now OP_PurchaseLeadershipAA=0x0000 #removed, these act as if all purchased now @@ -303,20 +303,20 @@ OP_MarkNPC=0x0000 OP_ClearNPCMarks=0x0000 OP_DelegateAbility=0x0000 OP_SetGroupTarget=0x0000 -OP_Charm=0x66bb -OP_Stun=0x34be +OP_Charm=0x2509 +OP_Stun=0x7f1d OP_SendFindableNPCs=0x0000 OP_FindPersonRequest=0x0000 OP_FindPersonReply=0x0000 -OP_Sound=0x2fa8 -OP_CashReward=0x5e23 +OP_Sound=0x5949 +OP_CashReward=0x3237 OP_PetBuffWindow=0x0000 -OP_LevelAppearance=0x5d24 -OP_Translocate=0x2772 -OP_Sacrifice=0x2cbf -OP_PopupResponse=0x6be9 -OP_OnLevelMessage=0x2a41 -OP_AugmentInfo=0x2e11 +OP_LevelAppearance=0x5eb5 +OP_Translocate=0x0611 +OP_Sacrifice=0x4b76 +OP_PopupResponse=0x4032 +OP_OnLevelMessage=0x552e +OP_AugmentInfo=0x19eb OP_Petition=0x0000 OP_SomeItemPacketMaybe=0x0000 OP_PVPStats=0x0000 @@ -324,26 +324,26 @@ OP_PVPLeaderBoardRequest=0x0000 OP_PVPLeaderBoardReply=0x0000 OP_PVPLeaderBoardDetailsRequest=0x0000 OP_PVPLeaderBoardDetailsReply=0x0000 -OP_RestState=0x0a92 -OP_RespawnWindow=0x55ed +OP_RestState=0x1930 +OP_RespawnWindow=0x5c OP_LDoNButton=0x0000 OP_SetStartCity=0x0000 -OP_VoiceMacroIn=0x703f -OP_VoiceMacroOut=0x72d1 +OP_VoiceMacroIn=0x2963 +OP_VoiceMacroOut=0x028d OP_ItemViewUnknown=0x0000 OP_VetRewardsAvaliable=0x0000 OP_VetClaimRequest=0x0000 OP_VetClaimReply=0x0000 -OP_DisciplineUpdate=0x6ce4 -OP_DisciplineTimer=0x7436 +OP_DisciplineUpdate=0x0a2f +OP_DisciplineTimer=0x2782 OP_BecomeCorpse=0x0000 # Unused? OP_Action2=0x0000 # Unused? OP_MobUpdate=0x0000 OP_NPCMoveUpdate=0x0000 -OP_CameraEffect=0x2f01 -OP_SpellEffect=0x7378 -OP_AddNimbusEffect=0x069f -OP_RemoveNimbusEffect=0x19ee +OP_CameraEffect=0x3352 +OP_SpellEffect=0x7ea2 +OP_AddNimbusEffect=0x54b1 +OP_RemoveNimbusEffect=0x4e88 OP_AltCurrency=0x0000 OP_AltCurrencyMerchantRequest=0x0000 OP_AltCurrencyMerchantReply=0x0000 @@ -354,22 +354,22 @@ OP_AltCurrencyReclaim=0x0000 OP_CrystalCountUpdate=0x0000 OP_CrystalCreate=0x0000 OP_CrystalReclaim=0x0000 -OP_Untargetable=0x026f -OP_IncreaseStats=0x1005 -OP_Weblink=0x16a3 -OP_OpenContainer=0x6758 -OP_Marquee=0x6bca -OP_ItemRecastDelay=0x547a +OP_Untargetable=0x6205 +OP_IncreaseStats=0x1312 +OP_Weblink=0x41f7 +OP_OpenContainer=0x1e8a +OP_Marquee=0x257c +OP_ItemRecastDelay=0x0fe4 #OP_OpenInventory=0x0000 # Likely does not exist in RoF -U -OP_ResetAA=0x53c0 -OP_Fling=0x3731 -OP_CancelSneakHide=0x7452 +OP_ResetAA=0x3126 +OP_Fling=0x1101 +OP_CancelSneakHide=0x14b0 OP_AggroMeterLockTarget=0x0000 OP_AggroMeterTargetInfo=0x0000 OP_AggroMeterUpdate=0x0000 -OP_UnderWorld=0x4ca9 # clients sends up when they detect an underworld issue, might be useful for cheat detection -OP_KickPlayers=0x7154 -OP_BookButton=0x014d +OP_UnderWorld=0x156c # clients sends up when they detect an underworld issue, might be useful for cheat detection +OP_KickPlayers=0x1257 +OP_BookButton=0x4e78 # Expeditions OP_DzQuit=0x0000 @@ -415,10 +415,10 @@ OP_MercenarySuspendResponse=0x0000 OP_MercenaryUnsuspendResponse=0x0000 # Looting -OP_LootRequest=0x60e5 -OP_EndLootRequest=0x35f6 -OP_LootItem=0x0856 -OP_LootComplete=0x1f5e +OP_LootRequest=0x2239 +OP_EndLootRequest=0x173c +OP_LootItem=0x5241 +OP_LootComplete=0x5470 # bazaar trader stuff: OP_BazaarSearch=0x0000 @@ -436,49 +436,49 @@ OP_Bazaar=0x0000 OP_TraderItemUpdate=0x0000 # pc/npc trading -OP_TradeRequest=0x7066 -OP_TradeAcceptClick=0x34ad -OP_TradeRequestAck=0x1c6b -OP_TradeCoins=0x44fe -OP_FinishTrade=0x0ec6 -OP_CancelTrade=0x5839 -OP_TradeMoneyUpdate=0x5fb3 -OP_MoneyUpdate=0x70bb -OP_TradeBusy=0x109f +OP_TradeRequest=0x1f5d +OP_TradeAcceptClick=0x1d90 +OP_TradeRequestAck=0x2737 +OP_TradeCoins=0x63d8 +OP_FinishTrade=0x0875 +OP_CancelTrade=0x5fb5 +OP_TradeMoneyUpdate=0x544d +OP_MoneyUpdate=0x578a +OP_TradeBusy=0x43b8 # Sent after canceling trade or after closing tradeskill object -OP_FinishWindow=0x50d4 -OP_FinishWindow2=0x6b03 +OP_FinishWindow=0x1935 +OP_FinishWindow2=0x5458 # Sent on Live for what seems to be item existance verification # Ex. Before Right Click Effect happens from items -OP_ItemVerifyRequest=0x2003 -OP_ItemVerifyReply=0x43d0 +OP_ItemVerifyRequest=0x4d8e +OP_ItemVerifyReply=0x0bce OP_ItemAdvancedLoreText=0x0000 # merchant stuff -OP_ShopPlayerSell=0x6489 -OP_ShopRequest=0x840 -OP_ShopEnd=0x74bb -OP_ShopEndConfirm=0x2ed1 -OP_ShopPlayerBuy=0x625e -OP_ShopDelItem=0x4ce4 -OP_ShopSendParcel=0x0f16 -OP_ShopDeleteParcel=0x4e2a -OP_ShopRetrieveParcel=0x27d1 -OP_ShopParcelIcon=0x4f27 +OP_ShopPlayerSell=0x5d8e +OP_ShopRequest=0x25d0 +OP_ShopEnd=0x3e98 +OP_ShopEndConfirm=0x493d +OP_ShopPlayerBuy=0x0696 +OP_ShopDelItem=0x0672 +OP_ShopSendParcel=0x3d05 +OP_ShopDeleteParcel=0x109b +OP_ShopRetrieveParcel=0x5d5b +OP_ShopParcelIcon=0x1936 # tradeskill stuff: -OP_ClickObject=0x687e -OP_ClickObjectAction=0x110f -OP_ClearObject=0x6155 -OP_RecipeDetails=0x01e7 -OP_RecipesFavorite=0x0495 -OP_RecipesSearch=0x2f4e -OP_RecipeReply=0x2cd2 -OP_RecipeAutoCombine=0x5dba -OP_TradeSkillCombine=0x4ed8 +OP_ClickObject=0x6693 +OP_ClickObjectAction=0x3dbe +OP_ClearObject=0x3df2 +OP_RecipeDetails=0x400f +OP_RecipesFavorite=0x2d6b +OP_RecipesSearch=0x1a3a +OP_RecipeReply=0x3e33 +OP_RecipeAutoCombine=0x5257 +OP_TradeSkillCombine=0x40af # Tribute Packets: OP_TributeUpdate=0x0000 @@ -529,8 +529,8 @@ OP_AdventureLeaderboardRequest=0x0000 OP_AdventureLeaderboardReply=0x0000 # Group Opcodes -OP_GroupDisband=0x78ef -OP_GroupInvite=0x1d90 +OP_GroupDisband=0x0573 +OP_GroupInvite=0x7e79 OP_GroupFollow=0x0000 OP_GroupUpdate=0x0000 OP_GroupUpdateB=0x0000 @@ -539,7 +539,7 @@ OP_GroupAcknowledge=0x0000 OP_GroupDelete=0x0000 OP_CancelInvite=0x0000 OP_GroupFollow2=0x0000 -OP_GroupInvite2=0x1e7e +OP_GroupInvite2=0x43b1 OP_GroupDisbandYou=0x0000 OP_GroupDisbandOther=0x0000 OP_GroupLeaderChange=0x0000 @@ -566,24 +566,24 @@ OP_RaidUpdate=0x0000 OP_RaidJoin=0x0000 OP_RaidDelegateAbility=0x0000 OP_MarkRaidNPC=0x0000 -OP_RaidClearNPCMarks=0x0000 +OP_RaidClearNPCMarks=0x0000 # Button-push commands -OP_Taunt=0x5064 -OP_CombatAbility=0xbf -OP_SenseTraps=0x579c -OP_PickPocket=0x53d1 -OP_DisarmTraps=0x21bf -OP_Disarm=0x31e9 -OP_Sneak=0x78a7 -OP_Fishing=0x57cc -OP_InstillDoubt=0x57cc -OP_FeignDeath=0x14b8 -OP_Mend=0x6b8 -OP_Bind_Wound=0x650e -OP_LDoNOpen=0x448 -OP_LDoNPickLock=0x61c8 -OP_LDoNInspect=0xc1c +OP_Taunt=0x6ad9 +OP_CombatAbility=0x50e2 +OP_SenseTraps=0x235e +OP_PickPocket=0x2c63 +OP_DisarmTraps=0x7362 +OP_Disarm=0x5a91 +OP_Sneak=0x7f05 +OP_Fishing=0x3cdb +OP_InstillDoubt=0x3cdb +OP_FeignDeath=0x3d9f +OP_Mend=0x3bac +OP_Bind_Wound=0x580f +OP_LDoNOpen=0x7a62 +OP_LDoNPickLock=0x36ea +OP_LDoNInspect=0x256a # Task packets OP_TaskDescription=0x0000 @@ -650,7 +650,7 @@ OP_LoginComplete=0x0000 # discovered opcodes not yet used: OP_PickLockSuccess=0x0000 -OP_PlayMP3=0x6451 +OP_PlayMP3=0x2e09 OP_ReclaimCrystals=0x0000 OP_DynamicWall=0x0000 OP_OpenDiscordMerchant=0x0000 @@ -696,4 +696,4 @@ OP_PetitionViewPetition=0x0000 OP_UpdateAura=0x0000 OP_RemoveTrap=0x0000 -OP_Fingerprint=0x7a5b \ No newline at end of file +OP_Fingerprint=0x52ef From 2c4d82f1b90db5d950516e196695fc3fda85d1d7 Mon Sep 17 00:00:00 2001 From: dannuic Date: Wed, 8 Apr 2026 10:26:36 -0500 Subject: [PATCH 2/6] Fixed packed structs --- common/patches/tob_structs.h | 51 ++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/common/patches/tob_structs.h b/common/patches/tob_structs.h index 0a96127e5..e70e0a1db 100644 --- a/common/patches/tob_structs.h +++ b/common/patches/tob_structs.h @@ -283,23 +283,23 @@ namespace TOB { { union { struct { - signed y : 19; + signed deltaHeading : 10; + signed animation : 10; + // unsigned pad1 : 12; + signed deltaX : 13; - - unsigned heading : 12; signed z : 19; - unsigned pad1 : 1; - unsigned pitch : 12; - signed animation : 10; //these might be swapped - signed deltaHeading : 10; //these might be swapped - - signed deltaY : 13; - signed deltaZ : 13; - unsigned pad3 : 6; + signed y : 19; + unsigned heading : 12; + // unsigned pad2 : 1; signed x : 19; - unsigned pad4 : 13; + signed deltaZ : 13; + + unsigned pitch : 12; + signed deltaY : 13; + // unsigned pad3 : 7; }; uint32_t raw[5]; }; @@ -307,19 +307,20 @@ namespace TOB { struct Client_Position { - /*00*/ float delta_x; - /*04*/ float x; - /*08*/ float z; - /*12*/ signed animation : 10; - unsigned pitch : 12; - signed padding1 : 10; - /*16*/ float delta_y; - /*20*/ float y; - /*24*/ signed delta_heading : 10; - signed heading : 12; - signed padding2 : 10; - /*28*/ float delta_z; - /*32*/ + /*0x00*/ float y; + /*0x04*/ float delta_y; + /*0x08*/ float x; + /*0x0c*/ int animation : 10; + // signed padding1 : 22; + /*0x10*/ float delta_x; + /*0x14*/ float z; + /*0x18*/ float delta_z; + /*0x1c*/ int heading : 12; + int pitch : 12; + // signed padding2 : 8; + /*0x20*/ int delta_heading : 10; + // signed padding3 : 22; + /*0x24*/ }; struct PlayerPositionUpdateServer_Struct From aac7bbf48accccc1dc0b28beca299efbbb91f334 Mon Sep 17 00:00:00 2001 From: dannuic Date: Wed, 8 Apr 2026 15:57:37 -0500 Subject: [PATCH 3/6] Fixed enough to allow zoning --- common/patches/tob.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/common/patches/tob.cpp b/common/patches/tob.cpp index 98d59d786..0608ddf18 100644 --- a/common/patches/tob.cpp +++ b/common/patches/tob.cpp @@ -1482,12 +1482,10 @@ namespace TOB s32 index; s32 points_spent; s32 charges_spent; - u8 unknown1; */ out.WriteUInt32(emu->aa_array[i].AA); out.WriteUInt32(emu->aa_array[i].value); out.WriteUInt32(emu->aa_array[i].charges); - out.WriteUInt8(0); } for (int i = 0; i < 60; ++i) { @@ -1495,12 +1493,10 @@ namespace TOB s32 index; s32 points_spent; s32 charges_spent; - u8 unknown1; //not sure about this one */ out.WriteUInt32(0); out.WriteUInt32(0); out.WriteUInt32(0); - out.WriteUInt8(0); } /*u32 skill_count;*/ @@ -1622,16 +1618,15 @@ namespace TOB */ out.WriteFloat(1.0f); - out.WriteUInt32(0); - out.WriteUInt32(0); + out.WriteUInt64(0); out.WriteUInt32(0); out.WriteUInt32(0); out.WriteUInt8(0); out.WriteUInt32(0xFFFFFFFF); out.WriteUInt32(0); + out.WriteUInt32(0); + out.WriteUInt32(0); out.WriteUInt8(0); - out.WriteUInt32(0); - out.WriteUInt32(0); //SlotData slots[6]; for (int j = 0; j < 6; ++j) { /* @@ -1782,8 +1777,8 @@ namespace TOB out.WriteUInt32(emu->endurance); out.WriteUInt32(0); - //ItemIndex keyring_item_index[5]; - for (int i = 0; i < 5; ++i) { + //ItemIndex keyring_item_index[6]; + for (int i = 0; i < 6; ++i) { /* s16 slot1; s16 slot2; @@ -1826,7 +1821,7 @@ namespace TOB u32 last_played_time; u32 played_minutes; u32 entitled_days; - u32 expansion_flags; + u64 expansion_flags; */ out.WriteUInt32(emu->birthday); @@ -1834,7 +1829,7 @@ namespace TOB out.WriteUInt32(emu->lastlogin); out.WriteUInt32(5000); out.WriteUInt32(6000); - out.WriteUInt32(0x3FFFFFFF); + out.WriteUInt64(0x3FFFFFFF); //u32 language_count; out.WriteUInt32(32); @@ -2469,11 +2464,13 @@ namespace TOB s32 AutoGrantExpansion; s32 Unknown098; u8 Unknown09C; + u8 unk TOB added */ buffer.WriteInt32(emu->expansion); buffer.WriteInt32(0); buffer.WriteUInt8(0); + buffer.WriteUInt8(0); //u32 TotalEffects; buffer.WriteUInt32(emu->total_effects); From 49161a618fd21c41f53f9ac8487e2db8d8f0741a Mon Sep 17 00:00:00 2001 From: dannuic Date: Wed, 8 Apr 2026 17:57:08 -0500 Subject: [PATCH 4/6] Added up to DoN currency (not inclusive) --- common/patches/tob.cpp | 85 +++++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 30 deletions(-) diff --git a/common/patches/tob.cpp b/common/patches/tob.cpp index 0608ddf18..cd100c3d7 100644 --- a/common/patches/tob.cpp +++ b/common/patches/tob.cpp @@ -1017,14 +1017,15 @@ namespace TOB /* s32 ZoneType; - s32 ZoneId; + s32 ZoneId; // combine id + instance float ZoneExpModifier; s32 GroupLvlExpRelated; s32 FilterID; s32 Unknown1; */ buffer.WriteInt32(emu->ztype); - buffer.WriteInt32(emu->zone_id); + buffer.WriteUInt16(emu->zone_id); + buffer.WriteUInt16(emu->zone_instance); buffer.WriteFloat(emu->zone_exp_multiplier); buffer.WriteInt32(0); buffer.WriteInt32(0); @@ -1845,7 +1846,7 @@ namespace TOB } /* - u32 current_zone; + u32 current_zone; // combine id + instance float current_x; float current_y; float current_z; @@ -1875,8 +1876,7 @@ namespace TOB u8 status; */ - out.WriteInt32(emu->guild_id); - out.WriteUInt32(0); + out.WriteUInt64(emu->guild_id); out.WriteUInt8(0); out.WriteUInt8(5); @@ -1903,19 +1903,17 @@ namespace TOB /* u32 BenefitTimer; s32 unknown1; - s32 current_favor; - s32 unknown2; - s32 all_time_favor; - s32 unknown3; //some of these are probably the bools on the pcclient; - u16 unknown4; + s64 current_favor; + s64 all_time_favor; + u8 unknown; + u8 unknown; */ out.WriteUInt32(600000); out.WriteInt32(-1); - out.WriteUInt32(emu->tribute_points); - out.WriteUInt32(0); - out.WriteUInt32(emu->career_tribute_points); - out.WriteUInt32(0); - out.WriteUInt16(0); + out.WriteUInt64(emu->tribute_points); + out.WriteUInt64(emu->career_tribute_points); + out.WriteUInt8(0); + out.WriteUInt8(0); //u32 tribute_benefit_count out.WriteUInt32(5); @@ -1944,24 +1942,51 @@ namespace TOB out.WriteUInt32(0xFFFFFFFF); out.WriteUInt32(0); } - const uint8_t task_data[137] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, - }; - //u8 tasks[137]; //on live and on xac's capture from 12/28/23 these both are the same size; - for (int i = 0; i < 137; i++) - { - out.WriteUInt8(task_data[i]); + // u32 BankItems type + // u32 BankItems data1 + // u32 BankItems data2 + out.WriteUInt32(0); + out.WriteUInt32(0); + out.WriteUInt32(0); + + // s32 ActiveSharedTaskID + // bool IsMonsterMission + // s32 TaskID + // s32 MovingStartTime + // s32 InitialStartTime + out.WriteInt32(0); + out.WriteUInt8(0); + out.WriteInt32(0); + out.WriteInt32(0); + out.WriteInt32(0); + + for (int i = 0; i < 2; ++i) { + // these are the element active booleans, will want to set them all individually later + for (int j = 0; j < 10; ++j) + out.WriteUInt8(0); } + for (int i = 0; i < 2; ++i) { + // these are the current count integers, will want to set them all individually later + for (int j = 0; j < 10; ++j) + out.WriteUInt32(0); + } + + // float RewardAdjustment + out.WriteFloat(0.f); + + // monster mission count (set to 0 for now) + // monster mission packets are as follows: + // s32 template id + // s32 min + // s32 max + // s32 num selected + // bool can select + // string template name + out.WriteUInt32(0); + + /* u32 good_points_available; u32 good_points_earned; From 7f42add39b532763bffe6ff86b493c42c4db4747 Mon Sep 17 00:00:00 2001 From: dannuic Date: Wed, 8 Apr 2026 22:13:37 -0500 Subject: [PATCH 5/6] Finished up player profile --- common/patches/tob.cpp | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/common/patches/tob.cpp b/common/patches/tob.cpp index cd100c3d7..d8c3b9b5c 100644 --- a/common/patches/tob.cpp +++ b/common/patches/tob.cpp @@ -2128,24 +2128,22 @@ namespace TOB //PvPKill last_kill; /* char name[]; - u32 level; - u32 unknown1; //not sure - u32 unknown2; //not sure + u32 unk; u32 race; u32 class; u32 zone; u32 time; u32 points; + u32 level; */ out.WriteString(emu->PVPLastKill.Name); - out.WriteUInt32(emu->PVPLastKill.Level); - out.WriteUInt32(0); out.WriteUInt32(0); out.WriteUInt32(emu->PVPLastKill.Race); out.WriteUInt32(emu->PVPLastKill.Class); out.WriteUInt32(emu->PVPLastKill.Zone); out.WriteUInt32(emu->PVPLastKill.Time); out.WriteUInt32(emu->PVPLastKill.Points); + out.WriteUInt32(emu->PVPLastKill.Level); //PvPDeath last_death; /* @@ -2179,24 +2177,22 @@ namespace TOB for (int i = 0; i < 50; ++i) { /* char name[]; - u32 level; - u32 unknown1; //not sure - u32 unknown2; //not sure + u32 unknown1; u32 race; u32 class; u32 zone; u32 time; u32 points; + u32 level; */ out.WriteString(emu->PVPRecentKills[i].Name); - out.WriteUInt32(emu->PVPRecentKills[i].Level); - out.WriteUInt32(0); out.WriteUInt32(0); out.WriteUInt32(emu->PVPRecentKills[i].Race); out.WriteUInt32(emu->PVPRecentKills[i].Class); out.WriteUInt32(emu->PVPRecentKills[i].Zone); out.WriteUInt32(emu->PVPRecentKills[i].Time); out.WriteUInt32(emu->PVPRecentKills[i].Points); + out.WriteUInt32(emu->PVPRecentKills[i].Level); } /* @@ -2238,21 +2234,29 @@ namespace TOB //AltCurrency alt_currency; /* - u32 alt_currency_str_length; - u32 unknown1; + u64 alt_currency_str_length; char alt_currency_string[alt_currency_str_length]; */ - out.WriteUInt32(1); - out.WriteUInt32(0); + out.WriteUInt64(1); out.WriteUInt8(0x31); //u32 completed_event_subcomponent_count; out.WriteUInt32(0); //AchivementSubComponentData completed_event_subcomponents[completed_event_subcomponent_count]; + // s32 component id + // s32 requirement id + // u32 requirement type + // s32 count + // u32 unk //u32 inprogress_event_subcomponent_count; out.WriteUInt32(0); //AchivementSubComponentData inprogress_event_subcomponents[inprogress_event_subcomponent_count]; + // s32 component id + // s32 requirement id + // u32 requirement type + // s32 count + // u32 unk /* u64 merc_aa_exp; @@ -2278,10 +2282,18 @@ namespace TOB //alchemy_bonus_list_count out.WriteUInt32(0); //AlchemyBonusSkillData alchemy_bonus_list[alchemy_bonus_list_count]; + // s32 skill id + // s32 bonus points //u32 persona_count; out.WriteUInt32(0); //PersonaEquipmentSet persona_equipment_set[persona_count]; + // u32 + // u32 (length) + // u32 + // u32 + // u32 + // (there is a way to set two more u32's here, but the client seems to not ever reach that code) //u8 term; out.WriteUInt8(0); From 48e0847f213ebda31037e9a2ff366368e374294c Mon Sep 17 00:00:00 2001 From: dannuic Date: Wed, 8 Apr 2026 23:06:09 -0500 Subject: [PATCH 6/6] renamed straggler file for tob --- .../{login_opcodes_steam_latest.conf => login_opcodes_tob.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename loginserver/login_util/{login_opcodes_steam_latest.conf => login_opcodes_tob.conf} (100%) diff --git a/loginserver/login_util/login_opcodes_steam_latest.conf b/loginserver/login_util/login_opcodes_tob.conf similarity index 100% rename from loginserver/login_util/login_opcodes_steam_latest.conf rename to loginserver/login_util/login_opcodes_tob.conf