Exemple #1
0
    void CheckAddCheatItem(string msg)
    {
        if (null == MainPlayer.Instance.entity)
        {
            return;
        }

        CheatData data = CheatData.GetData(msg);

        if (null != data)
        {
            if (1 == data.addType)
            {
                if (MainPlayer.Instance.entity.packageCmpt.Add(data.itemID, 1) && "0" != data.successNotice)
                {
                    PeTipMsg.Register(data.successNotice, PeTipMsg.EMsgLevel.HighLightRed);
                }
            }
            else if (2 == data.addType)
            {
                if (0 == VCEditor.MakeCreation("Isos/Mission/" + data.isoName) && "0" != data.successNotice)
                {
                    PeTipMsg.Register(data.successNotice, PeTipMsg.EMsgLevel.HighLightRed);
                }
            }
        }
    }
Exemple #2
0
    public void OnExportClick()
    {
        // Make Creation
        int r = VCEditor.MakeCreation();

        if (r == -4)           // Inventory is full
        {
            return;
        }
        if (!VCEditor.s_MultiplayerMode)
        {
            VCEMsgBox.Show((r == 0) ? VCEMsgBoxType.EXPORT_OK : VCEMsgBoxType.EXPORT_FAILED);
        }
    }