Как реализовать звук после покупки итема через Multisell

EXCLUSIVE

Интересующийся
Участник
Сообщения
205
Розыгрыши
0
Репутация
17
Реакции
70
Баллы
323
Хроники
  1. Chaotic Throne: High Five
Исходники
Присутствуют
Сборка
Brawery
Всем добрый день хотел зделать вот такой звук после покупки итема через multisell. Но как их реализовать в First-Team есть такой звук но исходников нигде не нащёл помогите пожалйста !
Спасибо !
 
В обработке диалогОк добавить
Код:
Playsound("ItemSound2.smelting.smelting_finalD");
Ну только звук свой. Не, можно и с сервер слать пакет со звуком, если сорков интерфейса нет.
 
Реакции: EXCLUSIVE

    EXCLUSIVE

    Баллов: 4
    СПАСИБО БОЛЬШОЕ !
можно и с сервер слать пакет со звуком
Пакет - [0xB0]MULTI_SELL_CHOOSE в конце (при успехе) добавить отправку пакета [0x9E] PlaySoundPacket с нужным звуком.
Как вариант - ItemSound.quest_itemget
 
криво сделал

Код:
class MultiSellWnd extends UICommonAPI;

const MULTISELLWND_DIALOG_OK = 1122;

var WindowHandle Me;

var EditBoxHandle edt_ItemCountEdit;

var TextBoxHandle PointItemName;
var TextBoxHandle txtPointItemDescription;
var TextBoxHandle txt_AvailableTB;

var TextureHandle tex_EnchantResultItem;

var ItemWindowHandle ItemList;

struct MultiSellInfo
{
    var int                 MultiSellInfoID;
    var int                 MultiSellType;
    var    ItemInfo            ResultItemInfo;
    var array< ItemInfo >    OutputItemInfoList;
    var array< ItemInfo >    InputItemInfoList;
};

var array< MultiSellInfo >    m_MultiSellInfoList;

var int                        m_MultiSellGroupID;
var int                        m_nSelectedMultiSellInfoIndex;
var int                        m_nCurrentMultiSellInfoIndex;
var int                        MultiSell;
var int                        GlobalIndex;

var int                        PCCafeTotalPoint;

var INT64                    GlobalItemCount;
var INT64                    GlobalAvailable;
var string                    GlobalParam;


function OnLoad()
{
    Me = GetWindowHandle("MultiSellWnd");
    
    edt_ItemCountEdit = GetEditBoxHandle("MultiSellWnd.ItemCountEdit");
    
    PointItemName = GetTextBoxHandle("PointItemName");
    txtPointItemDescription = GetTextBoxHandle("txtPointItemDescription");
    txt_AvailableTB = GetTextBoxHandle("MultiSellWnd.AvailableTB");
    
    tex_EnchantResultItem = GetTextureHandle("MultiSellWnd.texEnchantResultItem");
    
    ItemList = GetItemWindowHandle("MultiSellWnd.ItemList");
        
    edt_ItemCountEdit.SetString("1");
    edt_ItemCountEdit.EnableWindow();
    txt_AvailableTB.SetText("Available: ");
    
    GlobalAvailable = IntToINT64(0);
    MultiSell = 0;
    PCCafeTotalPoint= 0;
    GlobalIndex = -1;
    m_nSelectedMultiSellInfoIndex = -1;
    
    PointItemName.HideWindow();
    txtPointItemDescription.HideWindow();
}


function OnRegisterEvent()
{
    registerEvent(EV_MultiSellInfoListBegin);
    registerEvent(EV_MultiSellResultItemInfo);
    registerEvent(EV_MultiSellOutputItemInfo);
    registerEvent(EV_MultiSellInputItemInfo);
    registerEvent(EV_MultiSellInfoListEnd);
    registerEvent(EV_DialogOK);
    registerEvent(EV_Restart);
    registerEvent(EV_PCCafePointInfo);
    
    RegisterEvent(EV_AITimer);        // by monokini for switch window style   
}


function OnEvent(int Event_ID, string param)
{
    switch( Event_ID )
    {
        case EV_MultiSellInfoListBegin:
            HandleMultiSellInfoListBegin(param);
            break;
            
        case EV_MultiSellResultItemInfo:
            HandleMultiSellResultItemInfo(param);
            break;
            
        case EV_MultiSellOutputItemInfo:
            HandelMultiSellOutputItemInfo(param);
            break;
            
        case EV_MultiSellInputItemInfo:
            HandelMultiSellInputItemInfo(param);
            break;
            
        case EV_MultiSellInfoListEnd:
            HandleMultiSellInfoListEnd(param);
            break;
            
        case EV_DialogOK:
            HandleDialogOK();
            break;

        case EV_PCCafePointInfo:
            HandlePCCafePointInfo(param);
            break;
            
        case EV_Restart:
            Me.KillTimer(6670);
            Me.KillTimer(6671);
            break;
            
        case EV_AITimer:
            SwitchWindowStyle(param);   
            break;
    }
}


function SwitchWindowStyle(string param)
{
    local int EventID;
    local string newStyle;
    
    ParseInt(param, "EventID", EventID);
    if (EventID == 10)
    {
        ParseString(param, "Style", newStyle);
    }
}

function OnShow()
{
    tex_EnchantResultItem.SetTexture("");
    
    edt_ItemCountEdit.Clear();
    edt_ItemCountEdit.EnableWindow();
    edt_ItemCountEdit.SetString("1");
    txt_AvailableTB.SetText("Available: ");

    GlobalItemCount = IntToINT64(1);
    GlobalIndex = -1;
    MultiSell = 0;
    GlobalAvailable = IntToINT64(0);
    GlobalParam = "";
    
    Me.KillTimer(6670);
    Me.KillTimer(6671);
}


function OnHide()
{
    tex_EnchantResultItem.SetTexture("");
    
    txt_AvailableTB.SetText("Available: ");

    Me.KillTimer(6670);
    Me.KillTimer(6671);
}


function Clear()
{
    tex_EnchantResultItem.SetTexture("");
    
    m_nCurrentMultiSellInfoIndex = 0;
    m_MultiSellInfoList.Length = 0;
    m_MultiSellGroupID = 0;
    GlobalItemCount = IntToINT64(1);
    
    class'UIAPI_MULTISELLITEMINFO'.static.Clear("MultiSellWnd.ItemInfo");
    ItemList.Clear();
    class'UIAPI_TREECTRL'.static.Clear("MultiSellWnd.NeedItem");
}


function OnClickButton( string ControlName )
{
    if( ControlName == "OKButton" )
    {
        HandleOKButton();

    }
    else if (ControlName == "CancelButton" || ControlName == "btnHide")
    {
        Clear();
        HideWindow("MultiSellWnd");
    }
}


function HandleOKButton()
{
    local int selectedIndex;
    local INT64 itemNum;

    selectedIndex = ItemList.GetSelectedNum();
    itemNum = StringToInt64(edt_ItemCountEdit.GetString());
    
    if( selectedIndex >= 0 )
    {
        DialogSetReservedInt( selectedIndex );
        DialogSetReservedInt2( itemNum );
        DialogSetID( MULTISELLWND_DIALOG_OK );
        DialogShow(DIALOG_Modalless,DIALOG_Warning, GetSystemMessage(1383));
        m_nSelectedMultiSellInfoIndex = selectedIndex;
        Playsound("ItemSound2.smelting.smelting_finalD");
    }
}


function HandlePCCafePointInfo(String a_Param)
{
    local int Show;
    
    ParseInt( a_Param, "Show", Show );
    if (Show == 0) return;   
    ParseInt( a_Param, "TotalPoint", PCCafeTotalPoint );
}


function bool GetMyUserInfo( out UserInfo a_MyUserInfo )
{
    return GetPlayerInfo( a_MyUserInfo );
}


function CustomTooltip SetTooltip(string Name, string AdditionalName, string GradeTexture, int CrystalType)
{
    local CustomTooltip Tooltip;
    local DrawItemInfo info;
    local DrawItemInfo infoClear;
    
    Tooltip.DrawList.Length = 3;

    info = infoClear;
    info.eType = DIT_TEXT;
    info.t_bDrawOneLine = true;
    info.t_strText = Name;
    Tooltip.DrawList[0] = info;
    
    info = infoClear;
    info.bLineBreak = false;
    info.t_bDrawOneLine = true;
    info.eType = DIT_TEXT;
    info.t_strText = "";
    Tooltip.DrawList[1] = info;
    
    if (AdditionalName != "")
    {   
        info = infoClear;
        info.eType = DIT_TEXT;
        info.t_bDrawOneLine = true;
        info.t_color.R = 255;
        info.t_color.G = 215;
        info.t_color.B = 0;
        info.t_color.A = 255;
        info.t_strText = " " $ AdditionalName;
        Tooltip.DrawList[1] = info;
    }
    
    
    info = infoClear;
    info.bLineBreak = false;
    info.t_bDrawOneLine = true;
    Tooltip.DrawList[2] = info;
    
    if (GradeTexture != "")
    {
        info = infoClear;
        info.eType = DIT_TEXTURE;
        info.nOffSetX = 2;
        info.t_bDrawOneLine = true;
        if (CrystalType == 6 || CrystalType == 7)
        {
            info.u_nTextureWidth = 32;
            info.u_nTextureHeight = 16;
            
            info.u_nTextureUWidth = 32;
            info.u_nTextureUHeight = 16;
        }
        else
        {
            info.u_nTextureWidth = 16;
            info.u_nTextureHeight = 16;
            
            info.u_nTextureUWidth = 16;
            info.u_nTextureUHeight = 16;
        }
        info.u_strTexture = GradeTexture;
        Tooltip.DrawList[2] = info;
    }
    
    return Tooltip;
}


function OnSelectItemWithHandle( ItemWindowHandle a_hItemWindow, int index )
{
    local int i, j, sameItem;
    local string param;
    local XMLTreeNodeInfo    infNode;
    local XMLTreeNodeItemInfo    infNodeItem;
    local XMLTreeNodeInfo    infNodeClear;
    local XMLTreeNodeItemInfo    infNodeItemClear;
    
    local string        TextureName;
    local string        tempString;
    local string        strTmp;
    local string        strRetName;
    
    local INT64        nTmp;
    local UserInfo    info;

    if (index != GlobalIndex)
    {
        Me.KillTimer(6670);
        Me.KillTimer(6671);   
        
        MultiSell = 0;
        GlobalAvailable = IntToINT64(0);
        GlobalParam = "";
        GlobalIndex = index;
        
        txt_AvailableTB.SetText("Available: ");
        edt_ItemCountEdit.SetString("1");
        return;
    }
    
    class'UIAPI_MULTISELLITEMINFO'.static.Clear("MultiSellWnd.ItemInfo");
    class'UIAPI_TREECTRL'.static.Clear("MultiSellWnd.NeedItem");
    
    tex_EnchantResultItem.SetTexture("");
    
    infNode.strName = "root";
    infNode.nOffSetX = 0;
    infNode.nOffSetY = 2;
        
    strTmp = class'UIAPI_TREECTRL'.static.InsertNode("MultiSellWnd.NeedItem", "", infNode);

    if (a_hItemWindow == ItemList )
    {
        if( index >= 0 && index < m_MultiSellInfoList.Length )
        {   
            ////////////////////////// Need Item List //////////////////////////
            for( i=0 ; i < m_MultiSellInfoList[index].InputItemInfoList.Length ; ++i )
            {
                tempString = "";
                param = "";
                ParamAdd( param, "Name",        m_MultiSellInfoList[index].InputItemInfoList[i].Name );
                ParamAdd( param, "ID",            string(m_MultiSellInfoList[index].InputItemInfoList[i].Id.ClassID ));
                ParamAddInt64( param, "Num",    m_MultiSellInfoList[index].InputItemInfoList[i].ItemNum);
                ParamAdd( param, "Icon",        m_MultiSellInfoList[index].InputItemInfoList[i].IconName );
                ParamAdd( param, "Enchant",        string(m_MultiSellInfoList[index].InputItemInfoList[i].Enchanted) );
                ParamAdd( param, "CrystalType", string(m_MultiSellInfoList[index].InputItemInfoList[i].CrystalType) );
                ParamAdd( param, "ItemType",    string(m_MultiSellInfoList[index].InputItemInfoList[i].ItemType) );
                ParamAdd( param, "IconPanel",    m_MultiSellInfoList[index].InputItemInfoList[i].IconPanel );            // -- 판넬 추가 -_-;;
                
                TextureName = GetItemGradeTextureName(m_MultiSellInfoList[index].InputItemInfoList[i].CrystalType);
                
                nTmp = GetInventoryItemCount(GetItemID(m_MultiSellInfoList[index].InputItemInfoList[i].Id.ClassID ));       
                if (m_MultiSellInfoList[index].InputItemInfoList[i].IconName == "icon.pvp_point_i00")
                    if (GetMyUserInfo(info))
                    {
                        m_MultiSellInfoList[index].InputItemInfoList[i].ItemType = 5;
                        nTmp = IntToINT64(info.PvPPoint);
                    }
                    
                if (m_MultiSellInfoList[index].InputItemInfoList[i].IconName == "icon.etc_i.etc_pccafe_point_i00")                   
                    {
                        m_MultiSellInfoList[index].InputItemInfoList[i].ItemType = 5;
                        nTmp = IntToINT64(PCCafeTotalPoint);
                    }
            
                
                sameItem = 0;           
                for ( j = 0 ; j < m_MultiSellInfoList[index].InputItemInfoList.Length ; ++j )
                    if (m_MultiSellInfoList[index].InputItemInfoList[i].Id.ClassID == m_MultiSellInfoList[index].InputItemInfoList[j].Id.ClassID)
                    {
                        ++sameItem;
                    }   
                    
                if (sameItem == 1)
                {           
                    if (i==0) GlobalAvailable = nTmp/m_MultiSellInfoList[index].InputItemInfoList[i].ItemNum;
                    if (i>=0)
                        if (GlobalAvailable > nTmp/m_MultiSellInfoList[index].InputItemInfoList[i].ItemNum) GlobalAvailable = nTmp/m_MultiSellInfoList[index].InputItemInfoList[i].ItemNum;
                    
                    txt_AvailableTB.SetText("Available: " $ Int64ToString(GlobalAvailable));
                }
                
                if (sameItem > 1)
                {           
                    if (i==0) GlobalAvailable = nTmp/IntToINT64(sameItem);
                    if (i>=0)
                        if (GlobalAvailable > nTmp/IntToINT64(sameItem)) GlobalAvailable = nTmp/IntToINT64(sameItem);
                    
                    txt_AvailableTB.SetText("Available: " $ Int64ToString(GlobalAvailable));
                }

                
                ////////////////////////// Need Item List: Set Tooltip //////////////////////////
                infNode = infNodeClear;
                infNode.strName = "" $ string(m_MultiSellInfoList[index].InputItemInfoList[i].Id.ClassID )$string(i);
                if (m_MultiSellInfoList[index].InputItemInfoList[i].ItemType != 5 && m_MultiSellInfoList[index].InputItemInfoList[i].ItemType != 2) //&& (m_MultiSellInfoList[index].InputItemInfoList[i].IconName != "icon.pvp_point_i00" && m_MultiSellInfoList[index].InputItemInfoList[i].IconName != "icon.etc_i.etc_pccafe_point_i00"))
                {   
                    if (m_MultiSellInfoList[index].InputItemInfoList[i].Enchanted > 0)
                        infNode.Tooltip = SetTooltip("+" $ string(m_MultiSellInfoList[index].InputItemInfoList[i].Enchanted) @ m_MultiSellInfoList[index].InputItemInfoList[i].Name, m_MultiSellInfoList[index].InputItemInfoList[i].AdditionalName, TextureName,m_MultiSellInfoList[index].InputItemInfoList[i].CrystalType);
                    else
                        infNode.Tooltip = SetTooltip(m_MultiSellInfoList[index].InputItemInfoList[i].Name, m_MultiSellInfoList[index].InputItemInfoList[i].AdditionalName, TextureName,m_MultiSellInfoList[index].InputItemInfoList[i].CrystalType);       
                }
                else
                {
                    tempString = " x " $ MakeCostStringInt64(GlobalItemCount * (m_MultiSellInfoList[index].InputItemInfoList[i].ItemNum));
                    infNode.Tooltip = SetTooltip(m_MultiSellInfoList[index].InputItemInfoList[i].Name $ tempString $ " (" $ MakeCostStringInt64(nTmp) $ ")", "", "", 0);   
                }
                
                infNode.nOffSetY = 4;
                infNode.bShowButton = 0;
                strRetName = class'UIAPI_TREECTRL'.static.InsertNode("MultiSellWnd.NeedItem","root", infNode);
                
                ////////////////////////// Need Item List: ItemIcon //////////////////////////
                infNodeItem = infNodeItemClear;
                infNodeItem.eType = XTNITEM_TEXTURE;
                infNodeItem.nOffSetX = 0;
                infNodeItem.nOffSetY = 0;
                infNodeItem.u_nTextureWidth = 32;
                infNodeItem.u_nTextureHeight = 32;
                infNodeItem.u_strTexture = m_MultiSellInfoList[index].InputItemInfoList[i].IconName;
                class'UIAPI_TREECTRL'.static.InsertNodeItem("MultiSellWnd.NeedItem", strRetName, infNodeItem);

                ////////////////////////// Need Item List: ItemIcon PvP/Common //////////////////////////
                if (m_MultiSellInfoList[index].InputItemInfoList[i].IconPanel !="")
                {
                    infNodeItem = infNodeItemClear;
                    infNodeItem.eType = XTNITEM_TEXTURE;
                    infNodeItem.nOffSetX = -32;
                    infNodeItem.nOffSetY = 0;
                    infNodeItem.u_nTextureWidth = 32;
                    infNodeItem.u_nTextureHeight = 32;
                    infNodeItem.u_strTexture = m_MultiSellInfoList[index].InputItemInfoList[i].IconPanel;
                    class'UIAPI_TREECTRL'.static.InsertNodeItem("MultiSellWnd.NeedItem", strRetName, infNodeItem);
                }

                ////////////////////////// Need Item List: ItemIcon Enchant //////////////////////////
                if (m_MultiSellInfoList[index].InputItemInfoList[i].Enchanted > 0 && m_MultiSellInfoList[index].InputItemInfoList[i].Enchanted <= 19)
                {
                    infNodeItem = infNodeItemClear;
                    infNodeItem.eType = XTNITEM_TEXTURE;
                    infNodeItem.nOffSetX = -32;
                    infNodeItem.nOffSetY = 0;
                    infNodeItem.u_nTextureWidth = 32;
                    infNodeItem.u_nTextureHeight = 32;
                    infNodeItem.u_strTexture = "MonIcaTex.enchant" $ m_MultiSellInfoList[index].InputItemInfoList[i].Enchanted;
                    class'UIAPI_TREECTRL'.static.InsertNodeItem("MultiSellWnd.NeedItem", strRetName, infNodeItem);
                }
                
                ////////////////////////// Need Item List: Item Name + Enchant //////////////////////////
                infNodeItem = infNodeItemClear;
                infNodeItem.eType = XTNITEM_TEXT;
                infNodeItem.t_strText = m_MultiSellInfoList[index].InputItemInfoList[i].Name;
                if (m_MultiSellInfoList[index].InputItemInfoList[i].Enchanted > 0)
                    infNodeItem.t_strText = "+" $ string(m_MultiSellInfoList[index].InputItemInfoList[i].Enchanted) @ m_MultiSellInfoList[index].InputItemInfoList[i].Name;
                
                if (Len(infNodeItem.t_strText @ m_MultiSellInfoList[index].InputItemInfoList[i].AdditionalName) > 29)
                {
                    infNodeItem.t_strText = Left(infNodeItem.t_strText, 28 - Len(m_MultiSellInfoList[index].InputItemInfoList[i].AdditionalName) - 4) $ "...";
                }
                infNodeItem.t_bDrawOneLine = true;
                infNodeItem.nOffSetX = 2;
                infNodeItem.nOffSetY = 3;
                class'UIAPI_TREECTRL'.static.InsertNodeItem("MultiSellWnd.NeedItem", strRetName, infNodeItem);
                
                ////////////////////////// Need Item List: Additional Name //////////////////////////                   
                if (m_MultiSellInfoList[index].InputItemInfoList[i].AdditionalName != "")
                {
                    infNodeItem = infNodeItemClear;
                    infNodeItem.eType = XTNITEM_TEXT;
                    infNodeItem.t_strText = m_MultiSellInfoList[index].InputItemInfoList[i].AdditionalName;
                    infNodeItem.t_bDrawOneLine = true;
                    infNodeItem.nOffSetX = 3;
                    infNodeItem.nOffSetY = 3;
                    infNodeItem.t_color.R = 255;
                    infNodeItem.t_color.G = 215;
                    infNodeItem.t_color.B = 0;
                    infNodeItem.t_color.A = 255;
                    class'UIAPI_TREECTRL'.static.InsertNodeItem("MultiSellWnd.NeedItem", strRetName, infNodeItem);
                }
                
                ////////////////////////// Need Item List: Item Grade Icon //////////////////////////
                if (Len(TextureName) > 0)
                {
                    infNodeItem.eType = XTNITEM_TEXTURE;
                    infNodeItem.nOffSetX = 2;
                    infNodeItem.nOffSetY = 3;
                    if (m_MultiSellInfoList[index].InputItemInfoList[i].CrystalType == 6 || m_MultiSellInfoList[index].InputItemInfoList[i].CrystalType == 7)
                    {
                        infNodeItem.u_nTextureWidth = 32;
                        infNodeItem.u_nTextureHeight = 16;
            
                        infNodeItem.u_nTextureUWidth = 32;
                        infNodeItem.u_nTextureUHeight = 16;
                    }
                    else
                    {
                        infNodeItem.u_nTextureWidth = 16;
                        infNodeItem.u_nTextureHeight = 16;
            
                        infNodeItem.u_nTextureUWidth = 16;
                        infNodeItem.u_nTextureUHeight = 16;
                    }
                    infNodeItem.u_strTexture = TextureName;
                    class'UIAPI_TREECTRL'.static.InsertNodeItem("MultiSellWnd.NeedItem", strRetName, infNodeItem);
                }
                
                ////////////////////////// Need Item List: Item Need Amount //////////////////////////
                infNodeItem = infNodeItemClear;
                infNodeItem.eType = XTNITEM_TEXT;
                infNodeItem.t_strText = " x " $ MakeCostStringInt64(GlobalItemCount * (m_MultiSellInfoList[index].InputItemInfoList[i].ItemNum));
                if (Len(infNodeItem.t_strText) > 26)
                {
                    infNodeItem.t_strText = Left(infNodeItem.t_strText, 23) $ "...";
                }
                tempString = infNodeItem.t_strText;
                infNodeItem.bLineBreak = true;
                infNodeItem.nOffSetX = 31;
                infNodeItem.nOffSetY = -14;
                class'UIAPI_TREECTRL'.static.InsertNodeItem("MultiSellWnd.NeedItem", strRetName, infNodeItem);
                        
                ////////////////////////// Item List: Item Kept Amount //////////////////////////
                infNodeItem = infNodeItemClear;
                infNodeItem.eType = XTNITEM_TEXT;
                infNodeItem.t_strText = " (" $ MakeCostStringInt64(nTmp) $ ")";
                

                if (Len(tempString) + Len(infNodeItem.t_strText) > 26)
                {
                    if (Right(tempString, 3) != "...")
                    {
                        infNodeItem.t_strText = Left(infNodeItem.t_strText, 26 - Len(tempString)) $ "...";
                    }
                    else
                    {
                        infNodeItem.t_strText = "";
                    }
                }
                
                infNodeItem.nOffSetX = 0;
                infNodeItem.nOffSetY = -14;

                infNodeItem.t_color.A = 255;
                if (nTmp < (GlobalItemCount * m_MultiSellInfoList[index].InputItemInfoList[i].ItemNum))    // not enough item count
                {
                    infNodeItem.t_color.R = 250;
                    infNodeItem.t_color.G = 50;
                    infNodeItem.t_color.B = 0;
                }
                else    // enough item count
                {
                    infNodeItem.t_color.R = 85;
                    infNodeItem.t_color.G = 170;
                    infNodeItem.t_color.B = 255;
                }
                class'UIAPI_TREECTRL'.static.InsertNodeItem("MultiSellWnd.NeedItem", strRetName, infNodeItem);
            }

            ////////////////////////// Result Item List //////////////////////////
            for( i=0 ; i < m_MultiSellInfoList[index].OutputItemInfoList.Length ; ++i )
            {
                
                if     (m_MultiSellInfoList[index].OutputItemInfoList[i].Enchanted > 0 && m_MultiSellInfoList[index].OutputItemInfoList[i].Enchanted <= 19)
                    tex_EnchantResultItem.SetTexture("MonIcaTex.enchant"$m_MultiSellInfoList[index].OutputItemInfoList[i].Enchanted);
                
                class'UIAPI_MULTISELLITEMINFO'.static.SetItemInfo("MultiSellWnd.ItemInfo", i, m_MultiSellInfoList[index].OutputItemInfoList[i] );           
                
                if (m_MultiSellInfoList[index].OutputItemInfoList[i].IconName == "icon.pvp_point_i00")
                {
                    PointItemName.ShowWindow();
                    txtPointItemDescription.ShowWindow();
                    PointItemName.SetText(GetSystemString(102)$"x"$Int64ToString(m_MultiSellInfoList[index].OutputItemInfoList[i].ItemNum));
                    txtPointItemDescription.SetText(GetSystemMessage(2334));
                }
                else
                {
                    PointItemName.HideWindow();
                    txtPointItemDescription.HideWindow();
                    PointItemName.SetText("");
                    txtPointItemDescription.SetText("");
                }   
            }
        
            if(m_nSelectedMultiSellInfoIndex != index)    //다이얼로그를 없애준다. - innowind
            {
                if( DialogIsMine() )
                {
                    DialogHide();
                }
            }
        }
    }
}


function HandleMultiSellInfoListBegin( string param )
{

    Clear();
    ParseInt( param, "MultiSellGroupID", m_MultiSellGroupID );
}


function HandleMultiSellResultItemInfo( string param)
{
    local int        nMultiSellInfoID;
    local int        nBuyType;
    local ItemInfo    info;
    
    ParseInt( param, "MultiSellInfoID",            nMultiSellInfoID );
    ParseInt( param, "BuyType",                    nBuyType );
    ParseInt( param, "Enchant",                    info.Enchanted );
    ParseInt( param, "RefineryOp1",                info.RefineryOp1 );
    ParseInt( param, "RefineryOp2",                info.RefineryOp2 );
    ParseInt( param, "AttrAttackType",            info.AttackAttributeType );
    ParseInt( param, "AttrAttackValue",            info.AttackAttributeValue );
    ParseInt( param, "AttrDefenseValueFire",    info.DefenseAttributeValueFire );
    ParseInt( param, "AttrDefenseValueWater",    info.DefenseAttributeValueWater );
    ParseInt( param, "AttrDefenseValueWind",    info.DefenseAttributeValueWind );
    ParseInt( param, "AttrDefenseValueEarth",    info.DefenseAttributeValueEarth );
    ParseInt( param, "AttrDefenseValueHoly",    info.DefenseAttributeValueHoly );
    ParseInt( param, "AttrDefenseValueUnholy",    info.DefenseAttributeValueUnholy );
    
    m_nCurrentMultiSellInfoIndex = m_MultiSellInfoList.Length;
    m_MultiSellInfoList.Length = m_nCurrentMultiSellInfoIndex + 1;
    
    m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].MultiSellInfoID    = nMultiSellInfoID;
    m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].MultiSellType        = nBuyType;
    m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].ResultItemInfo    = info;

}


function HandelMultiSellOutputItemInfo( string param )
{
    local int        nMultiSellInfoID;
    local int        nCurrentOutputItemInfoIndex;
    local ItemInfo    info;
    local int        nItemClassID;
    
    //~ local ItemInfo    info;
    //~ ParseItemID( param, info.Id );
    //~ class'UIDATA_ITEM'.static.GetItemInfo( info.Id, info );
    //~ ParseInt( param, "MultiSellInfoID",            nMultiSellInfoID );
    
    ParseItemID( param, info.ID );
    
    class'UIDATA_ITEM'.static.GetItemInfo( info.ID, info );
    
    ParseInt( param, "ClassID",                    nItemClassID );
    ParseInt( param, "MultiSellInfoID",            nMultiSellInfoID );
    ParseInt( param, "SlotBitType",                info.SlotBitType );
    ParseInt( param, "ItemType",                info.ItemType );
    ParseInt64( param, "ItemCount",                info.ItemNum);
    ParseInt( param, "Enchant",                    info.Enchanted );
    ParseInt( param, "RefineryOp1",                info.RefineryOp1);
    ParseInt( param, "RefineryOp2",                info.RefineryOp2);
    ParseInt( param, "AttrAttackType",            info.AttackAttributeType );
    ParseInt( param, "AttrAttackValue",            info.AttackAttributeValue );
    ParseInt( param, "AttrDefenseValueFire",    info.DefenseAttributeValueFire );
    ParseInt( param, "AttrDefenseValueWater",    info.DefenseAttributeValueWater );
    ParseInt( param, "AttrDefenseValueWind",    info.DefenseAttributeValueWind );
    ParseInt( param, "AttrDefenseValueEarth",    info.DefenseAttributeValueEarth );
    ParseInt( param, "AttrDefenseValueHoly",    info.DefenseAttributeValueHoly );
    ParseInt( param, "AttrDefenseValueUnholy",    info.DefenseAttributeValueUnholy );
    
    if(m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].MultiSellInfoID != nMultiSellInfoID)
    {
        //debug("MultiSellWnd::HandelMultiSellOutputItemInfo - Invalid nMultiSellInfoID");
        return;
    }

    if( nItemClassID == -300 )
    {
        info.Name = GetSystemString( 102 );
        info.IconName = "icon.pvp_point_i00";
        info.Enchanted = 0;
        info.ItemType = -1;
        info.Id.ClassID = 0;
    }

    // 투영병기의 경우 강제로, 100% Durability를 표시하게 합니다 - NeverDie
    if( 0 < info.Durability )
    {
        info.CurrentDurability = info.Durability;
    }
    
    nCurrentOutputItemInfoIndex = m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].OutputItemInfoList.Length;
    m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].OutputItemInfoList.Length = nCurrentOutputItemInfoIndex + 1;
    m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].OutputItemInfoList[nCurrentOutputItemInfoIndex] = info;
}


function HandelMultiSellInputItemInfo( string param )
{
    local int        nMultiSellInfoID;
    local int        nCurrentInputItemInfoIndex;
    local int        nItemClassID;
    local ItemInfo    info;

    ParseItemID( param, info.Id );
    class'UIDATA_ITEM'.static.GetItemInfo( info.Id, info );

    ParseInt( param, "MultiSellInfoID",            nMultiSellInfoID );
    ParseInt( param, "ClassID",                    nItemClassID );
    ParseInt( param, "ItemType",                info.ItemType );
    ParseInt64( param, "ItemCount",                info.ItemNum);
    ParseInt( param, "Enchant",                    info.Enchanted );
    ParseInt( param, "RefineryOp1",                info.RefineryOp1);
    ParseInt( param, "RefineryOp2",                info.RefineryOp2);
    ParseInt( param, "AttrAttackType",            info.AttackAttributeType );
    ParseInt( param, "AttrAttackValue",            info.AttackAttributeValue );
    ParseInt( param, "AttrDefenseValueFire",    info.DefenseAttributeValueFire );
    ParseInt( param, "AttrDefenseValueWater",    info.DefenseAttributeValueWater );
    ParseInt( param, "AttrDefenseValueWind",    info.DefenseAttributeValueWind );
    ParseInt( param, "AttrDefenseValueEarth",    info.DefenseAttributeValueEarth );
    ParseInt( param, "AttrDefenseValueHoly",    info.DefenseAttributeValueHoly );
    ParseInt( param, "AttrDefenseValueUnholy",    info.DefenseAttributeValueUnholy );

    if(m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].MultiSellInfoID != nMultiSellInfoID)
    {
        //debug("MultiSellWnd::HandelMultiSellInputItemInfo - Invalid nMultiSellInfoID");
        return;
    }
    
    if( nItemClassID == -100 )
    {
        info.Name = GetSystemString(1277);
        info.IconName = "icon.etc_i.etc_pccafe_point_i00";
        info.Enchanted = 0;
        info.ItemType = -1;
        info.Id.ClassID = 0;
    }
    else if( nItemClassID == -200 )
    {
        info.Name = GetSystemString( 1311 );
        info.IconName = "icon.etc_i.etc_bloodpledge_point_i00";
        info.Enchanted = 0;
        info.ItemType = -1;
        info.Id.ClassID = 0;
    }
    else if( nItemClassID == -300 )
    {
        info.Name = GetSystemString( 102 );
        info.IconName = "icon.pvp_point_i00";
        info.Enchanted = 0;
        info.ItemType = -1;
        info.Id.ClassID = 0;
    }
    else
    {
        info.Name = class'UIDATA_ITEM'.static.GetItemName( info.Id );
        info.IconName = class'UIDATA_ITEM'.static.GetItemTextureName( info.Id );
    }

    info.ItemType = class'UIDATA_ITEM'.static.GetItemDataType( info.Id );
    info.CrystalType = class'UIDATA_ITEM'.static.GetItemCrystalType( info.Id );
    
    //-400 필드사이클일 경우 아무 데이터도 삽입하지 안ㅅ는 식으로 처리 함.
    if (nItemClassID != -400 )
    {
        nCurrentInputItemInfoIndex = m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].InputItemInfoList.Length;
        m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].InputItemInfoList.Length = nCurrentInputItemInfoIndex + 1;   
        m_MultiSellInfoList[m_nCurrentMultiSellInfoIndex].InputItemInfoList[nCurrentInputItemInfoIndex] = info;
    }
}


function HandleMultiSellInfoListEnd( string param )
{
    local WindowHandle m_inventoryWnd;
    
    m_inventoryWnd = GetWindowHandle( "InventoryWnd" );    //인벤토리
    
    if( m_inventoryWnd.IsShowWindow() )            //인벤토리 창이 열려있으면 닫아준다.
    {
        m_inventoryWnd.HideWindow();
    }   
    
    Me.ShowWindow();
    Me.SetFocus();
    ShowItemList();
}


function ShowItemList()
{
    local ItemInfo info;
    local int i;

    for( i=0 ; i < m_MultiSellInfoList.Length ; ++i )
    {
        info = m_MultiSellInfoList[i].OutputItemInfoList[0];
        SetEnchantTex(info);
        ItemList.AddItem(info);
    }
}


function OnChangeEditBox( String strID )
{
    local int selectedIndex;
    
    switch( strID )
    {
        case "ItemCountEdit":
            selectedIndex = ItemList.GetSelectedNum();
            if( selectedIndex >= 0 )
            {
                GlobalItemCount = StringToInt64(edt_ItemCountEdit.GetString());
                m_nSelectedMultiSellInfoIndex = selectedIndex;
                OnSelectItemWithHandle( ItemList, m_nSelectedMultiSellInfoIndex);
            }
            break;
    }
}


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

    if( DialogIsMine() )
    {
        SelectedIndex = DialogGetReservedInt();

        if( SelectedIndex >= m_MultiSellInfoList.Length )
        {
            return;
        }
        
        if (StringToInt64(edt_ItemCountEdit.GetString()) <= IntToINT64(0))
        {
            return;
        }
        
        ParamAdd( param, "MultiSellGroupID",        string( m_MultiSellGroupID ) );
        ParamAdd( param, "MultiSellInfoID",            string( m_MultiSellInfoList[SelectedIndex].MultiSellInfoID ) );
        ParamAdd( param, "Enchant",                    string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.Enchanted ) );
        ParamAdd( param, "RefineryOp1",                string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.RefineryOp1 ) );
        ParamAdd( param, "RefineryOp2",                string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.RefineryOp2 ) );
        ParamAdd( param, "AttrAttackType",            string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.AttackAttributeType ) );
        ParamAdd( param, "AttrAttackValue",            string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.AttackAttributeValue ) );
        ParamAdd( param, "AttrDefenseValueFire",    string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.DefenseAttributeValueFire ) );
        ParamAdd( param, "AttrDefenseValueWater",    string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.DefenseAttributeValueWater ) );
        ParamAdd( param, "AttrDefenseValueWind",    string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.DefenseAttributeValueWind ) );
        ParamAdd( param, "AttrDefenseValueEarth",    string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.DefenseAttributeValueEarth ) );
        ParamAdd( param, "AttrDefenseValueHoly",    string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.DefenseAttributeValueHoly ) );
        ParamAdd( param, "AttrDefenseValueUnholy",    string( m_MultiSellInfoList[SelectedIndex].ResultItemInfo.DefenseAttributeValueUnholy ) );

        if( m_MultiSellInfoList[SelectedIndex].MultiSellType == 0 )
        {
            edt_ItemCountEdit.DisableWindow();
            ParamAddINT64( param, "ItemCount",            IntToINT64(1) );
            GlobalParam = param;   
            MultiSell    = 0;   
            Me.SetTimer(6671,100);
        }
        else if( m_MultiSellInfoList[SelectedIndex].MultiSellType == 1 )
        {
            edt_ItemCountEdit.DisableWindow();
            ParamAddINT64( param, "ItemCount",            GlobalItemCount );
            RequestMultiSellChoose( param );
            Me.SetTimer(6670,300);
        }   
    }
}


function OnTimer(int TimerID)
{

    if (TimerID == 6670)
    {
        OnSelectItemWithHandle( ItemList, m_nSelectedMultiSellInfoIndex);
        edt_ItemCountEdit.EnableWindow();
        Me.KillTimer(6670);
    }
    else if (TimerID == 6671)
    {
        if (GlobalItemCount <= GlobalAvailable)
        {   
            RequestMultiSellChoose( GlobalParam );
            MultiSell = MultiSell +1;
            Me.KillTimer(6671);
            
            if (MultiSell == INT64ToInt(GlobalItemCount))
            {
                Me.KillTimer(6671);
                Me.SetTimer(6670,300);
                MultiSell = 0;
            }
            else
                Me.SetTimer(6671,300);
        }
        else if (GlobalItemCount > GlobalAvailable)
        {   
            RequestMultiSellChoose( GlobalParam );
            MultiSell = MultiSell +1;
            Me.KillTimer(6671);
            
            if (IntToINT64(MultiSell) == GlobalAvailable || GlobalAvailable == IntToINT64(0))
            {
                Me.KillTimer(6671);
                Me.SetTimer(6670,300);
                MultiSell = 0;
            }
            else
                Me.SetTimer(6671,300);
        }   
    }

}


defaultproperties
{
}
 

Вложения


Вон туда звук лучше пихать, на обработку соглашения на покупку, а не на само намерение диалогок увидеть.
 
Последнее редактирование модератором:
А в ла2 когда-то в принципе со звуком играли? Обычно музыка и фарм.
Ну я помню с с1 единственный звук это когда Хуман Маг катсует ветерок свой, он мне отпечатался на всю жизнь.
 
Реакции: Rolo
Помню звук покупки когда торгашей несколько в гиране с точками поставишь.

Я помню кастовал тоже ветерок, это запомнилось керамическому креслу надолго
 
Я в Дионе включаю звук, там мелодия приятная ))
 
Данный сайт использует cookie. Вы должны принять их для продолжения использования. Узнать больше…