BLEND bug fix.

12/15/2015 23:14 fcsk_aim#1
Hi, epvp.

Search char_item.cpp ITEM_BLEND :

replace with this.
Code:
		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)) {
					if(!m_bIsLoadedAffect) {
                        Chat Packet(CHAT_TYPE_INFO, LC_TEXT("Nu poti face asta."));
                        return false;
                        }
				} else {
						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. :D
If u like thanks button.
02/09/2016 22:45 .Sanii#2
Pls tell me what this should fix.

Code:
if (item->GetSocket(1) >= _countof(aApplyInfo))
What should this do? Why are you comparing the Value of Blend Item with the count of applies? i think you want to check, Socket0 with the type.
Even then, why using "_countof(aApplyInfo)" when the structure of metin source have ENUMS. Use "MAX_APPLY_NUM"

As i see, this only tell me what i failed in blend.txt, this is not a fix for me :o

so pls tell me ^^

#edit:
The Blue Blend Item will be disabled with this fix. Because of Socket1 is Value and will be over (in my source 95 applycount) same with the white.