Networking Overhaul: Modern packets, buffers, handshake, dispatch & security hardening

See Readme
This commit is contained in:
rtw1x1
2026-02-08 07:35:02 +00:00
parent 0cc595bf09
commit 60ee35e921
142 changed files with 5703 additions and 14494 deletions

View File

@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "utils.h"
#include "config.h"
#include "desc.h"
@@ -9,7 +9,7 @@
#include "item_manager.h"
#include "mob_manager.h"
#include "vector.h"
#include "packet.h"
#include "packet_structs.h"
#include "pvp.h"
#include "profiler.h"
#include "guild.h"
@@ -382,6 +382,16 @@ int CalcMeleeDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreDe
LPITEM pWeapon = pkAttacker->GetWear(WEAR_WEAPON);
bool bPolymorphed = pkAttacker->IsPolymorphed();
// DEBUG: Log weapon and attack info
if (pkAttacker->IsPC())
{
sys_log(0, "CalcMeleeDamage: attacker=%s weapon=%s vnum=%u ignoredef=%d",
pkAttacker->GetName(),
pWeapon ? pWeapon->GetName() : "NONE",
pWeapon ? pWeapon->GetVnum() : 0,
bIgnoreDefense);
}
if (pWeapon && !(bPolymorphed && !pkAttacker->IsPolyMaintainStat()))
{
if (pWeapon->GetType() != ITEM_WEAPON)
@@ -485,6 +495,13 @@ int CalcMeleeDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreDe
iDam = MAX(0, iAtk - iDef);
// DEBUG: Log damage calculation for players
if (pkAttacker->IsPC())
{
sys_log(0, "CalcMeleeDamage RESULT: atk=%d def=%d dam=%d (weaponDam=%d, fAR=%.2f)",
iAtk, iDef, iDam, DEBUG_iDamCur, fAR);
}
if (test_server)
{
int DEBUG_iLV = pkAttacker->GetLevel()*2;