예제 #1
0
        public override bool itemCallBack(string tab, string name, int vale, int num)
        {
            string[] weapons = { "Whip2",   "Whip3",    "Knife",     "Rapier",      "Axe",        "Katana",    "Shuriken", "R-Shuriken", "E-Spear", "Flare Gun", "Bomb",
                                 "Chakram", "Caltrops", "Clay Doll", "Origin Seal", "Birth Seal", "Life Seal", "Death Seal" };

            bool result = orig_itemCallBack(tab, name, vale, num);

            if (result)
            {
                int counter = this.item_copunter - 1;
                if (this.sys.isMap(name))
                {
                    this.icon[counter]             = L2SystemCore.getMenuIconSprite(L2SystemCore.getItemData("Map"));
                    this.shop_item[counter].sprite = this.icon[counter];
                }
                else if (name.Equals("MSX"))
                {
                    this.icon[counter]             = L2SystemCore.getShopIconSprite(L2SystemCore.getItemData("MSX3p"));
                    this.shop_item[counter].sprite = this.icon[counter];
                }
                else if (name.Contains("Sacred Orb"))
                {
                    this.icon[counter]             = L2SystemCore.getMenuIconSprite(L2SystemCore.getItemData("Sacred Orb"));
                    this.shop_item[counter].sprite = this.icon[counter];
                    this.item_name[counter].text   = this.sys.getMojiText(true, this.sys.mojiSheetNameToNo(tab, this.sys.getMojiScript(mojiScriptType.item)),
                                                                          this.sys.mojiIdToNo(tab, "Sacred Orb", this.sys.getMojiScript(mojiScriptType.item)), this.sys.getNowLangage(), this.sys.getMojiScript(mojiScriptType.item));
                }
                else if (name.Contains("Crystal S"))
                {
                    this.icon[counter]             = L2SystemCore.getMenuIconSprite(L2SystemCore.getItemData("Crystal S"));
                    this.shop_item[counter].sprite = this.icon[counter];
                    this.item_name[counter].text   = this.sys.getMojiText(true, this.sys.mojiSheetNameToNo(tab, this.sys.getMojiScript(mojiScriptType.item)),
                                                                          this.sys.mojiIdToNo(tab, "Crystal S", this.sys.getMojiScript(mojiScriptType.item)), this.sys.getNowLangage(), this.sys.getMojiScript(mojiScriptType.item));
                }
                else
                {
                    if (Array.IndexOf(weapons, name) > -1)
                    {
                        this.icon[counter]             = L2SystemCore.getMenuIconSprite(L2SystemCore.getItemData(name));
                        this.shop_item[counter].sprite = this.icon[counter];
                    }
                }
            }
            return(result);
        }
예제 #2
0
        public override bool itemCallBack(string tab, string name, int vale, int num)
        {
            string[] weapons = { "Whip2",   "Whip3",    "Knife",     "Rapier",      "Axe",        "Katana",    "Shuriken", "R-Shuriken", "E-Spear", "Flare Gun", "Bomb",
                                 "Chakram", "Caltrops", "Clay Doll", "Origin Seal", "Birth Seal", "Life Seal", "Death Seal" };

            if (this.item_copunter > 2)
            {
                return(false);
            }
            this.true_name[this.item_copunter] = name;
            if (this.sys.isAnkJewel(name))
            {
                name = "Ankh Jewel";
            }
            else if (this.sys.isMap(name))
            {
                name = "Map";
            }
            this.item_id[this.item_copunter] = name;

            if (name.Contains("Mantra") && !name.Equals("Mantra"))
            {
                this.icon[this.item_copunter]             = L2SystemCore.getShopIconSprite(L2SystemCore.getItemData("Mantra"));
                this.shop_item[this.item_copunter].sprite = this.icon[this.item_copunter];

                string mojiName = name.Equals("Mantra10") ? "mantra1stM10" : "mantra1stM" + name.Substring(6, 1);
                this.item_name[this.item_copunter].text = this.sys.getMojiText(true, this.sys.mojiSheetNameToNo(tab, this.sys.getMojiScript(mojiScriptType.system)),
                                                                               this.sys.mojiIdToNo(tab, mojiName, this.sys.getMojiScript(mojiScriptType.system)), this.sys.getNowLangage(), this.sys.getMojiScript(mojiScriptType.system));
            }
            else
            {
                if (name.Equals("Map"))
                {
                    this.icon[this.item_copunter] = L2SystemCore.getMapIconSprite(L2SystemCore.getItemData("Map"));
                }
                else if (name.Equals("MSX"))
                {
                    this.icon[this.item_copunter] = L2SystemCore.getShopIconSprite(L2SystemCore.getItemData("MSX3p"));
                }
                else if (name.Contains("Sacred Orb"))
                {
                    this.icon[this.item_copunter] = L2SystemCore.getMenuIconSprite(L2SystemCore.getItemData("Sacred Orb"));
                    name = "Sacred Orb";
                }
                else if (name.Contains("Crystal S"))
                {
                    this.icon[this.item_copunter] = L2SystemCore.getShopIconSprite(L2SystemCore.getItemData("Crystal S"));
                    name = "Crystal S";
                }
                else if (Array.IndexOf(weapons, name) > -1)
                {
                    this.icon[this.item_copunter] = L2SystemCore.getMenuIconSprite(L2SystemCore.getItemData(name));
                }
                else
                {
                    this.icon[this.item_copunter] = ShopScript.Load("Textures/icons_shops", name);
                }

                this.shop_item[this.item_copunter].sprite = this.icon[this.item_copunter];
                this.item_name[this.item_copunter].text   = this.sys.getMojiText(true, this.sys.mojiSheetNameToNo(tab, this.sys.getMojiScript(mojiScriptType.item)),
                                                                                 this.sys.mojiIdToNo(tab, name, this.sys.getMojiScript(mojiScriptType.item)), this.sys.getNowLangage(), this.sys.getMojiScript(mojiScriptType.item));
            }

            this.item_value[this.item_copunter] = vale;
            if (vale > 999)
            {
                this.item_valu[this.item_copunter].text = L2Math.numToText(vale, 4);
            }
            else
            {
                this.item_valu[this.item_copunter].text = L2Math.numToText(vale, 3);
            }
            this.item_num[this.item_copunter] = num;
            this.item_copunter++;
            return(true);
        }