Skip to content

Commit

Permalink
Bug fixed, added some natives from memhack.
Browse files Browse the repository at this point in the history
Memhack natives:
GetUnitArmor
SetUnitArmor
GetUnitMaxLife
SetUnitMaxLife
GetUnitMaxMana
SetUnitMaxMana
GetUnitLifeRegen
SetUnitLifeRegen
GetUnitManaRegen
SetUnitManaRegen
GetUnitBaseDamage
SetUnitBaseDamage
GetUnitAttackSpeed
SetUnitAttackSpeed
UnitResetAttackCooldown
GetItemBaseNameById
SetItemBaseNameById
GetItemBaseUbertipById
SetItemBaseUbertipById
GetItemBaseIconPathById
SetItemBaseIconPathById
GetMouseWorldPos
GetMouseWorldX
GetMouseWorldY
GetMouseWorldZ
GetEffectPos
GetEffectX
GetEffectY
GetEffectZ
SetEffectPos
SetEffectX
SetEffectY
SetEffectZ
  • Loading branch information
Ev3nt committed Apr 6, 2022
1 parent 14f2fe1 commit 489bc03
Show file tree
Hide file tree
Showing 88 changed files with 29,784 additions and 168 deletions.
89 changes: 89 additions & 0 deletions 3rd/Detours/Include/syelog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
//////////////////////////////////////////////////////////////////////////////
//
// Detours Test Program (syelog.h of syelog.lib)
//
// Microsoft Research Detours Package
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
#pragma once
#ifndef _SYELOGD_H_
#define _SYELOGD_H_
#include <stdarg.h>

#pragma pack(push, 1)
#pragma warning(push)
#pragma warning(disable: 4200)

//////////////////////////////////////////////////////////////////////////////
//
//
#define SYELOG_PIPE_NAMEA "\\\\.\\pipe\\syelog"
#define SYELOG_PIPE_NAMEW L"\\\\.\\pipe\\syelog"
#ifdef UNICODE
#define SYELOG_PIPE_NAME SYELOG_PIPE_NAMEW
#else
#define SYELOG_PIPE_NAME SYELOG_PIPE_NAMEA
#endif

//////////////////////////////////////////////////////////////////////////////
//
#define SYELOG_MAXIMUM_MESSAGE 4086 // 4096 - sizeof(header stuff)

typedef struct _SYELOG_MESSAGE
{
USHORT nBytes;
BYTE nFacility;
BYTE nSeverity;
DWORD nProcessId;
FILETIME ftOccurance;
BOOL fTerminate;
CHAR szMessage[SYELOG_MAXIMUM_MESSAGE];
} SYELOG_MESSAGE, *PSYELOG_MESSAGE;


// Facility Codes.
//
#define SYELOG_FACILITY_KERNEL 0x10 // OS Kernel
#define SYELOG_FACILITY_SECURITY 0x20 // OS Security
#define SYELOG_FACILITY_LOGGING 0x30 // OS Logging-internal
#define SYELOG_FACILITY_SERVICE 0x40 // User-mode system daemon
#define SYELOG_FACILITY_APPLICATION 0x50 // User-mode application
#define SYELOG_FACILITY_USER 0x60 // User self-generated.
#define SYELOG_FACILITY_LOCAL0 0x70 // Locally defined.
#define SYELOG_FACILITY_LOCAL1 0x71 // Locally defined.
#define SYELOG_FACILITY_LOCAL2 0x72 // Locally defined.
#define SYELOG_FACILITY_LOCAL3 0x73 // Locally defined.
#define SYELOG_FACILITY_LOCAL4 0x74 // Locally defined.
#define SYELOG_FACILITY_LOCAL5 0x75 // Locally defined.
#define SYELOG_FACILITY_LOCAL6 0x76 // Locally defined.
#define SYELOG_FACILITY_LOCAL7 0x77 // Locally defined.
#define SYELOG_FACILITY_LOCAL8 0x78 // Locally defined.
#define SYELOG_FACILITY_LOCAL9 0x79 // Locally defined.

// Severity Codes.
//
#define SYELOG_SEVERITY_FATAL 0x00 // System is dead.
#define SYELOG_SEVERITY_ALERT 0x10 // Take action immediately.
#define SYELOG_SEVERITY_CRITICAL 0x20 // Critical condition.
#define SYELOG_SEVERITY_ERROR 0x30 // Error
#define SYELOG_SEVERITY_WARNING 0x40 // Warning
#define SYELOG_SEVERITY_NOTICE 0x50 // Significant condition.
#define SYELOG_SEVERITY_INFORMATION 0x60 // Informational
#define SYELOG_SEVERITY_AUDIT_FAIL 0x66 // Audit Failed
#define SYELOG_SEVERITY_AUDIT_PASS 0x67 // Audit Succeeeded
#define SYELOG_SEVERITY_DEBUG 0x70 // Debugging

// Logging Functions.
//
VOID SyelogOpen(PCSTR pszIdentifier, BYTE nFacility);
VOID Syelog(BYTE nSeverity, PCSTR pszMsgf, ...);
VOID SyelogV(BYTE nSeverity, PCSTR pszMsgf, va_list args);
VOID SyelogClose(BOOL fTerminate);

#pragma warning(pop)
#pragma pack(pop)

#endif // _SYELOGD_H_
//
///////////////////////////////////////////////////////////////// End of File.
Binary file modified 3rd/Detours/Lib/detours.lib
Binary file not shown.
17 changes: 17 additions & 0 deletions 3rd/lua/Features/extended lua.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "extended lua.h"

LUA_API void lua_push(lua_State* L, UINT value, int type) {
lua_lock(L);
setvalue(s2v(L->top), value, type);
api_incr_top(L);
lua_unlock(L);
}

//LUA_API lua_Integer lua_to(lua_State* L, int idx, int type) {
// lua_Integer res = 0;
// const TValue* o = index2value(L, idx);
// int isnum = tointeger(o, &res);
// if (pisnum)
// *pisnum = isnum;
// return res;
//}
120 changes: 120 additions & 0 deletions 3rd/lua/Features/extended lua.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
#pragma once

#include "./lobject.h"
#include "./lapi.h"
typedef unsigned int UINT;

/*
** basic types
*/
#define LUA_TNONE (-1)

#define LUA_TNIL 0
#define LUA_TBOOLEAN 1
#define LUA_TLIGHTUSERDATA 2
#define LUA_TNUMBER 3
#define LUA_TSTRING 4
#define LUA_TTABLE 5
#define LUA_TFUNCTION 6
#define LUA_TUSERDATA 7
#define LUA_TTHREAD 8

// Warcraft Types
#define LUA_TAGENT
#define LUA_TEVENT
#define LUA_TPLAYER
#define LUA_TWIDGET
#define LUA_TUNIT
#define LUA_TDESTRUCTABLE
#define LUA_TITEM
#define LUA_TABILITY
#define LUA_TBUFF
#define LUA_TFORCE
#define LUA_TGROUP
#define LUA_TTRIGGER
#define LUA_TTRIGGERCONDITION
#define LUA_TTRIGGERACTION
#define LUA_TTIMER
#define LUA_TLOCATION
#define LUA_TREGION
#define LUA_TRECT
#define LUA_TBOOLEXPR
#define LUA_TSOUND
#define LUA_TCONDITIONFUNC
#define LUA_TFILTERFUNC
#define LUA_TUNITPOOL
#define LUA_TITEMPOOL
#define LUA_TRACE
#define LUA_TALLIANCETYPE
#define LUA_TRACEPREFERENCE
#define LUA_TGAMESTATE
#define LUA_TIGAMESTATE
#define LUA_TFGAMESTATE
#define LUA_TPLAYERSTATE
#define LUA_TPLAYERSCORE
#define LUA_TPLAYERGAMERESULT
#define LUA_TUNITSTATE
#define LUA_TAIDIFFICULTY

#define LUA_TEVENTID
#define LUA_TGAMEEVENT
#define LUA_TPLAYEREVENT
#define LUA_TPLAYERUNITEVENT
#define LUA_TUNITEVENT
#define LUA_TLIMITOP
#define LUA_TWIDGETEVENT
#define LUA_TDIALOGEVENT
#define LUA_TUNITTYPE

#define LUA_TGAMESPEED
#define LUA_TGAMEDIFFICULTY
#define LUA_TGAMETYPE
#define LUA_TMAPFLAG
#define LUA_TMAPVISIBILITY
#define LUA_TMAPSETTING
#define LUA_TMAPDENSITY
#define LUA_TMAPCONTROL
#define LUA_TPLAYERSLOTSTATE
#define LUA_TVOLUMEGROUP
#define LUA_TCAMERAFIELD
#define LUA_TCAMERASETUP
#define LUA_TPLAYERCOLOR
#define LUA_TPLACEMENT
#define LUA_TSTARTLOCPRIO
#define LUA_TRARITYCONTROL
#define LUA_TBLENDMODE
#define LUA_TTEXMAPFLAGS
#define LUA_TEFFECT
#define LUA_TEFFECTTYPE
#define LUA_TWEATHEREFFECT
#define LUA_TTERRAINDEFORMATION
#define LUA_TFOGSTATE
#define LUA_TFOGMODIFIER
#define LUA_TDIALOG
#define LUA_TBUTTON
#define LUA_TQUEST
#define LUA_TQUESTITEM
#define LUA_TDEFEATCONDITION
#define LUA_TTIMERDIALOG
#define LUA_TLEADERBOARD
#define LUA_TMULTIBOARD
#define LUA_TMULTIBOARDITEM
#define LUA_TTRACKABLE
#define LUA_TGAMECACHE
#define LUA_TVERSION
#define LUA_TITEMTYPE
#define LUA_TTEXTTAG
#define LUA_TATTACKTYPE
#define LUA_TDAMAGETYPE
#define LUA_TWEAPONTYPE
#define LUA_TSOUNDTYPE
#define LUA_TLIGHTNING
#define LUA_TPATHINGTYPE
#define LUA_TIMAGE
#define LUA_TUBERSPLAT
#define LUA_THASHTABLE

#define LUA_NUMTYPES 9 // default 9

#define setvalue(obj,x,t) \
{ TValue *io=(obj); val_(io).i=(x); settt_(io, makevariant(t, 0)); }
Binary file removed 3rd/lua/Lib/lua.lib
Binary file not shown.
Loading

0 comments on commit 489bc03

Please sign in to comment.