Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into native
Browse files Browse the repository at this point in the history
  • Loading branch information
0blu committed Dec 10, 2024
2 parents 43af32f + 8f379e7 commit 528e018
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
21 changes: 14 additions & 7 deletions src/game/Anticheat/WardenAnticheat/Warden.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,15 +619,22 @@ void Warden::HandlePacket(WorldPacket& recvData)
if (!!m_crk)
return;

// at this point the client has our module loaded. send whatever packets are necessary to initialize Warden
InitializeClient();
// in versions before 1.8, the client does not call the module's tick function
// this means the client can never respond to any scans, and will time out
// it's unlcear if they used different modules that don't require a tick
// or if warden was just unfinished and not actually used before 1.8
if (m_clientBuild > CLIENT_BUILD_1_7_1)
{
// at this point the client has our module loaded. send whatever packets are necessary to initialize Warden
InitializeClient();

// send any initial hack scans that the scan manager may have for us
RequestScans(SelectScans(ScanFlags::InitialLogin));
// send any initial hack scans that the scan manager may have for us
RequestScans(SelectScans(ScanFlags::InitialLogin));

// begin the scan clock (note that even if the clock expires before any initial scans are answered, no new
// checks will be requested until the reply is received).
BeginScanClock();
// begin the scan clock (note that even if the clock expires before any initial scans are answered, no new
// checks will be requested until the reply is received).
BeginScanClock();
}

break;
}
Expand Down
12 changes: 1 addition & 11 deletions src/game/Anticheat/WardenAnticheat/WardenWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,7 @@ static constexpr struct ClientOffsets
// Click to move
uint32 ClickToMovePosition;
} Offsets[] = {
{
4695,
0x2D66F0,
0x21F750, 0x220740, 0x2203C0, 0x226A90,
0x225D0,
0xA61D84,
0xAD5EAC,
0x9F5928, 0x3890, 0x0, 0xA8,
0xACECF8, 0x228, 0x08,
0xA34414
},
// scanning does not work in versions before 1.8 so no point in defining offsets for them
{
4878,
0x2DB9D0,
Expand Down
5 changes: 4 additions & 1 deletion src/game/Objects/SpellCaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,9 @@ float SpellCaster::MeleeDamageBonusDone(Unit const* pVictim, float pdamage, Weap
// ====================
float DonePercent = 1.0f;

if (!isWeaponDamageBasedSpell && GetTypeId() == TYPEID_UNIT && !(IsPet() && ((Creature*)this)->GetOwnerGuid().IsPlayer()))
DonePercent *= Creature::_GetSpellDamageMod(((Creature*)this)->GetCreatureInfo()->rank);

// ..done pct, already included in weapon damage based spells
if (pUnit && !isWeaponDamageBasedSpell)
{
Expand Down Expand Up @@ -1319,7 +1322,7 @@ float SpellCaster::SpellDamageBonusDone(Unit const* pVictim, SpellEntry const* s
Item* pWeapon = GetTypeId() == TYPEID_PLAYER ? ((Player*)this)->GetWeaponForAttack(BASE_ATTACK, true, false) : nullptr;

// Creature damage
if (GetTypeId() == TYPEID_UNIT && !((Creature*)this)->IsPet())
if (GetTypeId() == TYPEID_UNIT && !(IsPet() && ((Creature*)this)->GetOwnerGuid().IsPlayer()))
DoneTotalMod *= Creature::_GetSpellDamageMod(((Creature*)this)->GetCreatureInfo()->rank);

if (pUnit)
Expand Down

0 comments on commit 528e018

Please sign in to comment.