function HandleEnchantResult(string param)
{
local int IntResult;
local ItemID ItemID;
local int64 Count;
local int CountInt;
local ItemInfo ResultItem;
local string EndTxt;
EnchantProgressAnim.HideWindow();
//결과에 상관없이 무조건 Hide
//~ Me.HideWindow();
//~ Clear();
//debug (param);
ParseInt(Param, "Result", IntResult );
ParseItemID(param, ItemID );
Parseint64(param, "Count", Count );
ParseInt(param, "Count", CountInt );
//debug ("count:" @ string(int(Count)));
class'UIDATA_ITEM'.static.GetItemInfo(ItemID, ResultItem );
switch (IntResult)
{
case 0:
bEnchantedbool = true;
EnchantProgressAnim.HideWindow();
EnchantProgressAnim.SetTexture("l2ui_ct1.ItemEnchant_DF_Effect_Success_00");
EnchantProgressAnim.SetLoopCount( 1 );
EnchantProgressAnim.Stop();
EnchantProgressAnim.Play();
Playsound("ItemSound3.enchant_success");
EnchantProgressAnim.ShowWindow();
BackPattern.SetAlpha(0, 0);
BackPattern.ShowWindow();
BackPattern.SetAlpha(255, 2);
SelectItemInfo.Enchanted = SelectItemInfo.Enchanted+1;
EnchantedItemSlot.SetItem( 0, SelectItemInfo );
EnchantedItemSlot.AddItem( SelectItemInfo );
EndTxt = MakeFullSystemMsg(GetSystemMessage(2342), "+"$string(SelectItemInfo.Enchanted) @ SelectItemInfo.Name, "");
InstructionTxt.SetText(EndTxt);
EnchantedItemSlot.SetAlpha(0);
EnchantedItemSlot.ShowWindow();
EnchantedItemSlot.SetAlpha(255,2);
CloverItemSlot.HideWindow();
//~ EnchantItemSlot.SetAlpha(0, 2);
EnchantItemSlot.HideWindow();
EnchantScriptSlot.HideWindow();
CloverItemSlot.HideWindow();
break;
case 1:
bEnchantedbool = true;
EnchantProgressAnim.HideWindow();
EnchantProgressAnim.SetTexture("l2ui_ct1.ItemEnchant_DF_Effect_Failed_01");
EnchantProgressAnim.SetLoopCount( C_ANIMLOOPCOUNT );
EnchantProgressAnim.Stop();
EnchantProgressAnim.Play();
Playsound("ItemSound3.enchant_fail");
EnchantProgressAnim.ShowWindow();
BackPattern.SetAlpha(0, 0);
BackPattern.ShowWindow();
BackPattern.SetAlpha(255, 2);
//~ ResultItem.
ResultItem.ItemNum = Count;
//debug ("Count2" @ string(int(Count)));
EnchantedItemSlot.SetAlpha(0);
EnchantedItemSlot.SetItem( 0, ResultItem );
EnchantedItemSlot.AddItem( ResultItem );
EnchantedItemSlot.ShowWindow();
EnchantedItemSlot.SetAlpha(255,2);
EndTxt = MakeFullSystemMsg(GetSystemMessage(2343), ResultItem.Name, String(CountInt));
InstructionTxt.SetText(EndTxt);
CloverItemSlot.HideWindow();
EnchantItemSlot.HideWindow();
//~ EnchantItemSlot.SetAlpha(0, 3);
//~ EnchantItemSlot.HideWindow();
EnchantScriptSlot.HideWindow();
CloverItemSlot.HideWindow();
break;
case 2:
EnchantProgressAnim.HideWindow();
if (!bEnchantedbool)
Me.HideWindow();
break;
case 3:
bEnchantedbool = true;
EnchantProgressAnim.HideWindow();
EnchantProgressAnim.SetTexture("l2ui_ct1.ItemEnchant_DF_Effect_Failed_01");
EnchantProgressAnim.SetLoopCount( C_ANIMLOOPCOUNT );
EnchantProgressAnim.Stop();
EnchantProgressAnim.Play();
Playsound("ItemSound3.enchant_fail");
EnchantProgressAnim.ShowWindow();
BackPattern.SetAlpha(0, 0);
BackPattern.ShowWindow();
BackPattern.SetAlpha(255, 2);
//~ ResultItem.
ResultItem.ItemNum = IntToInt64(1);
EnchantedItemSlot.SetAlpha(0);
SelectItemInfo.Enchanted = 0;
EnchantedItemSlot.SetItem( 0, SelectItemInfo );
EnchantedItemSlot.AddItem( SelectItemInfo );
EnchantedItemSlot.ShowWindow();
EnchantedItemSlot.SetAlpha(255,2);
EndTxt = MakeFullSystemMsg(GetSystemMessage(2343), SelectItemInfo.Name, "1");
InstructionTxt.SetText(EndTxt);
CloverItemSlot.HideWindow();
EnchantItemSlot.HideWindow();
//~ EnchantItemSlot.SetAlpha(0, 3);
//~ EnchantItemSlot.HideWindow();
EnchantScriptSlot.HideWindow();
CloverItemSlot.HideWindow();
break;
case 4:
bEnchantedbool = true;
EnchantProgressAnim.HideWindow();
EnchantProgressAnim.SetTexture("l2ui_ct1.ItemEnchant_DF_Effect_Failed_01");
EnchantProgressAnim.SetLoopCount( C_ANIMLOOPCOUNT );
EnchantProgressAnim.Stop();
EnchantProgressAnim.Play();
Playsound("ItemSound3.enchant_fail");
EnchantProgressAnim.ShowWindow();
BackPattern.SetAlpha(0, 0);
BackPattern.ShowWindow();
BackPattern.SetAlpha(255, 2);
//~ ResultItem.
ResultItem.ItemNum = IntToInt64(0);
EnchantedItemSlot.SetAlpha(0);
EnchantedItemSlot.SetItem( 0, ResultItem );
EnchantedItemSlot.AddItem( ResultItem );
//~ EnchantedItemSlot.ShowWindow();
EnchantedItemSlot.SetAlpha(255,2);
EndTxt = MakeFullSystemMsg(GetSystemMessage(64), SelectItemInfo.Name,"");
InstructionTxt.SetText(EndTxt);
CloverItemSlot.HideWindow();
EnchantItemSlot.HideWindow();
//~ EnchantItemSlot.SetAlpha(0, 3);
//~ EnchantItemSlot.HideWindow();
EnchantScriptSlot.HideWindow();
break;
//branch
case 5: // case IER_ANCIENT_BLESSED_FAIL -> ItemEnchantResult 상수가 추가되어 번호가 변경되진 않는지 확인.
bEnchantedbool = true;
EnchantProgressAnim.HideWindow();
EnchantProgressAnim.SetTexture("l2ui_ct1.ItemEnchant_DF_Effect_Failed_01");
EnchantProgressAnim.SetLoopCount( C_ANIMLOOPCOUNT );
EnchantProgressAnim.Stop();
EnchantProgressAnim.Play();
Playsound("ItemSound3.enchant_fail");
EnchantProgressAnim.ShowWindow();
BackPattern.SetAlpha(0, 0);
BackPattern.ShowWindow();
BackPattern.SetAlpha(255, 2);
//~ ResultItem.
ResultItem.ItemNum = IntToInt64(1);
EnchantedItemSlot.SetAlpha(0);
EnchantedItemSlot.SetItem( 0, SelectItemInfo );
EnchantedItemSlot.AddItem( SelectItemInfo );
EnchantedItemSlot.ShowWindow();
EnchantedItemSlot.SetAlpha(255,2);
EndTxt = GetSystemMessage(6004);
InstructionTxt.SetText(EndTxt);
CloverItemSlot.HideWindow();
EnchantItemSlot.HideWindow();
//~ EnchantItemSlot.SetAlpha(0, 3);
//~ EnchantItemSlot.HideWindow();
EnchantScriptSlot.HideWindow();
CloverItemSlot.HideWindow();
break;
//end of branch
}
ExitBtn.SetNameText( GetSystemString(646) );
EnchantBtn.DisableWindow();
ExitBtn.EnableWindow();
}