Skip to content

Commit

Permalink
steam update
Browse files Browse the repository at this point in the history
  • Loading branch information
ermaccer committed Dec 16, 2022
1 parent 9351db7 commit 8ce20c7
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 135 deletions.
4 changes: 2 additions & 2 deletions MK11Hook/MK11Hook.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions MK11Hook/code/CharacterDefinition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@

void CharacterDefinition::Set(const char* name, int64 loadout, int64 unk)
{
((void(__fastcall*)(CharacterDefinition*, const char*, int64, int64))_addr(0x140598AB0))(this, name, loadout, unk);
((void(__fastcall*)(CharacterDefinition*, const char*, int64, int64))_addr(0x14059C950))(this, name, loadout, unk);
}

void CharacterDefinition::SetLevel(int level)
{
((void(__fastcall*)(CharacterDefinition*, int))_addr(0x140599F80))(this, level);
((void(__fastcall*)(CharacterDefinition*, int))_addr(0x14059DE20))(this, level);
}

void CharacterDefinition::SetAlternatePalette(bool set)
{
((void(__fastcall*)(CharacterDefinition*, int))_addr(0x14059E5E0))(this, set);
((void(__fastcall*)(CharacterDefinition*, int))_addr(0x1405A2480))(this, set);
}

void CharacterDefinition::SetLoadout(int64 loadout)
{
((void(__fastcall*)(CharacterDefinition*, int64))_addr(0x14059A0B0))(this, loadout);
((void(__fastcall*)(CharacterDefinition*, int64))_addr(0x14059DF50))(this, loadout);
}

//void CharacterLoadout::EquipItem(GearItem* item)
Expand Down
20 changes: 10 additions & 10 deletions MK11Hook/code/GameInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

MKScript* GetScript(const char* name)
{
int64 package = ((int64(__fastcall*)(const char*))_addr(0x140941B20))("MainlineManaged.SystemPackages.FightingArt");
int64 package = ((int64(__fastcall*)(const char*))_addr(0x14094A1B0))("MainlineManaged.SystemPackages.FightingArt");
if (package)
{
MKScript* script = ((MKScript*(__fastcall*)(int64, const char*, int,int,int))_addr(0x140EA8830))(package,name,1,1,0);
MKScript* script = ((MKScript*(__fastcall*)(int64, const char*, int,int,int))_addr(0x140EC2190))(package,name,1,1,0);
return script;

}
Expand All @@ -16,7 +16,7 @@ MKScript* GetScript(const char* name)

int64 GetScriptVar(MKScript* script, const char* name)
{
return ((int64(__fastcall*)(MKScript*, const char*, int))_addr(0x14114F750))(script, name, 1);
return ((int64(__fastcall*)(MKScript*, const char*, int))_addr(0x141169AC0))(script, name, 1);
}

FGGameInfo* GetGameInfo()
Expand All @@ -31,31 +31,31 @@ int GetGameState()

void FGGameInfo::SetStage(const char* stage)
{
((void(__thiscall*)(FGGameInfo*, const char*))_addr(0x14059A460))(this, stage);
((void(__thiscall*)(FGGameInfo*, const char*))_addr(0x14059E300))(this, stage);
}

void FGGameInfo::ResetStageInteractables()
{
int64 bgnd_info = *(int64*)(this + 80);

((void(__fastcall*)(int64))_addr(0x14045C5C0))(bgnd_info);
((void(__fastcall*)(int64))_addr(0x14045CB00))(bgnd_info);
((void(__fastcall*)(int64))_addr(0x14045C530))(bgnd_info);
((void(__fastcall*)(int64))_addr(0x140460290))(bgnd_info);
((void(__fastcall*)(int64))_addr(0x1404607D0))(bgnd_info);
((void(__fastcall*)(int64))_addr(0x140460200))(bgnd_info);
}

PlayerInfo* FGGameInfo::GetInfo(PLAYER_NUM plr)
{
return ((PlayerInfo*(__fastcall*)(FGGameInfo*, PLAYER_NUM))_addr(0x14056F8F0))(this, plr);
return ((PlayerInfo*(__fastcall*)(FGGameInfo*, PLAYER_NUM))_addr(0x1405736C0))(this, plr);
}

int MKScript::GetFunctionID(int hash)
{
return ((int(__thiscall*)(MKScript*, int, int))_addr(0x14114C5F0))(this, hash, 0);
return ((int(__thiscall*)(MKScript*, int, int))_addr(0x141166960))(this, hash, 0);
}

int64 MKScript::GetVar(const char* name)
{
return ((int64(__fastcall*)(MKScript*, const char*, int))_addr(0x14114F750))(this, name, 1);
return ((int64(__fastcall*)(MKScript*, const char*, int))_addr(0x141169AC0))(this, name, 1);
}

unsigned int MKScript::GetCurrentFunc()
Expand Down
4 changes: 2 additions & 2 deletions MK11Hook/code/Krypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

MKObject* Krypt::GetKryptPlayer(int value)
{
return ((MKObject*(__fastcall*)(Krypt*, int))_addr(0x140985370))(this, value);
return ((MKObject*(__fastcall*)(Krypt*, int))_addr(0x14098DA20))(this, value);
}

Krypt* GetKrypt()
{
return ((Krypt*(__fastcall*)(int))_addr(0x140985210))(1);
return ((Krypt*(__fastcall*)(int))_addr(0x14098D8C0))(1);
}
26 changes: 13 additions & 13 deletions MK11Hook/code/MKCharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@

void MKCharacter::SetLife(float life)
{
((void(__fastcall*)(MKCharacter*, float))_addr(0x1404C8830))(this, life);
((void(__fastcall*)(MKCharacter*, float))_addr(0x1404CC300))(this, life);
}

void MKCharacter::SetScale(FVector * scale)
{
((void(__fastcall*)(MKCharacter*, FVector*))_addr(0x1411608B0))(this, scale);
((void(__fastcall*)(MKCharacter*, FVector*))_addr(0x14117AC20))(this, scale);
}

void MKCharacter::SetSpeed(float speed)
{
((void(__fastcall*)(MKCharacter*, float))_addr(0x1404C4510))(this, speed);
((void(__fastcall*)(MKCharacter*, float))_addr(0x1404C7FE0))(this, speed);
}


void MKCharacter::SetEasyKrushingBlows(bool enable)
{
((void(__fastcall*)(MKCharacter*, int, int))_addr(0x1404C7970))(this, enable, 1);
((void(__fastcall*)(MKCharacter*, int, int))_addr(0x1404CB440))(this, enable, 1);
}

void MKCharacter::SetInfiniteKrushingBlows(bool enable)
{
((void(__fastcall*)(MKCharacter*, int, int))_addr(0x1404CABD0))(this, enable, 1);
((void(__fastcall*)(MKCharacter*, int, int))_addr(0x1404CE6A0))(this, enable, 1);
}

void MKCharacter::SetFastUppercutRecovery(bool enable)
{
((void(__fastcall*)(MKCharacter*, int, int))_addr(0x1404C9770))(this, enable, 1);
((void(__fastcall*)(MKCharacter*, int, int))_addr(0x1404CD240))(this, enable, 1);
}

int MKCharacter::GetAbility()
Expand All @@ -54,7 +54,7 @@ void MKCharacter::SetAbility(unsigned int id)

void MKCharacter::SetCombos(bool enable)
{
((void(__fastcall*)(MKCharacter*, int, int))_addr(0x1404C7300))(this, enable, 1);
((void(__fastcall*)(MKCharacter*, int, int))_addr(0x1404CADD0))(this, enable, 1);
}

float MKCharacter::GetLife()
Expand All @@ -69,35 +69,35 @@ void MKCharacter::ClearAbilities()

void MKCharacter::ActivateHeadTracking()
{
((void(__fastcall*)(MKCharacter*, float))_addr(0x140DC05C0))(this, 0.5);
((void(__fastcall*)(MKCharacter*, float))_addr(0x140DD9030))(this, 0.5);
}

void MKCharacter::KillHeadTracking()
{
((void(__fastcall*)(MKCharacter*, float))_addr(0x140DC0590))(this, 0.5);
((void(__fastcall*)(MKCharacter*, float))_addr(0x140DD9000))(this, 0.5);
}

void MKCharacter::SetBoneSize(const char * name, float size)
{
FName fname(name, FNAME_Add, 1);
((void(__fastcall*)(int64, FName*, float))_addr(0x141A30590))(*(int64*)((int64)this + 0x250), &fname, size);
((void(__fastcall*)(int64, FName*, float))_addr(0x141A39B30))(*(int64*)((int64)this + 0x250), &fname, size);
}

void MKCharacter::GetBonePos(const char * name, FVector * pos)
{
FName fname(name, FNAME_Add, 1);
((void(__fastcall*)(MKCharacter*, FName, FVector*))_addr(0x140DB9BF0))(this, fname, pos);
((void(__fastcall*)(MKCharacter*, FName, FVector*))_addr(0x140DD2660))(this, fname, pos);
}

void MKCharacter::GetBoneRot(const char * name, FRotator * rot)
{
FName fname(name, FNAME_Add, 1);
((void(__fastcall*)(MKCharacter*, FName, FRotator*))_addr(0x1404A5550))(this, fname, rot);
((void(__fastcall*)(MKCharacter*, FName, FRotator*))_addr(0x1404A9220))(this, fname, rot);
}

void MKCharacter::ExecuteScript(MKScript* script, int function)
{
((void(__thiscall*)(MKCharacter*, MKScript*, int, int))_addr(0x1404D1CC0))(this, script, function, 1);
((void(__thiscall*)(MKCharacter*, MKScript*, int, int))_addr(0x1404D5790))(this, script, function, 1);
}

MKScript* MKCharacter::GetMyScript()
Expand Down
38 changes: 6 additions & 32 deletions MK11Hook/code/MKModifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,25 @@

TagAssistModifier::TagAssistModifier(const char * character)
{
((void(__fastcall*)(BaseModifier*,const char*, int))_addr(0x140545F90))(this, character, 0);
((void(__fastcall*)(BaseModifier*,const char*, int))_addr(0x140549D20))(this, character, 0);
}

void TagAssistModifier::Activate(PlayerInfo* info)
{
//140558320
((void(__fastcall*)(BaseModifier*, PlayerInfo*))_addr(0x140558AE0))(this, info);
((void(__fastcall*)(BaseModifier*, PlayerInfo*))_addr(0x14055C8B0))(this, info);
}

TagAssistModifierObject * TagAssistModifier::CreateObject()
{
return ((TagAssistModifierObject*(__fastcall*)(BaseModifier*))_addr(0x140560BE0))(this);
return ((TagAssistModifierObject*(__fastcall*)(BaseModifier*))_addr(0x1405649B0))(this);
}

void MKModifier::ActivateModifier(BaseModifier * modifier, MKCharacter * obj)
{
((void(__fastcall*)(MKModifier*, BaseModifier*, MKCharacter*))_addr(0x140B85ED0))(this, modifier, obj);
((void(__fastcall*)(MKModifier*, BaseModifier*, MKCharacter*))_addr(0x140B9C5B0))(this, modifier, obj);
}

void TagAssistModifierObject::Activate(MKCharacter* obj)
{
((void(__fastcall*)(TagAssistModifierObject*, MKCharacter*))_addr(0x140558960))(this, obj);
}

Modifier::Modifier(const char* character,int a3, int a4, char* a5)
{
((void(__fastcall*)(BaseModifier*, const char*, int, int, char*))_addr(0x140542610))(this, character, a3, a4, a5);
}

void Modifier::Activate(MKCharacter* who)
{
((void(__fastcall*)(BaseModifier*, MKCharacter*))_addr(0x1405586E0))(this, who);
}

ModifierAssist::ModifierAssist(const char* name, int a3, int a4, char* a5)
{
((void(__fastcall*)(ModifierAssist*, const char*, int, int, char*))_addr(0x140542230))(this, name, a3, a4, a5);
}

ModifierAssistObject* ModifierAssist::CreateObject()
{
return ((ModifierAssistObject* (__fastcall*)(BaseModifier*))_addr(0x1405608F0))(this);
}

void ModifierAssistObject::Activate(MKCharacter* obj)
{
((void(__fastcall*)(ModifierAssistObject*,MKCharacter*))_addr(0x1405581A0))(this, obj);
}
((void(__fastcall*)(TagAssistModifierObject*, MKCharacter*))_addr(0x14055C730))(this, obj);
}
19 changes: 0 additions & 19 deletions MK11Hook/code/MKModifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,6 @@ class TagAssistModifier : public BaseModifier {
TagAssistModifierObject* CreateObject();
};


class Modifier : public BaseModifier {
public:
Modifier(const char* character, int a3, int a4, char* a5);
void Activate(MKCharacter* who);
};

class ModifierAssistObject {
public:
void Activate(MKCharacter* obj);
};


class ModifierAssist : public BaseModifier {
public:
ModifierAssist(const char* name, int a3, int a4, char* a5);
ModifierAssistObject* CreateObject();
};

class MKModifier {
public:
void ActivateModifier(BaseModifier* modifier, MKCharacter* obj);
Expand Down
4 changes: 2 additions & 2 deletions MK11Hook/code/MKObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

void MKObject::SetPos(FVector* pos)
{
((void(__fastcall*)(MKObject*, FVector*))_addr(0x14115E910))(this, pos);
((void(__fastcall*)(MKObject*, FVector*))_addr(0x141178C80))(this, pos);
}

void MKObject::GetPos(FVector* dest)
{
((void(__fastcall*)(MKObject*, FVector*))_addr(0x14114F8A0))(this, dest);
((void(__fastcall*)(MKObject*, FVector*))_addr(0x141169C10))(this, dest);
}
8 changes: 4 additions & 4 deletions MK11Hook/code/PlayerInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

void PlayerInfo::SetMeter(eMeterValues type, float value)
{
((void(__fastcall*)(PlayerInfo*, int, float))_addr(0x1405FABE0))(this, type, value);
((void(__fastcall*)(PlayerInfo*, int, float))_addr(0x1405FEE50))(this, type, value);
}

void PlayerInfo::SetDamageMult(float value)
Expand All @@ -18,7 +18,7 @@ void PlayerInfo::SetDamageMult(float value)

void PlayerInfo::RefreshMeter(bool value)
{
((void(__fastcall*)(PlayerInfo*, bool))_addr(0x140602930))(this,value);
((void(__fastcall*)(PlayerInfo*, bool))_addr(0x140606BA0))(this,value);
}

float PlayerInfo::GetMeter(eMeterValues type)
Expand All @@ -34,10 +34,10 @@ HitCounter PlayerInfo::GetHits()

AIDrone* PlayerInfo::GetDrone()
{
return ((AIDrone*(__fastcall*)(PlayerInfo*))_addr(0x1405E4C70))(this);
return ((AIDrone*(__fastcall*)(PlayerInfo*))_addr(0x1405E8FE0))(this);
}

void AIDrone::Set(const char* script, int unk)
{
((void(__fastcall*)(AIDrone*, const char*, int))_addr(0x14042AA70))(this, script, unk);
((void(__fastcall*)(AIDrone*, const char*, int))_addr(0x14042E640))(this, script, unk);
}
Loading

0 comments on commit 8ce20c7

Please sign in to comment.