Jump to content
  • 0

Shop appear Enchant Level


Question

Posted (edited)

Hello guys im using L2JFrozen_1.5, i have make at the multisell to give the weapons +10, its works but does not appear the enchant level!!!
Maybe someone can help ?

 

lbrs0xm.jpg

 

i want it like this 

 

wgFb6cF.jpg

Edited by cyta5

5 answers to this question

Recommended Posts

  • 0
Posted
3 minutes ago, SweeTs said:

As far as I remember you have to modify client to display enchant value at multisell.

 

maybe you know which file ?

  • 0
Posted (edited)

Check here, did that years ago and it worked.

//================================================================================
// MultiSellWnd.
//================================================================================

class MultiSellWnd extends UICommonAPI;

var array<ItemList> m_itemLIst;
var int m_shopID;
var int pre_itemList;
struct ItemList
{
	var int MultiSellType;
	var int NeededItemNum;
	var array<ItemInfo> ItemInfoList;
	var array<NeededItem> NeededItemList;
};

struct NeededItem
{
	var int Id;
	var string Name;
	var int ‰;
	var string IconName;
	var int Enchant;
	var int CrystalType;
	var int ItemType;
	var int RefineryOp1;
	var int RefineryOp2;
};

const MULTISELLWND_DIALOG_OK=1122;

function OnLoad ()
{
	RegisterEvent(2530);
	RegisterEvent(2540);
	RegisterEvent(2550);
	RegisterEvent(2560);
	RegisterEvent(1710);
	pre_itemList = -1;
}

function OnEvent (int Event_ID, string 
)
{
	switch (Event_ID)
	{
		case 2530:
		HandleShopID(
		);
		break;
		case 2540:
		HandleItemList(
		);
		break;
		case 2550:
		HandleNeededItemList(
		);
		break;
		case 2560:
		HandleItemListEnd(
		);
		break;
		case 1710:
		HandleDialogOK();
		break;
		default:
		break;
	}
}

function OnShow ()
{
	Class'UIAPI_EDITBOX'.Clear("MultiSellWnd.ItemCountEdit");
}

function OnHide ()
{
}

function OnClickButton (string ControlName)
{
	if ( UnknownFunction122(ControlName,"OKButton") )
	{
		HandleOKButton();
	} else {
		if ( UnknownFunction122(ControlName,"CancelButton") )
		{
			Clear();
			HideWindow("MultiSellWnd");
		}
	}
}

function OnClickItem (string strID, int Index)
{
	local int ‹;
	local string 
;

	Class'UIAPI_MULTISELLITEMINFO'.Clear("MultiSellWnd.ItemInfo");
	Class'UIAPI_MULTISELLNEEDEDITEM'.Clear("MultiSellWnd.NeededItem");
	if ( UnknownFunction122(strID,"ItemList") )
	{
		if ( UnknownFunction130(UnknownFunction153(Index,0),UnknownFunction150(Index,m_itemLIst.Length)) )
		{
			 = 0;
			if ( UnknownFunction150(‹,m_itemLIst[Index].NeededItemList.Length) )
			{
				
				 = "";
				ParamAdd(
				,"Name",m_itemLIst[Index].NeededItemList[‹].Name);
				ParamAdd(
				,"ID",string(m_itemLIst[Index].NeededItemList[‹].Id));
				ParamAdd(
				,"Num",string(m_itemLIst[Index].NeededItemList[‹].‰));
				ParamAdd(
				,"Icon",m_itemLIst[Index].NeededItemList[‹].IconName);
				ParamAdd(
				,"Enchant",string(m_itemLIst[Index].NeededItemList[‹].Enchant));
				ParamAdd(
				,"CrystalType",string(m_itemLIst[Index].NeededItemList[‹].CrystalType));
				ParamAdd(
				,"ItemType",string(m_itemLIst[Index].NeededItemList[‹].ItemType));
				Class'UIAPI_MULTISELLNEEDEDITEM'.AddData("MultiSellWnd.NeededItem",
				);
				UnknownFunction163(‹);
				goto JL0086;
			}
			 = 0;
			if ( UnknownFunction150(‹,m_itemLIst[Index].NeededItemNum) )
			{
				Class'UIAPI_MULTISELLITEMINFO'.SetItemInfo("MultiSellWnd.ItemInfo",‹,m_itemLIst[Index].ItemInfoList[‹]);
				UnknownFunction163(‹);
				goto JL0230;
			}
			Class'UIAPI_EDITBOX'.Clear("MultiSellWnd.ItemCountEdit");
			if ( UnknownFunction154(m_itemLIst[Index].MultiSellType,0) )
			{
				Class'UIAPI_EDITBOX'.SetString("MultiSellWnd.ItemCountEdit","1");
				Class'UIAPI_WINDOW'.DisableWindow("MultiSellWnd.ItemCountEdit");
			} else {
				if ( UnknownFunction154(m_itemLIst[Index].MultiSellType,1) )
				{
					Class'UIAPI_EDITBOX'.SetString("MultiSellWnd.ItemCountEdit","1");
					Class'UIAPI_WINDOW'.EnableWindow("MultiSellWnd.ItemCountEdit");
				}
			}
			if ( UnknownFunction155(pre_itemList,Index) )
			{
				if ( DialogIsMine() )
				{
					DialogHide();
				}
			}
		}
	}
}

function Print ()
{
	local int ‹;
	local int 
;

	 = 0;
	if ( UnknownFunction150(‹,m_itemLIst.Length) )
	{
		
		 = 0;
		if ( UnknownFunction150(
		,m_itemLIst[‹].NeededItemList.Length) )
		{
			Debug(UnknownFunction112(UnknownFunction112(UnknownFunction112(UnknownFunction112(UnknownFunction112("Print (",string(‹)),","),string(
			)),"), "),m_itemLIst[‹].NeededItemList[
			].Name));
			UnknownFunction163(
			);
			goto JL001E;
		}
		UnknownFunction163(‹);
		goto JL0007;
	}
}

function HandleShopID (string 
)
{
	Clear();
	ParseInt(
	,"shopID",m_shopID);
}

function Clear ()
{
	m_itemLIst.Length = 0;
	Class'UIAPI_MULTISELLITEMINFO'.Clear("MultiSellWnd.ItemInfo");
	Class'UIAPI_MULTISELLNEEDEDITEM'.Clear("MultiSellWnd.NeededItem");
	Class'UIAPI_ITEMWINDOW'.Clear("MultiSellWnd.ItemList");
}

function HandleItemList (string 
)
{
	local ItemInfo Info;
	local int Index;
	local int †;
	local int ‹;
	local int ClassID;
	local bool bMatchFound;

	ParseInt(
	,"classID",ClassID);
	Class'UIDATA_ITEM'.GetItemInfo(ClassID,Info);
	Info.ClassID = ClassID;
	ParseInt(
	,"index",Index);
	ParseInt(
	,"type",†);
	ParseInt(
	,"ID",Info.Reserved);
	ParseInt(
	,"slotBitType",Info.SlotBitType);
	ParseInt(
	,"itemType",Info.ItemType);
	ParseInt(
	,"itemCount",Info.ItemNum);
	ParseInt(
	,"Enchant",Info.Enchanted);
	ParseInt(
	,"OutputRefineryOp1",Info.RefineryOp1);
	ParseInt(
	,"OutputRefineryOp2",Info.RefineryOp2);
	if ( UnknownFunction150(0,Info.Durability) )
	{
		Info.CurrentDurability = Info.Durability;
	}
	if ( UnknownFunction154(Index,0) )
	{
		 = m_itemLIst.Length;
		m_itemLIst.Length = UnknownFunction146(‹,1);
		m_itemLIst[‹].MultiSellType = †;
		m_itemLIst[‹].NeededItemNum = 1;
		m_itemLIst[‹].ItemInfoList.Length = UnknownFunction146(Index,1);
		m_itemLIst[‹].ItemInfoList[Index] = Info;
	} else {
		if ( UnknownFunction151(Index,0) )
		{
			bMatchFound = False;
			 = UnknownFunction147(m_itemLIst.Length,1);
			if ( UnknownFunction153(‹,0) )
			{
				if ( UnknownFunction130(UnknownFunction130(UnknownFunction154(m_itemLIst[‹].ItemInfoList[0].Reserved,Info.Reserved),UnknownFunction154(m_itemLIst[‹].ItemInfoList[0].RefineryOp1,Info.RefineryOp1)),UnknownFunction154(m_itemLIst[‹].ItemInfoList[0].RefineryOp2,Info.RefineryOp2)) )
				{
					bMatchFound = True;
				} else {
					UnknownFunction164(‹);
					goto JL0225;
				}
			}
			if ( bMatchFound )
			{
				if ( UnknownFunction152(m_itemLIst[‹].ItemInfoList.Length,Index) )
				{
					m_itemLIst[‹].ItemInfoList.Length = UnknownFunction146(Index,1);
				}
JL0225:
				m_itemLIst[‹].MultiSellType = †;
				m_itemLIst[‹].ItemInfoList[Index] = Info;
				UnknownFunction163(m_itemLIst[‹].NeededItemNum);
			} else {
				Debug("MultiSellWnd Error!!");
			}
		}
	}
}

function HandleNeededItemList (string 
)
{
	local NeededItem item;
	local int ‹;
	local int Id;
	local int Index;
	local int RefineryOp1;
	local int RefineryOp2;

	ParseInt(
	,"ID",Id);
	ParseInt(
	,"refineryOp1",RefineryOp1);
	ParseInt(
	,"refineryOp2",RefineryOp2);
	ParseInt(
	,"ClassID",item.Id);
	ParseInt(
	,"count",item.‰);
	ParseInt(
	,"enchant",item.Enchant);
	ParseInt(
	,"inputRefineryOp1",item.RefineryOp1);
	ParseInt(
	,"inputRefineryOp2",item.RefineryOp2);
	if ( UnknownFunction154(item.Id,-100) )
	{
		item.Name = GetSystemString(1277);
		item.IconName = "icon.etc_i.etc_pccafe_point_i00";
		item.Enchant = 0;
		item.ItemType = -1;
		item.Id = 0;
	} else {
		if ( UnknownFunction154(item.Id,-200) )
		{
			item.Name = GetSystemString(1311);
			item.IconName = "icon.etc_i.etc_bloodpledge_point_i00";
			item.Enchant = 0;
			item.ItemType = -1;
			item.Id = 0;
		} else {
			item.Name = Class'UIDATA_ITEM'.GetItemName(item.Id);
			item.IconName = Class'UIDATA_ITEM'.GetItemTextureName(item.Id);
		}
	}
	 = UnknownFunction147(m_itemLIst.Length,1);
	if ( UnknownFunction153(‹,0) )
	{
		if ( UnknownFunction130(UnknownFunction130(UnknownFunction154(m_itemLIst[‹].ItemInfoList[0].Reserved,Id),UnknownFunction154(m_itemLIst[‹].ItemInfoList[0].RefineryOp1,RefineryOp1)),UnknownFunction154(m_itemLIst[‹].ItemInfoList[0].RefineryOp2,RefineryOp2)) )
		{
			Index = m_itemLIst[‹].NeededItemList.Length;
			m_itemLIst[‹].NeededItemList.Length = UnknownFunction146(Index,1);
			item.ItemType = Class'UIDATA_ITEM'.GetItemDataType(item.Id);
			item.CrystalType = Class'UIDATA_ITEM'.GetItemCrystalType(item.Id);
			m_itemLIst[‹].NeededItemList[Index] = item;
		} else {
			UnknownFunction164(‹);
			goto JL0252;
		}
	}
}

function HandleItemListEnd (string 
)
{
	local WindowHandle m_inventoryWnd;

	m_inventoryWnd = GetHandle("InventoryWnd");
	if ( m_inventoryWnd.IsShowWindow() )
	{
		m_inventoryWnd.HideWindow();
	}
	ShowWindow("MultiSellWnd");
	Class'UIAPI_WINDOW'.SetFocus("MultiSellWnd");
	ShowItemList();
}

function ShowItemList ()
{
	local ItemInfo Info;
	local int ‹;

	 = 0;
	if ( UnknownFunction150(‹,m_itemLIst.Length) )
	{
		Info = m_itemLIst[‹].ItemInfoList[0];
		Class'UIAPI_ITEMWINDOW'.AddItem("MultiSellWnd.ItemList",Info);
		UnknownFunction163(‹);
		goto JL0007;
	}
}

function HandleOKButton ()
{
	local int SelectedIndex;
	local int ItemNum;

	SelectedIndex = Class'UIAPI_ITEMWINDOW'.GetSelectedNum("MultiSellWnd.ItemList");
	ItemNum = int(Class'UIAPI_EDITBOX'.GetString("MultiSellWnd.ItemCountEdit"));
	if ( UnknownFunction153(SelectedIndex,0) )
	{
		DialogSetReservedInt(SelectedIndex);
		DialogSetReservedInt2(ItemNum);
		DialogSetID(1122);
		DialogShow(4,GetSystemMessage(1383));
		pre_itemList = SelectedIndex;
	}
}

function HandleDialogOK ()
{
	local string 
;
	local int SelectedIndex;

	if ( DialogIsMine() )
	{
		SelectedIndex = DialogGetReservedInt();
		ParamAdd(
		,"ShopID",string(m_shopID));
		ParamAdd(
		,"ItemID",string(m_itemLIst[SelectedIndex].ItemInfoList[0].Reserved));
		ParamAdd(
		,"RefineryOp1",string(m_itemLIst[SelectedIndex].ItemInfoList[0].RefineryOp1));
		ParamAdd(
		,"RefineryOp2",string(m_itemLIst[SelectedIndex].ItemInfoList[0].RefineryOp2));
		ParamAdd(
		,"ItemCount",string(DialogGetReservedInt2()));
		ParamAdd(
		,"Enchant",string(DialogGetReservedInt2()));
		RequestMultiSellChoose(
		);
	}
}

You also need to implement the server side to send the enchant packet.

Edited by filimon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...