Yardım Çicek sularının affectlerde iconu gözükmesi

  • Konuyu açan Konuyu açan asilords
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 1
  • Gösterim Gösterim 63
Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.
affect.h:
Genişlet Daralt Kopyala
#ifdef ENABLE_TUNGA_BLEND_AFFECT
    AFFECT_RAMADAN_ABILITY                    = 600,
    AFFECT_NOG_ABILITY,

    RED_BLEND_POTION                        = 605,
    ORANGE_BLEND_POTION                        = 606,
    YELLOW_BLEND_POTION                        = 607,
    GREEN_BLEND_POTION                        = 608,
    BLUE_BLEND_POTION                        = 609,
    WHITE_BLEND_POTION                        = 610,

    DOK_BLEND_POTION                        = 611,
    SIM_BLEND_POTION                        = 612,
    HWAL_BLEND_POTION                        = 613,
    MONG_BLEND_POTION                        = 614,
    ZIN_BLEND_POTION                        = 615,
    SAMBO_BLEND_POTION                        = 616,
    BO_BLEND_POTION                            = 617,
    YONG_BLEND_POTION                        = 618,

    ZARGANA_BLEND_POTION                    = 619,
    HAMSI_BLEND_POTION                        = 620,
    OTSAZAN_BLEND_POTION                    = 621,
    SAZAN_BLEND_POTION                        = 622,
    SUDAK_BLEND_POTION                        = 623,
    YAYIN_BLEND_POTION                        = 624,

    CANAVAR_BLEND_POTION                    = 625,
    METIN_BLEND_POTION                        = 626,
    PATRON_BLEND_POTION                        = 627,
    PEMBE_BLEND_POTION                        = 628,
    METIN_MARKA_POTION                        = 629,


    CAN_CICEGI_POTION                        = 633,
    SEFTALI_CICEGI_POTION                    = 634,
    IZGARA_PALAMUT_POTION                    = 635,
#endif

char_item.cpp:
Genişlet Daralt Kopyala
        case ITEM_USE:
            {
                if (item->GetVnum() > 50800 && item->GetVnum() <= 50820)
                {
                    if (test_server)
                        sys_log (0, "ADD addtional effect : vnum(%d) subtype(%d)", item->GetOriginalVnum(), item->GetSubType());

                    int affect_type = AFFECT_EXP_BONUS_EURO_FREE;
                    int apply_type = aApplyInfo[item->GetValue(0)].bPointType;
                    int apply_value = item->GetValue(2);
                    int apply_duration = item->GetValue(1);

                    switch (item->GetSubType())
                    {
                        case USE_ABILITY_UP:
                            if (FindAffect(affect_type, apply_type))
                            {
                                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                return false;
                            }

                            {
                                switch (item->GetValue(0))
                                {
                                    case APPLY_MOV_SPEED:
                                        if (item->GetVnum() != 50801 && FindAffect(AFFECT_MOV_SPEED))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        if (item->GetVnum() == 50801)
                                            AddAffect(SEFTALI_CICEGI_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        else
                                            AddAffect(affect_type, apply_type, apply_value, AFF_MOV_SPEED_POTION, apply_duration, 0, true, true);
                                        break;

//                                    case APPLY_ATT_SPEED:
//                                        if (FindAffect(AFFECT_ATT_SPEED))
//                                        {
//                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
//                                            return false;
//                                        }
//                                        AddAffect(affect_type, apply_type, apply_value, AFF_ATT_SPEED_POTION, apply_duration, 0, true, true);
//                                        break;

#ifdef ENABLE_TUNGA_BLEND_AFFECT
                                    case APPLY_CRITICAL_PCT:
                                        if (FindAffect(DOK_BLEND_POTION))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        AddAffect(DOK_BLEND_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;

                                    case APPLY_PENETRATE_PCT:
                                        if (FindAffect(SIM_BLEND_POTION))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        AddAffect(SIM_BLEND_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;

                                    case APPLY_ATT_SPEED:
                                        if (FindAffect(HWAL_BLEND_POTION))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        if (item->GetVnum() == 50820)
                                            AddAffect(HWAL_BLEND_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        else
                                            AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;

                                    case APPLY_MAGIC_DEF_GRADE:
                                        if (FindAffect(MONG_BLEND_POTION))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        AddAffect(MONG_BLEND_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;

                                    case APPLY_ATT_GRADE_BONUS:
                                        if (FindAffect(ZIN_BLEND_POTION))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        AddAffect(ZIN_BLEND_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;

                                    case APPLY_DEF_GRADE_BONUS:
                                        if (FindAffect(SAMBO_BLEND_POTION))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        AddAffect(SAMBO_BLEND_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;

                                    case APPLY_ATTBONUS_MONSTER:
                                        if (FindAffect(BO_BLEND_POTION))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        AddAffect(BO_BLEND_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;

                                    case APPLY_MAX_HP:
                                        if (FindAffect(YONG_BLEND_POTION))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        AddAffect(YONG_BLEND_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;
#endif

                                    case APPLY_STR:
                                        if (FindAffect(CAN_CICEGI_POTION))
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다."));
                                            return false;
                                        }
                                        AddAffect(CAN_CICEGI_POTION, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;

                                    case APPLY_DEX:
                                    case APPLY_CON:
                                    case APPLY_INT:
                                    case APPLY_CAST_SPEED:
                                    //case APPLY_RESIST_MAGIC:
                                    //case APPLY_ATT_GRADE_BONUS:
                                    //case APPLY_DEF_GRADE_BONUS:
                                        AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, true, true);
                                        break;
                                }
                            }

                            if (GetDungeon())
                                GetDungeon()->UsePotion(this);

                            if (GetWarMap())
                                GetWarMap()->UsePotion(this, item);

                            item->SetCount(item->GetCount() - 1);
                            break;


şebnem sisteminden örnekleyerek bu şekilde yapmıştım ben işini görür
 
Geri
Üst