Gmler için Mob Vnum Gösterme Eklentisi

Erto

Gold Üye
Gold Üye
Geliştirici
Yardımsever Üye
MT Üye
Mesaj
704
Çözümler
31
Beğeni
656
Puan
930
Ticaret Puanı
1
Basit bir eklentidir ama yeri gelince lazım oluyor . İyi kullanımlar dilerim . Daha önce paylaşıldığını görmedim fakat varsa kapatılabilir .

KANIT :

WhatsApp Görsel 2025-06-12 saat 16.35.41_678583a9.webp
 

Dosya Eklentileri

Son düzenleme:
alternatif olarak genel bilgileri ayrı texttail olarakta gösterebilirsiniz, AttachTextTail geçen yerlere ek olarak ekleyebilirsiniz

oXbLTSj[1].webp


Kod:
Genişlet Daralt Kopyala
void CPythonTextTail::AttachDebugTextTails(uint32_t dwVID)
{
    CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetInstancePtr(dwVID);
    if (!pInstance)
        return;

    /*
        TPixelPosition kPos;
    pInstance->NEW_GetPixelPosition(&kPos);

    auto kScale = pInstance->GetGraphicThingInstancePtr()->GetScale();

    std::string stInfo;
    stInfo += "Index: " + std::to_string(dwVID) + "\n";
    stInfo += "VNUM: " + std::to_string(pInstance->GetVirtualNumber()) + "\n";
    stInfo += "Race: " + std::to_string(pInstance->GetRace()) + "\n";
    stInfo += "Shape: " + std::to_string(pInstance->GetShape()) + "\n";
    stInfo += "Pos: " + std::to_string(kPos.x) + ", " + std::to_string(kPos.y) + ", " + std::to_string(kPos.z) + "\n";
    stInfo += "H: " + std::to_string(pInstance->GetGraphicThingInstanceRef().GetHeight()) + "\n";
    stInfo += "Dir: " + std::to_string(pInstance->GetRotation()) + "\n";
    stInfo += "AI: " + std::to_string(pInstance->GetAIFlag()) + "\n";
    stInfo += "Rot: " + std::to_string(pInstance->GetRotation()) + "/" + std::to_string(pInstance->GetAdvancingRotation()) + "\n";
    stInfo += "Motion: " + std::to_string(pInstance->GetMotionMode()) + "\n";
    stInfo += "Scale: " + std::to_string(kScale.x) + ", " + std::to_string(kScale.y) + ", " + std::to_string(kScale.z) + "\n";

    // Dist
    {
        CInstanceBase* pMainInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
        if (pMainInstance)
        {
            TPixelPosition kMainPos;
            pMainInstance->NEW_GetPixelPosition(&kMainPos);

            float fDist = sqrtf(powf(kPos.x - kMainPos.x, 2) + powf(kPos.y - kMainPos.y, 2));
            stInfo += "Dist: " + std::to_string(fDist) + "\n";
        }
    }
    */
    /*
    // Index / VID
    {
        char szText[256];
        sprintf(szText, "Index: %u", dwVID);
        RegisterInfoTail(dwVID, szText, 1);
    }

    // VNUM
    {
        char szText[256];
        sprintf(szText, "VNUM: %u", pInstance->GetVirtualNumber());
        RegisterInfoTail(dwVID, szText, 2);
    }

    // Race
    {
        char szText[256];
        sprintf(szText, "Race: %u", pInstance->GetRace());
        RegisterInfoTail(dwVID, szText, 3);
    }

    // Shape
    {
        char szText[256];
        sprintf(szText, "Shape: %u", pInstance->GetShape());
        RegisterInfoTail(dwVID, szText, 4);
    }

    // Position
    {
        TPixelPosition kPos;
        pInstance->NEW_GetPixelPosition(&kPos);

        char szText[256];
        sprintf(szText, "Pos: %.2f, %.2f, %.2f", kPos.x, kPos.y, kPos.z);
        RegisterInfoTail(dwVID, szText, 5);
    }

    // Width - Height
    {
        char szText[256];
        sprintf(szText, "H: %.2f", pInstance->GetGraphicThingInstanceRef().GetHeight());
        RegisterInfoTail(dwVID, szText, 6);
    }

    // Direction
    {
        char szText[256];
        sprintf(szText, "Dir: %.2f", pInstance->GetRotation());
        RegisterInfoTail(dwVID, szText, 7);
    }

    // AI Flag
    {
        char szText[256];
        sprintf(szText, "AI: %u", pInstance->GetAIFlag());
        RegisterInfoTail(dwVID, szText, 8);
    }

    // Rotation
    {
        char szText[256];
        sprintf(szText, "Rot: %.2f/%.2f", pInstance->GetRotation(), pInstance->GetAdvancingRotation());
        RegisterInfoTail(dwVID, szText, 9);
    }

    // Motion
    {
        char szText[256];
        sprintf(szText, "Motion: %u", pInstance->GetMotionMode());
        RegisterInfoTail(dwVID, szText, 10);
    }

    // Scale
    {
        auto kScale = pInstance->GetGraphicThingInstancePtr()->GetScale();

        char szText[256];
        sprintf(szText, "Scale: %.2f, %.2f, %.2f", kScale.x, kScale.y, kScale.z);
        RegisterInfoTail(dwVID, szText, 11);
    }
    */
    // Dist
    {
        CInstanceBase* pMainInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
        if (pMainInstance)
        {
            char szText[256];
            sprintf(szText, "VID: %u\n Dist: %.2f", dwVID, pInstance->NEW_GetDistanceFromDestInstance(*pMainInstance));
            RegisterInfoTail(dwVID, szText, 12);
        }
    }
}
 
Yapay zekadan ufak optimizasyon:

C++:
Genişlet Daralt Kopyala
    const char* displayName = pCharacterInstance->GetNameString();

    if (CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetMainInstancePtr())
    {
        if (pInstance->IsGameMaster() && pInstance != pCharacterInstance && !pCharacterInstance->IsPC())
        {
            static char chrName[CHARACTER_NAME_MAX_LEN + 16]; // Static for reuse
            snprintf(chrName, sizeof(chrName), "%s |cFFFF8C00[%u]", displayName, pCharacterInstance->GetRace());
            displayName = chrName;
        }
    }
 
Yapay zekadan ufak optimizasyon:

C++:
Genişlet Daralt Kopyala
    const char* displayName = pCharacterInstance->GetNameString();

    if (CInstanceBase* pInstance = CPythonCharacterManager::Instance().GetMainInstancePtr())
    {
        if (pInstance->IsGameMaster() && pInstance != pCharacterInstance && !pCharacterInstance->IsPC())
        {
            static char chrName[CHARACTER_NAME_MAX_LEN + 16]; // Static for reuse
            snprintf(chrName, sizeof(chrName), "%s |cFFFF8C00[%u]", displayName, pCharacterInstance->GetRace());
            displayName = chrName;
        }
    }
evet buda kullanılabilir fakat orjinal kodu koruma taraftarıyım
 
Bu Eklemeden Sonra Yanıma Hiç Bir Mob Spawn Edemiyorum. Bilgisi olan var mı ?
 
Uyarı: Bu konu açıldığından bu yana baya zaman geçmiş.
Muhtemelen daha fazla tartışma gerekli değildir ki bu durumda yeni bir konu başlatmayı öneririz. Eğer yine de cevabınızın gerekli olduğunu düşünüyorsanız buna rağmen cevap verebilirsiniz.
Geri
Üst