Aç: //client_source/UserInterface/PythonNetworkStreamPhaseGame.cpp
C++:
Ara:
bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim)
{
if (!__CanActMainInstance())
return true;
C++:
Ekle:
SendTargetPacket(dwVIDVictim);
C++:
Ara:
TPacketCGAttack kPacketAtk;
kPacketAtk.header = HEADER_CG_ATTACK;
kPacketAtk.bType = uMotAttack;
kPacketAtk.dwVictimVID = dwVIDVictim;
C++:
// üstüne ekle
if (!__IsPlayerAttacking()) // multidano
return true;
C++:
//Olması gereken
bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim)
{
if (!__CanActMainInstance())
return true;
SendTargetPacket(dwVIDVictim);
#ifdef 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;
#endif
if (!__IsPlayerAttacking()) // multidano
return true;
TPacketCGAttack kPacketAtk;
kPacketAtk.header = HEADER_CG_ATTACK;
kPacketAtk.bType = uMotAttack;
kPacketAtk.dwVictimVID = dwVIDVictim;
if (!SendSpecial(sizeof(kPacketAtk), &kPacketAtk))
{
#ifdef _DEBUG
Tracen("Send Battle Attack Packet Error");
#endif
return false;
}
return SendSequence();
}