Skip to content

Commit

Permalink
bugfix update
Browse files Browse the repository at this point in the history
  • Loading branch information
ParanormalVibe committed Oct 27, 2019
1 parent 83c27fd commit 80384b8
Show file tree
Hide file tree
Showing 27 changed files with 98 additions and 133 deletions.
9 changes: 0 additions & 9 deletions .gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

4 changes: 2 additions & 2 deletions src/core/game_structures.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <sstream>
#include <random>
#include <functional>
#include <main.h>
#include "main.h"
#include <climits>

struct RegionCoordinates
Expand Down Expand Up @@ -456,4 +456,4 @@ struct Player : public Entity
if (for_display) stat_increase += GetArtifactTypeBaseStats(artifact_type);
return stat_increase;
}
};
};
6 changes: 3 additions & 3 deletions src/core/hook/hook.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

extern "C"
{
#include <xed/include/xed-interface.h>
#include "../../../lib/xed/include/xed-interface.h"
}

#include <memory/memory_helper.h>
#include "../memory/memory_helper.h"

#define MAX_INSTRUCTION_LENGTH 15
#define JMP_LENGTH 6
Expand Down Expand Up @@ -156,4 +156,4 @@ class Hook

installed_hooks.erase(std::find(installed_hooks.begin(), installed_hooks.end(), this));
}
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookGetAttackPower : public Hook
{
Expand All @@ -21,11 +21,10 @@ class HookGetAttackPower : public Hook

//Patch base value back
MemoryHelper::PatchMemory<float>(base_damage, 5.f);

return ret;
}

public:
HookGetAttackPower() : Hook(MemoryHelper::GetCubeBase() + 0x4FA70, (void*)GetAttackPower, hook)
{}
};
};
6 changes: 3 additions & 3 deletions src/core/hook/hooks/artifact/base_stats/hook_get_hit_points.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookGetMaxHitPoints : public Hook
{
Expand All @@ -18,4 +18,4 @@ class HookGetMaxHitPoints : public Hook
public:
HookGetMaxHitPoints() : Hook(MemoryHelper::GetCubeBase() + 0x5FAC0, (void*)GetMaxHitPoints, hook)
{}
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookGetPlayerArmor : public Hook
{
Expand All @@ -14,11 +14,10 @@ class HookGetPlayerArmor : public Hook

//Just nerf base armor a bit here
ret *= 0.9;

return ret + ((Player*)entity)->GetIncreasedArtifactStats(ARMOR);
}

public:
HookGetPlayerArmor() : Hook(MemoryHelper::GetCubeBase() + 0x4F080, (void*)GetArmor, hook)
{}
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookGetPlayerCrit : public Hook
{
Expand All @@ -18,4 +18,4 @@ class HookGetPlayerCrit : public Hook
public:
HookGetPlayerCrit() : Hook(MemoryHelper::GetCubeBase() + 0x50D30, (void*)GetPlayerCrit, hook)
{}
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookGetPlayerHaste : public Hook
{
Expand All @@ -11,11 +11,10 @@ class HookGetPlayerHaste : public Hook
{
auto ret = hook->Trampoline(GetHaste)(entity);
if (entity->GetEntityType() != PLAYER) return ret;

return ret + ((Player*)entity)->GetIncreasedArtifactStats(HASTE) / 100.f;
}

public:
HookGetPlayerHaste() : Hook(MemoryHelper::GetCubeBase() + 0x66460, (void*)GetHaste, hook)
{}
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookGetPlayerRegeneration : public Hook
{
Expand All @@ -18,4 +18,4 @@ class HookGetPlayerRegeneration : public Hook
public:
HookGetPlayerRegeneration() : Hook(MemoryHelper::GetCubeBase() + 0x647B0, (void*)GetRegeneration, hook)
{}
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookGetPlayerResistance : public Hook
{
Expand All @@ -18,4 +18,4 @@ class HookGetPlayerResistance : public Hook
public:
HookGetPlayerResistance() : Hook(MemoryHelper::GetCubeBase() + 0x64D90, (void*)GetResistance, hook)
{}
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookGetSpellPower : public Hook
{
Expand All @@ -28,4 +28,4 @@ class HookGetSpellPower : public Hook
public:
HookGetSpellPower() : Hook(MemoryHelper::GetCubeBase() + 0x65C70, (void*)GetSpellPower, hook)
{}
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"
#include "hook_concat_artifact_suffix.h"

class Hookroundf : public Hook
Expand All @@ -18,4 +18,4 @@ class Hookroundf : public Hook
public:
Hookroundf() : Hook(MemoryHelper::GetCubeBase() + 0x275760, (void*)cube_roundf, hook)
{}
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookConcatArtifactSuffix : public Hook
{
Expand Down Expand Up @@ -36,4 +36,4 @@ class HookConcatArtifactSuffix : public Hook
{}

static inline int artifact_index;
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../../hook.h"
#include "../../../../game_structures.h"

class HookRoundArtifactThing : public Hook
{
Expand All @@ -21,4 +21,4 @@ class HookRoundArtifactThing : public Hook
public:
HookRoundArtifactThing() : Hook(MemoryHelper::GetCubeBase() + 0xA2740, (void*)RoundArtifactThing, hook)
{}
};
};
7 changes: 3 additions & 4 deletions src/core/hook/hooks/artifact/hook_set_artifact_stats.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../hook.h"
#include "../../../game_structures.h"

class HookSetArtifactStats : public Hook
{
Expand All @@ -12,11 +12,10 @@ class HookSetArtifactStats : public Hook
auto ret = hook->Trampoline(SetArtifactStats)(player);

Main::GetInstance().GetLocalPlayer()->UpdateNetworkedArtifactStats();

return ret;
}

public:
HookSetArtifactStats() : Hook(MemoryHelper::GetCubeBase() + 0x66850, (void*)SetArtifactStats, hook)
{}
};
};
4 changes: 2 additions & 2 deletions src/core/hook/hooks/command/hook_send_chat.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <hook/hook.h>
#include "../../hook.h"

class ChatString
{
Expand Down Expand Up @@ -95,4 +95,4 @@ class HookSendChat : public Hook
public:
HookSendChat() : Hook(MemoryHelper::GetCubeBase() + 0x26B670, (void*)SendChatHook, hook)
{}
};
};
7 changes: 3 additions & 4 deletions src/core/hook/hooks/item_generation/hook_create_armor.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../hook.h"
#include "../../../game_structures.h"

class HookCreateArmor : public Hook
{
Expand All @@ -14,11 +14,10 @@ class HookCreateArmor : public Hook
//Check the return address to avoid lowering rates for shop items
auto create_shop_offer_armor_address = (void*)(MemoryHelper::GetCubeBase() + 0x2AC7F3);
item->ModifyRarity(__builtin_return_address(0) == create_shop_offer_armor_address);

return item;
}

public:
HookCreateArmor() : Hook(MemoryHelper::GetCubeBase() + 0x2D0680, (void*)CreateArmor, hook)
{}
};
};
6 changes: 3 additions & 3 deletions src/core/hook/hooks/item_generation/hook_create_weapon.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../hook.h"
#include "../../../game_structures.h"

class HookCreateWeapon : public Hook
{
Expand All @@ -21,4 +21,4 @@ class HookCreateWeapon : public Hook
public:
HookCreateWeapon() : Hook(MemoryHelper::GetCubeBase() + 0x2D15D0, (void*)CreateWeapon, hook)
{}
};
};
7 changes: 3 additions & 4 deletions src/core/hook/hooks/pvp/hook_can_attack_entity.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../hook.h"
#include "../../../game_structures.h"

class HookIsEnemy : public Hook
{
Expand All @@ -13,11 +13,10 @@ class HookIsEnemy : public Hook
{
return Main::GetInstance().CanPvP();
}

return hook->Trampoline(IsEntityEnemy)(entity_1, entity_2);
}

public:
HookIsEnemy() : Hook(MemoryHelper::GetCubeBase() + 0x50550, (void*)IsEntityEnemy, hook)
{}
};
};
6 changes: 3 additions & 3 deletions src/core/hook/hooks/scaling/hook_get_item_crit.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <hook/hook.h>
#include <game_structures.h>
#include "../../hook.h"
#include "../../../game_structures.h"

class HookGetItemCrit : public Hook
{
Expand All @@ -21,4 +21,4 @@ class HookGetItemCrit : public Hook
public:
HookGetItemCrit() : Hook(MemoryHelper::GetCubeBase() + 0x1090F0, (void*)GetItemCrit, hook)
{}
};
};
Loading

0 comments on commit 80384b8

Please sign in to comment.