Psych0SoociaL 1
Psych0SoociaL
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Agora Metin2 1
Agora Metin2
Bvural41 1
Bvural41
Mt2Hizmet 1
Mt2Hizmet
Hikaye Ekle

Mobların Becerileri ile Sektirememesi

Bu konu ile bağlantılıdır.
Lazım olan bazı arkadaşalar varmış;

2dcc1fda5924ca98963ad00a45931c33.gif


char_skill.cpp
C++:
                float fx, fy;
                float degree = GetDegreeFromPositionXY(m_pkChr->GetX(), m_pkChr->GetY(), pkChrVictim->GetX(), pkChrVictim->GetY());

                if (m_pkSk->dwVnum == SKILL_HORSE_WILDATTACK){
                    degree -= m_pkChr->GetRotation();
                    degree = fmod(degree, 360.0f) - 180.0f;

                    if (degree > 0) { degree = m_pkChr->GetRotation() + 90.0f; }
                    else { degree = m_pkChr->GetRotation() - 90.0f; }
                }

                GetDeltaByDegree(degree, fCrushSlidingLength, &fx, &fy);
                //sys_log(0, "CRUSH! %s -> %s (%d %d) -> (%d %d)", m_pkChr->GetName(), pkChrVictim->GetName(), pkChrVictim->GetX(), pkChrVictim->GetY(), (long)(pkChrVictim->GetX()+fx), (long)(pkChrVictim->GetY()+fy));
                long tx = (long)(pkChrVictim->GetX() + fx);
                long ty = (long)(pkChrVictim->GetY() + fy);

                pkChrVictim->Sync(tx, ty);
                pkChrVictim->Goto(tx, ty);
                pkChrVictim->CalculateMoveDuration();

                pkChrVictim->SyncPacket();

Değiştir

C++:
if (m_pkChr->IsPC()) {
                    float fx, fy;
                    float degree = GetDegreeFromPositionXY(m_pkChr->GetX(), m_pkChr->GetY(), pkChrVictim->GetX(), pkChrVictim->GetY());

                    if (m_pkSk->dwVnum == SKILL_HORSE_WILDATTACK) {
                        degree -= m_pkChr->GetRotation();
                        degree = fmod(degree, 360.0f) - 180.0f;

                        if (degree > 0) { degree = m_pkChr->GetRotation() + 90.0f; }
                        else { degree = m_pkChr->GetRotation() - 90.0f; }
                    }

                    GetDeltaByDegree(degree, fCrushSlidingLength, &fx, &fy);
                    //sys_log(0, "CRUSH! %s -> %s (%d %d) -> (%d %d)", m_pkChr->GetName(), pkChrVictim->GetName(), pkChrVictim->GetX(), pkChrVictim->GetY(), (long)(pkChrVictim->GetX()+fx), (long)(pkChrVictim->GetY()+fy));
                    long tx = (long)(pkChrVictim->GetX() + fx);
                    long ty = (long)(pkChrVictim->GetY() + fy);

                    pkChrVictim->Sync(tx, ty);
                    pkChrVictim->Goto(tx, ty);
                    pkChrVictim->CalculateMoveDuration();

                    pkChrVictim->SyncPacket();
                }
Paylaşım için teşekkürler.
 
şimdi bu kodları buradan alıp copy paste yapıp bide mmo profillerine 'developer' yazacak arkadaşlara selamlar :)

eline sağlık conim sende olmasan forumda kaliteli paylaşım olmayacak :)
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst