Yardım Kadim Efsun Küresi sorunu

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

adv1453

Yardımsever Üye
Yardımsever Üye
MT Üye
Mesaj
442
Çözümler
42
Beğeni
221
Puan
869
Ticaret Puanı
0
Selamlar,

oyuna kadim efsun sistemi eklemesi yaptım ancak kadim efsun küresi sadece 5. efsunu değiştirmek yerine komple 5 efsunu birden değiştiriyor bunu nasıl engelleyebilirim?

kod şu şekilde; (71052 kadim efsun küresi kodu)
Python:
Genişlet Daralt Kopyala
#ifdef WJ_ELDER_ATTRIBUTE_SYSTEM
                            case 71051 : // ÁøÀç°¡
                                {
                                    LPITEM item2;
                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
                                        return false;
                                    if (ITEM_COSTUME == item2->GetType()){ // @fixme15
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
                                        return false;
                                    }
                                    if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
                                        return false;
                                    if (item2->GetAttributeSetIndex() == -1){
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
                                        return false;
                                    }
                                    if (item2->AddRareAttribute() == true){
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼º°øÀûÀ¸·Î ¼Ó¼ºÀÌ Ãß°¡ µÇ¾ú½À´Ï´Ù"));
                                        int iAddedIdx = item2->GetRareAttrCount() + 4;
                                        char buf[21];
                                        snprintf(buf, sizeof(buf), "%u", item2->GetID());
                                        LogManager::instance().ItemLog(GetPlayerID(), item2->GetAttributeType(iAddedIdx), item2->GetAttributeValue(iAddedIdx), item->GetID(), "ADD_RARE_ATTR", buf, GetDesc()->GetHostName(), item->GetOriginalVnum());
                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    else
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´õ ÀÌ»ó ÀÌ ¾ÆÀÌÅÛÀ¸·Î ¼Ó¼ºÀ» Ãß°¡ÇÒ ¼ö ¾ø½À´Ï´Ù"));
                                }
                                break;
#else
                            case 71051 : // ÁøÀç°¡
                                {
                                    // À¯·´, ½Ì°¡Æú, º£Æ®³² ÁøÀç°¡ »ç¿ë±İÁö
                                    LPITEM item2;

                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
                                        return false;

                                    if (ITEM_COSTUME == item2->GetType()) // @fixme124
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
                                        return false;
                                    }

                                    if (item2->IsExchanging() || item2->IsEquipped()) // @fixme114
                                        return false;

                                    if (item2->GetAttributeSetIndex() == -1)
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
                                        return false;
                                    }

                                    if (item2->AddRareAttribute() == true)
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼º°øÀûÀ¸·Î ¼Ó¼ºÀÌ Ãß°¡ µÇ¾ú½À´Ï´Ù"));

                                        int iAddedIdx = item2->GetRareAttrCount() + 4;
                                        char buf[21];
                                        snprintf(buf, sizeof(buf), "%u", item2->GetID());

                                        LogManager::instance().ItemLog(
                                                GetPlayerID(),
                                                item2->GetAttributeType(iAddedIdx),
                                                item2->GetAttributeValue(iAddedIdx),
                                                item->GetID(),
                                                "ADD_RARE_ATTR",
                                                buf,
                                                GetDesc()->GetHostName(),
                                                item->GetOriginalVnum());

                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    else
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´õ ÀÌ»ó ÀÌ ¾ÆÀÌÅÛÀ¸·Î ¼Ó¼ºÀ» Ãß°¡ÇÒ ¼ö ¾ø½À´Ï´Ù"));
                                    }
                                }
                                break;
#endif

#ifdef WJ_ELDER_ATTRIBUTE_SYSTEM
                            case 71052:
                                {
                                    LPITEM item2;
                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                        return false;
                                    if (ITEM_COSTUME == item2->GetType()){ // @fixme15
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
                                        return false;
                                    }
                                    if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
                                        return false;
                                    if (item2->GetAttributeSetIndex() == -1){
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
                                        return false;
                                    }
                                    if (item2->GetAttributeCount() == 5){
                                        item2->RemoveAttributeAt(4);
                                        item2->AddAttribute();
                                        item->SetCount(item->GetCount()-1);
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));
                                    }
                                    else if (item2->GetAttributeCount() == 4){
                                        item2->AddAttribute();
                                        item->SetCount(item->GetCount()-1);
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));                                      
                                    }
                                    else
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_MARBLE_ENOUGH_ATTR_COUNT"));
                                }
                                break;
#else
                            case 71052 : // ÁøÀç°æ
                                {
                                    LPITEM item2;
                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                        return false;
                                    if (ITEM_COSTUME == item2->GetType()){ // @fixme15
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
                                        return false;
                                    }
                                    if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
                                        return false;
                                    if (item2->GetAttributeSetIndex() == -1){
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
                                        return false;
                                    }
                                    if (item2->ChangeRareAttribute() == true){
                                        char buf[21];
                                        snprintf(buf, sizeof(buf), "%u", item2->GetID());
                                        LogManager::instance().ItemLog(this, item, "CHANGE_RARE_ATTR", buf);
                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    else
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("º¯°æ ½Ãų ¼Ó¼ºÀÌ ¾ø½À´Ï´Ù"));
                                }
                                break;
#endif
 
char_item.cpp açılır ve 71052 numaralı case şu şekilde değiştirilir

Kod:
Genişlet Daralt Kopyala
#ifdef WJ_ELDER_ATTRIBUTE_SYSTEM
                            case 71052:
                                {
                                    LPITEM item2;
                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                        return false;
                                    if (ITEM_COSTUME == item2->GetType()){ // @fixme15
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼O¼ºA≫ º?°æCO ¼o ¾ø´A ¾ÆAIAUAO´I´U."));
                                        return false;
                                    }
                                    if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
                                        return false;
                                    if (item2->GetAttributeSetIndex() == -1){
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼O¼ºA≫ º?°æCO ¼o ¾ø´A ¾ÆAIAUAO´I´U."));
                                        return false;
                                    }
                                    if (item2->GetAttributeCount() == 5){
                                        item2->RemoveAttributeAt(4);
                                        item2->AddAttribute();
                                        item->SetCount(item->GetCount()-1);
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));
                                    }
                                    else if (item2->GetAttributeCount() == 4){
                                        item2->AddAttribute();
                                        item->SetCount(item->GetCount()-1);
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));                                       
                                    }
                                    else
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_MARBLE_ENOUGH_ATTR_COUNT"));
                                }
                                break;
#else
                            case 71052 : // AøAc°æ
                                {
                                    LPITEM item2;
                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                        return false;
                                    if (ITEM_COSTUME == item2->GetType()){ // @fixme15
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼O¼ºA≫ º?°æCO ¼o ¾ø´A ¾ÆAIAUAO´I´U."));
                                        return false;
                                    }
                                    if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
                                        return false;
                                    if (item2->GetAttributeSetIndex() == -1){
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼O¼ºA≫ º?°æCO ¼o ¾ø´A ¾ÆAIAUAO´I´U."));
                                        return false;
                                    }
                                    if (item2->ChangeRareAttribute() == true){
                                        char buf[21];
                                        snprintf(buf, sizeof(buf), "%u", item2->GetID());
                                        LogManager::instance().ItemLog(this, item, "CHANGE_RARE_ATTR", buf);
                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    else
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("º?°æ ½AA³ ¼O¼ºAI ¾ø½A´I´U"));
                                }
                                break;
#endif

item_proto txt kodu alttadır
Kod:
Genişlet Daralt Kopyala
71052    Kadim_Efsun_Kuresi    ITEM_USE    USE_SPECIAL    1    NONE    ITEM_STACKABLE    NONE    NONE    3    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    0    0    0    0    0    0    0    0    0

Deneyip tekrar yazın.
 
char_item.cpp açılır ve 71052 numaralı case şu şekilde değiştirilir

Kod:
Genişlet Daralt Kopyala
#ifdef WJ_ELDER_ATTRIBUTE_SYSTEM
                            case 71052:
                                {
                                    LPITEM item2;
                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                        return false;
                                    if (ITEM_COSTUME == item2->GetType()){ // @fixme15
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼O¼ºA≫ º?°æCO ¼o ¾ø´A ¾ÆAIAUAO´I´U."));
                                        return false;
                                    }
                                    if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
                                        return false;
                                    if (item2->GetAttributeSetIndex() == -1){
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼O¼ºA≫ º?°æCO ¼o ¾ø´A ¾ÆAIAUAO´I´U."));
                                        return false;
                                    }
                                    if (item2->GetAttributeCount() == 5){
                                        item2->RemoveAttributeAt(4);
                                        item2->AddAttribute();
                                        item->SetCount(item->GetCount()-1);
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));
                                    }
                                    else if (item2->GetAttributeCount() == 4){
                                        item2->AddAttribute();
                                        item->SetCount(item->GetCount()-1);
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));                                      
                                    }
                                    else
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_MARBLE_ENOUGH_ATTR_COUNT"));
                                }
                                break;
#else
                            case 71052 : // AøAc°æ
                                {
                                    LPITEM item2;
                                    if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                                        return false;
                                    if (ITEM_COSTUME == item2->GetType()){ // @fixme15
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼O¼ºA≫ º?°æCO ¼o ¾ø´A ¾ÆAIAUAO´I´U."));
                                        return false;
                                    }
                                    if (item2->IsExchanging() || item2->IsEquipped()) // @fixme14
                                        return false;
                                    if (item2->GetAttributeSetIndex() == -1){
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼O¼ºA≫ º?°æCO ¼o ¾ø´A ¾ÆAIAUAO´I´U."));
                                        return false;
                                    }
                                    if (item2->ChangeRareAttribute() == true){
                                        char buf[21];
                                        snprintf(buf, sizeof(buf), "%u", item2->GetID());
                                        LogManager::instance().ItemLog(this, item, "CHANGE_RARE_ATTR", buf);
                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    else
                                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("º?°æ ½AA³ ¼O¼ºAI ¾ø½A´I´U"));
                                }
                                break;
#endif

item_proto txt kodu alttadır
Kod:
Genişlet Daralt Kopyala
71052    Kadim_Efsun_Kuresi    ITEM_USE    USE_SPECIAL    1    NONE    ITEM_STACKABLE    NONE    NONE    3    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    0    0    0    0    0    0    0    0    0

Deneyip tekrar yazın.

Src'den belirttiğiniz şekilde güncelledim ancak bir şey değişmedi. item_proto txt bu şekilde; (item_proto navicat üzerinden çalışıyor)

Kod:
Genişlet Daralt Kopyala
71052    gÑ¦Û±Ü    ITEM_USE    USE_CHANGE_ATTRIBUTE    1    ANTI_DROP | ANTI_SELL | ANTI_GIVE | ANTI_MYSHOP    ITEM_STACKABLE | LOG    NONE    NONE    500    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    0    0    0    0    0    0    0    0    0

Navicat;
Kod:
Genişlet Daralt Kopyala
71052    gÑ¦Û±Ü    Kadim Küresi    3    18    0    1    74112    8196    0        0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    -1    -1    -1    -1    -1    -1    0    0    0
 
Geri
Üst