Jump to content
×
×
  • Create New...

Agrandir les shops


Recommended Posts

280113screenshot.png

Révélation

050234Capture-d-ecran-2022-01-05-120216.

 

2801132141814.png

Révélation

Source client/UserInterface/packet.h

Révélation

Recherchez :

SHOP_HOST_ITEM_MAX_NUM = 40,

Modifiez la valeur comme souhaité :

SHOP_HOST_ITEM_MAX_NUM = 80,

 

 

Source Server

Révélation

/common/length.h

Révélation

Recherchez ses deux lignes :

SHOP_HOST_ITEM_MAX_NUM = 40,
SHOP_PRICELIST_MAX_NUM = 40,

Modifiez les valeurs :

SHOP_HOST_ITEM_MAX_NUM = 80,
SHOP_PRICELIST_MAX_NUM = 80,

 

 

/game/shop.cpp

Révélation

Recherchez la ligne :

m_pGrid = M2_NEW CGrid(5, 9);

Modifiez :

m_pGrid = M2_NEW CGrid(10, 9);

 

 

 

Client/pack/uiscript/shopdialog.py

Révélation

Voici un exemple du shopdialog.py modifié pour l'agrandissement du shop :

import uiScriptLocale

window = {
	"name" : "ShopDialog",

	"x" : SCREEN_WIDTH - 400,
	"y" : 10,

	"style" : ("movable", "float",),

	"width" : 184 + 160,
	"height" : 328,

	"children" :
	(
		{
			"name" : "board",
			"type" : "board",
			"style" : ("attach",),

			"x" : 0,
			"y" : 0,

			"width" : 184 + 160,
			"height" : 328,

			"children" :
			(
				## Title
				{
					"name" : "TitleBar",
					"type" : "titlebar",
					"style" : ("attach",),

					"x" : 8,
					"y" : 8,

					"width" : 169 + 160,
					"color" : "gray",

					"children" :
					(
						{ "name":"TitleName", "type":"text", "x":84+80, "y":4, "text":uiScriptLocale.SHOP_TITLE, "text_horizontal_align":"center" },
					),
				},

				## Item Slot
				{
					"name" : "ItemSlot",
					"type" : "grid_table",

					"x" : 12,
					"y" : 34,

					"start_index" : 0,
					"x_count" : 10,
					"y_count" : 8,
					"x_step" : 32,
					"y_step" : 32,

					"image" : "d:/ymir work/ui/public/Slot_Base.sub",
				},

				## Buy
				{
					"name" : "BuyButton",
					"type" : "toggle_button",

					"x" : 21,
					"y" : 295,

					"width" : 61,
					"height" : 21,

					"text" : uiScriptLocale.SHOP_BUY,

					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},

				## Sell
				{
					"name" : "SellButton",
					"type" : "toggle_button",

					"x" : 104 + 160,
					"y" : 295,

					"width" : 61,
					"height" : 21,

					"text" : uiScriptLocale.SHOP_SELL,

					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},

				## Close
				{
					"name" : "CloseButton",
					"type" : "button",

					"x" : 0,
					"y" : 295,

					"horizontal_align" : "center",

					"text" : uiScriptLocale.PRIVATE_SHOP_CLOSE_BUTTON,

					"default_image" : "d:/ymir work/ui/public/large_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/large_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/large_button_03.sub",
				},

			),
		},
	),
}

 

 

 

  • Funky Emulation 2
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Popular Posts

Yalabi

 Share



Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.