diff options
77 files changed, 2210 insertions, 317 deletions
diff --git a/Hercules-10.sln b/Hercules-10.sln index b663ad491..dc6bacfbc 100644 --- a/Hercules-10.sln +++ b/Hercules-10.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +# Visual C++ Express 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "vcproj-10\char-server.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server", "vcproj-10\login-server.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" @@ -10,7 +10,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-10\mapca EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-10\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking", "vcproj-10\plugin-HPMHooking.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_map", "vcproj-10\plugin-HPMHooking_map.vcxproj", "{7ED92B9F-95E8-49B8-9D4F-C4C9BFDE0B22}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_char", "vcproj-10\plugin-HPMHooking_char.vcxproj", "{337F99A2-528C-473C-97F0-BF202F197061}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_login", "vcproj-10\plugin-HPMHooking_login.vcxproj", "{B7B66F36-2EE9-4F16-929A-5E4A64492DAE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -36,8 +40,18 @@ Global {D356871D-58E1-450B-967A-E7E9646175AF}.Release|Win32.Build.0 = Release|Win32 {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.ActiveCfg = Debug|Win32 {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32 - {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32 + {7ED92B9F-95E8-49B8-9D4F-C4C9BFDE0B22}.Debug|Win32.ActiveCfg = Debug|Win32 + {7ED92B9F-95E8-49B8-9D4F-C4C9BFDE0B22}.Debug|Win32.Build.0 = Debug|Win32 + {7ED92B9F-95E8-49B8-9D4F-C4C9BFDE0B22}.Release|Win32.ActiveCfg = Release|Win32 + {7ED92B9F-95E8-49B8-9D4F-C4C9BFDE0B22}.Release|Win32.Build.0 = Release|Win32 + {337F99A2-528C-473C-97F0-BF202F197061}.Debug|Win32.ActiveCfg = Debug|Win32 + {337F99A2-528C-473C-97F0-BF202F197061}.Debug|Win32.Build.0 = Debug|Win32 + {337F99A2-528C-473C-97F0-BF202F197061}.Release|Win32.ActiveCfg = Release|Win32 + {337F99A2-528C-473C-97F0-BF202F197061}.Release|Win32.Build.0 = Release|Win32 + {B7B66F36-2EE9-4F16-929A-5E4A64492DAE}.Debug|Win32.ActiveCfg = Debug|Win32 + {B7B66F36-2EE9-4F16-929A-5E4A64492DAE}.Debug|Win32.Build.0 = Debug|Win32 + {B7B66F36-2EE9-4F16-929A-5E4A64492DAE}.Release|Win32.ActiveCfg = Release|Win32 + {B7B66F36-2EE9-4F16-929A-5E4A64492DAE}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Hercules-11.sln b/Hercules-11.sln index b395132be..cc5aad477 100644 --- a/Hercules-11.sln +++ b/Hercules-11.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio Express 2012 for Windows Desktop Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "vcproj-11\char-server.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server", "vcproj-11\login-server.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}" @@ -10,7 +10,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-11\mapca EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-11\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking", "vcproj-11\plugin-HPMHooking.vcxproj", "{745D4A8C-6A68-4721-A43A-D81BF59860A1}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_map", "vcproj-11\plugin-HPMHooking_map.vcxproj", "{745D4A8C-6A68-4721-A43A-D81BF59860A1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_char", "vcproj-11\plugin-HPMHooking_char.vcxproj", "{ACEB1E80-4EA2-4193-AA7C-624B6C5664BA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_login", "vcproj-11\plugin-HPMHooking_login.vcxproj", "{93DB46CC-FC44-4E43-820A-63DC7318F413}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -42,6 +46,14 @@ Global {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Debug|Win32.Build.0 = Debug|Win32 {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Release|Win32.ActiveCfg = Release|Win32 {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Release|Win32.Build.0 = Release|Win32 + {ACEB1E80-4EA2-4193-AA7C-624B6C5664BA}.Debug|Win32.ActiveCfg = Debug|Win32 + {ACEB1E80-4EA2-4193-AA7C-624B6C5664BA}.Debug|Win32.Build.0 = Debug|Win32 + {ACEB1E80-4EA2-4193-AA7C-624B6C5664BA}.Release|Win32.ActiveCfg = Release|Win32 + {ACEB1E80-4EA2-4193-AA7C-624B6C5664BA}.Release|Win32.Build.0 = Release|Win32 + {93DB46CC-FC44-4E43-820A-63DC7318F413}.Debug|Win32.ActiveCfg = Debug|Win32 + {93DB46CC-FC44-4E43-820A-63DC7318F413}.Debug|Win32.Build.0 = Debug|Win32 + {93DB46CC-FC44-4E43-820A-63DC7318F413}.Release|Win32.ActiveCfg = Release|Win32 + {93DB46CC-FC44-4E43-820A-63DC7318F413}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Hercules-12.sln b/Hercules-12.sln index 7cb72efd7..ab0df4e07 100644 --- a/Hercules-12.sln +++ b/Hercules-12.sln @@ -1,6 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2013 for Windows Desktop +VisualStudioVersion = 12.0.30723.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "vcproj-12\char-server.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}" EndProject @@ -12,7 +13,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server", "vcproj-12\map EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-12\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking", "vcproj-12\plugin-HPMHooking.vcxproj", "{745D4A8C-6A68-4721-A43A-D81BF59860A1}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_map", "vcproj-12\plugin-HPMHooking_map.vcxproj", "{745D4A8C-6A68-4721-A43A-D81BF59860A1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_char", "vcproj-12\plugin-HPMHooking_char.vcxproj", "{D495824D-24D3-4623-A28C-4CA506084A09}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_login", "vcproj-12\plugin-HPMHooking_login.vcxproj", "{544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -44,6 +49,14 @@ Global {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Debug|Win32.Build.0 = Debug|Win32 {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Release|Win32.ActiveCfg = Release|Win32 {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Release|Win32.Build.0 = Release|Win32 + {D495824D-24D3-4623-A28C-4CA506084A09}.Debug|Win32.ActiveCfg = Debug|Win32 + {D495824D-24D3-4623-A28C-4CA506084A09}.Debug|Win32.Build.0 = Debug|Win32 + {D495824D-24D3-4623-A28C-4CA506084A09}.Release|Win32.ActiveCfg = Release|Win32 + {D495824D-24D3-4623-A28C-4CA506084A09}.Release|Win32.Build.0 = Release|Win32 + {544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}.Debug|Win32.ActiveCfg = Debug|Win32 + {544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}.Debug|Win32.Build.0 = Debug|Win32 + {544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}.Release|Win32.ActiveCfg = Release|Win32 + {544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Hercules.xcodeproj/project.pbxproj b/Hercules.xcodeproj/project.pbxproj index 3d6ed8ef7..779e8b26c 100644 --- a/Hercules.xcodeproj/project.pbxproj +++ b/Hercules.xcodeproj/project.pbxproj @@ -158,6 +158,10 @@ A58A5A281858025D0099683E /* HPMHooking.c in Sources */ = {isa = PBXBuildFile; fileRef = A58A5A271858025D0099683E /* HPMHooking.c */; }; A5AA94EE185796CB00C940C8 /* sample.c in Sources */ = {isa = PBXBuildFile; fileRef = A5AA94ED185796CB00C940C8 /* sample.c */; }; A5AA94FA185799E400C940C8 /* db2sql.c in Sources */ = {isa = PBXBuildFile; fileRef = A5AA94F8185799DF00C940C8 /* db2sql.c */; }; + A5B894AA1A03CDD4005AD22E /* HPMlogin.c in Sources */ = {isa = PBXBuildFile; fileRef = A5B894A81A03CDD4005AD22E /* HPMlogin.c */; }; + A5B894AD1A03CDFA005AD22E /* HPMchar.c in Sources */ = {isa = PBXBuildFile; fileRef = A5B894AB1A03CDFA005AD22E /* HPMchar.c */; }; + A5B894B01A03CE25005AD22E /* HPMHooking.c in Sources */ = {isa = PBXBuildFile; fileRef = A58A5A271858025D0099683E /* HPMHooking.c */; }; + A5B894B91A03CE5D005AD22E /* HPMHooking.c in Sources */ = {isa = PBXBuildFile; fileRef = A58A5A271858025D0099683E /* HPMHooking.c */; }; A5F7946C191CA34E002293AB /* sysinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = A5F79469191CA34E002293AB /* sysinfo.c */; }; A5F7946D191CA34E002293AB /* sysinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = A5F79469191CA34E002293AB /* sysinfo.c */; }; A5F7946E191CA34E002293AB /* sysinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = A5F79469191CA34E002293AB /* sysinfo.c */; }; @@ -389,17 +393,33 @@ A56CC7B618565812009EB79C /* unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = unit.h; path = src/map/unit.h; sourceTree = SOURCE_ROOT; }; A56CC7B718565812009EB79C /* vending.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vending.c; path = src/map/vending.c; sourceTree = SOURCE_ROOT; }; A56CC7B818565812009EB79C /* vending.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vending.h; path = src/map/vending.h; sourceTree = SOURCE_ROOT; }; - A58A5A26185801FF0099683E /* HPMHooking.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = HPMHooking.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + A58A5A26185801FF0099683E /* HPMHooking_map.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = HPMHooking_map.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; A58A5A271858025D0099683E /* HPMHooking.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = HPMHooking.c; path = src/plugins/HPMHooking.c; sourceTree = "<group>"; }; - A58A5A2A1858028C0099683E /* HPMHooking.GetSymbol.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.GetSymbol.inc; path = src/plugins/HPMHooking/HPMHooking.GetSymbol.inc; sourceTree = "<group>"; }; - A58A5A2B1858028C0099683E /* HPMHooking.HookingPoints.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.HookingPoints.inc; path = src/plugins/HPMHooking/HPMHooking.HookingPoints.inc; sourceTree = "<group>"; }; - A58A5A2C1858028C0099683E /* HPMHooking.Hooks.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.Hooks.inc; path = src/plugins/HPMHooking/HPMHooking.Hooks.inc; sourceTree = "<group>"; }; - A58A5A2D1858028C0099683E /* HPMHooking.HPMHooksCore.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.HPMHooksCore.inc; path = src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc; sourceTree = "<group>"; }; - A58A5A2E1858028C0099683E /* HPMHooking.sources.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HPMHooking.sources.inc; path = src/plugins/HPMHooking/HPMHooking.sources.inc; sourceTree = "<group>"; }; A5AA94E71857956100C940C8 /* sample.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = sample.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; A5AA94ED185796CB00C940C8 /* sample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sample.c; path = src/plugins/sample.c; sourceTree = "<group>"; }; A5AA94F3185799B700C940C8 /* db2sql.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = db2sql.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; A5AA94F8185799DF00C940C8 /* db2sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = db2sql.c; path = src/plugins/db2sql.c; sourceTree = "<group>"; }; + A5B894A81A03CDD4005AD22E /* HPMlogin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = HPMlogin.c; path = src/login/HPMlogin.c; sourceTree = SOURCE_ROOT; }; + A5B894A91A03CDD4005AD22E /* HPMlogin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HPMlogin.h; path = src/login/HPMlogin.h; sourceTree = SOURCE_ROOT; }; + A5B894AB1A03CDFA005AD22E /* HPMchar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = HPMchar.c; path = src/char/HPMchar.c; sourceTree = SOURCE_ROOT; }; + A5B894AC1A03CDFA005AD22E /* HPMchar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HPMchar.h; path = src/char/HPMchar.h; sourceTree = SOURCE_ROOT; }; + A5B894B61A03CE25005AD22E /* HPMHooking_char.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = HPMHooking_char.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + A5B894BF1A03CE5D005AD22E /* HPMHooking_login.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = HPMHooking_login.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + A5B894C01A03CEE1005AD22E /* HPMHooking_char.GetSymbol.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_char.GetSymbol.inc; path = src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc; sourceTree = "<group>"; }; + A5B894C11A03CEE1005AD22E /* HPMHooking_char.HookingPoints.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_char.HookingPoints.inc; path = src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc; sourceTree = "<group>"; }; + A5B894C21A03CEE1005AD22E /* HPMHooking_char.Hooks.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_char.Hooks.inc; path = src/plugins/HPMHooking/HPMHooking_char.Hooks.inc; sourceTree = "<group>"; }; + A5B894C31A03CEE1005AD22E /* HPMHooking_char.HPMHooksCore.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_char.HPMHooksCore.inc; path = src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc; sourceTree = "<group>"; }; + A5B894C41A03CEE1005AD22E /* HPMHooking_char.sources.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_char.sources.inc; path = src/plugins/HPMHooking/HPMHooking_char.sources.inc; sourceTree = "<group>"; }; + A5B894C51A03CEE1005AD22E /* HPMHooking_login.GetSymbol.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_login.GetSymbol.inc; path = src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc; sourceTree = "<group>"; }; + A5B894C61A03CEE1005AD22E /* HPMHooking_login.HookingPoints.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_login.HookingPoints.inc; path = src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc; sourceTree = "<group>"; }; + A5B894C71A03CEE1005AD22E /* HPMHooking_login.Hooks.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_login.Hooks.inc; path = src/plugins/HPMHooking/HPMHooking_login.Hooks.inc; sourceTree = "<group>"; }; + A5B894C81A03CEE1005AD22E /* HPMHooking_login.HPMHooksCore.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_login.HPMHooksCore.inc; path = src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc; sourceTree = "<group>"; }; + A5B894C91A03CEE1005AD22E /* HPMHooking_login.sources.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_login.sources.inc; path = src/plugins/HPMHooking/HPMHooking_login.sources.inc; sourceTree = "<group>"; }; + A5B894CA1A03CEE1005AD22E /* HPMHooking_map.GetSymbol.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_map.GetSymbol.inc; path = src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc; sourceTree = "<group>"; }; + A5B894CB1A03CEE1005AD22E /* HPMHooking_map.HookingPoints.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_map.HookingPoints.inc; path = src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc; sourceTree = "<group>"; }; + A5B894CC1A03CEE1005AD22E /* HPMHooking_map.Hooks.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_map.Hooks.inc; path = src/plugins/HPMHooking/HPMHooking_map.Hooks.inc; sourceTree = "<group>"; }; + A5B894CD1A03CEE1005AD22E /* HPMHooking_map.HPMHooksCore.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_map.HPMHooksCore.inc; path = src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc; sourceTree = "<group>"; }; + A5B894CE1A03CEE1005AD22E /* HPMHooking_map.sources.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = HPMHooking_map.sources.inc; path = src/plugins/HPMHooking/HPMHooking_map.sources.inc; sourceTree = "<group>"; }; A5F79468191CA34E002293AB /* HPMDataCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HPMDataCheck.h; path = src/common/HPMDataCheck.h; sourceTree = "<group>"; }; A5F79469191CA34E002293AB /* sysinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sysinfo.c; path = src/common/sysinfo.c; sourceTree = "<group>"; }; A5F7946A191CA34E002293AB /* sysinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sysinfo.h; path = src/common/sysinfo.h; sourceTree = "<group>"; }; @@ -457,6 +477,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A5B894B11A03CE25005AD22E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A5B894BA1A03CE5D005AD22E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -488,7 +522,9 @@ A5380CCD1856CE180090CBC4 /* mapcache */, A5AA94E71857956100C940C8 /* sample.dylib */, A5AA94F3185799B700C940C8 /* db2sql.dylib */, - A58A5A26185801FF0099683E /* HPMHooking.dylib */, + A58A5A26185801FF0099683E /* HPMHooking_map.dylib */, + A5B894B61A03CE25005AD22E /* HPMHooking_char.dylib */, + A5B894BF1A03CE5D005AD22E /* HPMHooking_login.dylib */, ); name = Products; sourceTree = "<group>"; @@ -496,6 +532,8 @@ A56CC66B18564315009EB79C /* login-server */ = { isa = PBXGroup; children = ( + A5B894A81A03CDD4005AD22E /* HPMlogin.c */, + A5B894A91A03CDD4005AD22E /* HPMlogin.h */, A56CC68118564387009EB79C /* account_sql.c */, A56CC68218564387009EB79C /* account.h */, A56CC68318564387009EB79C /* ipban_sql.c */, @@ -511,6 +549,8 @@ A56CC6741856434D009EB79C /* char-server */ = { isa = PBXGroup; children = ( + A5B894AB1A03CDFA005AD22E /* HPMchar.c */, + A5B894AC1A03CDFA005AD22E /* HPMchar.h */, A56CC743185657D9009EB79C /* char.c */, A56CC744185657D9009EB79C /* char.h */, A56CC745185657D9009EB79C /* int_auction.c */, @@ -752,11 +792,21 @@ A58A5A291858026F0099683E /* HPMHooking */ = { isa = PBXGroup; children = ( - A58A5A2A1858028C0099683E /* HPMHooking.GetSymbol.inc */, - A58A5A2B1858028C0099683E /* HPMHooking.HookingPoints.inc */, - A58A5A2C1858028C0099683E /* HPMHooking.Hooks.inc */, - A58A5A2D1858028C0099683E /* HPMHooking.HPMHooksCore.inc */, - A58A5A2E1858028C0099683E /* HPMHooking.sources.inc */, + A5B894C01A03CEE1005AD22E /* HPMHooking_char.GetSymbol.inc */, + A5B894C11A03CEE1005AD22E /* HPMHooking_char.HookingPoints.inc */, + A5B894C21A03CEE1005AD22E /* HPMHooking_char.Hooks.inc */, + A5B894C31A03CEE1005AD22E /* HPMHooking_char.HPMHooksCore.inc */, + A5B894C41A03CEE1005AD22E /* HPMHooking_char.sources.inc */, + A5B894C51A03CEE1005AD22E /* HPMHooking_login.GetSymbol.inc */, + A5B894C61A03CEE1005AD22E /* HPMHooking_login.HookingPoints.inc */, + A5B894C71A03CEE1005AD22E /* HPMHooking_login.Hooks.inc */, + A5B894C81A03CEE1005AD22E /* HPMHooking_login.HPMHooksCore.inc */, + A5B894C91A03CEE1005AD22E /* HPMHooking_login.sources.inc */, + A5B894CA1A03CEE1005AD22E /* HPMHooking_map.GetSymbol.inc */, + A5B894CB1A03CEE1005AD22E /* HPMHooking_map.HookingPoints.inc */, + A5B894CC1A03CEE1005AD22E /* HPMHooking_map.Hooks.inc */, + A5B894CD1A03CEE1005AD22E /* HPMHooking_map.HPMHooksCore.inc */, + A5B894CE1A03CEE1005AD22E /* HPMHooking_map.sources.inc */, A58A5A271858025D0099683E /* HPMHooking.c */, ); name = HPMHooking; @@ -812,6 +862,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A5B894B21A03CE25005AD22E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A5B894BB1A03CE5D005AD22E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -887,9 +951,9 @@ productReference = A56CC67C18564356009EB79C /* map-server */; productType = "com.apple.product-type.tool"; }; - A58A5A1E185801FF0099683E /* HPMHooking */ = { + A58A5A1E185801FF0099683E /* HPMHooking_map */ = { isa = PBXNativeTarget; - buildConfigurationList = A58A5A23185801FF0099683E /* Build configuration list for PBXNativeTarget "HPMHooking" */; + buildConfigurationList = A58A5A23185801FF0099683E /* Build configuration list for PBXNativeTarget "HPMHooking_map" */; buildPhases = ( A58A5A1F185801FF0099683E /* Sources */, A58A5A21185801FF0099683E /* Frameworks */, @@ -899,9 +963,9 @@ ); dependencies = ( ); - name = HPMHooking; + name = HPMHooking_map; productName = sample; - productReference = A58A5A26185801FF0099683E /* HPMHooking.dylib */; + productReference = A58A5A26185801FF0099683E /* HPMHooking_map.dylib */; productType = "com.apple.product-type.library.dynamic"; }; A5AA94E61857956100C940C8 /* sample */ = { @@ -938,6 +1002,40 @@ productReference = A5AA94F3185799B700C940C8 /* db2sql.dylib */; productType = "com.apple.product-type.library.dynamic"; }; + A5B894AE1A03CE25005AD22E /* HPMHooking_char */ = { + isa = PBXNativeTarget; + buildConfigurationList = A5B894B31A03CE25005AD22E /* Build configuration list for PBXNativeTarget "HPMHooking_char" */; + buildPhases = ( + A5B894AF1A03CE25005AD22E /* Sources */, + A5B894B11A03CE25005AD22E /* Frameworks */, + A5B894B21A03CE25005AD22E /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HPMHooking_char; + productName = sample; + productReference = A5B894B61A03CE25005AD22E /* HPMHooking_char.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + A5B894B71A03CE5D005AD22E /* HPMHooking_login */ = { + isa = PBXNativeTarget; + buildConfigurationList = A5B894BC1A03CE5D005AD22E /* Build configuration list for PBXNativeTarget "HPMHooking_login" */; + buildPhases = ( + A5B894B81A03CE5D005AD22E /* Sources */, + A5B894BA1A03CE5D005AD22E /* Frameworks */, + A5B894BB1A03CE5D005AD22E /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HPMHooking_login; + productName = sample; + productReference = A5B894BF1A03CE5D005AD22E /* HPMHooking_login.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -963,7 +1061,9 @@ A56CC6721856434D009EB79C /* char-server */, A56CC67B18564356009EB79C /* map-server */, A5380CCC1856CE180090CBC4 /* mapcache */, - A58A5A1E185801FF0099683E /* HPMHooking */, + A5B894B71A03CE5D005AD22E /* HPMHooking_login */, + A5B894AE1A03CE25005AD22E /* HPMHooking_char */, + A58A5A1E185801FF0099683E /* HPMHooking_map */, A5AA94F2185799B700C940C8 /* db2sql */, A5AA94E61857956100C940C8 /* sample */, ); @@ -1056,6 +1156,7 @@ A56CC6EA185643BB009EB79C /* md5calc.c in Sources */, A5F7946C191CA34E002293AB /* sysinfo.c in Sources */, A56CC74018564C23009EB79C /* mt19937ar.c in Sources */, + A5B894AA1A03CDD4005AD22E /* HPMlogin.c in Sources */, A56CC6DE185643BB009EB79C /* grfio.c in Sources */, A56CC68C18564387009EB79C /* loginlog_sql.c in Sources */, A56CC73118564C05009EB79C /* libconfig.c in Sources */, @@ -1103,6 +1204,7 @@ A56CC768185657D9009EB79C /* inter.c in Sources */, A56CC73818564C05009EB79C /* scanner.c in Sources */, A56CC700185643BB009EB79C /* random.c in Sources */, + A5B894AD1A03CDFA005AD22E /* HPMchar.c in Sources */, A56CC761185657D9009EB79C /* int_homun.c in Sources */, A56CC6FA185643BB009EB79C /* nullpo.c in Sources */, A56CC6E5185643BB009EB79C /* malloc.c in Sources */, @@ -1230,6 +1332,22 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A5B894AF1A03CE25005AD22E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A5B894B01A03CE25005AD22E /* HPMHooking.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A5B894B81A03CE5D005AD22E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A5B894B91A03CE5D005AD22E /* HPMHooking.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ @@ -1405,6 +1523,7 @@ "-DHAVE_XLOCALE_H=1", "-DHAVE_LIBZ=1", "-DHAVE_LIBPTHREAD=1", + "-DHPMHOOKING_LOGIN", ); OTHER_LDFLAGS = ( "-lpthread", @@ -1482,6 +1601,7 @@ "-DHAVE_XLOCALE_H=1", "-DHAVE_LIBZ=1", "-DHAVE_LIBPTHREAD=1", + "-DHPMHOOKING_LOGIN", ); OTHER_LDFLAGS = ( "-lpthread", @@ -1549,24 +1669,22 @@ A58A5A24185801FF0099683E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins"; EXECUTABLE_PREFIX = ""; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); - PRODUCT_NAME = HPMHooking; + PRODUCT_NAME = HPMHooking_map; }; name = Debug; }; A58A5A25185801FF0099683E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins"; EXECUTABLE_PREFIX = ""; - PRODUCT_NAME = HPMHooking; + PRODUCT_NAME = HPMHooking_map; }; name = Release; }; @@ -1618,6 +1736,50 @@ }; name = Release; }; + A5B894B41A03CE25005AD22E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins"; + EXECUTABLE_PREFIX = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + PRODUCT_NAME = HPMHooking_char; + }; + name = Debug; + }; + A5B894B51A03CE25005AD22E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins"; + EXECUTABLE_PREFIX = ""; + PRODUCT_NAME = HPMHooking_char; + }; + name = Release; + }; + A5B894BD1A03CE5D005AD22E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins"; + EXECUTABLE_PREFIX = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + PRODUCT_NAME = HPMHooking_login; + }; + name = Debug; + }; + A5B894BE1A03CE5D005AD22E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/plugins"; + EXECUTABLE_PREFIX = ""; + PRODUCT_NAME = HPMHooking_login; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1666,7 +1828,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A58A5A23185801FF0099683E /* Build configuration list for PBXNativeTarget "HPMHooking" */ = { + A58A5A23185801FF0099683E /* Build configuration list for PBXNativeTarget "HPMHooking_map" */ = { isa = XCConfigurationList; buildConfigurations = ( A58A5A24185801FF0099683E /* Debug */, @@ -1693,6 +1855,24 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + A5B894B31A03CE25005AD22E /* Build configuration list for PBXNativeTarget "HPMHooking_char" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A5B894B41A03CE25005AD22E /* Debug */, + A5B894B51A03CE25005AD22E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A5B894BC1A03CE5D005AD22E /* Build configuration list for PBXNativeTarget "HPMHooking_login" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A5B894BD1A03CE5D005AD22E /* Debug */, + A5B894BE1A03CE5D005AD22E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = A56CC652185642B4009EB79C /* Project object */; diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking_char.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking_char.xcscheme new file mode 100644 index 000000000..12a0d695e --- /dev/null +++ b/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking_char.xcscheme @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "0610" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "A5B894AE1A03CE25005AD22E" + BuildableName = "HPMHooking_char.dylib" + BlueprintName = "HPMHooking_char" + ReferencedContainer = "container:Hercules.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES" + buildConfiguration = "Debug"> + <Testables> + </Testables> + </TestAction> + <LaunchAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "A5B894AE1A03CE25005AD22E" + BuildableName = "HPMHooking_char.dylib" + BlueprintName = "HPMHooking_char" + ReferencedContainer = "container:Hercules.xcodeproj"> + </BuildableReference> + </MacroExpansion> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Release" + debugDocumentVersioning = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "A5B894AE1A03CE25005AD22E" + BuildableName = "HPMHooking_char.dylib" + BlueprintName = "HPMHooking_char" + ReferencedContainer = "container:Hercules.xcodeproj"> + </BuildableReference> + </MacroExpansion> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking_login.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking_login.xcscheme new file mode 100644 index 000000000..cd102c62d --- /dev/null +++ b/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking_login.xcscheme @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "0610" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "A5B894B71A03CE5D005AD22E" + BuildableName = "HPMHooking_char copy.dylib" + BlueprintName = "HPMHooking_login" + ReferencedContainer = "container:Hercules.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES" + buildConfiguration = "Debug"> + <Testables> + </Testables> + </TestAction> + <LaunchAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "A5B894B71A03CE5D005AD22E" + BuildableName = "HPMHooking_char copy.dylib" + BlueprintName = "HPMHooking_login" + ReferencedContainer = "container:Hercules.xcodeproj"> + </BuildableReference> + </MacroExpansion> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Release" + debugDocumentVersioning = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "A5B894B71A03CE5D005AD22E" + BuildableName = "HPMHooking_char copy.dylib" + BlueprintName = "HPMHooking_login" + ReferencedContainer = "container:Hercules.xcodeproj"> + </BuildableReference> + </MacroExpansion> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking.xcscheme b/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking_map.xcscheme index 6cb69978d..1c49c5785 100644 --- a/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking.xcscheme +++ b/Hercules.xcodeproj/xcshareddata/xcschemes/HPMHooking_map.xcscheme @@ -15,8 +15,8 @@ <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "A58A5A1E185801FF0099683E" - BuildableName = "HPMHooking.dylib" - BlueprintName = "HPMHooking" + BuildableName = "HPMHooking_map.dylib" + BlueprintName = "HPMHooking_map" ReferencedContainer = "container:Hercules.xcodeproj"> </BuildableReference> </BuildActionEntry> @@ -43,8 +43,8 @@ <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "A58A5A1E185801FF0099683E" - BuildableName = "HPMHooking.dylib" - BlueprintName = "HPMHooking" + BuildableName = "HPMHooking_map.dylib" + BlueprintName = "HPMHooking_map" ReferencedContainer = "container:Hercules.xcodeproj"> </BuildableReference> </MacroExpansion> diff --git a/conf/battle/monster.conf b/conf/battle/monster.conf index 9ca8df825..6f63f55be 100644 --- a/conf/battle/monster.conf +++ b/conf/battle/monster.conf @@ -52,14 +52,14 @@ monster_ai: 0 // How often should a monster rethink its chase? // 0: Every 100ms (MIN_MOBTHINKTIME) -// 1: Every cell moved (official) +// 1: Every cell moved // 2: Every 2 cells moved -// 3: Every 3 cells moved (previous setting) +// 3: Every 3 cells moved (official) // x: Every x cells moved // Regardless of this setting, a monster will always rethink its chase if it has // reached its target. Increase this value if you want to make monsters continue // moving after they lost their target (hide, loot picked, etc.). -monster_chase_refresh: 1 +monster_chase_refresh: 3 // Should mobs be able to be warped (add as needed)? // 0: Disable. @@ -216,3 +216,19 @@ mvp_tomb_enabled: yes // This is only invoked under the 'monster' command, @monsterbig, and @monstersmall. (Note 1) // Default: no mob_size_influence: no + +// How should a monster be trapped by an icewall casted directly on it? +// On official servers, monsters can only leave an icewall to the west and south. If their target is north or east of +// them they will continously try to chase it but fail doing so. This brings them into a loop during which they will use +// idle and chase skills. Boss monsters on the other hand will behave like a trapped monster, do not move and will use +// idle and rudeattacked skills (when attacked). +// 0: Monster won't be stuck in icewall at all. +// 1: Monster will behave like a trapped monster. +// 2-255: Number of loops a monster will go through the behavior described above before it frees itself from icewall. +// NOTE: On some servers, normal monsters can free themselves after 15-35 second depending on their speed. On other +// servers, they will be stuck inside icewall until it expires. Also, many official servers (e.g. iRO) have casting +// icewall completely blocked on all maps that have boss monsters on them. +// Default (least exploitable): mob - 75, boss - 0 +// Default (most official): mob - 220, boss - 1 +mob_icewall_walk_block: 220 +boss_icewall_walk_block: 1
\ No newline at end of file diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf index 1bb58211a..e6828749b 100644 --- a/conf/battle/skill.conf +++ b/conf/battle/skill.conf @@ -293,13 +293,4 @@ mob_max_skilllvl: 100 // 1: Gutter line system without demi gutter bug // 2-20: Area around caster (2 = 5x5, 3 = 7x7, 4 = 9x9, ..., 20 = 41x41) // Note: If you knock the target out of the area it will only be hit once and won't do splash damage -bowling_bash_area: 0 - -// How many attempts should a monster need until it can escape from an icewall casted directly on it? -// On official servers, monsters can only leave an icewall to the west and south. If their target is north or east of them -// they will continously try to chase it but fail doing so. This brings them into a loop during which they will cast idle -// and rudeattacked skills (if attacked). Official servers have a safety system that eventually allows monsters to escape -// when their walk routine failed many times in row so they won't stay on the loop endlessly. The time for this seems to be -// around 15 seconds for fast monsters and 35 seconds for slow monsters, this equals about 75 attempts. -// Set this to 0 if you don't want monsters to be stuck in icewalls at all. -icewall_walk_block: 75
\ No newline at end of file +bowling_bash_area: 0
\ No newline at end of file diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt index 5f1e7c2f2..34639425e 100644 --- a/db/re/skill_db.txt +++ b/db/re/skill_db.txt @@ -124,7 +124,7 @@ 77,5,6,1,6,0x28,0,10,1,yes,0,0,0,magic,0, PR_TURNUNDEAD,Turn Undead 78,9,6,1,0,0x1,0,1,0,yes,0,0,0,magic,0, PR_LEXAETERNA,Lex Aeterna 79,9,8,2,6,0,0,10,1:2:3:4:5:6:7:8:9:10,yes,0,0,0,magic,0, PR_MAGNUS,Magnus Exorcismus -80,9,8,2,3,0x20,1:1:1:1:1:2:2:2:2:2:2,10,3:4:5:6:7:8:9:10:11:12:12,yes,0,0x80,5,magic,0, WZ_FIREPILLAR,Fire Pillar +80,9,8,2,3,0x20,1:1:1:1:1:2:2:2:2:2:2,10,3:4:5:6:7:8:9:10:11:12:12,yes,0,0,5,magic,0, WZ_FIREPILLAR,Fire Pillar 81,0,6,4,3,0,3,10,1,yes,0,0,0,magic,5, WZ_SIGHTRASHER,Sightrasher 83,9,8,2,3,0,3:3:3:3:3:3:3:3:3:3:14,10,1:1:2:2:3:3:4:4:5:5:15,yes,0,0,0,magic,0, WZ_METEOR,Meteor Storm 84,9,8,1,4,0,0,10,3:4:5:6:7:8:9:10:11:12,yes,0,0,0,magic,2:3:3:4:4:5:5:6:6:7, WZ_JUPITEL,Jupitel Thunder diff --git a/npc/merchants/renters.txt b/npc/merchants/renters.txt index 255db3e62..3b6e6c28c 100644 --- a/npc/merchants/renters.txt +++ b/npc/merchants/renters.txt @@ -130,7 +130,7 @@ prontera,232,318,3 script Peco Peco Breeder#cru 8W_SOLDIER,{ close; } Zeny -= .@price; - setmount(MOUNT_NONE); + setmount(MOUNT_PECO); close; case 2: mes "[PecoPeco Breeder]"; diff --git a/src/char/HPMchar.c b/src/char/HPMchar.c new file mode 100644 index 000000000..4b153b244 --- /dev/null +++ b/src/char/HPMchar.c @@ -0,0 +1,53 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file + +#define HERCULES_CORE + +#include "HPMchar.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" +#include "../common/des.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" + +#include "../common/HPMDataCheck.h" + +bool HPM_char_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { + /* record address */ + switch( type ) { + default: + return false; + } + return true; +} + +void HPM_char_plugin_load_sub(struct hplugin *plugin) { +} + +void HPM_char_do_init(void) { +#if 0 // TODO (HPMDataCheck is disabled for the time being) + HPM->datacheck_init(HPMDataCheck, HPMDataCheckLen, HPMDataCheckVer); +#else + HPM->DataCheck = NULL; +#endif +} + +void HPM_char_do_final(void) { +#if 0 // TODO (HPMDataCheck is disabled for the time being) + HPM->datacheck_final(); +#endif +} diff --git a/src/char/HPMchar.h b/src/char/HPMchar.h new file mode 100644 index 000000000..9d367725c --- /dev/null +++ b/src/char/HPMchar.h @@ -0,0 +1,21 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file + +#ifndef CHAR_HPMCHAR_H +#define CHAR_HPMCHAR_H + +#include "../common/cbasetypes.h" +#include "../common/HPM.h" + +struct hplugin; + +bool HPM_char_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); + +void HPM_char_plugin_load_sub(struct hplugin *plugin); + +void HPM_char_do_final(void); + +void HPM_char_do_init(void); + +#endif /* CHAR_HPMCHAR_H */ + diff --git a/src/char/Makefile.in b/src/char/Makefile.in index ecb2f8741..d591a5370 100644 --- a/src/char/Makefile.in +++ b/src/char/Makefile.in @@ -22,13 +22,13 @@ MT19937AR_OBJ = $(MT19937AR_D)/mt19937ar.o MT19937AR_H = $(MT19937AR_D)/mt19937ar.h MT19937AR_INCLUDE = -I$(MT19937AR_D) -CHAR_C = char.c inter.c int_auction.c int_elemental.c int_guild.c int_homun.c \ - int_mail.c int_mercenary.c int_party.c int_pet.c int_quest.c \ - int_storage.c pincode.c +CHAR_C = char.c HPMchar.c inter.c int_auction.c int_elemental.c int_guild.c \ + int_homun.c int_mail.c int_mercenary.c int_party.c int_pet.c \ + int_quest.c int_storage.c pincode.c CHAR_OBJ = $(addprefix obj_sql/, $(patsubst %.c,%.o,$(CHAR_C))) -CHAR_H = char.h inter.h int_auction.h int_elemental.h int_guild.h int_homun.h \ - int_mail.h int_mercenary.h int_party.h int_pet.h int_quest.h \ - int_storage.h pincode.h +CHAR_H = char.h HPMchar.h inter.h int_auction.h int_elemental.h int_guild.h \ + int_homun.h int_mail.h int_mercenary.h int_party.h int_pet.h \ + int_quest.h int_storage.h pincode.h HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) diff --git a/src/char/char.c b/src/char/char.c index 824c782bc..3dcc48f2e 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -15,6 +15,7 @@ #include <sys/types.h> #include <time.h> +#include "HPMchar.h" #include "int_elemental.h" #include "int_guild.h" #include "int_homun.h" @@ -5375,6 +5376,8 @@ int do_final(void) { char_fd = -1; } + HPM_char_do_final(); + SQL->Free(sql_handle); mapindex->final(); @@ -5382,6 +5385,8 @@ int do_final(void) { if( server[i].map ) aFree(server[i].map); + HPM->event(HPET_POST_FINAL); + ShowStatus("Finished.\n"); return EXIT_SUCCESS; } @@ -5416,6 +5421,9 @@ void do_shutdown(void) } } +void char_hp_symbols(void) { + HPM->share(sql_handle,"sql_handle"); +} int do_init(int argc, char **argv) { int i; @@ -5426,6 +5434,29 @@ int do_init(int argc, char **argv) { mapindex_defaults(); pincode_defaults(); + + HPM_char_do_init(); + HPM->symbol_defaults_sub = char_hp_symbols; +#if 0 + /* TODO: Move to common code */ + for( i = 1; i < argc; i++ ) { + const char* arg = argv[i]; + if( strcmp(arg, "--load-plugin") == 0 ) { + if( map->arg_next_value(arg, i, argc, true) ) { + RECREATE(load_extras, char *, ++load_extras_count); + load_extras[load_extras_count-1] = argv[++i]; + } + } + } + HPM->config_read((const char * const *)load_extras, load_extras_count); + if (load_extras) { + aFree(load_extras); + load_extras = NULL; + load_extras_count = 0; + } +#endif + HPM->config_read(NULL, 0); + HPM->event(HPET_PRE_INIT); //Read map indexes mapindex->init(); @@ -5446,8 +5477,6 @@ int do_init(int argc, char **argv) { auth_db = idb_alloc(DB_OPT_RELEASE_DATA); online_char_db = idb_alloc(DB_OPT_RELEASE_DATA); - HPM->share(sql_handle,"sql_handle"); - HPM->config_read(NULL, 0); HPM->event(HPET_INIT); mmo_char_sql_init(); diff --git a/src/common/HPM.c b/src/common/HPM.c index f39954175..7a875d1c4 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -31,6 +31,13 @@ struct malloc_interface iMalloc_HPM; struct malloc_interface *HPMiMalloc; +/** + * (char*) data name -> (unsigned int) HPMDataCheck[] index + **/ +DBMap *datacheck_db; +int datacheck_version; +const struct s_HPMDataCheck *datacheck_data; + void hplugin_trigger_event(enum hp_event_types type) { unsigned int i; for( i = 0; i < HPM->plugin_count; i++ ) { @@ -122,6 +129,7 @@ struct hplugin *hplugin_load(const char* filename) { bool anyEvent = false; void **import_symbol_ref; Sql **sql_handle; + int *HPMDataCheckVer; unsigned int *HPMDataCheckLen; struct s_HPMDataCheck *HPMDataCheck; @@ -217,13 +225,20 @@ struct hplugin *hplugin_load(const char* filename) { return NULL; } + if( !( HPMDataCheckVer = plugin_import(plugin->dll, "HPMDataCheckVer", int *) ) ) { + ShowWarning("HPM:plugin_load: failed to retrieve 'HPMDataCheckVer' for '"CL_WHITE"%s"CL_RESET"', most likely an outdated plugin, skipping...\n", filename); + HPM->unload(plugin); + return NULL; + } + if( !( HPMDataCheck = plugin_import(plugin->dll, "HPMDataCheck", struct s_HPMDataCheck *) ) ) { ShowWarning("HPM:plugin_load: failed to retrieve 'HPMDataCheck' for '"CL_WHITE"%s"CL_RESET"', most likely not including HPMDataCheck.h, skipping...\n", filename); HPM->unload(plugin); return NULL; } - if( HPM->DataCheck && !HPM->DataCheck(HPMDataCheck,*HPMDataCheckLen,plugin->info->name) ) { + // TODO: Remove the HPM->DataCheck != NULL check once login and char support is complete + if (HPM->DataCheck != NULL && !HPM->DataCheck(HPMDataCheck,*HPMDataCheckLen,*HPMDataCheckVer,plugin->info->name)) { ShowWarning("HPM:plugin_load: '"CL_WHITE"%s"CL_RESET"' failed DataCheck, out of sync from the core (recompile plugin), skipping...\n", filename); HPM->unload(plugin); return NULL; @@ -282,12 +297,6 @@ void hplugins_config_read(const char * const *extra_plugins, int extra_plugins_c FILE *fp; int i; -// uncomment once login/char support is wrapped up -// if( !HPM->DataCheck ) { -// ShowError("HPM:config_read: HPM->DataCheck not set! Failure\n"); -// return; -// } - /* yes its ugly, its temporary and will be gone as soon as the new inter-server.conf is set */ if( (fp = fopen("conf/import/plugins.conf","r")) ) { config_filename = "conf/import/plugins.conf"; @@ -309,27 +318,40 @@ void hplugins_config_read(const char * const *extra_plugins, int extra_plugins_c if (plist != NULL) { int length = libconfig->setting_length(plist); char filename[60]; - for(i = 0; i < length; i++) { - if( !strcmpi(libconfig->setting_get_string_elem(plist,i),"HPMHooking") ) {//must load it first + char hooking_plugin_name[32]; + const char *plugin_name_suffix = ""; + if (SERVER_TYPE == SERVER_TYPE_LOGIN) + plugin_name_suffix = "_login"; + else if (SERVER_TYPE == SERVER_TYPE_CHAR) + plugin_name_suffix = "_char"; + else if (SERVER_TYPE == SERVER_TYPE_MAP) + plugin_name_suffix = "_map"; + snprintf(hooking_plugin_name, sizeof(hooking_plugin_name), "HPMHooking%s", plugin_name_suffix); + + for (i = 0; i < length; i++) { + const char *plugin_name = libconfig->setting_get_string_elem(plist,i); + if (strcmpi(plugin_name, "HPMHooking") == 0 || strcmpi(plugin_name, hooking_plugin_name) == 0) { //must load it first struct hplugin *plugin; - snprintf(filename, 60, "plugins/%s%s", libconfig->setting_get_string_elem(plist,i), DLL_EXT); - if( ( plugin = HPM->load(filename) ) ) { + snprintf(filename, 60, "plugins/%s%s", hooking_plugin_name, DLL_EXT); + if ((plugin = HPM->load(filename))) { bool (*func)(bool *fr); bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); - if( ( func = plugin_import(plugin->dll, "Hooked",bool (*)(bool *)) ) && ( addhook_sub = plugin_import(plugin->dll, "HPM_Plugin_AddHook",bool (*)(enum HPluginHookType, const char *, void *, unsigned int)) ) ) { - if( func(&HPM->force_return) ) { + if ((func = plugin_import(plugin->dll, "Hooked",bool (*)(bool *))) + && (addhook_sub = plugin_import(plugin->dll, "HPM_Plugin_AddHook",bool (*)(enum HPluginHookType, const char *, void *, unsigned int)))) { + if (func(&HPM->force_return)) { HPM->hooking = true; HPM->addhook_sub = addhook_sub; } } } + break; } } - for(i = 0; i < length; i++) { - if( strcmpi(libconfig->setting_get_string_elem(plist,i),"HPMHooking") ) {//now all others - snprintf(filename, 60, "plugins/%s%s", libconfig->setting_get_string_elem(plist,i), DLL_EXT); - HPM->load(filename); - } + for (i = 0; i < length; i++) { + if (strncmpi(libconfig->setting_get_string_elem(plist,i),"HPMHooking", 10) == 0) // Already loaded, skip + continue; + snprintf(filename, 60, "plugins/%s%s", libconfig->setting_get_string_elem(plist,i), DLL_EXT); + HPM->load(filename); } libconfig->destroy(&plugins_conf); } @@ -688,6 +710,56 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po return false; } +/** + * Called by HPM->DataCheck on a plugins incoming data, ensures data structs in use are matching! + **/ +bool HPM_DataCheck(struct s_HPMDataCheck *src, unsigned int size, int version, char *name) { + unsigned int i, j; + + if (version != datacheck_version) { + ShowError("HPMDataCheck:%s: DataCheck API version mismatch %d != %d\n", name, datacheck_version, version); + return false; + } + + for (i = 0; i < size; i++) { + if (!(src[i].type|SERVER_TYPE)) + continue; + + if (!strdb_exists(datacheck_db, src[i].name)) { + ShowError("HPMDataCheck:%s: '%s' was not found\n",name,src[i].name); + return false; + } else { + j = strdb_uiget(datacheck_db, src[i].name);/* not double lookup; exists sets cache to found data */ + if (src[i].size != datacheck_data[j].size) { + ShowWarning("HPMDataCheck:%s: '%s' size mismatch %u != %u\n",name,src[i].name,src[i].size,datacheck_data[j].size); + return false; + } + } + } + + return true; +} + +void HPM_datacheck_init(const struct s_HPMDataCheck *src, unsigned int length, int version) { + unsigned int i; + + datacheck_version = version; + datacheck_data = src; + + /** + * Populates datacheck_db for easy lookup later on + **/ + datacheck_db = strdb_alloc(DB_OPT_BASE,0); + + for(i = 0; i < length; i++) { + strdb_uiput(datacheck_db, src[i].name, i); + } +} + +void HPM_datacheck_final(void) { + db_destroy(datacheck_db); +} + void hplugins_share_defaults(void) { /* console */ #ifdef CONSOLE_INPUT @@ -729,6 +801,9 @@ void hplugins_share_defaults(void) { void hpm_init(void) { unsigned int i; + datacheck_db = NULL; + datacheck_data = NULL; + datacheck_version = 0; HPM->symbols = NULL; HPM->plugins = NULL; @@ -866,5 +941,7 @@ void hpm_defaults(void) { HPM->grabHPData = hplugins_grabHPData; HPM->grabHPDataSub = NULL; HPM->parseConf = hplugins_parse_conf; - HPM->DataCheck = NULL; + HPM->DataCheck = HPM_DataCheck; + HPM->datacheck_init = HPM_datacheck_init; + HPM->datacheck_final = HPM_datacheck_final; } diff --git a/src/common/HPM.h b/src/common/HPM.h index fe8d45066..a4ea504e6 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -151,7 +151,9 @@ struct HPM_interface { /* for custom config parsing */ bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point); /* validates plugin data */ - bool (*DataCheck) (struct s_HPMDataCheck *src, unsigned int size, char *name); + bool (*DataCheck) (struct s_HPMDataCheck *src, unsigned int size, int version, char *name); + void (*datacheck_init) (const struct s_HPMDataCheck *src, unsigned int length, int version); + void (*datacheck_final) (void); } HPM_s; struct HPM_interface *HPM; diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index 79ec36472..9f4316617 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -9,134 +9,135 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { #ifdef COMMON_CONF_H - { "libconfig_interface", sizeof(struct libconfig_interface) }, + { "libconfig_interface", sizeof(struct libconfig_interface), SERVER_TYPE_ALL }, #else #define COMMON_CONF_H #endif // COMMON_CONF_H #ifdef COMMON_DB_H - { "DBData", sizeof(struct DBData) }, - { "DBIterator", sizeof(struct DBIterator) }, - { "DBMap", sizeof(struct DBMap) }, + { "DBData", sizeof(struct DBData), SERVER_TYPE_ALL }, + { "DBIterator", sizeof(struct DBIterator), SERVER_TYPE_ALL }, + { "DBMap", sizeof(struct DBMap), SERVER_TYPE_ALL }, #else #define COMMON_DB_H #endif // COMMON_DB_H #ifdef COMMON_DES_H - { "BIT64", sizeof(struct BIT64) }, + { "BIT64", sizeof(struct BIT64), SERVER_TYPE_ALL }, #else #define COMMON_DES_H #endif // COMMON_DES_H #ifdef COMMON_ERS_H - { "eri", sizeof(struct eri) }, + { "eri", sizeof(struct eri), SERVER_TYPE_ALL }, #else #define COMMON_ERS_H #endif // COMMON_ERS_H #ifdef COMMON_MAPINDEX_H - { "mapindex_interface", sizeof(struct mapindex_interface) }, + { "mapindex_interface", sizeof(struct mapindex_interface), SERVER_TYPE_ALL }, #else #define COMMON_MAPINDEX_H #endif // COMMON_MAPINDEX_H #ifdef COMMON_MMO_H - { "quest", sizeof(struct quest) }, + { "quest", sizeof(struct quest), SERVER_TYPE_ALL }, #else #define COMMON_MMO_H #endif // COMMON_MMO_H #ifdef COMMON_SOCKET_H - { "socket_interface", sizeof(struct socket_interface) }, + { "socket_interface", sizeof(struct socket_interface), SERVER_TYPE_ALL }, #else #define COMMON_SOCKET_H #endif // COMMON_SOCKET_H #ifdef COMMON_STRLIB_H - { "StringBuf", sizeof(struct StringBuf) }, - { "s_svstate", sizeof(struct s_svstate) }, + { "StringBuf", sizeof(struct StringBuf), SERVER_TYPE_ALL }, + { "s_svstate", sizeof(struct s_svstate), SERVER_TYPE_ALL }, #else #define COMMON_STRLIB_H #endif // COMMON_STRLIB_H #ifdef COMMON_SYSINFO_H - { "sysinfo_interface", sizeof(struct sysinfo_interface) }, + { "sysinfo_interface", sizeof(struct sysinfo_interface), SERVER_TYPE_ALL }, #else #define COMMON_SYSINFO_H #endif // COMMON_SYSINFO_H #ifdef MAP_ATCOMMAND_H - { "AliasInfo", sizeof(struct AliasInfo) }, - { "atcommand_interface", sizeof(struct atcommand_interface) }, + { "AliasInfo", sizeof(struct AliasInfo), SERVER_TYPE_MAP }, + { "atcommand_interface", sizeof(struct atcommand_interface), SERVER_TYPE_MAP }, #else #define MAP_ATCOMMAND_H #endif // MAP_ATCOMMAND_H #ifdef MAP_BATTLE_H - { "Damage", sizeof(struct Damage) }, - { "battle_interface", sizeof(struct battle_interface) }, + { "Damage", sizeof(struct Damage), SERVER_TYPE_MAP }, + { "battle_interface", sizeof(struct battle_interface), SERVER_TYPE_MAP }, #else #define MAP_BATTLE_H #endif // MAP_BATTLE_H #ifdef MAP_BUYINGSTORE_H - { "buyingstore_interface", sizeof(struct buyingstore_interface) }, - { "s_buyingstore_item", sizeof(struct s_buyingstore_item) }, + { "buyingstore_interface", sizeof(struct buyingstore_interface), SERVER_TYPE_MAP }, + { "s_buyingstore_item", sizeof(struct s_buyingstore_item), SERVER_TYPE_MAP }, #else #define MAP_BUYINGSTORE_H #endif // MAP_BUYINGSTORE_H #ifdef MAP_CHRIF_H - { "auth_node", sizeof(struct auth_node) }, + { "auth_node", sizeof(struct auth_node), SERVER_TYPE_MAP }, #else #define MAP_CHRIF_H #endif // MAP_CHRIF_H #ifdef MAP_CLIF_H - { "clif_interface", sizeof(struct clif_interface) }, + { "clif_interface", sizeof(struct clif_interface), SERVER_TYPE_MAP }, #else #define MAP_CLIF_H #endif // MAP_CLIF_H #ifdef MAP_ELEMENTAL_H - { "elemental_skill", sizeof(struct elemental_skill) }, + { "elemental_skill", sizeof(struct elemental_skill), SERVER_TYPE_MAP }, #else #define MAP_ELEMENTAL_H #endif // MAP_ELEMENTAL_H #ifdef MAP_GUILD_H - { "eventlist", sizeof(struct eventlist) }, - { "guardian_data", sizeof(struct guardian_data) }, + { "eventlist", sizeof(struct eventlist), SERVER_TYPE_MAP }, + { "guardian_data", sizeof(struct guardian_data), SERVER_TYPE_MAP }, #else #define MAP_GUILD_H #endif // MAP_GUILD_H #ifdef MAP_MAPREG_H - { "mapreg_save", sizeof(struct mapreg_save) }, + { "mapreg_save", sizeof(struct mapreg_save), SERVER_TYPE_MAP }, #else #define MAP_MAPREG_H #endif // MAP_MAPREG_H #ifdef MAP_MAP_H - { "map_data_other_server", sizeof(struct map_data_other_server) }, + { "map_data_other_server", sizeof(struct map_data_other_server), SERVER_TYPE_MAP }, #else #define MAP_MAP_H #endif // MAP_MAP_H #ifdef MAP_PACKETS_STRUCT_H - { "EQUIPSLOTINFO", sizeof(struct EQUIPSLOTINFO) }, + { "EQUIPSLOTINFO", sizeof(struct EQUIPSLOTINFO), SERVER_TYPE_MAP }, #else #define MAP_PACKETS_STRUCT_H #endif // MAP_PACKETS_STRUCT_H #ifdef MAP_PC_H - { "autotrade_vending", sizeof(struct autotrade_vending) }, - { "item_cd", sizeof(struct item_cd) }, + { "autotrade_vending", sizeof(struct autotrade_vending), SERVER_TYPE_MAP }, + { "item_cd", sizeof(struct item_cd), SERVER_TYPE_MAP }, #else #define MAP_PC_H #endif // MAP_PC_H #ifdef MAP_SCRIPT_H - { "Script_Config", sizeof(struct Script_Config) }, - { "reg_db", sizeof(struct reg_db) }, - { "script_interface", sizeof(struct script_interface) }, + { "Script_Config", sizeof(struct Script_Config), SERVER_TYPE_MAP }, + { "reg_db", sizeof(struct reg_db), SERVER_TYPE_MAP }, + { "script_interface", sizeof(struct script_interface), SERVER_TYPE_MAP }, #else #define MAP_SCRIPT_H #endif // MAP_SCRIPT_H #ifdef MAP_SEARCHSTORE_H - { "searchstore_interface", sizeof(struct searchstore_interface) }, + { "searchstore_interface", sizeof(struct searchstore_interface), SERVER_TYPE_MAP }, #else #define MAP_SEARCHSTORE_H #endif // MAP_SEARCHSTORE_H #ifdef MAP_SKILL_H - { "skill_cd", sizeof(struct skill_cd) }, - { "skill_condition", sizeof(struct skill_condition) }, - { "skill_interface", sizeof(struct skill_interface) }, - { "skill_unit_save", sizeof(struct skill_unit_save) }, + { "skill_cd", sizeof(struct skill_cd), SERVER_TYPE_MAP }, + { "skill_condition", sizeof(struct skill_condition), SERVER_TYPE_MAP }, + { "skill_interface", sizeof(struct skill_interface), SERVER_TYPE_MAP }, + { "skill_unit_save", sizeof(struct skill_unit_save), SERVER_TYPE_MAP }, #else #define MAP_SKILL_H #endif // MAP_SKILL_H }; HPExport unsigned int HPMDataCheckLen = ARRAYLENGTH(HPMDataCheck); +HPExport int HPMDataCheckVer = 1; #endif /* HPM_DATA_CHECK_H */ diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 478cfbdd9..485586f6f 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -36,6 +36,7 @@ struct hplugin_info { struct s_HPMDataCheck { char *name; unsigned int size; + int type; }; HPExport void *(*import_symbol) (char *name, unsigned int pID); diff --git a/src/login/HPMlogin.c b/src/login/HPMlogin.c new file mode 100644 index 000000000..6b223d249 --- /dev/null +++ b/src/login/HPMlogin.c @@ -0,0 +1,53 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file + +#define HERCULES_CORE + +#include "HPMlogin.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + +#include "../common/HPM.h" +#include "../common/cbasetypes.h" +#include "../common/conf.h" +#include "../common/db.h" +#include "../common/des.h" +#include "../common/ers.h" +#include "../common/malloc.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/sysinfo.h" + +#include "../common/HPMDataCheck.h" + +bool HPM_login_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { + /* record address */ + switch( type ) { + default: + return false; + } + return true; +} + +void HPM_login_plugin_load_sub(struct hplugin *plugin) { +} + +void HPM_login_do_init(void) { +#if 0 // TODO (HPMDataCheck is disabled for the time being) + HPM->datacheck_init(HPMDataCheck, HPMDataCheckLen, HPMDataCheckVer); +#else + HPM->DataCheck = NULL; +#endif +} + +void HPM_login_do_final(void) { +#if 0 // TODO (HPMDataCheck is disabled for the time being) + HPM->datacheck_final(); +#endif +} diff --git a/src/login/HPMlogin.h b/src/login/HPMlogin.h new file mode 100644 index 000000000..6bdc0fb7b --- /dev/null +++ b/src/login/HPMlogin.h @@ -0,0 +1,20 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file + +#ifndef LOGIN_HPMLOGIN_H +#define LOGIN_HPMLOGIN_H + +#include "../common/cbasetypes.h" +#include "../common/HPM.h" + +struct hplugin; + +bool HPM_login_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); + +void HPM_login_plugin_load_sub(struct hplugin *plugin); + +void HPM_login_do_final(void); + +void HPM_login_do_init(void); + +#endif /* LOGIN_HPMLOGIN_H */ diff --git a/src/login/Makefile.in b/src/login/Makefile.in index a4aec59cf..9b1db69c2 100644 --- a/src/login/Makefile.in +++ b/src/login/Makefile.in @@ -22,9 +22,9 @@ MT19937AR_OBJ = $(MT19937AR_D)/mt19937ar.o MT19937AR_H = $(MT19937AR_D)/mt19937ar.h MT19937AR_INCLUDE = -I$(MT19937AR_D) -LOGIN_C = account_sql.c ipban_sql.c login.c loginlog_sql.c +LOGIN_C = account_sql.c HPMlogin.c ipban_sql.c login.c loginlog_sql.c LOGIN_OBJ = $(addprefix obj_sql/, $(patsubst %.c,%.o,$(LOGIN_C))) -LOGIN_H = login.h account.h ipban.h loginlog.h +LOGIN_H = login.h account.h HPMlogin.h ipban.h loginlog.h HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 10852e5b1..5f9357c81 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -169,6 +169,10 @@ static bool account_db_sql_init(AccountDB* self) if( codepage[0] != '\0' && SQL_ERROR == SQL->SetEncoding(sql_handle, codepage) ) Sql_ShowDebug(sql_handle); + Sql_HerculesUpdateCheck(db->accounts); +#ifdef CONSOLE_INPUT + console->input->setSQL(db->accounts); +#endif return true; } @@ -655,11 +659,7 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo Sql* account_db_sql_up(AccountDB* self) { AccountDB_SQL* db = (AccountDB_SQL*)self; - Sql_HerculesUpdateCheck(db->accounts); -#ifdef CONSOLE_INPUT - console->input->setSQL(db->accounts); -#endif - return db->accounts; + return db ? db->accounts : NULL; } void mmo_save_accreg2(AccountDB* self, int fd, int account_id, int char_id) { Sql* sql_handle = ((AccountDB_SQL*)self)->accounts; diff --git a/src/login/login.c b/src/login/login.c index 129049627..9aa2e778b 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -10,6 +10,7 @@ #include <stdlib.h> #include <string.h> +#include "HPMlogin.h" #include "account.h" #include "ipban.h" #include "loginlog.h" @@ -1737,6 +1738,10 @@ int do_final(void) { login_fd = -1; } + HPM_login_do_final(); + + HPM->event(HPET_POST_FINAL); + ShowStatus("Finished.\n"); return EXIT_SUCCESS; } @@ -1770,6 +1775,9 @@ void do_shutdown(void) } } +void login_hp_symbols(void) { + HPM->share(account_db_sql_up(accounts),"sql_handle"); +} //------------------------------ // Login server initialization @@ -1780,9 +1788,38 @@ int do_init(int argc, char** argv) // initialize engine (to accept config settings) account_engine[0].db = account_engine[0].constructor(); + accounts = account_engine[0].db; + if( accounts == NULL ) { + ShowFatalError("do_init: account engine 'sql' not found.\n"); + exit(EXIT_FAILURE); + } // read login-server configuration login_set_defaults(); + + HPM_login_do_init(); + HPM->symbol_defaults_sub = login_hp_symbols; + HPM->config_read(NULL, 0); +#if 0 + /* TODO: Move to common code */ + for( i = 1; i < argc; i++ ) { + const char* arg = argv[i]; + if( strcmp(arg, "--load-plugin") == 0 ) { + if( map->arg_next_value(arg, i, argc, true) ) { + RECREATE(load_extras, char *, ++load_extras_count); + load_extras[load_extras_count-1] = argv[++i]; + } + } + } + HPM->config_read((const char * const *)load_extras, load_extras_count); + if (load_extras) { + aFree(load_extras); + load_extras = NULL; + load_extras_count = 0; + } +#endif + HPM->event(HPET_PRE_INIT); + login_config_read((argc > 1) ? argv[1] : LOGIN_CONF_NAME); login_lan_config_read((argc > 2) ? argv[2] : LAN_CONF_NAME); @@ -1817,20 +1854,11 @@ int do_init(int argc, char** argv) } // Account database init - accounts = account_engine[0].db; - if( accounts == NULL ) { - ShowFatalError("do_init: account engine 'sql' not found.\n"); + if(!accounts->init(accounts)) { + ShowFatalError("do_init: Failed to initialize account engine 'sql'.\n"); exit(EXIT_FAILURE); - } else { - - if(!accounts->init(accounts)) { - ShowFatalError("do_init: Failed to initialize account engine 'sql'.\n"); - exit(EXIT_FAILURE); - } } - HPM->share(account_db_sql_up(accounts),"sql_handle"); - HPM->config_read(NULL, 0); HPM->event(HPET_INIT); // server port open & binding diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index cb8c979c6..a0701ae45 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -74,11 +74,6 @@ struct HPM_atcommand_list { struct HPM_atcommand_list *atcommand_list = NULL; unsigned int atcommand_list_items = 0; -/** - * (char*) data name -> (unsigned int) HPMDataCheck[] index - **/ -DBMap *datacheck_db; - bool HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { /* record address */ switch( type ) { @@ -147,29 +142,6 @@ void HPM_map_atcommands(void) { } /** - * Called by HPM->DataCheck on a plugins incoming data, ensures data structs in use are matching! - **/ -bool HPM_map_DataCheck (struct s_HPMDataCheck *src, unsigned int size, char *name) { - unsigned int i, j; - - for(i = 0; i < size; i++) { - - if( !strdb_exists(datacheck_db, src[i].name) ) { - ShowError("HPMDataCheck:%s: '%s' was not found\n",name,src[i].name); - return false; - } else { - j = strdb_uiget(datacheck_db, src[i].name);/* not double lookup; exists sets cache to found data */ - if( src[i].size != HPMDataCheck[j].size ) { - ShowWarning("HPMDataCheck:%s: '%s' size mismatch %u != %u\n",name,src[i].name,src[i].size,HPMDataCheck[j].size); - return false; - } - } - } - - return true; -} - -/** * Adds a new group permission to the HPM-provided list **/ void HPM_map_add_group_permission(unsigned int pluginID, char *name, unsigned int *mask) { @@ -183,17 +155,9 @@ void HPM_map_add_group_permission(unsigned int pluginID, char *name, unsigned in } void HPM_map_do_init(void) { - unsigned int i; - - /** - * Populates datacheck_db for easy lookup later on - **/ - datacheck_db = strdb_alloc(DB_OPT_BASE,0); - - for(i = 0; i < HPMDataCheckLen; i++) { - strdb_uiput(datacheck_db, HPMDataCheck[i].name, i); - } - + HPM->load_sub = HPM_map_plugin_load_sub; + HPM->grabHPDataSub = HPM_map_grabHPData; + HPM->datacheck_init(HPMDataCheck, HPMDataCheckLen, HPMDataCheckVer); } void HPM_map_do_final(void) { @@ -211,5 +175,5 @@ void HPM_map_do_final(void) { if( pcg->HPMpermissions ) aFree(pcg->HPMpermissions); - db_destroy(datacheck_db); + HPM->datacheck_final(); } diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h index 99c4224ff..fa2f625c0 100644 --- a/src/map/HPMmap.h +++ b/src/map/HPMmap.h @@ -22,8 +22,6 @@ void HPM_map_do_final(void); void HPM_map_add_group_permission(unsigned int pluginID, char *name, unsigned int *mask); -bool HPM_map_DataCheck(struct s_HPMDataCheck *src, unsigned int size, char *name); - void HPM_map_do_init(void); #endif /* MAP_HPMMAP_H */ diff --git a/src/map/battle.c b/src/map/battle.c index 88d83f91b..40ef15191 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6838,7 +6838,8 @@ static const struct battle_data { { "song_timer_reset", &battle_config.song_timer_reset, 0, 0, 1, }, { "snap_dodge", &battle_config.snap_dodge, 0, 0, 1, }, { "monster_chase_refresh", &battle_config.mob_chase_refresh, 1, 0, 30, }, - { "icewall_walk_block", &battle_config.icewall_walk_block, 75, 0, 255, } + { "mob_icewall_walk_block", &battle_config.mob_icewall_walk_block, 75, 0, 255, }, + { "boss_icewall_walk_block", &battle_config.boss_icewall_walk_block, 0, 0, 255, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index 6ac2df391..1b6321cbf 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -452,7 +452,8 @@ struct Battle_Config { int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95] int bowling_bash_area; int mob_chase_refresh; //How often a monster should refresh its chase [Playtester] - int icewall_walk_block; //How long a monster should stay trapped in icewall [Playtester] + int mob_icewall_walk_block; //How a normal monster should be trapped in icewall [Playtester] + int boss_icewall_walk_block; //How a boss monster should be trapped in icewall [Playtester] /** Hercules **/ int skill_trap_type; diff --git a/src/map/map.c b/src/map/map.c index 045233e91..bb3b17822 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5614,10 +5614,7 @@ int do_init(int argc, char *argv[]) map_load_defaults(); HPM_map_do_init(); - HPM->DataCheck = HPM_map_DataCheck; - HPM->load_sub = HPM_map_plugin_load_sub; HPM->symbol_defaults_sub = map_hp_symbols; - HPM->grabHPDataSub = HPM_map_grabHPData; for( i = 1; i < argc; i++ ) { const char* arg = argv[i]; if( strcmp(arg, "--load-plugin") == 0 ) { diff --git a/src/map/mob.c b/src/map/mob.c index eaf8c8468..23706d293 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1429,7 +1429,7 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { //No valid target if (mob->warpchase(md, tbl)) return true; //Chasing this target. - if(md->ud.walktimer != INVALID_TIMER && md->ud.walkpath.path_pos <= battle_config.mob_chase_refresh) + if(md->ud.walktimer != INVALID_TIMER && (!can_move || md->ud.walkpath.path_pos <= battle_config.mob_chase_refresh)) return true; //Walk at least "mob_chase_refresh" cells before dropping the target mob_unlocktarget(md, tick); //Unlock target tbl = NULL; @@ -1442,13 +1442,14 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { if( md->attacked_id == md->target_id ) { //Rude attacked check. if( !battle->check_range(&md->bl, tbl, md->status.rhw.range) - && ( //Can't attack back and can't reach back. + && ( //Can't attack back and can't reach back. (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 && (battle_config.mob_ai&0x2 || (md->sc.data[SC_SPIDERWEB] && md->sc.data[SC_SPIDERWEB]->val1) - || md->sc.data[SC_WUGBITE] || md->sc.data[SC_VACUUM_EXTREME] || md->sc.data[SC_THORNS_TRAP] - || md->sc.data[SC__MANHOLE])) // Not yet confirmed if boss will teleport once it can't reach target. - || !mob->can_reach(md, tbl, md->min_chase, MSS_RUSH) - || md->walktoxy_fail_count > 0 + || md->sc.data[SC_WUGBITE] || md->sc.data[SC_VACUUM_EXTREME] || md->sc.data[SC_THORNS_TRAP] + || md->sc.data[SC__MANHOLE] // Not yet confirmed if boss will teleport once it can't reach target. + || md->walktoxy_fail_count > 0) ) + || !mob->can_reach(md, tbl, md->min_chase, MSS_RUSH) + ) && md->state.attacked_count++ >= RUDE_ATTACKED_COUNT && !mob->skill_use(md, tick, MSC_RUDEATTACKED) // If can't rude Attack && can_move && unit->escape(&md->bl, tbl, rnd()%10 +1)) // Attempt escape @@ -1466,11 +1467,12 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { || (battle_config.mob_ai&0x2 && !status->check_skilluse(&md->bl, abl, 0, 0)) // Cannot normal attack back to Attacker || (!battle->check_range(&md->bl, abl, md->status.rhw.range) // Not on Melee Range and ... && ( // Reach check - (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 && (battle_config.mob_ai&0x2 || (md->sc.data[SC_SPIDERWEB] && md->sc.data[SC_SPIDERWEB]->val1) - || md->sc.data[SC_WUGBITE] || md->sc.data[SC_VACUUM_EXTREME] || md->sc.data[SC_THORNS_TRAP] - || md->sc.data[SC__MANHOLE])) // Not yet confirmed if boss will teleport once it can't reach target. - || !mob->can_reach(md, abl, dist+md->db->range3, MSS_RUSH) - || md->walktoxy_fail_count > 0 + (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 && (battle_config.mob_ai&0x2 || (md->sc.data[SC_SPIDERWEB] && md->sc.data[SC_SPIDERWEB]->val1) + || md->sc.data[SC_WUGBITE] || md->sc.data[SC_VACUUM_EXTREME] || md->sc.data[SC_THORNS_TRAP] + || md->sc.data[SC__MANHOLE] // Not yet confirmed if boss will teleport once it can't reach target. + || md->walktoxy_fail_count > 0) + ) + || !mob->can_reach(md, abl, dist+md->db->range3, MSS_RUSH) ) ) ) { @@ -1636,6 +1638,9 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { if(battle->check_range(&md->bl, tbl, md->status.rhw.range)) return true; + //Only update target cell / drop target after having moved at least "mob_chase_refresh" cells + if(md->ud.walktimer != INVALID_TIMER && (!can_move || md->ud.walkpath.path_pos <= battle_config.mob_chase_refresh)) + return true; //Out of range... if (!(mode&MD_CANMOVE) || (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0)) @@ -1655,10 +1660,6 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { )) //Current target tile is still within attack range. return true; - //Only update target cell after having moved at least "mob_chase_refresh" cells - if(md->ud.walktimer != INVALID_TIMER && md->ud.walkpath.path_pos <= battle_config.mob_chase_refresh) - return true; - //Follow up if possible. //Hint: Chase skills are handled in the walktobl routine if(!mob->can_reach(md, tbl, md->min_chase, MSS_RUSH) || diff --git a/src/map/script.c b/src/map/script.c index f4c343452..1516a0234 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8761,6 +8761,7 @@ BUILDIN(setmount) flag == SETMOUNT_TYPE_DRAGON_RED ? OPTION_DRAGON5 : OPTION_DRAGON1); // default value pc->setridingdragon(sd, option); + } } else if ((sd->class_&MAPID_THIRDMASK) == MAPID_RANGER) { // Ranger (Warg) if (pc->checkskill(sd, RA_WUGRIDER)) @@ -8769,8 +8770,6 @@ BUILDIN(setmount) // Mechanic (Mado Gear) if (pc->checkskill(sd, NC_MADOLICENCE)) pc->setmadogear(sd, true); - } else if (flag != SETMOUNT_TYPE_PECO) - flag = SETMOUNT_TYPE_PECO; } else { // Knight / Crusader (Peco Peco) if (pc->checkskill(sd, KN_RIDING)) diff --git a/src/map/skill.c b/src/map/skill.c index f762c4b41..340fd0ec5 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -15261,9 +15261,10 @@ int skill_cell_overlap(struct block_list *bl, va_list ap) { break; } break; + case WZ_ICEWALL: case HP_BASILICA: - if (su->group->skill_id == HP_BASILICA) { - //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex] + if (su->group->skill_id == skill_id) { + //These can't be placed on top of themselves (duration can't be refreshed) (*alive) = 0; return 1; } diff --git a/src/map/status.c b/src/map/status.c index addf290ac..66f7db3fa 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -11345,7 +11345,7 @@ int status_change_timer_sub(struct block_list* bl, va_list ap) { if (sce && skill->attack(BF_MAGIC,src,src,bl,WZ_SIGHTBLASTER,sce->val1,tick,0x4000) && (!su || !su->group || !(skill->get_inf2(su->group->skill_id)&INF2_TRAP))) { // The hit is not counted if it's against a trap sce->val2 = 0; // This signals it to end. - } else if((bl->type&BL_SKILL) && sce->val4%2 == 0) { + } else if ((bl->type&BL_SKILL) && sce && sce->val4%2 == 0) { //Remove trap immunity temporarily so it triggers if you still stand on it sce->val4++; } diff --git a/src/map/unit.c b/src/map/unit.c index 849e9348f..76a5853df 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -108,11 +108,11 @@ int unit_walktoxy_sub(struct block_list *bl) uint8 dir; //Trim the last part of the path to account for range, //but always move at least one cell when requested to move. - for (i = ud->chaserange*10; i > 0 && ud->walkpath.path_len>1;) { + for (i = (ud->chaserange*10)-10; i > 0 && ud->walkpath.path_len>1;) { ud->walkpath.path_len--; dir = ud->walkpath.path[ud->walkpath.path_len]; if(dir&1) - i -= MOVE_DIAGONAL_COST; + i -= MOVE_COST*20; //When chasing, units will target a diamond-shaped area in range [Playtester] else i -= MOVE_COST; ud->to_x -= dirx[dir]; @@ -211,6 +211,7 @@ int unit_step_timer(int tid, int64 tick, int id, intptr_t data) int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { int i; int x,y,dx,dy; + unsigned char icewall_walk_block; uint8 dir; struct block_list *bl; struct map_session_data *sd; @@ -249,19 +250,29 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { dx = dirx[(int)dir]; dy = diry[(int)dir]; + //Get icewall walk block depending on boss mode (players can't be trapped) + if(md && md->status.mode&MD_BOSS) + icewall_walk_block = battle_config.boss_icewall_walk_block; + else if(md) + icewall_walk_block = battle_config.mob_icewall_walk_block; + else + icewall_walk_block = 0; + //Monsters will walk into an icewall from the west and south if they already started walking if(map->getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS) - && (battle_config.icewall_walk_block == 0 || !map->getcell(bl->m,x+dx,y+dy,CELL_CHKICEWALL) || dx < 0 || dy < 0)) + && (icewall_walk_block == 0 || !map->getcell(bl->m,x+dx,y+dy,CELL_CHKICEWALL) || dx < 0 || dy < 0)) return unit->walktoxy_sub(bl); //Monsters can only leave icewalls to the west and south //But if movement fails more than icewall_walk_block times, they can ignore this rule - if(md && md->walktoxy_fail_count < battle_config.icewall_walk_block && map->getcell(bl->m,x,y,CELL_CHKICEWALL) && (dx > 0 || dy > 0)) { + if(md && md->walktoxy_fail_count < icewall_walk_block && map->getcell(bl->m,x,y,CELL_CHKICEWALL) && (dx > 0 || dy > 0)) { //Needs to be done here so that rudeattack skills are invoked md->walktoxy_fail_count++; clif->fixpos(bl); + //Monsters in this situation first use a chase skill, then unlock target and then use an idle skill + if (!(++ud->walk_count%WALK_SKILL_INTERVAL)) + mob->skill_use(md, tick, -1); mob->unlocktarget(md, tick); - //Use idle skill at this point if (!(++ud->walk_count%WALK_SKILL_INTERVAL)) mob->skill_use(md, tick, -1); return 0; @@ -1060,6 +1071,17 @@ int unit_can_move(struct block_list *bl) { return 0; } + + // Icewall walk block special trapped monster mode + if(bl->type == BL_MOB) { + struct mob_data *md = BL_CAST(BL_MOB, bl); + if(md && ((md->status.mode&MD_BOSS && battle_config.boss_icewall_walk_block == 1 && map->getcell(bl->m,bl->x,bl->y,CELL_CHKICEWALL)) + || (!(md->status.mode&MD_BOSS) && battle_config.mob_icewall_walk_block == 1 && map->getcell(bl->m,bl->x,bl->y,CELL_CHKICEWALL)))) { + md->walktoxy_fail_count = 1; //Make sure rudeattacked skills are invoked + return 0; + } + } + return 1; } diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c index 46792b268..3f3ecc4ec 100644 --- a/src/plugins/HPMHooking.c +++ b/src/plugins/HPMHooking.c @@ -11,6 +11,29 @@ #include "../common/malloc.h" #include "../common/mmo.h" #include "../common/socket.h" + +#if defined (HPMHOOKING_LOGIN) +#define HPM_SERVER_TYPE SERVER_TYPE_LOGIN +#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc" +#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking_login.GetSymbol.inc" +#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking_login.Hooks.inc" +#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking_login.HookingPoints.inc" +#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking_login.sources.inc" +#elif defined (HPMHOOKING_CHAR) +#define HPM_SERVER_TYPE SERVER_TYPE_CHAR +#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc" +#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking_char.GetSymbol.inc" +#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking_char.Hooks.inc" +#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking_char.HookingPoints.inc" +#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking_char.sources.inc" +#include "../char/pincode.h" +#elif defined (HPMHOOKING_MAP) +#define HPM_SERVER_TYPE SERVER_TYPE_MAP +#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc" +#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking_map.GetSymbol.inc" +#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking_map.Hooks.inc" +#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking_map.HookingPoints.inc" +#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking_map.sources.inc" #include "../map/atcommand.h" #include "../map/battle.h" #include "../map/battleground.h" @@ -44,13 +67,22 @@ #include "../map/storage.h" #include "../map/trade.h" #include "../map/unit.h" +#else +#define HPM_SERVER_TYPE SERVER_TYPE_UNKNOWN +#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking.HPMHooksCore.inc" +#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking.GetSymbol.inc" +#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking.Hooks.inc" +#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking.HookingPoints.inc" +#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking.sources.inc" +#error HPMHooking plugin needs to be compiled for a specific server type. Please make sure your Makefiles are up to date. +#endif #include "../common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "HPMHooking", // Plugin name - SERVER_TYPE_MAP,// Which server types this plugin works with? - "0.1", // Plugin version + HPM_SERVER_TYPE,// Which server types this plugin works with? + "0.2", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; @@ -70,7 +102,7 @@ struct HPMHookPoint { }; struct HPMHooksCore { - #include "../plugins/HPMHooking/HPMHooking.HPMHooksCore.inc" + #include HPM_CORE_INCLUDE struct { int total; } data; @@ -89,7 +121,7 @@ HPExport bool Hooked (bool *fr) { HPMforce_return = fr; DB = GET_SYMBOL("DB"); iMalloc = GET_SYMBOL("iMalloc"); -#include "../plugins/HPMHooking/HPMHooking.GetSymbol.inc" +#include HPM_SYMBOL_INCLUDE HPM_HP_load(); return true; } @@ -127,7 +159,7 @@ HPExport bool HPM_Plugin_AddHook(enum HPluginHookType type, const char *target, return false; } -#include "../plugins/HPMHooking/HPMHooking.Hooks.inc" +#include HPM_HOOKS_INCLUDE void HPM_HP_final(void) { int i, len = HPMHooks.data.total * 2; @@ -149,7 +181,7 @@ void HPM_HP_final(void) { } void HPM_HP_load(void) { - #include "../plugins/HPMHooking/HPMHooking.HookingPoints.inc" + #include HPM_POINTS_INCLUDE int i, len = ARRAYLENGTH(HookingPoints), idx = 0; memset(&HPMHooks,0,sizeof(struct HPMHooksCore)); @@ -171,6 +203,6 @@ void HPM_HP_load(void) { HPMHooks.data.total++; } - #include "../plugins/HPMHooking/HPMHooking.sources.inc" + #include HPM_SOURCES_INCLUDE } diff --git a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc new file mode 100644 index 000000000..84800ca49 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc @@ -0,0 +1,7 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +if( !(pincode = GET_SYMBOL("pincode") ) ) return false; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc new file mode 100644 index 000000000..4a940739f --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -0,0 +1,55 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +struct { + struct HPMHookPoint *HP_pincode_handle_pre; + struct HPMHookPoint *HP_pincode_handle_post; + struct HPMHookPoint *HP_pincode_decrypt_pre; + struct HPMHookPoint *HP_pincode_decrypt_post; + struct HPMHookPoint *HP_pincode_error_pre; + struct HPMHookPoint *HP_pincode_error_post; + struct HPMHookPoint *HP_pincode_update_pre; + struct HPMHookPoint *HP_pincode_update_post; + struct HPMHookPoint *HP_pincode_sendstate_pre; + struct HPMHookPoint *HP_pincode_sendstate_post; + struct HPMHookPoint *HP_pincode_setnew_pre; + struct HPMHookPoint *HP_pincode_setnew_post; + struct HPMHookPoint *HP_pincode_change_pre; + struct HPMHookPoint *HP_pincode_change_post; + struct HPMHookPoint *HP_pincode_compare_pre; + struct HPMHookPoint *HP_pincode_compare_post; + struct HPMHookPoint *HP_pincode_check_pre; + struct HPMHookPoint *HP_pincode_check_post; + struct HPMHookPoint *HP_pincode_config_read_pre; + struct HPMHookPoint *HP_pincode_config_read_post; +} list; + +struct { + int HP_pincode_handle_pre; + int HP_pincode_handle_post; + int HP_pincode_decrypt_pre; + int HP_pincode_decrypt_post; + int HP_pincode_error_pre; + int HP_pincode_error_post; + int HP_pincode_update_pre; + int HP_pincode_update_post; + int HP_pincode_sendstate_pre; + int HP_pincode_sendstate_post; + int HP_pincode_setnew_pre; + int HP_pincode_setnew_post; + int HP_pincode_change_pre; + int HP_pincode_change_post; + int HP_pincode_compare_pre; + int HP_pincode_compare_post; + int HP_pincode_check_pre; + int HP_pincode_check_post; + int HP_pincode_config_read_pre; + int HP_pincode_config_read_post; +} count; + +struct { + struct pincode_interface pincode; +} source; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc new file mode 100644 index 000000000..11c3b86a7 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -0,0 +1,21 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +struct HookingPointData HookingPoints[] = { +/* pincode */ + { HP_POP(pincode->handle, HP_pincode_handle) }, + { HP_POP(pincode->decrypt, HP_pincode_decrypt) }, + { HP_POP(pincode->error, HP_pincode_error) }, + { HP_POP(pincode->update, HP_pincode_update) }, + { HP_POP(pincode->sendstate, HP_pincode_sendstate) }, + { HP_POP(pincode->setnew, HP_pincode_setnew) }, + { HP_POP(pincode->change, HP_pincode_change) }, + { HP_POP(pincode->compare, HP_pincode_compare) }, + { HP_POP(pincode->check, HP_pincode_check) }, + { HP_POP(pincode->config_read, HP_pincode_config_read) }, +}; + +int HookingPointsLenMax = 20; diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc new file mode 100644 index 000000000..d795ebb4a --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -0,0 +1,269 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +/* pincode */ +void HP_pincode_handle(int fd, struct char_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_handle_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_handle_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.handle(fd, sd); + } + if( HPMHooks.count.HP_pincode_handle_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_handle_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_pincode_decrypt(unsigned int userSeed, char *pin) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_decrypt_pre ) { + void (*preHookFunc) (unsigned int *userSeed, char *pin); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_decrypt_pre[hIndex].func; + preHookFunc(&userSeed, pin); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.decrypt(userSeed, pin); + } + if( HPMHooks.count.HP_pincode_decrypt_post ) { + void (*postHookFunc) (unsigned int *userSeed, char *pin); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_decrypt_post[hIndex].func; + postHookFunc(&userSeed, pin); + } + } + return; +} +void HP_pincode_error(int account_id) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_error_pre ) { + void (*preHookFunc) (int *account_id); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_error_pre[hIndex].func; + preHookFunc(&account_id); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.error(account_id); + } + if( HPMHooks.count.HP_pincode_error_post ) { + void (*postHookFunc) (int *account_id); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_error_post[hIndex].func; + postHookFunc(&account_id); + } + } + return; +} +void HP_pincode_update(int account_id, char *pin) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_update_pre ) { + void (*preHookFunc) (int *account_id, char *pin); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_update_pre[hIndex].func; + preHookFunc(&account_id, pin); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.update(account_id, pin); + } + if( HPMHooks.count.HP_pincode_update_post ) { + void (*postHookFunc) (int *account_id, char *pin); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_update_post[hIndex].func; + postHookFunc(&account_id, pin); + } + } + return; +} +void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_sendstate_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd, uint16 *state); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_sendstate_pre[hIndex].func; + preHookFunc(&fd, sd, &state); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.sendstate(fd, sd, state); + } + if( HPMHooks.count.HP_pincode_sendstate_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd, uint16 *state); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_sendstate_post[hIndex].func; + postHookFunc(&fd, sd, &state); + } + } + return; +} +void HP_pincode_setnew(int fd, struct char_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_setnew_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_setnew_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.setnew(fd, sd); + } + if( HPMHooks.count.HP_pincode_setnew_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_setnew_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +void HP_pincode_change(int fd, struct char_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_change_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_change_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.change(fd, sd); + } + if( HPMHooks.count.HP_pincode_change_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_change_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { + int hIndex = 0; + int retVal___ = 0; + if( HPMHooks.count.HP_pincode_compare_pre ) { + int (*preHookFunc) (int *fd, struct char_session_data *sd, char *pin); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_compare_pre[hIndex].func; + retVal___ = preHookFunc(&fd, sd, pin); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pincode.compare(fd, sd, pin); + } + if( HPMHooks.count.HP_pincode_compare_post ) { + int (*postHookFunc) (int retVal___, int *fd, struct char_session_data *sd, char *pin); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_compare_post[hIndex].func; + retVal___ = postHookFunc(retVal___, &fd, sd, pin); + } + } + return retVal___; +} +void HP_pincode_check(int fd, struct char_session_data *sd) { + int hIndex = 0; + if( HPMHooks.count.HP_pincode_check_pre ) { + void (*preHookFunc) (int *fd, struct char_session_data *sd); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_check_pre[hIndex].func; + preHookFunc(&fd, sd); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.check(fd, sd); + } + if( HPMHooks.count.HP_pincode_check_post ) { + void (*postHookFunc) (int *fd, struct char_session_data *sd); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_check_post[hIndex].func; + postHookFunc(&fd, sd); + } + } + return; +} +bool HP_pincode_config_read(char *w1, char *w2) { + int hIndex = 0; + bool retVal___ = false; + if( HPMHooks.count.HP_pincode_config_read_pre ) { + bool (*preHookFunc) (char *w1, char *w2); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_pincode_config_read_pre[hIndex].func; + retVal___ = preHookFunc(w1, w2); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pincode.config_read(w1, w2); + } + if( HPMHooks.count.HP_pincode_config_read_post ) { + bool (*postHookFunc) (bool retVal___, char *w1, char *w2); + for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_pincode_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, w1, w2); + } + } + return retVal___; +} diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc new file mode 100644 index 000000000..fd5d2d2bf --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc @@ -0,0 +1,7 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +memcpy(&HPMHooks.source.pincode, pincode, sizeof(struct pincode_interface)); diff --git a/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc new file mode 100644 index 000000000..6dcfae29d --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc @@ -0,0 +1,6 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc new file mode 100644 index 000000000..4c380b367 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -0,0 +1,14 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +struct { +} list; + +struct { +} count; + +struct { +} source; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc new file mode 100644 index 000000000..6752a4324 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -0,0 +1,10 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + +struct HookingPointData HookingPoints[] = { +}; + +int HookingPointsLenMax = 0; diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc new file mode 100644 index 000000000..6dcfae29d --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -0,0 +1,6 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc new file mode 100644 index 000000000..6dcfae29d --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc @@ -0,0 +1,6 @@ +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// +// NOTE: This file was auto-generated and should never be manually edited, +// as it will get overwritten. + diff --git a/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc index 8482b9f80..8482b9f80 100644 --- a/src/plugins/HPMHooking/HPMHooking.GetSymbol.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 6054e9d9a..6054e9d9a 100644 --- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index e2f946f7e..e2f946f7e 100644 --- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index f47cf27f0..f47cf27f0 100644 --- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc diff --git a/src/plugins/HPMHooking/HPMHooking.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc index 53bb6bcad..53bb6bcad 100644 --- a/src/plugins/HPMHooking/HPMHooking.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 39f445319..7f94e6b67 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -24,10 +24,11 @@ MYPLUGINS = ######### DO NOT EDIT ANYTHING BELOW THIS LINE!!! ################## # All plugins in the src/plugins directory -ALLPLUGINS = $(basename $(wildcard *.c)) +HPMHOOKING = $(addprefix HPMHooking_, login char map) +ALLPLUGINS = $(filter-out HPMHooking, $(basename $(wildcard *.c))) $(HPMHOOKING) # Plugins that will be built through 'make plugins' or 'make all' -PLUGINS = sample db2sql HPMHooking $(MYPLUGINS) +PLUGINS = sample db2sql HPMHooking_map $(MYPLUGINS) COMMON_D = ../common COMMON_H = $(wildcard $(COMMON_D)/*.h) @@ -46,11 +47,14 @@ CC = @CC@ export CC ##################################################################### -.PHONY: all $(ALLPLUGINS) clean buildclean help +.PHONY: all $(ALLPLUGINS) HPMHooking clean buildclean help all: $(PLUGINS) Makefile $(ALLPLUGINS): %: ../../plugins/%@DLLEXT@ + @echo " PLUGIN $@" + +HPMHooking: $(HPMHOOKING) buildclean: @echo " CLEAN plugins (build temp files)" @@ -81,3 +85,11 @@ Makefile: Makefile.in ../../plugins/%@DLLEXT@: %.c $(ALL_H) $$(shell ls %/* 2>/dev/null) @echo " CC $<" @$(CC) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< + +../../plugins/HPMHooking_login@DLLEXT@: HPMHOOKINGTYPE = LOGIN +../../plugins/HPMHooking_char@DLLEXT@: HPMHOOKINGTYPE = CHAR +../../plugins/HPMHooking_map@DLLEXT@: HPMHOOKINGTYPE = MAP + +../../plugins/HPMHooking_%@DLLEXT@: HPMHooking.c $(ALL_H) $$(shell ls HPMHooking/*_%* HPMHooking/*_common* 2>/dev/null) + @echo " CC $< ($(HPMHOOKINGTYPE))" + @$(CC) -DHPMHOOKING_$(HPMHOOKINGTYPE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< diff --git a/src/plugins/sample.c b/src/plugins/sample.c index 84df88e06..88ef84d48 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -19,7 +19,7 @@ HPExport struct hplugin_info pinfo = { "Sample", // Plugin name - SERVER_TYPE_MAP,// Which server types this plugin works with? + SERVER_TYPE_LOGIN|SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; diff --git a/tools/HPMHookGen/HPMDataCheckGen.pl b/tools/HPMHookGen/HPMDataCheckGen.pl index 7ec1ba7e4..f950152d1 100644 --- a/tools/HPMHookGen/HPMDataCheckGen.pl +++ b/tools/HPMHookGen/HPMDataCheckGen.pl @@ -13,6 +13,8 @@ local $ENV{XML_SIMPLE_PREFERRED_PARSER} = 'XML::Parser'; # 0m4.256s #local $ENV{XML_SIMPLE_PREFERRED_PARSER} = 'XML::SAX::Expat'; # 0m14.186s #local $ENV{XML_SIMPLE_PREFERRED_PARSER} = 'XML::LibXML::SAX'; # 0m7.055s +my $HPMDataCheckAPIVer = 1; + my @files = grep { -f } grep { /[^h]\.xml/ } glob 'doxyoutput/xml/struct*.xml'; my %out; @@ -24,8 +26,15 @@ foreach my $file (@files) { my @filepath = split(/[\/\\]/, $data->{compounddef}->{location}->{file}); my $foldername = uc($filepath[-2]); my $filename = uc($filepath[-1]); $filename =~ s/-/_/g; $filename =~ s/\.[^.]*$//; + my $plugintypes = 'SERVER_TYPE_UNKNOWN'; + $plugintypes = 'SERVER_TYPE_ALL' if $foldername eq 'COMMON'; + $plugintypes = "SERVER_TYPE_${foldername}" if $foldername =~ /^(LOGIN|CHAR|MAP)/; + my $symboldata = { + name => $data->{compounddef}->{compoundname}, + type => $plugintypes, + }; my $name = "${foldername}_${filename}_H"; - push @{ $out{$name} }, $data->{compounddef}->{compoundname}; + push @{ $out{$name} }, $symboldata; } my $fname = '../../src/common/HPMDataCheck.h'; @@ -49,8 +58,10 @@ foreach my $key (sort keys %out) { #ifdef $key EOF foreach my $entry (@{ $out{$key} }) { + my $entryname = $$entry{name}; + my $entrytype = $$entry{type}; print FH <<"EOF" - { "$entry", sizeof(struct $entry) }, + { "$entryname", sizeof(struct $entryname), $entrytype }, EOF } print FH <<"EOF" @@ -62,6 +73,7 @@ EOF print FH <<"EOF"; }; HPExport unsigned int HPMDataCheckLen = ARRAYLENGTH(HPMDataCheck); +HPExport int HPMDataCheckVer = $HPMDataCheckAPIVer; #endif /* HPM_DATA_CHECK_H */ EOF diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl index 3e2a11e5d..fa5bd1150 100755 --- a/tools/HPMHookGen/HPMHookGen.pl +++ b/tools/HPMHookGen/HPMHookGen.pl @@ -250,14 +250,19 @@ sub parse($$) { my %key2original; my @files = grep { -f } glob 'doxyoutput/xml/*interface*.xml'; my %ifs; -my @keys; +my %keys = ( + login => [ ], + char => [ ], + map => [ ], +); foreach my $file (@files) { # Loop through the xml files my $xml = new XML::Simple; my $data = $xml->XMLin($file); my $loc = $data->{compounddef}->{location}; - next unless $loc->{file} =~ /src\/map\//; # We only handle mapserver for the time being + next unless $loc->{file} =~ /src\/(map|char|login)\//; + my $servertype = $1; my $key = $data->{compounddef}->{compoundname}; my $original = $key; @@ -370,25 +375,27 @@ foreach my $file (@files) { # Loop through the xml files push(@{ $ifs{$key} }, $if); } } - push(@keys, $key) if $key2original{$key}; + push($keys{$servertype}, $key) if $key2original{$key}; } -# Some interfaces use different names -my %exportsymbols = map { - $_ => &{ sub ($) { - return 'battlegrounds' if $_ =~ /^bg$/; - return 'pc_groups' if $_ =~ /^pcg$/; - return $_; - }}($_); -} @keys; - -my ($maxlen, $idx) = (0, 0); -my $fname; -$fname = "../../src/plugins/HPMHooking/HPMHooking.HookingPoints.inc"; -open(FH, ">", $fname) - or die "cannot open > $fname: $!"; - -print FH <<"EOF"; +foreach my $servertype (keys %keys) { + my $keysref = $keys{$servertype}; + # Some interfaces use different names + my %exportsymbols = map { + $_ => &{ sub ($) { + return 'battlegrounds' if $servertype eq 'map' and $_ =~ /^bg$/; + return 'pc_groups' if $servertype eq 'map' and $_ =~ /^pcg$/; + return $_; + }}($_); + } @$keysref; + + my ($maxlen, $idx) = (0, 0); + my $fname; + $fname = "../../src/plugins/HPMHooking/HPMHooking_${servertype}.HookingPoints.inc"; + open(FH, ">", $fname) + or die "cannot open > $fname: $!"; + + print FH <<"EOF"; // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // @@ -398,30 +405,30 @@ print FH <<"EOF"; struct HookingPointData HookingPoints[] = { EOF -foreach my $key (@keys) { - print FH "/* ".$key." */\n"; - foreach my $if (@{ $ifs{$key} }) { + foreach my $key (@$keysref) { + print FH "/* ".$key." */\n"; + foreach my $if (@{ $ifs{$key} }) { - print FH <<"EOF"; + print FH <<"EOF"; { HP_POP($key\->$if->{name}, $if->{hname}) }, EOF - $idx += 2; - $maxlen = length($key."->".$if->{name}) if( length($key."->".$if->{name}) > $maxlen ) + $idx += 2; + $maxlen = length($key."->".$if->{name}) if( length($key."->".$if->{name}) > $maxlen ) + } } -} -print FH <<"EOF"; + print FH <<"EOF"; }; int HookingPointsLenMax = $maxlen; EOF -close FH; + close FH; -$fname = "../../src/plugins/HPMHooking/HPMHooking.sources.inc"; -open(FH, ">", $fname) - or die "cannot open > $fname: $!"; + $fname = "../../src/plugins/HPMHooking/HPMHooking_${servertype}.sources.inc"; + open(FH, ">", $fname) + or die "cannot open > $fname: $!"; -print FH <<"EOF"; + print FH <<"EOF"; // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // @@ -429,19 +436,19 @@ print FH <<"EOF"; // as it will get overwritten. EOF -foreach my $key (@keys) { + foreach my $key (@$keysref) { - print FH <<"EOF"; + print FH <<"EOF"; memcpy(&HPMHooks.source.$key, $key, sizeof(struct $key2original{$key})); EOF -} -close FH; + } + close FH; -$fname = "../../src/plugins/HPMHooking/HPMHooking.GetSymbol.inc"; -open(FH, ">", $fname) - or die "cannot open > $fname: $!"; + $fname = "../../src/plugins/HPMHooking/HPMHooking_${servertype}.GetSymbol.inc"; + open(FH, ">", $fname) + or die "cannot open > $fname: $!"; -print FH <<"EOF"; + print FH <<"EOF"; // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // @@ -449,19 +456,19 @@ print FH <<"EOF"; // as it will get overwritten. EOF -foreach my $key (@keys) { + foreach my $key (@$keysref) { - print FH <<"EOF"; + print FH <<"EOF"; if( !($key = GET_SYMBOL("$exportsymbols{$key}") ) ) return false; EOF -} -close FH; + } + close FH; -$fname = "../../src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc"; -open(FH, ">", $fname) - or die "cannot open > $fname: $!"; + $fname = "../../src/plugins/HPMHooking/HPMHooking_${servertype}.HPMHooksCore.inc"; + open(FH, ">", $fname) + or die "cannot open > $fname: $!"; -print FH <<"EOF"; + print FH <<"EOF"; // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // @@ -471,53 +478,53 @@ print FH <<"EOF"; struct { EOF -foreach my $key (@keys) { - foreach my $if (@{ $ifs{$key} }) { + foreach my $key (@$keysref) { + foreach my $if (@{ $ifs{$key} }) { - print FH <<"EOF"; + print FH <<"EOF"; struct HPMHookPoint *$if->{hname}_pre; struct HPMHookPoint *$if->{hname}_post; EOF + } } -} -print FH <<"EOF"; + print FH <<"EOF"; } list; struct { EOF -foreach my $key (@keys) { - foreach my $if (@{ $ifs{$key} }) { + foreach my $key (@$keysref) { + foreach my $if (@{ $ifs{$key} }) { - print FH <<"EOF"; + print FH <<"EOF"; int $if->{hname}_pre; int $if->{hname}_post; EOF + } } -} -print FH <<"EOF"; + print FH <<"EOF"; } count; struct { EOF -foreach my $key (@keys) { + foreach my $key (@$keysref) { - print FH <<"EOF"; + print FH <<"EOF"; struct $key2original{$key} $key; EOF -} + } -print FH <<"EOF"; + print FH <<"EOF"; } source; EOF -close FH; + close FH; -$fname = "../../src/plugins/HPMHooking/HPMHooking.Hooks.inc"; -open(FH, ">", $fname) - or die "cannot open > $fname: $!"; + $fname = "../../src/plugins/HPMHooking/HPMHooking_${servertype}.Hooks.inc"; + open(FH, ">", $fname) + or die "cannot open > $fname: $!"; -print FH <<"EOF"; + print FH <<"EOF"; // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file // @@ -525,27 +532,27 @@ print FH <<"EOF"; // as it will get overwritten. EOF -foreach my $key (@keys) { + foreach my $key (@$keysref) { - print FH <<"EOF"; + print FH <<"EOF"; /* $key */ EOF - foreach my $if (@{ $ifs{$key} }) { - my ($initialization, $beforeblock3, $beforeblock2, $afterblock3, $afterblock2, $retval) = ('', '', '', '', '', ''); + foreach my $if (@{ $ifs{$key} }) { + my ($initialization, $beforeblock3, $beforeblock2, $afterblock3, $afterblock2, $retval) = ('', '', '', '', '', ''); - unless ($if->{type} eq 'void') { - $initialization = "\n\t$if->{type} retVal___$if->{typeinit};"; - $initialization .= "\n\tmemset(&retVal___, '\\0', sizeof($if->{type}));" if $if->{memset}; - } + unless ($if->{type} eq 'void') { + $initialization = "\n\t$if->{type} retVal___$if->{typeinit};"; + $initialization .= "\n\tmemset(&retVal___, '\\0', sizeof($if->{type}));" if $if->{memset}; + } - $beforeblock3 .= "\n\t\t\t$_" foreach (@{ $if->{before} }); - $afterblock3 .= "\n\t\t\t$_" foreach (@{ $if->{after} }); - $beforeblock2 .= "\n\t\t$_" foreach (@{ $if->{before} }); - $afterblock2 .= "\n\t\t$_" foreach (@{ $if->{after} }); - $retval = ' retVal___' unless $if->{type} eq 'void'; + $beforeblock3 .= "\n\t\t\t$_" foreach (@{ $if->{before} }); + $afterblock3 .= "\n\t\t\t$_" foreach (@{ $if->{after} }); + $beforeblock2 .= "\n\t\t$_" foreach (@{ $if->{before} }); + $afterblock2 .= "\n\t\t$_" foreach (@{ $if->{after} }); + $retval = ' retVal___' unless $if->{type} eq 'void'; - print FH <<"EOF"; + print FH <<"EOF"; $if->{handlerdef} {$if->{notes} int hIndex = 0;${initialization} if( HPMHooks.count.$if->{hname}_pre ) { @@ -573,8 +580,8 @@ $if->{handlerdef} {$if->{notes} return$retval; } EOF + } } -} - -close FH; + close FH; +} diff --git a/vcproj-10/char-server.vcxproj b/vcproj-10/char-server.vcxproj index 81f26e3ca..6b2fc82cd 100644 --- a/vcproj-10/char-server.vcxproj +++ b/vcproj-10/char-server.vcxproj @@ -137,6 +137,7 @@ <ClInclude Include="..\3rdparty\libconfig\strbuf.h" /> <ClInclude Include="..\3rdparty\libconfig\wincompat.h" /> <ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h" /> + <ClInclude Include="..\src\char\HPMchar.h" /> <ClInclude Include="..\src\common\cbasetypes.h" /> <ClInclude Include="..\src\common\conf.h" /> <ClInclude Include="..\src\common\core.h" /> @@ -181,6 +182,7 @@ <ClCompile Include="..\3rdparty\libconfig\scanner.c" /> <ClCompile Include="..\3rdparty\libconfig\strbuf.c" /> <ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c" /> + <ClCompile Include="..\src\char\HPMchar.c" /> <ClCompile Include="..\src\common\conf.c" /> <ClCompile Include="..\src\common\core.c" /> <ClCompile Include="..\src\common\console.c" /> diff --git a/vcproj-10/char-server.vcxproj.filters b/vcproj-10/char-server.vcxproj.filters index 5497e291d..b674bcd9b 100644 --- a/vcproj-10/char-server.vcxproj.filters +++ b/vcproj-10/char-server.vcxproj.filters @@ -115,6 +115,9 @@ <ClCompile Include="..\src\common\conf.c"> <Filter>common</Filter> </ClCompile> + <ClCompile Include="..\src\char\HPMchar.c"> + <Filter>char_sql</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\src\common\cbasetypes.h"> @@ -249,6 +252,9 @@ <ClInclude Include="..\src\common\conf.h"> <Filter>common</Filter> </ClInclude> + <ClInclude Include="..\src\char\HPMchar.h"> + <Filter>char_sql</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <Filter Include="common"> diff --git a/vcproj-10/login-server.vcxproj b/vcproj-10/login-server.vcxproj index ea7279bcb..d00797fb7 100644 --- a/vcproj-10/login-server.vcxproj +++ b/vcproj-10/login-server.vcxproj @@ -143,6 +143,7 @@ <ClInclude Include="..\src\common\thread.h" /> <ClInclude Include="..\src\common\winapi.h" /> <ClInclude Include="..\src\login\account.h" /> + <ClInclude Include="..\src\login\HPMlogin.h" /> <ClInclude Include="..\src\login\ipban.h" /> <ClInclude Include="..\src\login\login.h" /> <ClInclude Include="..\src\login\loginlog.h" /> @@ -177,6 +178,7 @@ <ClCompile Include="..\src\common\mutex.c" /> <ClCompile Include="..\src\common\thread.c" /> <ClCompile Include="..\src\login\account_sql.c" /> + <ClCompile Include="..\src\login\HPMlogin.c" /> <ClCompile Include="..\src\login\ipban_sql.c" /> <ClCompile Include="..\src\login\login.c" /> <ClCompile Include="..\src\login\loginlog_sql.c" /> diff --git a/vcproj-10/login-server.vcxproj.filters b/vcproj-10/login-server.vcxproj.filters index a8b460225..6d83824eb 100644 --- a/vcproj-10/login-server.vcxproj.filters +++ b/vcproj-10/login-server.vcxproj.filters @@ -88,6 +88,9 @@ <ClCompile Include="..\src\common\conf.c"> <Filter>common</Filter> </ClCompile> + <ClCompile Include="..\src\login\HPMlogin.c"> + <Filter>login_sql</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\src\login\account.h"> @@ -195,6 +198,9 @@ <ClInclude Include="..\src\common\conf.h"> <Filter>common</Filter> </ClInclude> + <ClInclude Include="..\src\login\HPMlogin.h"> + <Filter>login_sql</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <Filter Include="common"> diff --git a/vcproj-10/plugin-HPMHooking_char.vcxproj b/vcproj-10/plugin-HPMHooking_char.vcxproj new file mode 100644 index 000000000..9b4610371 --- /dev/null +++ b/vcproj-10/plugin-HPMHooking_char.vcxproj @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{337F99A2-528C-473C-97F0-BF202F197061}</ProjectGuid> + <RootNamespace>plugin-HPMHooking_char</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>plugin-HPMHooking_char</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" 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> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_char</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_char</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\src\plugins\HPMHooking.c" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/vcproj-10/plugin-HPMHooking_login.vcxproj b/vcproj-10/plugin-HPMHooking_login.vcxproj new file mode 100644 index 000000000..0ce039de4 --- /dev/null +++ b/vcproj-10/plugin-HPMHooking_login.vcxproj @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{B7B66F36-2EE9-4F16-929A-5E4A64492DAE}</ProjectGuid> + <RootNamespace>plugin-HPMHooking_login</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>plugin-HPMHooking_login</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" 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> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_login</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_login</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_LOGIN;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\src\plugins\HPMHooking.c" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/vcproj-10/plugin-HPMHooking.vcxproj b/vcproj-10/plugin-HPMHooking_map.vcxproj index 4ded9cc92..cce245c50 100644 --- a/vcproj-10/plugin-HPMHooking.vcxproj +++ b/vcproj-10/plugin-HPMHooking_map.vcxproj @@ -12,9 +12,9 @@ </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{7ED92B9F-95E8-49B8-9D4F-C4C9BFDE0B22}</ProjectGuid> - <RootNamespace>plugin-HPMHooking</RootNamespace> + <RootNamespace>plugin-HPMHooking_map</RootNamespace> <Keyword>Win32Proj</Keyword> - <ProjectName>plugin-HPMHooking</ProjectName> + <ProjectName>plugin-HPMHooking_map</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> @@ -49,15 +49,15 @@ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_map</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_map</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_MAP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <FunctionLevelLinking>true</FunctionLevelLinking> diff --git a/vcproj-11/char-server.vcxproj b/vcproj-11/char-server.vcxproj index d584c0404..f3f75d663 100644 --- a/vcproj-11/char-server.vcxproj +++ b/vcproj-11/char-server.vcxproj @@ -163,6 +163,7 @@ <ClInclude Include="..\src\common\timer.h" /> <ClInclude Include="..\src\common\utils.h" /> <ClInclude Include="..\src\char\char.h" /> + <ClInclude Include="..\src\char\HPMchar.h" /> <ClInclude Include="..\src\char\int_auction.h" /> <ClInclude Include="..\src\char\int_elemental.h" /> <ClInclude Include="..\src\char\int_guild.h" /> @@ -204,6 +205,7 @@ <ClCompile Include="..\src\common\timer.c" /> <ClCompile Include="..\src\common\utils.c" /> <ClCompile Include="..\src\char\char.c" /> + <ClCompile Include="..\src\char\HPMchar.c" /> <ClCompile Include="..\src\char\int_auction.c" /> <ClCompile Include="..\src\char\int_elemental.c" /> <ClCompile Include="..\src\char\int_guild.c" /> diff --git a/vcproj-11/char-server.vcxproj.filters b/vcproj-11/char-server.vcxproj.filters index 7034b8abc..c7d498190 100644 --- a/vcproj-11/char-server.vcxproj.filters +++ b/vcproj-11/char-server.vcxproj.filters @@ -55,6 +55,9 @@ <ClCompile Include="..\src\char\char.c"> <Filter>char_sql</Filter> </ClCompile> + <ClCompile Include="..\src\char\HPMchar.c"> + <Filter>char_sql</Filter> + </ClCompile> <ClCompile Include="..\src\char\int_auction.c"> <Filter>char_sql</Filter> </ClCompile> @@ -186,6 +189,9 @@ <ClInclude Include="..\src\char\char.h"> <Filter>char_sql</Filter> </ClInclude> + <ClInclude Include="..\src\char\HPMchar.h"> + <Filter>char_sql</Filter> + </ClInclude> <ClInclude Include="..\src\char\int_auction.h"> <Filter>char_sql</Filter> </ClInclude> diff --git a/vcproj-11/login-server.vcxproj b/vcproj-11/login-server.vcxproj index 1a0325987..a452cba7d 100644 --- a/vcproj-11/login-server.vcxproj +++ b/vcproj-11/login-server.vcxproj @@ -147,6 +147,7 @@ <ClInclude Include="..\src\common\winapi.h" /> <ClInclude Include="..\src\login\account.h" /> <ClInclude Include="..\src\login\ipban.h" /> + <ClInclude Include="..\src\login\HPMlogin.h" /> <ClInclude Include="..\src\login\login.h" /> <ClInclude Include="..\src\login\loginlog.h" /> <ClInclude Include="..\src\common\cbasetypes.h" /> @@ -181,6 +182,7 @@ <ClCompile Include="..\src\common\thread.c" /> <ClCompile Include="..\src\login\account_sql.c" /> <ClCompile Include="..\src\login\ipban_sql.c" /> + <ClCompile Include="..\src\login\HPMlogin.c" /> <ClCompile Include="..\src\login\login.c" /> <ClCompile Include="..\src\login\loginlog_sql.c" /> <ClCompile Include="..\src\common\conf.c" /> diff --git a/vcproj-11/login-server.vcxproj.filters b/vcproj-11/login-server.vcxproj.filters index 3e338dfda..3bdb93f6f 100644 --- a/vcproj-11/login-server.vcxproj.filters +++ b/vcproj-11/login-server.vcxproj.filters @@ -4,6 +4,9 @@ <ClCompile Include="..\src\login\account_sql.c"> <Filter>login_sql</Filter> </ClCompile> + <ClCompile Include="..\src\login\HPMlogin.c"> + <Filter>login_sql</Filter> + </ClCompile> <ClCompile Include="..\src\login\ipban_sql.c"> <Filter>login_sql</Filter> </ClCompile> @@ -93,6 +96,9 @@ <ClInclude Include="..\src\login\account.h"> <Filter>login_sql</Filter> </ClInclude> + <ClInclude Include="..\src\login\HPMlogin.h"> + <Filter>login_sql</Filter> + </ClInclude> <ClInclude Include="..\src\login\ipban.h"> <Filter>login_sql</Filter> </ClInclude> diff --git a/vcproj-11/plugin-HPMHooking_char.vcxproj b/vcproj-11/plugin-HPMHooking_char.vcxproj new file mode 100644 index 000000000..fced03de1 --- /dev/null +++ b/vcproj-11/plugin-HPMHooking_char.vcxproj @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{ACEB1E80-4EA2-4193-AA7C-624B6C5664BA}</ProjectGuid> + <RootNamespace>plugin-HPMHooking_char</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>plugin-HPMHooking_char</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" 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> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_char</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_char</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\src\plugins\HPMHooking.c" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/vcproj-11/plugin-HPMHooking_login.vcxproj b/vcproj-11/plugin-HPMHooking_login.vcxproj new file mode 100644 index 000000000..046d61acf --- /dev/null +++ b/vcproj-11/plugin-HPMHooking_login.vcxproj @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{93DB46CC-FC44-4E43-820A-63DC7318F413}</ProjectGuid> + <RootNamespace>plugin-HPMHooking_login</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>plugin-HPMHooking_login</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" 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> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_login</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_login</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_LOGIN;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\src\plugins\HPMHooking.c" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/vcproj-11/plugin-HPMHooking.vcxproj b/vcproj-11/plugin-HPMHooking_map.vcxproj index b24dbf2e2..5b8a5cfb0 100644 --- a/vcproj-11/plugin-HPMHooking.vcxproj +++ b/vcproj-11/plugin-HPMHooking_map.vcxproj @@ -12,9 +12,9 @@ </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{745D4A8C-6A68-4721-A43A-D81BF59860A1}</ProjectGuid> - <RootNamespace>plugin-HPMHooking</RootNamespace> + <RootNamespace>plugin-HPMHooking_map</RootNamespace> <Keyword>Win32Proj</Keyword> - <ProjectName>plugin-HPMHooking</ProjectName> + <ProjectName>plugin-HPMHooking_map</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> @@ -51,15 +51,15 @@ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_map</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_map</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_MAP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <FunctionLevelLinking>true</FunctionLevelLinking> diff --git a/vcproj-12/char-server.vcxproj b/vcproj-12/char-server.vcxproj index d281c2961..973d9d781 100644 --- a/vcproj-12/char-server.vcxproj +++ b/vcproj-12/char-server.vcxproj @@ -162,6 +162,7 @@ <ClInclude Include="..\src\common\timer.h" /> <ClInclude Include="..\src\common\utils.h" /> <ClInclude Include="..\src\char\char.h" /> + <ClInclude Include="..\src\char\HPMchar.h" /> <ClInclude Include="..\src\char\int_auction.h" /> <ClInclude Include="..\src\char\int_elemental.h" /> <ClInclude Include="..\src\char\int_guild.h" /> @@ -203,6 +204,7 @@ <ClCompile Include="..\src\common\timer.c" /> <ClCompile Include="..\src\common\utils.c" /> <ClCompile Include="..\src\char\char.c" /> + <ClCompile Include="..\src\char\HPMchar.c" /> <ClCompile Include="..\src\char\int_auction.c" /> <ClCompile Include="..\src\char\int_elemental.c" /> <ClCompile Include="..\src\char\int_guild.c" /> diff --git a/vcproj-12/char-server.vcxproj.filters b/vcproj-12/char-server.vcxproj.filters index 7034b8abc..c7d498190 100644 --- a/vcproj-12/char-server.vcxproj.filters +++ b/vcproj-12/char-server.vcxproj.filters @@ -55,6 +55,9 @@ <ClCompile Include="..\src\char\char.c"> <Filter>char_sql</Filter> </ClCompile> + <ClCompile Include="..\src\char\HPMchar.c"> + <Filter>char_sql</Filter> + </ClCompile> <ClCompile Include="..\src\char\int_auction.c"> <Filter>char_sql</Filter> </ClCompile> @@ -186,6 +189,9 @@ <ClInclude Include="..\src\char\char.h"> <Filter>char_sql</Filter> </ClInclude> + <ClInclude Include="..\src\char\HPMchar.h"> + <Filter>char_sql</Filter> + </ClInclude> <ClInclude Include="..\src\char\int_auction.h"> <Filter>char_sql</Filter> </ClInclude> diff --git a/vcproj-12/login-server.vcxproj b/vcproj-12/login-server.vcxproj index 671df4024..9420195fb 100644 --- a/vcproj-12/login-server.vcxproj +++ b/vcproj-12/login-server.vcxproj @@ -146,6 +146,7 @@ <ClInclude Include="..\src\common\thread.h" /> <ClInclude Include="..\src\common\winapi.h" /> <ClInclude Include="..\src\login\account.h" /> + <ClInclude Include="..\src\login\HPMlogin.h" /> <ClInclude Include="..\src\login\ipban.h" /> <ClInclude Include="..\src\login\login.h" /> <ClInclude Include="..\src\login\loginlog.h" /> @@ -180,6 +181,7 @@ <ClCompile Include="..\src\common\mutex.c" /> <ClCompile Include="..\src\common\thread.c" /> <ClCompile Include="..\src\login\account_sql.c" /> + <ClCompile Include="..\src\login\HPMlogin.c" /> <ClCompile Include="..\src\login\ipban_sql.c" /> <ClCompile Include="..\src\login\login.c" /> <ClCompile Include="..\src\login\loginlog_sql.c" /> diff --git a/vcproj-12/login-server.vcxproj.filters b/vcproj-12/login-server.vcxproj.filters index 3e338dfda..3bdb93f6f 100644 --- a/vcproj-12/login-server.vcxproj.filters +++ b/vcproj-12/login-server.vcxproj.filters @@ -4,6 +4,9 @@ <ClCompile Include="..\src\login\account_sql.c"> <Filter>login_sql</Filter> </ClCompile> + <ClCompile Include="..\src\login\HPMlogin.c"> + <Filter>login_sql</Filter> + </ClCompile> <ClCompile Include="..\src\login\ipban_sql.c"> <Filter>login_sql</Filter> </ClCompile> @@ -93,6 +96,9 @@ <ClInclude Include="..\src\login\account.h"> <Filter>login_sql</Filter> </ClInclude> + <ClInclude Include="..\src\login\HPMlogin.h"> + <Filter>login_sql</Filter> + </ClInclude> <ClInclude Include="..\src\login\ipban.h"> <Filter>login_sql</Filter> </ClInclude> diff --git a/vcproj-12/plugin-HPMHooking_char.vcxproj b/vcproj-12/plugin-HPMHooking_char.vcxproj new file mode 100644 index 000000000..f1b13d6c4 --- /dev/null +++ b/vcproj-12/plugin-HPMHooking_char.vcxproj @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{D495824D-24D3-4623-A28C-4CA506084A09}</ProjectGuid> + <RootNamespace>plugin-HPMHooking_char</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>plugin-HPMHooking_char</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v120</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v120</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" 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> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_char</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_char</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\src\plugins\HPMHooking.c" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/vcproj-12/plugin-HPMHooking_login.vcxproj b/vcproj-12/plugin-HPMHooking_login.vcxproj new file mode 100644 index 000000000..62e723a3a --- /dev/null +++ b/vcproj-12/plugin-HPMHooking_login.vcxproj @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}</ProjectGuid> + <RootNamespace>plugin-HPMHooking_login</RootNamespace> + <Keyword>Win32Proj</Keyword> + <ProjectName>plugin-HPMHooking_login</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v120</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v120</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" 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> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> + <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_login</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_login</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_LOGIN;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0417</Culture> + </ResourceCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName).dll</OutputFile> + <ModuleDefinitionFile> + </ModuleDefinitionFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\src\plugins\HPMHooking.c" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/vcproj-12/plugin-HPMHooking.vcxproj b/vcproj-12/plugin-HPMHooking_map.vcxproj index 1357697b8..afa5ac197 100644 --- a/vcproj-12/plugin-HPMHooking.vcxproj +++ b/vcproj-12/plugin-HPMHooking_map.vcxproj @@ -12,9 +12,9 @@ </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{745D4A8C-6A68-4721-A43A-D81BF59860A1}</ProjectGuid> - <RootNamespace>plugin-HPMHooking</RootNamespace> + <RootNamespace>plugin-HPMHooking_map</RootNamespace> <Keyword>Win32Proj</Keyword> - <ProjectName>plugin-HPMHooking</ProjectName> + <ProjectName>plugin-HPMHooking_map</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> @@ -51,15 +51,15 @@ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking</TargetName> - <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_map</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_map</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\src\common;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_MAP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <FunctionLevelLinking>true</FunctionLevelLinking> diff --git a/vcproj-9/char-server.vcproj b/vcproj-9/char-server.vcproj index 129a9b074..a532db231 100644 --- a/vcproj-9/char-server.vcproj +++ b/vcproj-9/char-server.vcproj @@ -453,6 +453,14 @@ > </File> <File + RelativePath="..\src\char\HPMchar.c" + > + </File> + <File + RelativePath="..\src\char\HPMchar.h" + > + </File> + <File RelativePath="..\src\char\int_auction.c" > </File> diff --git a/vcproj-9/login-server.vcproj b/vcproj-9/login-server.vcproj index 2895f80c9..bb8dd3ffd 100644 --- a/vcproj-9/login-server.vcproj +++ b/vcproj-9/login-server.vcproj @@ -215,6 +215,14 @@ > </File> <File + RelativePath="..\src\login\HPMlogin.h" + > + </File> + <File + RelativePath="..\src\login\HPMlogin.c" + > + </File> + <File RelativePath="..\src\login\ipban.h" > </File> |