From 6319d721289343089cb84cb7764a43b402862e2b Mon Sep 17 00:00:00 2001 From: Aranaktu Date: Mon, 23 Nov 2020 18:16:49 +0100 Subject: [PATCH] v21.1.1.5 --- source/FIFA21.CETRAINER | 568 +++++++++++++++++- .../GUI/forms/playerseditorform/manager.lua | 63 -- source/lua/consts.lua | 13 +- 3 files changed, 572 insertions(+), 72 deletions(-) diff --git a/source/FIFA21.CETRAINER b/source/FIFA21.CETRAINER index 259ca46..ed94ded 100644 --- a/source/FIFA21.CETRAINER +++ b/source/FIFA21.CETRAINER @@ -15,7 +15,7 @@ 0 - "v21.1.1.4" + "v21.1.1.5" 804000 1 @@ -16043,6 +16043,7 @@ unregistersymbol(GS_CamProSwing) 4776 "Transfer Budget" + 4 Bytes
pScriptsBase
@@ -23259,6 +23260,176 @@ dealloc(Weather)
+ + 4865 + "Sim Match Settings" + + + Auto Assembler Script + { +AUTHOR: Aranaktu + +GAME VERSION: Script should always work with newest version of the game which can be downloaded from Origin. + +RISK LEVEL: 0/5 (There is no chance that this script will harm your cm save.) + +DESCRIPTION: +Script allows you to change a few options from simsettings.ini + +HOW TO USE: +- Activate the script before you start simulation + +VIDEO TUTORIAL(S): +- NONE +} + +[ENABLE] +//code from here to '[DISABLE]' will be used to enable the cheat +{$lua} +if syntaxcheck then return end +onScriptActivate() + +INJECT_SimMatchSettings = gCTManager.memory_manager:get_validated_address('SimMatchSettings', 'FootballCompEng_Win64_retail.dll', 'FootballCompEng') +ORG_SimMatchSettings = readBytes(INJECT_SimMatchSettings, 12, true) + +{$asm} + +alloc(newmem_SimMatchSettings, $500, $INJECT_SimMatchSettings) + +label(code_SimMatchSettings) +label(ret_SimMatchSettings) + +alloc(sim_settings_max_cards, 4, $INJECT_SimMatchSettings) +registersymbol(sim_settings_max_cards) +sim_settings_max_cards: +db 04 00 00 00 + +alloc(sim_settings_max_injures, 4, $INJECT_SimMatchSettings) +registersymbol(sim_settings_max_injures) +sim_settings_max_injures: +db 02 00 00 00 + +alloc(sim_settings_fatiguebase, 4, $INJECT_SimMatchSettings) +registersymbol(sim_settings_fatiguebase) +sim_settings_fatiguebase: +db 24 00 00 00 + +newmem_SimMatchSettings: + mov r10d, [sim_settings_max_injures] + mov [r9+00000074], r10d + + mov r10d, [sim_settings_fatiguebase] + mov [r9+0000001C], r10d + + mov r10d, [sim_settings_max_cards] + mov [r9+000000A4], r10d +code_SimMatchSettings: + //mov r10d,[r9+000000A4] + jmp ret_SimMatchSettings + +$INJECT_SimMatchSettings: + jmp newmem_SimMatchSettings + nop + nop +ret_SimMatchSettings: + +[DISABLE] +//code_SimMatchSettings from here till the end of the code_SimMatchSettings will be used to disable the cheat +{$lua} +writeBytes(INJECT_SimMatchSettings, ORG_SimMatchSettings) +{$asm} + +dealloc(newmem_SimMatchSettings) +dealloc(sim_settings_max_cards) +dealloc(sim_settings_max_injures) +dealloc(sim_settings_fatiguebase) +unregistersymbol(sim_settings_max_cards) +unregistersymbol(sim_settings_max_injures) +unregistersymbol(sim_settings_fatiguebase) + +{ +// ORIGINAL CODE - INJECTION POINT: "FootballCompEng_Win64_retail.dll"+895BD + +"FootballCompEng_Win64_retail.dll"+895A1: 41 54 - push r12 +"FootballCompEng_Win64_retail.dll"+895A3: 41 55 - push r13 +"FootballCompEng_Win64_retail.dll"+895A5: 41 56 - push r14 +"FootballCompEng_Win64_retail.dll"+895A7: 41 57 - push r15 +"FootballCompEng_Win64_retail.dll"+895A9: 48 83 EC 50 - sub rsp,50 +"FootballCompEng_Win64_retail.dll"+895AD: 45 8B E0 - mov r12d,r8d +"FootballCompEng_Win64_retail.dll"+895B0: 8B DA - mov ebx,edx +"FootballCompEng_Win64_retail.dll"+895B2: 48 8B 41 08 - mov rax,[rcx+08] +"FootballCompEng_Win64_retail.dll"+895B6: 4C 8B 70 08 - mov r14,[rax+08] +"FootballCompEng_Win64_retail.dll"+895BA: 4C 8B 08 - mov r9,[rax] +// ---------- INJECTING HERE ---------- +"FootballCompEng_Win64_retail.dll"+895BD: 45 8B 91 A4 00 00 00 - mov r10d,[r9+000000A4] +// ---------- DONE INJECTING ---------- +"FootballCompEng_Win64_retail.dll"+895C4: 41 8B B9 A8 00 00 00 - mov edi,[r9+000000A8] +"FootballCompEng_Win64_retail.dll"+895CB: 41 8B 81 AC 00 00 00 - mov eax,[r9+000000AC] +"FootballCompEng_Win64_retail.dll"+895D2: 89 44 24 20 - mov [rsp+20],eax +"FootballCompEng_Win64_retail.dll"+895D6: 41 8B 81 B0 00 00 00 - mov eax,[r9+000000B0] +"FootballCompEng_Win64_retail.dll"+895DD: 89 84 24 A8 00 00 00 - mov [rsp+000000A8],eax +"FootballCompEng_Win64_retail.dll"+895E4: 45 85 D2 - test r10d,r10d +"FootballCompEng_Win64_retail.dll"+895E7: 0F 84 02 01 00 00 - je FootballCompEng_Win64_retail.dll+896EF +"FootballCompEng_Win64_retail.dll"+895ED: 41 8B C0 - mov eax,r8d +"FootballCompEng_Win64_retail.dll"+895F0: 2B C2 - sub eax,edx +"FootballCompEng_Win64_retail.dll"+895F2: FF C0 - inc eax +} + + + + 4866 + "Max Cards" + 4 Bytes +
sim_settings_max_cards
+
+ + 4867 + "Max Injures" + 4 Bytes +
sim_settings_max_injures
+
+ + 1992 + "Don't lose stamina" + + Auto Assembler Script + { +AUTHOR: +- Aranaktu + +GAME VERSION: +- Script should always work with newest version of the game which can be downloaded from Origin. + +RISK LEVEL: +- 0/5 (There is no chance that this script will harm your cm save.) + +DESCRIPTION: + Players will be fully renegerated after simming match + +HOW TO USE: + 1. Activate the script before you start match sim + +VIDEO TUTORIAL: +- NONE +} + + +[ENABLE] +sim_settings_fatiguebase: + db 9C FF FF FF +[DISABLE] +sim_settings_fatiguebase: + db 24 00 00 00 + + + + 4868 + "Base Fatigue" + 4 Bytes +
sim_settings_fatiguebase
+
+
+
4777 "Transfer HUB" @@ -23643,6 +23814,352 @@ dealloc(newmem_AllowLoanApp) "FIFA21.exe"+4862E39: 48 8B 08 - mov rcx,[rax] "FIFA21.exe"+4862E3C: 4C 8B 41 18 - mov r8,[rcx+18] } + + + + + + 4863 + "Player Contract" + + + 1 + + + 1459 + "Contract Negotiation" + + + Auto Assembler Script + { +AUTHOR: +- Aranaktu + +GAME VERSION: +- Script should always work with newest version of the game which can be downloaded from Origin. + +RISK LEVEL: +- 2/5 (There is slight chance that this script will harm your cm save.) + +DESCRIPTION: + Player will accept any terms that you have specified in the cheat table + +HOW TO USE: + 1. Activate script + 2. Make changes in cheat table if you want to + 3. Start 'Contract Negotiation' with the player. + 4. Just accept anything. Even if there be a wage $200,000, but in CT you will have $500 then when negotations will finish player wage will be $500. + +VIDEO TUTORIAL: +- https://youtu.be/qVEnMdiH0Po?list=PLx3DZm1ifjQw5exchXxcZpj0oN7_eDy-Q&t=1935 +} + +[ENABLE] +//code from here to '[DISABLE]' will be used to enable the cheat +{$lua} +if syntaxcheck then return end +onScriptActivate() + +INJECT_ContractNeg = gCTManager.memory_manager:get_validated_address('ContractNeg') +ORG_ContractNeg = readBytes(INJECT_ContractNeg, 12, true) + +{$asm} + +alloc(newmem_ContractNeg, $500, $INJECT_ContractNeg) + +label(code_ContractNeg) +label(ret_ContractNeg) + +alloc(ContractNeg_Wage, 4, $INJECT_ContractNeg) +registersymbol(ContractNeg_Wage) +ContractNeg_Wage: +dd (int)500 + +alloc(ContractNeg_Length, 4, $INJECT_ContractNeg) +registersymbol(ContractNeg_Length) +ContractNeg_Length: +dd (int)72 + +alloc(ContractNeg_ReleaseClause, 4, $INJECT_ContractNeg) +registersymbol(ContractNeg_ReleaseClause) +ContractNeg_ReleaseClause: +dd (int)0 + +alloc(ContractNeg_Role, 4, $INJECT_ContractNeg) +registersymbol(ContractNeg_Role) +ContractNeg_Role: +dd (int)5 + +alloc(ContractNeg_SigningBonus, 4, $INJECT_ContractNeg) +registersymbol(ContractNeg_SigningBonus) +ContractNeg_SigningBonus: +dd (int)0 + +alloc(ContractNeg_BonusType, 4, $INJECT_ContractNeg) +registersymbol(ContractNeg_BonusType) +ContractNeg_BonusType: +dd (int)0 + +alloc(ContractNeg_BonusType_Count, 4, $INJECT_ContractNeg) +registersymbol(ContractNeg_BonusType_Count) +ContractNeg_BonusType_Count: +dd (int)50 + +alloc(ContractNeg_BonusType_Sum, 4, $INJECT_ContractNeg) +registersymbol(ContractNeg_BonusType_Sum) +ContractNeg_BonusType_Sum: +dd (int)5 + +newmem_ContractNeg: + mov rdx,[rax+38] + + push RAX + xor rax, rax + mov eax, [ContractNeg_Wage] + mov [rdx-40], eax // Wage + + mov eax, [ContractNeg_Length] + mov [rdx-40+4], eax // Length + + mov eax, [ContractNeg_ReleaseClause] + mov [rdx-40+8], eax // Release Clause + + mov eax, [ContractNeg_Role] + mov [rdx-40+C], eax // Role + + mov eax, [ContractNeg_SigningBonus] + mov [rdx-40+10], eax // SigningBonus + + mov eax, [ContractNeg_BonusType] + mov [rdx-40+14], eax // BonusType , 0 Appearances, 1 clean Sheets + + mov eax, [ContractNeg_BonusType_Count] + mov [rdx-40+18], eax // Bonus Type - Count + + mov eax, [ContractNeg_BonusType_Sum] + mov [rdx-40+1C], eax // Bonus Type - Sum + pop RAX +code_ContractNeg: + sub rdx,40 + jmp ret_ContractNeg + +$INJECT_ContractNeg: + jmp newmem_ContractNeg + nop + nop + nop +ret_ContractNeg: + +[DISABLE] +//code_ContractNeg from here till the end of the code_ContractNeg will be used to disable the cheat +{$lua} +writeBytes(INJECT_ContractNeg, ORG_ContractNeg) +{$asm} + +dealloc(newmem_ContractNeg) +dealloc(ContractNeg_Wage) +dealloc(ContractNeg_Length) +dealloc(ContractNeg_ReleaseClause) +dealloc(ContractNeg_Role) +dealloc(ContractNeg_SigningBonus) +dealloc(ContractNeg_BonusType) +dealloc(ContractNeg_BonusType_Count) +dealloc(ContractNeg_BonusType_Sum) +unregistersymbol(ContractNeg_Wage) +unregistersymbol(ContractNeg_Length) +unregistersymbol(ContractNeg_ReleaseClause) +unregistersymbol(ContractNeg_Role) +unregistersymbol(ContractNeg_SigningBonus) +unregistersymbol(ContractNeg_BonusType) +unregistersymbol(ContractNeg_BonusType_Count) +unregistersymbol(ContractNeg_BonusType_Sum) +{ +// ORIGINAL CODE - INJECTION POINT: "FIFA21.exe"+5973B7E + +"FIFA21.exe"+5973B5F: CC - int 3 +"FIFA21.exe"+5973B60: 48 8B 41 18 - mov rax,[rcx+18] +"FIFA21.exe"+5973B64: 48 8B D1 - mov rdx,rcx +"FIFA21.exe"+5973B67: 33 C9 - xor ecx,ecx +"FIFA21.exe"+5973B69: 89 48 08 - mov [rax+08],ecx +"FIFA21.exe"+5973B6C: 48 8B 42 18 - mov rax,[rdx+18] +"FIFA21.exe"+5973B70: 89 48 0C - mov [rax+0C],ecx +"FIFA21.exe"+5973B73: 48 8B 4A 18 - mov rcx,[rdx+18] +"FIFA21.exe"+5973B77: 48 8B 42 20 - mov rax,[rdx+20] +"FIFA21.exe"+5973B7B: 4C 8B 01 - mov r8,[rcx] +// ---------- INJECTING HERE ---------- +"FIFA21.exe"+5973B7E: 48 8B 50 38 - mov rdx,[rax+38] +"FIFA21.exe"+5973B82: 48 83 EA 40 - sub rdx,40 +// ---------- DONE INJECTING ---------- +"FIFA21.exe"+5973B86: 49 FF 60 08 - jmp qword ptr [r8+08] +"FIFA21.exe"+5973B8A: CC - int 3 +"FIFA21.exe"+5973B8B: CC - int 3 +"FIFA21.exe"+5973B8C: CC - int 3 +"FIFA21.exe"+5973B8D: CC - int 3 +"FIFA21.exe"+5973B8E: CC - int 3 +"FIFA21.exe"+5973B8F: CC - int 3 +"FIFA21.exe"+5973B90: 48 8B 41 18 - mov rax,[rcx+18] +"FIFA21.exe"+5973B94: 48 8B D1 - mov rdx,rcx +"FIFA21.exe"+5973B97: C7 40 08 00 00 00 00 - mov [rax+08],00000000 +} + + + + 1460 + "Wage" + 4 Bytes +
ContractNeg_Wage
+
+ + 1461 + "Contract Length" + 12: '1 Year' +24: '2 Years' +36: '3 Years' +48: '4 Years' +60: '5 Years' +72: '6 Years' + + 4 Bytes +
ContractNeg_Length
+
+ + 1462 + "Release Clause" + 4 Bytes +
ContractNeg_ReleaseClause
+
+ + 1463 + "Squad Role" + 1: 'Crucial' +2: 'Important' +3: 'Rotation' +4: 'Sporadic' +5: 'Prospect' + + 4 Bytes +
ContractNeg_Role
+
+ + 1464 + "Signing Bonus" + 4 Bytes +
ContractNeg_SigningBonus
+
+ + 1465 + "Bonus Type" + 0: 'Appearances' +1: 'Clean Sheets' +2: 'Goals scored' + + 4 Bytes +
ContractNeg_BonusType
+
+ + 1466 + "Bonus Type - Count" + 4 Bytes +
ContractNeg_BonusType_Count
+
+ + 1467 + "Bonus Type - Sum" + 4 Bytes +
ContractNeg_BonusType_Sum
+
+
+
+ + 4864 + "Disable negotiation status checks" + + Auto Assembler Script + { +AUTHOR: +- Aranaktu + +GAME VERSION: +- Script should always work with newest version of the game which can be downloaded from Origin. + +RISK LEVEL: +- 0/5 (There is no chance that this script will harm your cm save.) + +DESCRIPTION: + You can renegotiate contract with your player at any time. + Even if your previous negotation has failed or you have recently negotiated a new contract with this player + +HOW TO USE: + 1. Activate script + 2. Start 'Contract Negotiation' with your player. + +VIDEO TUTORIAL: +- NONE +} + + +[ENABLE] +//code from here to '[DISABLE]' will be used to enable the cheat +{$lua} +if syntaxcheck then return end +onScriptActivate() + +INJECT_NegStatusCheck = gCTManager.memory_manager:get_validated_address('NegStatusCheck') +ORG_NegStatusCheck = readBytes(INJECT_NegStatusCheck, 12, true) + +{$asm} + +alloc(newmem_NegStatusCheck, $500, $INJECT_NegStatusCheck) + +label(code_NegStatusCheck) +label(ret_NegStatusCheck) + +newmem_NegStatusCheck: +code_NegStatusCheck: + call qword ptr [rax+00000130] + xor eax, eax + jmp ret_NegStatusCheck + +$INJECT_NegStatusCheck: + jmp newmem_NegStatusCheck + nop +ret_NegStatusCheck: + +[DISABLE] +//code_NegStatusCheck from here till the end of the code_NegStatusCheck will be used to disable the cheat +{$lua} +writeBytes(INJECT_NegStatusCheck, ORG_NegStatusCheck) +{$asm} + +dealloc(newmem_NegStatusCheck) + +{ +// ORIGINAL CODE - INJECTION POINT: "FIFA21.exe"+4873FDE + +"FIFA21.exe"+4873FBA: F3 0F 7F 44 24 30 - movdqu [rsp+30],xmm0 +"FIFA21.exe"+4873FC0: 48 8B 08 - mov rcx,[rax] +"FIFA21.exe"+4873FC3: 4C 8B 41 08 - mov r8,[rcx+08] +"FIFA21.exe"+4873FC7: 48 8D 54 24 30 - lea rdx,[rsp+30] +"FIFA21.exe"+4873FCC: 48 8B C8 - mov rcx,rax +"FIFA21.exe"+4873FCF: 41 FF D0 - call r8 +"FIFA21.exe"+4873FD2: 49 8B 07 - mov rax,[r15] +"FIFA21.exe"+4873FD5: 44 8B C5 - mov r8d,ebp +"FIFA21.exe"+4873FD8: 41 8B D6 - mov edx,r14d +"FIFA21.exe"+4873FDB: 49 8B CF - mov rcx,r15 +// ---------- INJECTING HERE ---------- +"FIFA21.exe"+4873FDE: FF 90 30 01 00 00 - call qword ptr [rax+00000130] +// ---------- DONE INJECTING ---------- +"FIFA21.exe"+4873FE4: 89 47 18 - mov [rdi+18],eax +"FIFA21.exe"+4873FE7: 85 C0 - test eax,eax +"FIFA21.exe"+4873FE9: 75 72 - jne FIFA21.exe+487405D +"FIFA21.exe"+4873FEB: 49 8B 07 - mov rax,[r15] +"FIFA21.exe"+4873FEE: 89 6C 24 20 - mov [rsp+20],ebp +"FIFA21.exe"+4873FF2: 44 8B CD - mov r9d,ebp +"FIFA21.exe"+4873FF5: 45 8B C6 - mov r8d,r14d +"FIFA21.exe"+4873FF8: 33 D2 - xor edx,edx +"FIFA21.exe"+4873FFA: 49 8B CF - mov rcx,r15 +"FIFA21.exe"+4873FFD: FF 90 D0 01 00 00 - call qword ptr [rax+000001D0] +}
@@ -25009,210 +25526,245 @@ bAwayTeam_Tired: 4460 "PlayerID 1" + 4 Bytes
arrNeverTiredPlayerIDs
4466 "PlayerID 2" + 4 Bytes
arrNeverTiredPlayerIDs+4
4465 "PlayerID 3" + 4 Bytes
arrNeverTiredPlayerIDs+8
4464 "PlayerID 4" + 4 Bytes
arrNeverTiredPlayerIDs+C
4463 "PlayerID 5" + 4 Bytes
arrNeverTiredPlayerIDs+10
4462 "PlayerID 6" + 4 Bytes
arrNeverTiredPlayerIDs+14
4472 "PlayerID 7" + 4 Bytes
arrNeverTiredPlayerIDs+1C
4473 "PlayerID 8" + 4 Bytes
arrNeverTiredPlayerIDs+20
4474 "PlayerID 9" + 4 Bytes
arrNeverTiredPlayerIDs+24
4475 "PlayerID 10" + 4 Bytes
arrNeverTiredPlayerIDs+28
4476 "PlayerID 11" + 4 Bytes
arrNeverTiredPlayerIDs+2C
4467 "PlayerID 12" + 4 Bytes
arrNeverTiredPlayerIDs+30
4468 "PlayerID 13" + 4 Bytes
arrNeverTiredPlayerIDs+34
4469 "PlayerID 14" + 4 Bytes
arrNeverTiredPlayerIDs+38
4470 "PlayerID 15" + 4 Bytes
arrNeverTiredPlayerIDs+3C
4471 "PlayerID 16" + 4 Bytes
arrNeverTiredPlayerIDs+40
4477 "PlayerID 17" + 4 Bytes
arrNeverTiredPlayerIDs+44
4478 "PlayerID 18" + 4 Bytes
arrNeverTiredPlayerIDs+48
4497 "PlayerID 19" + 4 Bytes
arrNeverTiredPlayerIDs+50
4498 "PlayerID 20" + 4 Bytes
arrNeverTiredPlayerIDs+54
4499 "PlayerID 21" + 4 Bytes
arrNeverTiredPlayerIDs+58
4500 "PlayerID 22" + 4 Bytes
arrNeverTiredPlayerIDs+5C
4501 "PlayerID 23" + 4 Bytes
arrNeverTiredPlayerIDs+60
4502 "PlayerID 24" + 4 Bytes
arrNeverTiredPlayerIDs+64
4503 "PlayerID 25" + 4 Bytes
arrNeverTiredPlayerIDs+6C
4504 "PlayerID 26" + 4 Bytes
arrNeverTiredPlayerIDs+70
4505 "PlayerID 27" + 4 Bytes
arrNeverTiredPlayerIDs+74
4506 "PlayerID 28" + 4 Bytes
arrNeverTiredPlayerIDs+78
4507 "PlayerID 29" + 4 Bytes
arrNeverTiredPlayerIDs+7C
4508 "PlayerID 30" + 4 Bytes
arrNeverTiredPlayerIDs+80
4509 "PlayerID 31" + 4 Bytes
arrNeverTiredPlayerIDs+84
4510 "PlayerID 32" + 4 Bytes
arrNeverTiredPlayerIDs+88
4511 "PlayerID 33" + 4 Bytes
arrNeverTiredPlayerIDs+8C
4512 "PlayerID 34" + 4 Bytes
arrNeverTiredPlayerIDs+90
4513 "PlayerID 35" + 4 Bytes
arrNeverTiredPlayerIDs+94
@@ -25658,7 +26210,7 @@ dealloc(newmem_disable_pgm) pScriptsBase -
13FFF0000
+
13FF60000
arrNeverTiredPlayerIDs @@ -25666,7 +26218,7 @@ dealloc(newmem_disable_pgm) funcGenReport -
13FFF0030
+
13FF60030
bNewReport @@ -25678,15 +26230,19 @@ dealloc(newmem_disable_pgm) pScoutMgr -
13FFF0020
+
13FF60020
pCareerModeSmth -
13FFF0010
+
13FF60010
magic_fldtype_real -
13FFF0040
+
13FF60040
+
+ + arr_NewTransfers +
13FF40000
-- Hello! diff --git a/source/lua/GUI/forms/playerseditorform/manager.lua b/source/lua/GUI/forms/playerseditorform/manager.lua index 38be141..f5a9bc5 100644 --- a/source/lua/GUI/forms/playerseditorform/manager.lua +++ b/source/lua/GUI/forms/playerseditorform/manager.lua @@ -35,69 +35,6 @@ function thisFormManager:new(o) return o; end -function thisFormManager:find_player_club_team_record(playerid) - if type(playerid) == 'string' then - playerid = tonumber(playerid) - end - - -- - 78, International - -- - 2136, International Women - -- - 76, Rest of World - -- - 383, Create Player League - local invalid_leagues = { - 76, 78, 2136, 383 - } - - local arr_flds = { - { - name = "playerid", - expr = "eq", - values = {playerid} - } - } - - local addr = self.game_db_manager:find_record_addr( - "teamplayerlinks", arr_flds - ) - - if #addr <= 0 then - self.logger:warning(string.format("No teams for playerid: %d", playerid)) - return 0 - end - - local fnIsLeagueValid = function(invalid_leagues, leagueid) - for j=1, #invalid_leagues do - local invalid_leagueid = invalid_leagues[j] - if invalid_leagueid == leagueid then return false end - end - return true - end - - for i=1, #addr do - local found_addr = addr[i] - local teamid = self.game_db_manager:get_table_record_field_value(found_addr, "teamplayerlinks", "teamid") - local arr_flds_2 = { - { - name = "teamid", - expr = "eq", - values = {teamid} - } - } - local found_addr2 = self.game_db_manager:find_record_addr( - "leagueteamlinks", arr_flds_2, 1 - )[1] - local leagueid = self.game_db_manager:get_table_record_field_value(found_addr2, "leagueteamlinks", "leagueid") - if fnIsLeagueValid(invalid_leagues, leagueid) then - self.logger:debug(string.format("found: %X, teamid: %d, leagueid: %d", found_addr, teamid, leagueid)) - writeQword("pTeamplayerlinksTableCurrentRecord", found_addr) - return found_addr - end - end - - self.logger:warning(string.format("No club teams for playerid: %d", playerid)) - return 0 -end - function thisFormManager:update_total_stats() local sum = 0 local attr_panel = self.frm.AttributesPanel diff --git a/source/lua/consts.lua b/source/lua/consts.lua index 6f517d9..31e32cc 100644 --- a/source/lua/consts.lua +++ b/source/lua/consts.lua @@ -97,10 +97,17 @@ AOB_PATTERNS = { YARemoveMinAgeRequirement = '89 43 40 85 C0', CustomManagerEditable = 'C7 45 74 0F 27 00 00', CustomTransfers = '84 C0 48 8B 01 74 ?? FF 50 10 41', - AltTab = '48 83 EC 48 48 83 3D ?? ?? ?? ?? ?? 74' + NegStatusCheck = 'FF 90 30 01 00 00 89 47 18', + ContractNeg = '48 8B 50 38 48 83 EA 40 49 FF 60 08 CC CC CC CC CC', + AltTab = '48 83 EC 48 48 83 3D ?? ?? ?? ?? ?? 74', - -- Not used anymore - -- BASE_FORM_MORALE_RLC = '48 89 35 ?? ?? ?? ?? 48 89 3D ?? ?? ?? ?? 48 89 0D ?? ?? ?? ??' + -- FootballCompEng_Win64_retail.dll + FootballCompEng = { + MODULE_NAME = 'FootballCompEng_Win64_retail.dll', + AOBS = { + SimMatchSettings = '45 8B 91 A4 00 00 00' + } + } } DEFAULT_CFG = {