Jump to content

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

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

english_banner.gif

Link to comment
Share on other sites

  • 1 month later...

Announcements



  • Similar Content

  • Similar Content

  • Similar Content

  • Tags

  • Activity

    1. 0

      Metin2 effect script files (MSE and MSA file) how can convert

    2. 10

      Multi Language System

    3. 0

      We are looking for a C++ and Python programmer

    4. 0

      [Quest Scheduler Request] Is there a way to make a quest run independet of player events? Lets say start quest automatically at server startup?

    5. 111

      Ulthar SF V2 (TMP4 Base)

    6. 0

      Quest function when 102.kill definition whereabouts help

    7. 5

      [M2 FILTER] Customized Client Filter

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