Çözülemedi Max item count ta item sayısının arasına nokta eklemek

  • Konuyu açan Konuyu açan asilords
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 5
  • Gösterim Gösterim 126
Ne yazık ki bu konuda sorulara çözüm bulunmuyor. Eğer konuda yorumlar varsa hepsini inceleyebilirsiniz. Belki sizlerin sorununuzu çözmek için için ipuçları bulabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

asilords

Üye
Üye
Mesaj
331
Çözümler
13
Beğeni
82
Puan
729
Ticaret Puanı
0
item sayısı limiti arttırdım göz yorucu oluyor tam olarak anlaşılmıyor sayı arasına nasıl nokta koyabilirim daha önce bazı serverlerde görmüştüm fikri olan var mı?
örn:30000 > 30.000

Ekran görüntüsü 2025-01-10 194128.webp
 
En son bir moderatör tarafından düzenlenmiş:
sayıyı gösteren kodu bul sonra envanterdeki yang gösterme kodu localeinfoda olacak onu bul ordaki mantığa uyarla
 
k t m gösteren sistemi . olarak değiştir olur her halde

vatansever2 den alıntıdır;
PythonSlotWindow.cpp:
Genişlet Daralt Kopyala
void CSlotWindow::SetSlotCount(DWORD dwIndex, DWORD dwCount)
{
    TSlot* pSlot;
    if (!GetSlotPointer(dwIndex, &pSlot))
        return;

    if (dwCount <= 0)
    {
        if (pSlot->pNumberLine)
        {
            delete pSlot->pNumberLine;
            pSlot->pNumberLine = NULL;
        }
    }
    else
    {
        string szCount;

        unsigned long long index = 0;

        long long modIndex = 1;
        while (dwCount > 0)
        {
            if ((index + 1) % 4 == 0)
            {

                if (modIndex == 1)
                    szCount = "k" + szCount;
                else if (modIndex == 2)
                    szCount = "m" + szCount;
                else
                    szCount = "t" + szCount;
                modIndex++;
            }
            else
            {
                szCount = std::to_string(dwCount % 10) + szCount;
                dwCount /= 10;
            }

            index++;
        }

        std::string::reverse_iterator checkPoint = szCount.rbegin();
        for (auto it = szCount.rbegin(); it != szCount.rend(); it++)
        {
            if (*it == '0')
            {
                continue;
            }
            if (*it >= '1' && *it <= '9')
            {
                break;
            }
            else // k m t
            {
                checkPoint = it;
            }
        }

        if (checkPoint != szCount.rbegin())
        {
            szCount.erase(checkPoint.base(), szCount.end());
        }

        if (!pSlot->pNumberLine)
        {
            CNumberLine* pNumberLine = new UI::CNumberLine(this);
            pNumberLine->SetHorizontalAlign(CNumberLine::HORIZONTAL_ALIGN_RIGHT);
            pNumberLine->Show();
            pSlot->pNumberLine = pNumberLine;
        }

        pSlot->pNumberLine->SetNumber(szCount.c_str());
    }
}
 
sayıyı gösteren kodu bul sonra envanterdeki yang gösterme kodu localeinfoda olacak onu bul ordaki mantığa uyarla
sayıyı gösteren kod clientte yang kısmı ise packta aynı mantık çalışmıyor

k t m gösteren sistemi . olarak değiştir olur her halde

vatansever2 den alıntıdır;
PythonSlotWindow.cpp:
Genişlet Daralt Kopyala
void CSlotWindow::SetSlotCount(DWORD dwIndex, DWORD dwCount)
{
    TSlot* pSlot;
    if (!GetSlotPointer(dwIndex, &pSlot))
        return;

    if (dwCount <= 0)
    {
        if (pSlot->pNumberLine)
        {
            delete pSlot->pNumberLine;
            pSlot->pNumberLine = NULL;
        }
    }
    else
    {
        string szCount;

        unsigned long long index = 0;

        long long modIndex = 1;
        while (dwCount > 0)
        {
            if ((index + 1) % 4 == 0)
            {

                if (modIndex == 1)
                    szCount = "k" + szCount;
                else if (modIndex == 2)
                    szCount = "m" + szCount;
                else
                    szCount = "t" + szCount;
                modIndex++;
            }
            else
            {
                szCount = std::to_string(dwCount % 10) + szCount;
                dwCount /= 10;
            }

            index++;
        }

        std::string::reverse_iterator checkPoint = szCount.rbegin();
        for (auto it = szCount.rbegin(); it != szCount.rend(); it++)
        {
            if (*it == '0')
            {
                continue;
            }
            if (*it >= '1' && *it <= '9')
            {
                break;
            }
            else // k m t
            {
                checkPoint = it;
            }
        }

        if (checkPoint != szCount.rbegin())
        {
            szCount.erase(checkPoint.base(), szCount.end());
        }

        if (!pSlot->pNumberLine)
        {
            CNumberLine* pNumberLine = new UI::CNumberLine(this);
            pNumberLine->SetHorizontalAlign(CNumberLine::HORIZONTAL_ALIGN_RIGHT);
            pNumberLine->Show();
            pSlot->pNumberLine = pNumberLine;
        }

        pSlot->pNumberLine->SetNumber(szCount.c_str());
    }
}
Bu yöntem ise daha mantıklı ama malesef işe yaramadı saldım uğraşmadım
 
En son bir moderatör tarafından düzenlenmiş:
bunu denermisin;

PythonSlotWindow.cpp:
Genişlet Daralt Kopyala
void CSlotWindow::SetSlotCount(DWORD dwIndex, DWORD dwCount)
{
    TSlot* pSlot;

    if (!GetSlotPointer(dwIndex, &pSlot))
        return;

    if (dwCount <= 0)
    {
        if (pSlot->pNumberLine)
        {
            delete pSlot->pNumberLine;
            pSlot->pNumberLine = nullptr;
        }

        return;
    }

    std::string countStr = std::to_string(dwCount);
    std::string formattedCount;
    int length = countStr.length();
    int counter = 0;

    for (int i = length - 1; i >= 0; --i)
    {
        formattedCount += countStr[i];
        counter++;

        if (counter % 3 == 0 && i != 0)
        {
            formattedCount += '.';
        }
    }

    std::reverse(formattedCount.begin(), formattedCount.end());

    if (!pSlot->pNumberLine)
    {
        CNumberLine* pNumberLine = new UI::CNumberLine(this);
        pNumberLine->SetHorizontalAlign(CNumberLine::HORIZONTAL_ALIGN_RIGHT);
        pNumberLine->Show();
        pSlot->pNumberLine = pNumberLine;
    }

    pSlot->pNumberLine->SetNumber(formattedCount.c_str());
}
 
bunu denermisin;

PythonSlotWindow.cpp:
Genişlet Daralt Kopyala
void CSlotWindow::SetSlotCount(DWORD dwIndex, DWORD dwCount)
{
    TSlot* pSlot;

    if (!GetSlotPointer(dwIndex, &pSlot))
        return;

    if (dwCount <= 0)
    {
        if (pSlot->pNumberLine)
        {
            delete pSlot->pNumberLine;
            pSlot->pNumberLine = nullptr;
        }

        return;
    }

    std::string countStr = std::to_string(dwCount);
    std::string formattedCount;
    int length = countStr.length();
    int counter = 0;

    for (int i = length - 1; i >= 0; --i)
    {
        formattedCount += countStr[i];
        counter++;

        if (counter % 3 == 0 && i != 0)
        {
            formattedCount += '.';
        }
    }

    std::reverse(formattedCount.begin(), formattedCount.end());

    if (!pSlot->pNumberLine)
    {
        CNumberLine* pNumberLine = new UI::CNumberLine(this);
        pNumberLine->SetHorizontalAlign(CNumberLine::HORIZONTAL_ALIGN_RIGHT);
        pNumberLine->Show();
        pSlot->pNumberLine = pNumberLine;
    }

    pSlot->pNumberLine->SetNumber(formattedCount.c_str());
}
değişen bişey yok fileslerde görürsem sökerim artık ordan
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst