Jump to content

problem Dargon Soul Changre Attribute


Recommended Posts

Helle Guys, I have a problem when installing Dargon Soul Changre Attribute

https://metin2.dev/topic/29242-dragon-soul-change-attribute/

problem in source Server >>> DragonSoul.cpp

https://metin2.download/picture/FWMf69kDGPNLw7356YzU0aGU695CRX5w/.png

 

Is there a solution please?

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

item_length.h

search this:

 

enum EMaterialSubTypes
{
	MATERIAL_LEATHER,
	MATERIAL_BLOOD,
	MATERIAL_ROOT,
	MATERIAL_NEEDLE,
	MATERIAL_JEWEL,
	MATERIAL_DS_REFINE_NORMAL,
	MATERIAL_DS_REFINE_BLESSED,
	MATERIAL_DS_REFINE_HOLLY,
};

extend with this:

 

enum EMaterialSubTypes
{
	MATERIAL_LEATHER,
	MATERIAL_BLOOD,
	MATERIAL_ROOT,
	MATERIAL_NEEDLE,
	MATERIAL_JEWEL,
	MATERIAL_DS_REFINE_NORMAL,
	MATERIAL_DS_REFINE_BLESSED,
	MATERIAL_DS_REFINE_HOLLY,
#if defined(__DS_CHANGE_ATTR__)
	MATERIAL_DS_CHANGE_ATTR,
#endif
};

DragonSoul.cpp

 

nullptr

change to:

 

NULL
Link to comment
Share on other sites

8 hours ago, SamuraiHUN said:

item_length.h

search this:

 

enum EMaterialSubTypes
{
	MATERIAL_LEATHER,
	MATERIAL_BLOOD,
	MATERIAL_ROOT,
	MATERIAL_NEEDLE,
	MATERIAL_JEWEL,
	MATERIAL_DS_REFINE_NORMAL,
	MATERIAL_DS_REFINE_BLESSED,
	MATERIAL_DS_REFINE_HOLLY,
};

extend with this:

 

enum EMaterialSubTypes
{
	MATERIAL_LEATHER,
	MATERIAL_BLOOD,
	MATERIAL_ROOT,
	MATERIAL_NEEDLE,
	MATERIAL_JEWEL,
	MATERIAL_DS_REFINE_NORMAL,
	MATERIAL_DS_REFINE_BLESSED,
	MATERIAL_DS_REFINE_HOLLY,
#if defined(__DS_CHANGE_ATTR__)
	MATERIAL_DS_CHANGE_ATTR,
#endif
};

DragonSoul.cpp

 

nullptr

change to:

 

NULL

I did what you asked of me

I also replaced > nullptr 
I replaced it > NULL

who is in
DragonSoul.cpp
questlua_dragonsoul.cpp
char_dragonsoul.cpp

https://metin2.download/picture/rAwjRV3uB0ybOq8rMoKaqsq2wcJpqbBZ/.png

But the problem is still there


wait here

This is the hidden content, please

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 3
  • Good 2
Link to comment
Share on other sites

  • Premium
4 hours ago, DoIIar said:

I did what you asked of me

I also replaced > nullptr 
I replaced it > NULL

who is in
DragonSoul.cpp
questlua_dragonsoul.cpp
char_dragonsoul.cpp

https://metin2.download/picture/U129KoE0yfl8S6W0xpH1SNGgEXiFoeLf/.png

But the problem is still there


wait here

This is the hidden content, please

https://en.cppreference.com/w/cpp/language/range-for

You need c++11. If you are still using C++03/C++98 you can't use:

for (auto lpItem : setItems)

Instead:

std::set<LPITEMS>::iterator itr;
for (itr = setItems.begin(); itr != setItems.end(); itr++)

and wherever lpItem in the loop is used, in this case needs to be replaced with *itr

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

23 hours ago, xXIntelXx said:

https://en.cppreference.com/w/cpp/language/range-for

You need c++11. If you are still using C++03/C++98 you can't use:

for (auto lpItem : setItems)

Instead:

std::set<LPITEMS>::iterator itr;
for (itr = setItems.begin(); itr != setItems.end(); itr++)

and wherever lpItem in the loop is used, in this case needs to be replaced with *itr

I logged in but did not understand how to install C++11 😬

Link to comment
Share on other sites

  • Premium
6 minutes ago, DoIIar said:

I logged in but did not understand how to install C++11 😬

You don't "install" c+11, you say to the compiler what version of C++ you intend to compile the files with. Depending on your gcc version (the compiler), the default might very well be a version prior c++11 who doesn't have for range loops ( for(auto x : container) ). Usually you define the version in the CXXFLAGS (declared in the Makefile), using

-std=c++11

but that might involve some modifications on the sources. I gave you an alternative without needing an updated version of C++ anyway

Edited by xXIntelXx
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 11

      Metin2 Closed Beta Content (2003-2004)

    2. 11

      Metin2 Closed Beta Content (2003-2004)

    3. 0

      Football Ground

    4. 11

      Metin2 Closed Beta Content (2003-2004)

    5. 0

      Error compile binary Zentoria2

    6. 11

      Metin2 Closed Beta Content (2003-2004)

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.