Yardım Sil sat vergi sorunu

  • Konuyu açan Konuyu açan tutsak57
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 9
  • Gösterim Gösterim 142
Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

tutsak57

Üye
Üye
Mesaj
30
Beğeni
3
Puan
406
Ticaret Puanı
1
Npc de vergi alıyor sil satta almıyor oradada almasını ıstıyorum bilgi verebilecek varmı
 
shop.cpp, varsa monarch.cpp/.h, char_item.cpp iletir misiniz?
 

Dosya Eklentileri

En son bir moderatör tarafından düzenlenmiş:
97 yapıcam kesıntı oranını normali yaptım sat silinkini bulamadım
char_item.cpp:
Genişlet Daralt Kopyala
// Arat: (SellItem(TItemPos Cell, DWORD count) içinde olacak)
    dwPrice *= count;

    // DWORD dwTax = 0;
    // dwTax = dwPrice * 3/100;
    // dwPrice -= dwTax;
    const int64_t nTotalMoney = static_cast<int64_t>(GetGold()) + static_cast<int64_t>(dwPrice);

// Değiştir:
    dwPrice *= count;

    DWORD dwTax = 0;
    int iVal = quest::CQuestManager::instance().GetEventFlag("personal_shop");

    if (iVal > 0)
    {
        if (iVal > 100)
            iVal = 100;

        dwTax = dwPrice * iVal / 100;
        dwPrice -= dwTax;
    }

    const int64_t nTotalMoney = static_cast<int64_t>(GetGold()) + static_cast<int64_t>(dwPrice);

// Arat:
    quest::CQuestManager::instance().ClearCurrentItem();
    // ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Satis icin %d%% (%d yang) vergi uygulandi."), 3, dwTax);
    ITEM_MANAGER::instance().RemoveItem(item, "SELL");
    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You succesfully sell %s."), item->GetName());
    PointChange(POINT_GOLD, dwPrice, false);
    return true;

// Değiştir:
    quest::CQuestManager::instance().ClearCurrentItem();
    ITEM_MANAGER::instance().RemoveItem(item, "SELL");
    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You succesfully sell %s."), item->GetName());
    PointChange(POINT_GOLD, dwPrice, false);
    CMonarch::instance().SendtoDBAddMoney(dwTax, GetEmpire(), this);
    return true;

Monarch sistemine göre ayarlanacaksa bu şekilde iş görebilir.
 
char_item.cpp:
Genişlet Daralt Kopyala
// Arat: (SellItem(TItemPos Cell, DWORD count) içinde olacak)
    dwPrice *= count;

    // DWORD dwTax = 0;
    // dwTax = dwPrice * 3/100;
    // dwPrice -= dwTax;
    const int64_t nTotalMoney = static_cast<int64_t>(GetGold()) + static_cast<int64_t>(dwPrice);

// Değiştir:
    dwPrice *= count;

    DWORD dwTax = 0;
    int iVal = quest::CQuestManager::instance().GetEventFlag("personal_shop");

    if (iVal > 0)
    {
        if (iVal > 100)
            iVal = 100;

        dwTax = dwPrice * iVal / 100;
        dwPrice -= dwTax;
    }

    const int64_t nTotalMoney = static_cast<int64_t>(GetGold()) + static_cast<int64_t>(dwPrice);

// Arat:
    quest::CQuestManager::instance().ClearCurrentItem();
    // ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Satis icin %d%% (%d yang) vergi uygulandi."), 3, dwTax);
    ITEM_MANAGER::instance().RemoveItem(item, "SELL");
    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You succesfully sell %s."), item->GetName());
    PointChange(POINT_GOLD, dwPrice, false);
    return true;

// Değiştir:
    quest::CQuestManager::instance().ClearCurrentItem();
    ITEM_MANAGER::instance().RemoveItem(item, "SELL");
    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You succesfully sell %s."), item->GetName());
    PointChange(POINT_GOLD, dwPrice, false);
    CMonarch::instance().SendtoDBAddMoney(dwTax, GetEmpire(), this);
    return true;

Monarch sistemine göre ayarlanacaksa bu şekilde iş görebilir.
Bunumı alıp denıyom
 
char_item.cpp:
Genişlet Daralt Kopyala
// Arat: (SellItem(TItemPos Cell, DWORD count) içinde olacak)
    dwPrice *= count;

    // DWORD dwTax = 0;
    // dwTax = dwPrice * 3/100;
    // dwPrice -= dwTax;
    const int64_t nTotalMoney = static_cast<int64_t>(GetGold()) + static_cast<int64_t>(dwPrice);

// Değiştir:
    dwPrice *= count;

    DWORD dwTax = 0;
    int iVal = quest::CQuestManager::instance().GetEventFlag("personal_shop");

    if (iVal > 0)
    {
        if (iVal > 100)
            iVal = 100;

        dwTax = dwPrice * iVal / 100;
        dwPrice -= dwTax;
    }

    const int64_t nTotalMoney = static_cast<int64_t>(GetGold()) + static_cast<int64_t>(dwPrice);

// Arat:
    quest::CQuestManager::instance().ClearCurrentItem();
    // ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Satis icin %d%% (%d yang) vergi uygulandi."), 3, dwTax);
    ITEM_MANAGER::instance().RemoveItem(item, "SELL");
    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You succesfully sell %s."), item->GetName());
    PointChange(POINT_GOLD, dwPrice, false);
    return true;

// Değiştir:
    quest::CQuestManager::instance().ClearCurrentItem();
    ITEM_MANAGER::instance().RemoveItem(item, "SELL");
    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You succesfully sell %s."), item->GetName());
    PointChange(POINT_GOLD, dwPrice, false);
    CMonarch::instance().SendtoDBAddMoney(dwTax, GetEmpire(), this);
    return true;

Monarch sistemine göre ayarlanacaksa bu şekilde iş görebilir.
Olmadı Malesef
 
Geri
Üst