• Announcement:
    In order to download VIP files, you need to UPGRADE your account.

[C++] Multiple Damages

Metin2Hub New World
Co-Admin
Premium
VIP
Designer
Developer
Apr
Threads
127
733
1,034
93
HubMoney
1,186
Hi to everyone, i'm Masamune a 2D Designer.. Welcome Here!



Open : //client_source/UserInterface/PythonNetworkStreamPhaseGame.cpp


C++:
Search:

bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim)
{
    if (!__CanActMainInstance())
        return true;

__​

C++:
ADD:

    SendTargetPacket(dwVIDVictim); // multidano

__​

C++:
Search:

    TPacketCGAttack kPacketAtk;

    kPacketAtk.header = HEADER_CG_ATTACK;
    kPacketAtk.bType = uMotAttack;
    kPacketAtk.dwVictimVID = dwVIDVictim;

__​

C++:
// add above
    if (!__IsPlayerAttacking()) // multidano
        return true;

____________​

C++:
bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim)
{
    if (!__CanActMainInstance())
        return true;
   
    SendTargetPacket(dwVIDVictim); // multidano

[HASH=2]#ifdef[/HASH] ATTACK_TIME_LOG
    static DWORD prevTime = timeGetTime();
    DWORD curTime = timeGetTime();
    TraceError("TIME: %.4f(%.4f) ATTACK_PACKET: %d TARGET: %d", curTime/1000.0f, (curTime-prevTime)/1000.0f, uMotAttack, dwVIDVictim);
    prevTime = curTime;
[HASH=3]#endif[/HASH]

    if (!__IsPlayerAttacking()) // multidano
        return true;

    TPacketCGAttack kPacketAtk;

    kPacketAtk.header = HEADER_CG_ATTACK;
    kPacketAtk.bType = uMotAttack;
    kPacketAtk.dwVictimVID = dwVIDVictim;

    if (!SendSpecial(sizeof(kPacketAtk), &kPacketAtk))
    {
[HASH=2]#ifdef[/HASH] _DEBUG
        Tracen("Send Battle Attack Packet Error");
[HASH=3]#endif[/HASH]
        return false;
    }

    return SendSequence();
}
 
Last edited:
Metin2Hub Bot
M2Hub Bot
Feb
Threads
65
1,086
1
411
83
HubMoney
769
Hi to everyone, i'm Masamune a 2D Designer.. Welcome Here!



Open : //client_source/UserInterface/PythonNetworkStreamPhaseGame.cpp

Python:
Search:

bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim)
{
    if (!__CanActMainInstance())
        return true;

__​

Python:
ADD:

    SendTargetPacket(dwVIDVictim); // multidano

__​

Python:
Search:

    TPacketCGAttack kPacketAtk;

    kPacketAtk.header = HEADER_CG_ATTACK;
    kPacketAtk.bType = uMotAttack;
    kPacketAtk.dwVictimVID = dwVIDVictim;

__​

Python:
// add above
    if (!__IsPlayerAttacking()) // multidano
        return true;

____________​

Python:
bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim)
{
    if (!__CanActMainInstance())
        return true;
    
    SendTargetPacket(dwVIDVictim); // multidano

[HASH=2]#ifdef[/HASH] ATTACK_TIME_LOG
    static DWORD prevTime = timeGetTime();
    DWORD curTime = timeGetTime();
    TraceError("TIME: %.4f(%.4f) ATTACK_PACKET: %d TARGET: %d", curTime/1000.0f, (curTime-prevTime)/1000.0f, uMotAttack, dwVIDVictim);
    prevTime = curTime;
[HASH=3]#endif[/HASH]

    if (!__IsPlayerAttacking()) // multidano
        return true;

    TPacketCGAttack kPacketAtk;

    kPacketAtk.header = HEADER_CG_ATTACK;
    kPacketAtk.bType = uMotAttack;
    kPacketAtk.dwVictimVID = dwVIDVictim;

    if (!SendSpecial(sizeof(kPacketAtk), &kPacketAtk))
    {
[HASH=2]#ifdef[/HASH] _DEBUG
        Tracen("Send Battle Attack Packet Error");
[HASH=3]#endif[/HASH]
        return false;
    }

    return SendSequence();
}


Hello dear user,

Your post will be under surveillance by bots for the next few hours.

Forum description : Metin2 private server, Metin2 download, Metin2 support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2.
 
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock