ds_aim 241 Posted December 17, 2015 Share Posted December 17, 2015 (edited) Hi. Search char_item.cpp ITEM_BLEND : replace with this. case ITEM_BLEND: sys_log(0,"ITEM_BLEND!!"); if (Blend_Item_find(item->GetVnum())) { int affect_type = AFFECT_BLEND; if (item->GetSocket(1) >= _countof(aApplyInfo)) { sys_err ("INVALID BLEND ITEM(id : %d, vnum : %d). APPLY TYPE IS %d.", item->GetID(), item->GetVnum(), item->GetSocket(0)); return false; } int apply_type = aApplyInfo[item->GetSocket(1)].bPointType; int apply_value = item->GetSocket(2); int apply_duration = item->GetSocket(3); if (FindAffect(affect_type, apply_type)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이미 효과가 걸려 있습니다.")); } else { item->ModifyPoints(false); //Bug fix ds_aim AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false); item->SetCount(item->GetCount() - 1); } } break; PS: fix don't tested. One friend said me to fix. I don't really understand the bug, but test for me. Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
Ken 904 Posted December 17, 2015 Share Posted December 17, 2015 case ITEM_BLEND: sys_log(0, "ITEM_BLEND"); if (Blend_Item_find(item->GetVnum())) { if (item->GetSocket(0) >= static_cast<long>(_countof(aApplyInfo))) // Use long for ignore warnings in gcc { sys_err("INVALID_BLEND_ITEM (id: %u, vnum: %u). Apply type is %ld", item->GetID(), item->GetVnum(), item->GetSocket(0)); return false; } int iApplyType = aApplyInfo[item->GetSocket(0)].bPointType; int iApplyValue = item->GetSocket(1), iApplyDuration = item->GetSocket(2); if (FindAffect(AFFECT_BLEND, iApplyType)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÀÌ¹Ì È¿°ú°¡ °É·Á ÀÖ½À´Ï´Ù.")); return false; } item->ModifyPoints(false); item->SetCount(item->GetCount() - 1); AddAffect(AFFECT_BLEND, iApplyType, iApplyValue, 0, iApplyDuration, 0, false); } break; Description: The system will remove old values on your character and add the new one on your character. I changed the code style. (I just don't like bad code style. ) Kind Regards ~ Ken 1 2 Do not be sorry, be better. Link to comment Share on other sites More sharing options...
ds_aim 241 Posted December 17, 2015 Author Share Posted December 17, 2015 I'am not a programmer , i don't like programming. For me it's a hobby. I'am still learinig about source Thanks for code. xD ^^^ Link to comment Share on other sites More sharing options...
Recommended Posts