Jump to content

Recommended Posts

Wouldn't it be better to store the "Guests" inside a vector and then check if the guest already exists in it, if yes don't add the guest to vector, if no add it to vector then send to client?

I'm just narrow-minded when it comes to quest flags haha :D

Link to comment
https://metin2.dev/topic/16313-seen-shop-system/#findComment-90469
Share on other sites

  • 9 months later...
  • Honorable Member
On 13.07.2017 at 1:42 AM, Denis said:

Wouldn't it be better to store the "Guests" inside a vector and then check if the guest already exists in it, if yes don't add the guest to vector, if no add it to vector then send to client?

I'm just narrow-minded when it comes to quest flags haha :D

You're right.I updated topic.

 

Link to comment
https://metin2.dev/topic/16313-seen-shop-system/#findComment-101113
Share on other sites

Good job but i think if same player open shop don't increment seens counter will be better.Also, why you use vector ? And push every time ? in you case you don't want to chack if player opened shop or no to increment counter ! You can use single counter not vector.

int counter = 0;

 

Link to comment
https://metin2.dev/topic/16313-seen-shop-system/#findComment-101116
Share on other sites

  • Honorable Member
18 hours ago, DeadSkull7 said:

Good job but i think if same player open shop don't increment seens counter will be better.Also, why you use vector ? And push every time ? in you case you don't want to chack if player opened shop or no to increment counter ! You can use single counter not vector.


int counter = 0;

 

-And push every time ?

Wrong! Not every time if ch isn't exist in vector control:

find(looked.begin(), looked.end(), ch) == looked.end()

 

Link to comment
https://metin2.dev/topic/16313-seen-shop-system/#findComment-101131
Share on other sites

2 hours ago, Mali61 said:

-And push every time ?

Wrong! Not every time if ch isn't exist in vector control:

find(looked.begin(), looked.end(), ch) == looked.end()

So if player open shop in first time you push him in vector, if open again ? He will be existed so vector size don't change .. ?

Link to comment
https://metin2.dev/topic/16313-seen-shop-system/#findComment-101138
Share on other sites

  • Honorable Member
4 minutes ago, DeadSkull7 said:

So if player open shop in first time you push him in vector, if open again ? He will be existed so vector size don't change .. ?

Yes, size only change for 1 character.

 

Link to comment
https://metin2.dev/topic/16313-seen-shop-system/#findComment-101140
Share on other sites

  • 3 years later...
  • 5 months later...
  • 2 years later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.