Skip to content

Commit

Permalink
Merge pull request planqi#12 from BeLikeLeBron/revert-9-BuffSystem
Browse files Browse the repository at this point in the history
Revert "Buff system"
  • Loading branch information
BeLikeLeBron authored Oct 27, 2021
2 parents 1d58d8c + b8b3a5e commit 2f93493
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 396 deletions.
1 change: 0 additions & 1 deletion BH/BH.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand Down
205 changes: 0 additions & 205 deletions BH/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -502,197 +502,6 @@ enum TextColor {
#define STAT_PASSIVEMAGICDMGMASTERY 357
#define STAT_PASSIVEMAGICRESREDUC 358

///////////////////////////////////////////////////
// Unit States
///////////////////////////////////////////////////
enum D2States
{
STATE_FREEZE = 0x1,
STATE_POISON = 0x2,
STATE_RESISTFIRE = 0x3,
STATE_RESISTCOLD = 0x4,
STATE_RESISTLIGHT = 0x5,
STATE_RESISTMAGIC = 0x6,
STATE_PLAYERBODY = 0x7,
STATE_RESISTALL = 0x8,
STATE_AMPLIFYDAMAGE = 0x9,
STATE_FROZENARMOR = 0xA,
STATE_COLD = 0xB,
STATE_INFERNO = 0xC,
STATE_BLAZE = 0xD,
STATE_BONEARMOR = 0xE,
STATE_CONCENTRATE = 0xF,
STATE_ENCHANT = 0x10,
STATE_INNERSIGHT = 0x11,
STATE_SKILL_MOVE = 0x12,
STATE_WEAKEN = 0x13,
STATE_CHILLINGARMOR = 0x14,
STATE_STUNNED = 0x15,
STATE_SPIDERLAY = 0x16,
STATE_DIMVISION = 0x17,
STATE_SLOWED = 0x18,
STATE_FETISHAURA = 0x19,
STATE_SHOUT = 0x1A,
STATE_TAUNT = 0x1B,
STATE_CONVICTION = 0x1C,
STATE_CONVICTED = 0x1D,
STATE_ENERGYSHIELD = 0x1E,
STATE_VENOMCLAWS = 0x1F,
STATE_BATTLEORDERS = 0x20,
STATE_MIGHT = 0x21,
STATE_PRAYER = 0x22,
STATE_HOLYFIRE = 0x23,
STATE_THORNS = 0x24,
STATE_DEFIANCE = 0x25,
STATE_THUNDERSTORM = 0x26,
STATE_LIGHTNINGBOLT = 0x27,
STATE_BLESSEDAIM = 0x28,
STATE_STAMINA = 0x29,
STATE_CONCENTRATION = 0x2A,
STATE_HOLYWIND = 0x2B,
STATE_HOLYWINDCOLD = 0x2C,
STATE_CLEANSING = 0x2D,
STATE_HOLYSHOCK = 0x2E,
STATE_SANCTUARY = 0x2F,
STATE_MEDITATION = 0x30,
STATE_FANATICISM = 0x31,
STATE_REDEMPTION = 0x32,
STATE_BATTLECOMMAND = 0x33,
STATE_PREVENTHEAL = 0x34,
STATE_CONVERSION = 0x35,
STATE_UNINTERRUPTABLE = 0x36,
STATE_IRONMAIDEN = 0x37,
STATE_TERROR = 0x38,
STATE_ATTRACT = 0x39,
STATE_LIFETAP = 0x3A,
STATE_CONFUSE = 0x3B,
STATE_DECREPIFY = 0x3C,
STATE_LOWERRESIST = 0x3D,
STATE_OPENWOUNDS = 0x3E,
STATE_DOPPLEZON = 0x3F,
STATE_CRITICALSTRIKE = 0x40,
STATE_DODGE = 0x41,
STATE_AVOID = 0x42,
STATE_PENETRATE = 0x43,
STATE_EVADE = 0x44,
STATE_PIERCE = 0x45,
STATE_WARMTH = 0x46,
STATE_FIREMASTERY = 0x47,
STATE_LIGHTNINGMASTERY = 0x48,
STATE_COLDMASTERY = 0x49,
STATE_SWORDMASTERY = 0x4A,
STATE_AXEMASTERY = 0x4B,
STATE_MACEMASTERY = 0x4C,
STATE_POLEARMMASTERY = 0x4D,
STATE_THROWINGMASTERY = 0x4E,
STATE_SPEARMASTERY = 0x4F,
STATE_INCREASEDSTAMINA = 0x50,
STATE_IRONSKIN = 0x51,
STATE_INCREASEDSPEED = 0x52,
STATE_NATURALRESISTANCE = 0x53,
STATE_FINGERMAGECURSE = 0x54,
STATE_NOMANAREGEN = 0x55,
STATE_JUSTHIT = 0x56,
STATE_SLOWMISSILES = 0x57,
STATE_SHIVERARMOR = 0x58,
STATE_BATTLECRY = 0x59,
STATE_BLUE = 0x5A,
STATE_RED = 0x5B,
STATE_DEATH_DELAY = 0x5C,
STATE_VALKYRIE = 0x5D,
STATE_FRENZY = 0x5E,
STATE_BERSERK = 0x5F,
STATE_REVIVE = 0x60,
STATE_SKEL_MASTERY = 0x61,
STATE_SOURCEUNIT = 0x62,
STATE_REDEEMED = 0x63,
STATE_HEALTHPOT = 0x64,
STATE_HOLYSHIELD = 0x65,
STATE_JUST_PORTALED = 0x66,
STATE_MONFRENZY = 0x67,
STATE_CORPSE_NODRAW = 0x68,
STATE_ALIGNMENT = 0x69,
STATE_MANAPOT = 0x6A,
STATE_SHATTER = 0x6B,
STATE_SYNC_WARPED = 0x6C,
STATE_CONVERSION_SAVE = 0x6D,
STATE_PREGNANT = 0x6E,
STATE_GOLEM_MASTERY = 0x6F,
STATE_RABIES = 0x70,
STATE_DEFENSE_CURSE = 0x71,
STATE_BLOOD_MANA = 0x72,
STATE_BURNING = 0x73,
STATE_DRAGONFLIGHT = 0x74,
STATE_MAUL = 0x75,
STATE_CORPSE_NOSELECT = 0x76,
STATE_SHADOWWARRIOR = 0x77,
STATE_FERALRAGE = 0x78,
STATE_SKILLDELAY = 0x79,
STATE_PROGRESSIVE_DAMAGE = 0x7A,
STATE_PROGRESSIVE_STEAL = 0x7B,
STATE_PROGRESSIVE_OTHER = 0x7C,
STATE_PROGRESSIVE_FIRE = 0x7D,
STATE_PROGRESSIVE_COLD = 0x7E,
STATE_PROGRESSIVE_LIGHTNING = 0x7F,
STATE_SHRINE_ARMOR = 0x80,
STATE_SHRINE_COMBAT = 0x81,
STATE_SHRINE_RESIST_LIGHTNING = 0x82,
STATE_SHRINE_RESIST_FIRE = 0x83,
STATE_SHRINE_RESIST_COLD = 0x84,
STATE_SHRINE_RESIST_POISON = 0x85,
STATE_SHRINE_SKILL = 0x86,
STATE_SHRINE_MANA_REGEN = 0x87,
STATE_SHRINE_STAMINA = 0x88,
STATE_SHRINE_EXPERIENCE = 0x89,
STATE_FENRIS_RAGE = 0x8A,
STATE_WOLF = 0x8B,
STATE_BEAR = 0x8C,
STATE_BLOODLUST = 0x8D,
STATE_CHANGECLASS = 0x8E,
STATE_ATTACHED = 0x8F,
STATE_HURRICANE = 0x90,
STATE_ARMAGEDDON = 0x91,
STATE_INVIS = 0x92,
STATE_BARBS = 0x93,
STATE_WOLVERINE = 0x94,
STATE_OAKSAGE = 0x95,
STATE_VINE_BEAST = 0x96,
STATE_CYCLONEARMOR = 0x97,
STATE_CLAWMASTERY = 0x98,
STATE_CLOAK_OF_SHADOWS = 0x99,
STATE_RECYCLED = 0x9A,
STATE_WEAPONBLOCK = 0x9B,
STATE_CLOAKED = 0x9C,
STATE_QUICKNESS = 0x9D,
STATE_BLADESHIELD = 0x9E,
STATE_FADE = 0x9F,
STATE_SUMMONRESIST = 0xA0,
STATE_OAKSAGECONTROL = 0xA1,
STATE_WOLVERINECONTROL = 0xA2,
STATE_BARBSCONTROL = 0xA3,
STATE_DEBUGCONTROL = 0xA4,
STATE_ITEMSET1 = 0xA5,
STATE_ITEMSET2 = 0xA6,
STATE_ITEMSET3 = 0xA7,
STATE_ITEMSET4 = 0xA8,
STATE_ITEMSET5 = 0xA9,
STATE_ITEMSET6 = 0xAA,
STATE_RUNEWORD = 0xAB,
STATE_RESTINPEACE = 0xAC,
STATE_CORPSEEXP = 0xAD,
STATE_WHIRLWIND = 0xAE,
STATE_FULLSETGENERIC = 0xAF,
STATE_MONSTERSET = 0xB0,
STATE_DELERIUM = 0xB1,
STATE_ANTIDOTE = 0xB2,
STATE_THAWING = 0xB3,
STATE_STAMINAPOT = 0xB4,
STATE_PASSIVE_RESISTFIRE = 0xB5,
STATE_PASSIVE_RESISTCOLD = 0xB6,
STATE_PASSIVE_RESISTLTNG = 0xB7,
STATE_UBERMINION = 0xB8,
};

///////////////////////////////////////////////////
// Unit Enchantments
///////////////////////////////////////////////////
Expand Down Expand Up @@ -1557,17 +1366,3 @@ enum D2_VideoMode {
VIDEO_MODE_DIRECT3D,
VIDEO_MODE_RAVE
};

///////////////////////////////////////////////////
// Draw Mode
///////////////////////////////////////////////////
enum D2_DrawMode {
DRAW_MODE_ALPHA_25 = 0,
DRAW_MODE_ALPHA_50 = 1,
DRAW_MODE_ALPHA_75 = 2,
DRAW_MODE_ALPHA_50_BRIGHT = 3,
DRAW_MODE_INVERTED = 4,
DRAW_MODE_NORMAL = 5,
DRAW_MODE_ALPHA_25_BRIGHT = 6,
DRAW_MODE_BRIGHT = 7
};
8 changes: 1 addition & 7 deletions BH/D2Ptrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,26 +500,20 @@ FUNCPTR(D2WIN, DrawCellFile, void __fastcall, (CellFile * pCellFile, int xPos, i
////////////////////////////////////////////////////////////////////////////////////////////////

FUNCPTR(D2WIN, DrawText, void __fastcall, (const wchar_t *wStr, int xPos, int yPos, DWORD dwColor, DWORD dwUnk), -10150, -10076)
FUNCPTR(D2WIN, DrawFramedText, void __fastcall, (const wchar_t* wStr, int xPos, int yPos,int nColor, int centered), -10085, -10137)
FUNCPTR(D2WIN, DrawRectText, void __fastcall, (const wchar_t* wStr, int X, int Y, int nRectColor, int nRectTrans, int nColor), -10013, -10078)

FUNCPTR(D2WIN, GetTextSize, DWORD __fastcall, (wchar_t *wStr, DWORD* dwWidth, DWORD* dwFileNo), -10177, -10179)
FUNCPTR(D2WIN, SetTextSize, DWORD __fastcall, (DWORD dwSize), -10184, -10047)
FUNCPTR(D2WIN, GetTextWidth, int __fastcall, (const wchar_t * wStr), -10028, -10150)

FUNCPTR(D2WIN, SetControlText, void* __fastcall, (Control* box, wchar_t* txt), -10042, -10007)
FUNCPTR(D2WIN, GetTextWidthFileNo, DWORD __fastcall, (wchar_t *wStr, DWORD* dwWidth, DWORD* dwFileNo), -10177, -10179)

FUNCPTR(D2WIN, CreateImage, Control* __fastcall, (int xPos, int yPos, int SizeX, int SizeY, CellFile* pCellFile, BOOL(__stdcall* OnClick)(Control*), void* a7, BOOL(__stdcall* KeyHandle)(Control*)), -10127, -10203) //Updated 1.13c
FUNCPTR(D2WIN, CreateEditBox, Control* __fastcall, (DWORD dwPosX, DWORD dwPosY, DWORD _1, DWORD _2, DWORD _3, DWORD _4, DWORD _5, BOOL(__stdcall *pCallback)(wchar_t* wText), DWORD _6, DWORD _7, ControlPreferences* pPreferences), 0x161B0, 0x11A10)//1.13c
FUNCPTR(D2WIN, DestroyEditBox, VOID __fastcall, (Control* pControl), 0x159E0, 0xF320)//1.13c
FUNCPTR(D2WIN, DestroyControl, VOID __stdcall, (Control* pControl), 0x18490, 0xE5F0)//1.13c
FUNCPTR(D2WIN, SetEditBoxCallback, VOID __fastcall, (Control* pControl, BOOL(__stdcall *FunCallBack)(Control* pControl, DWORD dwInputType, char* pChar)), 0x13970, 0xF1D0)//1.13c
FUNCPTR(D2WIN, SetEditBoxProc, void __fastcall, (Control* box, BOOL(__stdcall *FunCallBack)(Control*, DWORD, DWORD)), 0x13970, 0xF1D0)//Updated 1.13c
FUNCPTR(D2WIN, SelectEditBoxText, void __fastcall, (Control* box), 0x7708, 0xEF80) //Updated 1.13c

//FUNCPTR(D2WIN, InitMPQ, MpqHandle __fastcall, (const char *dll, const char *mpqfile, const char *mpqname, int v4, void* v5, int priority), 0x7E60, 0x7E50)
ASMPTR(D2WIN, LoadMpq_I, 0x7E60, 0x7E50)
FUNCPTR(D2WIN, InitMPQ, DWORD __stdcall, (char *dll, const char *mpqfile, char *mpqname, int v4, int v5), 0x7E60, 0x7E50)

////////////////////////////////////////////////////////////////////////////////////////////////
// D2Win Globals
Expand Down
15 changes: 0 additions & 15 deletions BH/D2Stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,4 @@ void __declspec(naked) __fastcall D2CLIENT_PlaySound(int SoundNo)
pop ebx;
ret
}
}

__declspec(naked) void* __stdcall D2WIN_LoadMpq(DWORD OrderFlag, const char* szDllFile, const char* szMpqFile, const char* szName, DWORD _1, BOOL(__stdcall* fnMPQMissing)())
{
__asm
{
push[esp + 0x18]
push[esp + 0x18]
push[esp + 0x18]
push[esp + 0x18]
push[esp + 0x18]
mov eax, [esp + 0x18]
call D2WIN_LoadMpq_I
ret 0x18
}
}
3 changes: 1 addition & 2 deletions BH/D2Stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ DWORD __fastcall D2CLIENT_GetLevelName_STUB(DWORD levelId);
DWORD __fastcall D2CLIENT_GetUIVar_STUB(DWORD varno);
CellFile* __fastcall D2CLIENT_LoadUiImage(CHAR* szPath);
DWORD __fastcall D2CLIENT_ClickParty_ASM(RosterUnit* RosterUnit, DWORD Mode);
void __fastcall D2CLIENT_PlaySound(int SoundNo);
void* __stdcall D2WIN_LoadMpq(DWORD OrderFlag, const char* szDllFile, const char* szMpqFile, const char* szName, DWORD _1, BOOL(__stdcall* fnMPQMissing)());
void __fastcall D2CLIENT_PlaySound(int SoundNo);
Loading

0 comments on commit 2f93493

Please sign in to comment.