Skip to content
View in the app

A better way to browse. Learn more.

Learn more

[C++] Multiple damages

Featured Replies

  • Administrator

screenshot_201-png.83875

Preview: https://gyazo.com/72e94dd42da3c66f28dfb4190df2c181

 

Open //client_source/UserInterface/PythonNetworkStreamPhaseGame.cpp

Search: 

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

Add:

  SendTargetPacket(dwVIDVictim); // multidano

Search:

  TPacketCGAttack kPacketAtk;

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

Add above

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

Full function

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();
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.