[C++] Multiple Damages

Metin2Hub New World
Moderator
Designer
Developer
Apr
Threads
127
733
1,761
93
HubMoney
1,772
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
2,002
2
842
113
HubMoney
1,212
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