Jump to content
Phishing - Beware of identity theft... ×

Fix Dungeon Music


Sonitex

Recommended Posts

  • Premium

Hey community!

When you specify which music you want to play in your dungeon map at settings.lua, it is always getting replaced with previous map's one(From which you were teleported to). This is happening because each dungeon has it's own unique map index and game cannot locate it from settings.

Here is a simple fix to get original index of that map, it should work as long as you do not have like 10000 dungeon instances of same type, which isn't possible with current Metin2 player count I believe.

In char.cpp search for:

void CHARACTER::MainCharacterPacket()

Replace this variable with the following:

const unsigned mapIndex = GetMapIndex();

const unsigned mapIndex = GetMapIndex() < 10000 ? GetMapIndex() : GetMapIndex() / 10000;

Greetings,

Sonitex

  • Confused 2
  • Love 7
Link to comment
Share on other sites

  • Premium
13 hours ago, hachiwari said:

3500? How did you calculate this number?

Actually I was wrong, there would have to be more than or equal to 10000 dungeons of same type because, (mapIndex * 10000 + 10000) / 10000 > mapIndex and we wouldn't get original mapIndex but mapIndex+1 or more, depends on dungeon instances. For some reason I thought it would round up the number, but it's type is integer so it is not possible ?‍♂️ so I just said 3500 just to give an idea. I apologise for that.

 

16 hours ago, JarajTo said:

I believe that more than 3500 dungeon instances of same type are possible.

 

Nice one

Sure, I would love to see that happen. There isn't a server with more than 3000 unique players right now, but you would need more than 10000 unique players(as I corrected myself earlier), each one creating their own dungeon, good luck with that one.

1 hour ago, Chyu ^^ said:

Don't fix bugs by creating new bugs.

If you are referring to having more than 10000 dungeons, it is just not possible, if not I'd love to hear those 'new bugs' and will happily fix them.

  • Love 1
Link to comment
Share on other sites

  • Premium
1 hour ago, Sonitex said:

If you are referring to having more than 10000 dungeons, it is just not possible, if not I'd love to hear those 'new bugs' and will happily fix them.

What I'm trying to say is your method to solving the bugs is incorrect. Yeah, In THIS case it WOULD may not be problem.

  • Love 1

 

 

Link to comment
Share on other sites

  • 1 month later...


  • Similar Content

  • Activity

    1. 1

      Phishing - Beware of identity theft...

    2. 1

      Phishing - Beware of identity theft...

    3. 45

      Official Pickup Slot Effect [REVERSED]

    4. 0

      damage from int to long long

    5. 22

      Green & Purple Potions Effect

    6. 12

      When Uninstalling Gaya System

    7. 12

      When Uninstalling Gaya System

    8. 12

      When Uninstalling Gaya System

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