This repository has been archived by the owner on Feb 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from goodwinxp/dev
Few changes
- Loading branch information
Showing
15 changed files
with
1,277 additions
and
5 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#pragma once | ||
|
||
#include "../../Common/Interfaces/ModuleInterface.h" | ||
#include "../../Common/Helpers/ModuleHook.hpp" | ||
|
||
#include <ATF/CPlayerInfo.hpp> | ||
#include <ATF/CAttackInfo.hpp> | ||
#include <ATF/CPlayerAttackInfo.hpp> | ||
|
||
namespace GameServer | ||
{ | ||
namespace Addon | ||
{ | ||
class CAccuracyEffect | ||
: public Yorozuya::Module::IModule | ||
, CModuleHook | ||
{ | ||
public: | ||
CAccuracyEffect() { }; | ||
|
||
virtual void load() override; | ||
|
||
virtual void unload() override; | ||
|
||
virtual Yorozuya::Module::ModuleName_t get_name() override; | ||
|
||
virtual void configure(const rapidjson::Value& nodeConfig) override; | ||
|
||
private: | ||
enum class eHitType | ||
{ | ||
standart, | ||
one_to_one, | ||
gen | ||
}; | ||
static bool m_bActivated; | ||
static eHitType m_eHitRand; | ||
|
||
private: | ||
inline static float CalcBaseAccuration( | ||
ATF::CPlayer* pPlayer, ATF::CCharacter* pDst); | ||
|
||
inline static float CalcBaseAccurationRand( | ||
ATF::CPlayer* pPlayer, ATF::CCharacter* pDst); | ||
|
||
inline static float CalcBaseAccurationRandGen( | ||
ATF::CPlayer* pPlayer, ATF::CCharacter* pDst); | ||
|
||
inline static float CalcBaseAccurationOneToOne( | ||
ATF::CPlayer* pPlayer, ATF::CCharacter* pDst); | ||
private: | ||
inline static bool Hit(int nDiff); | ||
|
||
inline static bool HitRand(int nDiff); | ||
|
||
inline static bool HitRandGen(int nDiff); | ||
|
||
inline static bool HitOneToOne(int nDiff); | ||
|
||
private: | ||
static void WINAPIV apply_normal_item_std_effect( | ||
ATF::CPlayer* pObj, | ||
int nEffCode, | ||
float fVal, | ||
bool bEquip, | ||
ATF::Info::CPlayerapply_normal_item_std_effect1397_ptr next); | ||
|
||
static void WINAPIV apply_have_item_std_effect( | ||
ATF::CPlayer* pObj, | ||
int nEffCode, | ||
float fVal, | ||
bool bAdd, | ||
int nDiffCnt, | ||
ATF::Info::CPlayerapply_have_item_std_effect1395_ptr next); | ||
|
||
static void WINAPIV AttackForce( | ||
ATF::CAttack* pObj, | ||
ATF::_attack_param* pParam, | ||
bool bUseEffBullet, | ||
ATF::Info::CAttackAttackForce4_ptr next); | ||
|
||
static void WINAPIV AttackSkill( | ||
ATF::CPlayerAttack* pObj, | ||
ATF::_attack_param* pParam, | ||
bool bUseEffBullet, | ||
ATF::Info::CPlayerAttackAttackSkill2_ptr next); | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="ReleaseDebug|x64"> | ||
<Configuration>ReleaseDebug</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<VCProjectVersion>15.0</VCProjectVersion> | ||
<ProjectGuid>{7db14895-df17-4e19-a0a5-2d2ef33fe89c}</ProjectGuid> | ||
<Keyword>Win32Proj</Keyword> | ||
<RootNamespace>AccuracyEffect</RootNamespace> | ||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion> | ||
<ProjectName>AccuracyEffect</ProjectName> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
<ConfigurationType>DynamicLibrary</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<PlatformToolset>v141</PlatformToolset> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDebug|x64'" Label="Configuration"> | ||
<ConfigurationType>DynamicLibrary</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<PlatformToolset>v141</PlatformToolset> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="ExtensionSettings"> | ||
</ImportGroup> | ||
<ImportGroup Label="Shared"> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDebug|x64'" Label="PropertySheets"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<LinkIncremental>false</LinkIncremental> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDebug|x64'"> | ||
<LinkIncremental>false</LinkIncremental> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<ClCompile> | ||
<PrecompiledHeader>Use</PrecompiledHeader> | ||
<WarningLevel>Level3</WarningLevel> | ||
<Optimization>MaxSpeed</Optimization> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
<SDLCheck> | ||
</SDLCheck> | ||
<PreprocessorDefinitions>NDEBUG;PVPPOTION_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<ConformanceMode>true</ConformanceMode> | ||
<AdditionalIncludeDirectories>$(SolutionDir)\library\ATF\;$(SolutionDir)\library\MinHook\include\;$(SolutionDir)\library\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<CompileAsManaged>false</CompileAsManaged> | ||
<CompileAsWinRT>false</CompileAsWinRT> | ||
<MultiProcessorCompilation>true</MultiProcessorCompilation> | ||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> | ||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
<BufferSecurityCheck>false</BufferSecurityCheck> | ||
<ControlFlowGuard>false</ControlFlowGuard> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
<OptimizeReferences>true</OptimizeReferences> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
<AdditionalLibraryDirectories>$(SolutionDir)\library\MinHook\lib;$(SolutionDir)$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
<AdditionalDependencies>libMinHook-$(PlatformTarget)-$(PlatformToolset)-mt.lib;YorozuyaGSLib.lib;winmm.lib</AdditionalDependencies> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDebug|x64'"> | ||
<ClCompile> | ||
<PrecompiledHeader>Use</PrecompiledHeader> | ||
<WarningLevel>Level3</WarningLevel> | ||
<Optimization>Disabled</Optimization> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
<SDLCheck> | ||
</SDLCheck> | ||
<PreprocessorDefinitions>NDEBUG;PVPPOTION_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<ConformanceMode>true</ConformanceMode> | ||
<AdditionalIncludeDirectories>$(SolutionDir)\library\ATF\;$(SolutionDir)\library\MinHook\include\;$(SolutionDir)\library\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<CompileAsManaged>false</CompileAsManaged> | ||
<CompileAsWinRT>false</CompileAsWinRT> | ||
<MultiProcessorCompilation>true</MultiProcessorCompilation> | ||
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> | ||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
<BufferSecurityCheck>false</BufferSecurityCheck> | ||
<ControlFlowGuard>false</ControlFlowGuard> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
<OptimizeReferences>true</OptimizeReferences> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
<AdditionalLibraryDirectories>$(SolutionDir)\library\MinHook\lib;$(SolutionDir)$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
<AdditionalDependencies>libMinHook-$(PlatformTarget)-$(PlatformToolset)-mt.lib;YorozuyaGSLib.lib;winmm.lib</AdditionalDependencies> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemGroup> | ||
<ClInclude Include="..\..\Common\ETypes.h" /> | ||
<ClInclude Include="..\..\Common\Interfaces\ModuleInterface.h" /> | ||
<ClInclude Include="Common\version.h" /> | ||
<ClInclude Include="AccuracyEffect.h" /> | ||
<ClInclude Include="resource.h" /> | ||
<ClInclude Include="stdafx.h" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="dllmain.cpp" /> | ||
<ClCompile Include="ModuleProxy.cpp" /> | ||
<ClCompile Include="AccuracyEffect.cpp" /> | ||
<ClCompile Include="stdafx.cpp"> | ||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> | ||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDebug|x64'">Create</PrecompiledHeader> | ||
</ClCompile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\library\MinHook\build\VC15\libMinHook.vcxproj"> | ||
<Project>{f142a341-5ee0-442d-a15f-98ae9b48dbae}</Project> | ||
</ProjectReference> | ||
<ProjectReference Include="..\..\YorozuyaGSLib\YorozuyaGSLib.vcxproj"> | ||
<Project>{0e0ea503-b731-3fad-be56-60ac806b69e3}</Project> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ResourceCompile Include="Resource.rc" /> | ||
</ItemGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<Filter Include="Common"> | ||
<UniqueIdentifier>{bcd725c1-9fd2-4e2c-9d6b-7a1262ac2f6b}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Impl"> | ||
<UniqueIdentifier>{498b67b4-48a3-4b54-840f-4255c932d547}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="Main"> | ||
<UniqueIdentifier>{b1777a40-e8cf-452f-ac69-a5c7d2645f60}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="General"> | ||
<UniqueIdentifier>{ae8c2f0e-cd23-47a0-ba92-1accd346f810}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="General\Resource Files"> | ||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> | ||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> | ||
</Filter> | ||
<Filter Include="Common\Interfaces"> | ||
<UniqueIdentifier>{b7eb367d-558b-4cde-9cb0-d038a24aff6b}</UniqueIdentifier> | ||
</Filter> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="stdafx.h"> | ||
<Filter>General</Filter> | ||
</ClInclude> | ||
<ClInclude Include="..\..\Common\Interfaces\ModuleInterface.h"> | ||
<Filter>Common\Interfaces</Filter> | ||
</ClInclude> | ||
<ClInclude Include="..\..\Common\ETypes.h"> | ||
<Filter>Common</Filter> | ||
</ClInclude> | ||
<ClInclude Include="Common\version.h"> | ||
<Filter>Common</Filter> | ||
</ClInclude> | ||
<ClInclude Include="resource.h"> | ||
<Filter>General\Resource Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="AccuracyEffect.h"> | ||
<Filter>Impl</Filter> | ||
</ClInclude> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="stdafx.cpp"> | ||
<Filter>General</Filter> | ||
</ClCompile> | ||
<ClCompile Include="dllmain.cpp"> | ||
<Filter>General</Filter> | ||
</ClCompile> | ||
<ClCompile Include="ModuleProxy.cpp"> | ||
<Filter>Main</Filter> | ||
</ClCompile> | ||
<ClCompile Include="AccuracyEffect.cpp"> | ||
<Filter>Impl</Filter> | ||
</ClCompile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ResourceCompile Include="Resource.rc"> | ||
<Filter>General\Resource Files</Filter> | ||
</ResourceCompile> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
#define STRINGIZE2(s) #s | ||
#define STRINGIZE(s) STRINGIZE2(s) | ||
|
||
#define VERSION_MAJOR 1 | ||
#define VERSION_MINOR 3 | ||
#define VERSION_REVISION 0 | ||
#define VERSION_BUILD 0 | ||
|
||
#define VER_FILE_DESCRIPTION_STR "Addon for server rf online 2232" | ||
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD | ||
#define VER_FILE_VERSION_STR STRINGIZE(VERSION_MAJOR) \ | ||
"." STRINGIZE(VERSION_MINOR) \ | ||
"." STRINGIZE(VERSION_REVISION) \ | ||
"." STRINGIZE(VERSION_BUILD) \ | ||
|
||
#define VER_PRODUCTNAME_STR "AccuracyEffect" | ||
#define VER_PRODUCT_VERSION VER_FILE_VERSION | ||
#define VER_PRODUCT_VERSION_STR VER_FILE_VERSION_STR | ||
#define VER_ORIGINAL_FILENAME_STR VER_PRODUCTNAME_STR ".dll" | ||
#define VER_INTERNAL_NAME_STR VER_ORIGINAL_FILENAME_STR | ||
#define VER_COPYRIGHT_STR "goodwinxp (C) 2017" | ||
|
||
#ifdef _DEBUG | ||
#define VER_VER_DEBUG VS_FF_DEBUG | ||
#else | ||
#define VER_VER_DEBUG 0 | ||
#endif | ||
|
||
#define VER_FILEOS VOS_NT_WINDOWS32 | ||
#define VER_FILEFLAGS VER_VER_DEBUG | ||
#define VER_FILETYPE VFT_APP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "stdafx.h" | ||
|
||
#include "AccuracyEffect.h" | ||
#include "../../Common/Helpers/ModuleProxy.hpp" | ||
#include "../../Common/Interfaces/ModuleInterface.h" | ||
|
||
using namespace GameServer::Addon; | ||
|
||
#define DllExport __declspec(dllexport) | ||
|
||
extern "C" DllExport | ||
Yorozuya::Module::IModule* CreateModule() | ||
{ | ||
return ModuleProxy::CModuleProxy<CAccuracyEffect>::get_instance()->CreateModule(); | ||
} | ||
|
||
extern "C" DllExport | ||
void ReleaseModule(Yorozuya::Module::IModule* pObj) | ||
{ | ||
ModuleProxy::CModuleProxy<CAccuracyEffect>::get_instance()->ReleaseModule(pObj); | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//{{NO_DEPENDENCIES}} | ||
// Microsoft Visual C++ generated include file. | ||
// Used by Resource.rc | ||
|
||
// Next default values for new objects | ||
// | ||
#ifdef APSTUDIO_INVOKED | ||
#ifndef APSTUDIO_READONLY_SYMBOLS | ||
#define _APS_NEXT_RESOURCE_VALUE 101 | ||
#define _APS_NEXT_COMMAND_VALUE 40001 | ||
#define _APS_NEXT_CONTROL_VALUE 1001 | ||
#define _APS_NEXT_SYMED_VALUE 101 | ||
#endif | ||
#endif |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.