Jump to content

Shop Ex Renewal


Recommended Posts

  • Honorable Member

M2 Download Center

Download Here ( Internal )

Download Here ( GitHub )

 

Anyway now you can sell shop items with sockets and attrs at shopex.

New price types.

New sorting options

Every Item can have different price type.

price_type: 1:Gold 2:Second Coin 3:Item 4:EXP

sort: Asc,Desc,Vnum,Price,Name,Type

Spoiler

28411568747470733a2f2f692e6962622e636f2f
28411568747470733a2f2f692e6962622e636f2f
28411568747470733a2f2f692e6962622e636f2f

 

  • Love 18

I'll be offline for a few months🌛

Link to post
  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Lambda expressions (since C++11), you need CFLAG += -std=c++11, if you want to do it without, then you've to do something like this: Hidden Content Give reaction to this post to see the hidden content.  

M2 Download Center Download Here ( Internal ) Download Here ( GitHub )   Anyway now you can sell shop items with sockets and attrs at shopex. New price types. New sorting options Every Item can have different price type. price_type: 1:Gold 2:Second Coin 3:Item 4:EXP sort: Asc,Desc,Vnum,Price,Name,Type  

8: your shit files

Posted Images

After 

		if (pItemGroup->GetValue(i, "price_type", shopItems[i].price_type) && pItemGroup->GetValue(i, "price_vnum", shopItems[i].price_vnum) && shopItems[i].price_type == 3) {
			if (shopItems[i].price_type > 4 || shopItems[i].price_type < 1) {
				sys_err("row(%d) of group items of group %s price_type is wrong!", i, pNode->GetNodeName().c_str());
				return false;
			}
			TItemTable * pProto = ITEM_MANAGER::instance().GetTable(shopItems[i].price_vnum);
			if (!pProto) {
				sys_err("NOT GET ITEM PROTO %d", shopItems[i].price_vnum);
				return false;
			}
		}

 

You can add this to clean the memory

 

memset(&getval, 0, sizeof(getval));

 

Link to post
  • Honorable Member
19 minutes ago, ManiacRobert said:

After 

		if (pItemGroup->GetValue(i, "price_type", shopItems[i].price_type) && pItemGroup->GetValue(i, "price_vnum", shopItems[i].price_vnum) && shopItems[i].price_type == 3) {
			if (shopItems[i].price_type > 4 || shopItems[i].price_type < 1) {
				sys_err("row(%d) of group items of group %s price_type is wrong!", i, pNode->GetNodeName().c_str());
				return false;
			}
			TItemTable * pProto = ITEM_MANAGER::instance().GetTable(shopItems[i].price_vnum);
			if (!pProto) {
				sys_err("NOT GET ITEM PROTO %d", shopItems[i].price_vnum);
				return false;
			}
		}

 

You can add this to clean the memory

 

memset(&getval, 0, sizeof(getval));

 

not necessary

I'll be offline for a few months🌛

Link to post

I am glad you added new prices as i said in your last topic

Great work

 

Just one thing to ask , in shopex is there a way to make the shop gui extend height if there are more choices let's say like : ARMOR-ITEMS-WEAPONS...etc so it look good

  • Love 1
Link to post
  • Honorable Member

#New sorting options added:

sort: Asc,Desc,Vnum,Price,Name,Type

----------

21 hours ago, MrQuin said:

I am glad you added new prices as i said in your last topic

Great work

 

Just one thing to ask , in shopex is there a way to make the shop gui extend height if there are more choices let's say like : ARMOR-ITEMS-WEAPONS...etc so it look good

You are looking for:

Spoiler

asd.png

Don't forget the change SHOP_TAB_COUNT_MAX from Server/length.h and Client/Packet.h

  • Love 1

I'll be offline for a few months🌛

Link to post
vor 2 Stunden schrieb Mali61:

#New sorting options added:

sort: Asc,Desc,Vnum,Price,Name,Type

----------

You are looking for:

  Inhalt unsichtbar machen

asd.png

Don't forget the change SHOP_TAB_COUNT_MAX from Server/length.h and Client/Packet.h

Cant see the picture

Link to post
  • Honorable Member
2 minutes ago, Dalí said:

this happens when freelancers are better than "developers". Good job mate!

I never had such a claim but thanks ?

I'll be offline for a few months🌛

Link to post

expected primary-expression before '['token on shop manager line 534

line 534


std::sort(shopItems.begin(), shopItems.end(), [stSort](const TShopItemTable& i1, const TShopItemTable& i2)


full line


#ifdef ENABLE_RENEWAL_SHOPEX
else {
std::sort(shopItems.begin(), shopItems.end(), [stSort](const TShopItemTable& i1, const TShopItemTable& i2)
{
TItemTable* lItem = ITEM_MANAGER::instance().GetTable(i1.vnum);
TItemTable* rItem = ITEM_MANAGER::instance().GetTable(i2.vnum);
if (stSort == "Vnum")
return i1.vnum > i2.vnum;
else if (stSort == "Price")
return i1.price > i2.price;
else if (stSort == "Name" && lItem && rItem)
return strcmp(lItem->szLocaleName, rItem->szLocaleName) < 0;
else if (stSort == "Type" && lItem && rItem)
return lItem->bType > rItem->bType;
});
}
#endif

 

@VegaS™  do you know how to solve?

Link to post
  • Moderator
On 9/5/2019 at 7:13 PM, Thundernatsu said:

expected primary-expression before '['token on shop manager line 534
line 534
std::sort(shopItems.begin(), shopItems.end(), [stSort](const TShopItemTable& i1, const TShopItemTable& i2)

Lambda expressions (since C++11), you need CFLAG += -std=c++11, if you want to do it without, then you've to do something like this:

Hidden Content

    Give reaction to this post to see the hidden content.

 

  • Love 26
  • Good 5
  • Confused 1
Link to post
23 godziny temu, displayjokes napisał:

Hey, i installed the system but when i'm in game i try to open the shop and nothing happens.

Shop does not open and syserrs are clean.

 

Edit: Normal Shops works fine ?

I have the same problem :(

Link to post
5 hours ago, Zeph said:

I have the same problem :(

I've tested a lot of things and that happens everytime, i even tried to open the shop with quest, but it seems like it's not there the shop at all, only the file is beeing loaded because it gave me conflicts with same npc that had shops

It's all lies

Link to post
15 minut temu, displayjokes napisał:

I've tested a lot of things and that happens everytime, i even tried to open the shop with quest, but it seems like it's not there the shop at all, only the file is beeing loaded because it gave me conflicts with same npc that had shops

We have to wait for solution i think.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

×
×
  • Create New...

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.