Jump to content

[C++]Shop price same in all Kingdoms


Recommended Posts

  • Active+ Member

With this change you can have same price in every kingdom 

 

At shop.cpp 

search for if (bOtherEmpire)

			pack2.items[i].price = item.price * 3;

change it to : 

			pack2.items[i].price = item.price

search 
if (it->second) // if other empire, price is triple
    dwPrice *= 3;

Change 

if (it->second) // if other empire, price is triple
    dwPrice *= 1;

 

Edited by Lycawn
Fixed
  • Metin2 Dev 3
  • Scream 1
  • Love 1

spacer.png

Link to comment
Share on other sites

  • Forum Moderator

Hello, thank you for your release but it is not a good or complete solution. Let me explain:

  • It is better to not do "price * 1" as "price * 1" is simply equal to "price".
    • pack2.items[i].price = item.price;
  • In that case, both cases of the if are equal, you can then simply remove the following check and replace it with the code above.
    • if (bOtherEmpire)
          pack2.items[i].price = item.price * 3;
      else
          pack2.items[i].price = item.price;
  • Also, in shop.cpp you must remove the following piece of code for the change to be complete:
    • if (it->second) // if other empire, price is triple
          dwPrice *= 3;
      

 

  • Metin2 Dev 1
  • Love 1

Gurgarath
coming soon

Link to comment
Share on other sites

  • Active+ Member
3 minutes ago, Gurgarath said:

Hello, thank you for your release but it is not a good or complete solution. Let me explain:

  • It is better to not do "price * 1" as "price * 1" is simply equal to "price".
    • pack2.items[i].price = item.price;
  • In that case, both cases of the if are equal, you can then simply remove the following check and replace it with the code above.
    • if (bOtherEmpire)
          pack2.items[i].price = item.price * 3;
      else
          pack2.items[i].price = item.price;
  • Also, in shop.cpp you must remove the following piece of code for the change to be complete:
    • if (it->second) // if other empire, price is triple
          dwPrice *= 3;
      

 

Thank you!  in my case there is not  dwPrice  already!

Edited by Lycawn
  • Good 1

spacer.png

Link to comment
Share on other sites

@Thorek

Take Polak, you ridicule everyone and on your "forum" people laugh at you because you can't write in python. The boy may be starting his adventure with coding from the simplest things and you have the nerve to criticize him instead of congratulating or in some way still directing him?
I feel bad having anything to do with Poland because of people like you.

Edited by Vegaz
  • Love 1
Link to comment
Share on other sites

4 hours ago, Vegaz said:

@Thorek

Take Polak, you ridicule everyone and on your "forum" people laugh at you because you can't write in python. The boy may be starting his adventure with coding from the simplest things and you have the nerve to criticize him instead of congratulating or in some way still directing him?
I feel bad having anything to do with Poland because of people like you.

Take Niemiec, which forum is mine? Yes, I can't write in Python because Python is crap, and I don't like this language. Even if he started his adventure, he could have looked for this addition before he published it.

I appreciate every work, but honestly - why would we need topics like this when we have tons of them? But yes - my first comment may be a little toxic, and I want to apologize for this.

Edited by Thorek
Link to comment
Share on other sites

Announcements



×
×
  • 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.