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;