Jump to content

[patch][7275] Generic "getbattlegroundqueueidfromlevel"


Recommended Posts

Posted

* What bug does the patch fix? What features does the patch add?

it makes getbattlegroundqueueidfromlevel generic, so it doesn't depend on static values (like before) it just looks for bg->minlevel and then calculates the bg-queueid with the players level

* For which SubVersion revision was the patch created?

6505->now mangos-18.12

* Is there a thread in the bug report section? If yes, please add a link to the thread.

no

* Who has been writing this patch? Please include either forum user names or email addresses.

balrok

i've changed this function just a bit so this will work also for alterac and give users the possibilty to customize their battlegrounds more

the only static thing is, the /10 in this function, maybe we add a field "levelstep" to bg_template.sql but current battlegrounds have all this levelstep/levelrange

patch can be found here:

http://github.com/balrok/mangos/commits/queue_id

old one here:

http://mangos-files.eu/patches/?file=generic_queueid.patch

can be downloaded here:

http://mangos-files.eu/patches/generic_queueid.patch

ps:i haven't tested it yet, so please read the code or add it to a well populated server

edit: updated to 6505 + added 2 asserts to this function

  • 4 weeks later...
Posted

nice discovery :D, but i think it would be better to have that function somewhere in battleground system ( i mean i want it to move from player class to some battleground related class)

I will check it tomorrow.

Posted

my update http://mangos-files.eu/patches/?file=gen_queue_cleanup.patch

the patch is now bigger, cause i cleaned up some other parts (changed name of variables and functions, so that they don't confuse anymore)

i also changed the function bgqueue::removeplayer() to avoid already done calculation (to get queue_id) and that my getbgqueueidfromlevel fits better inside

the problem from my last patch was that it sometimes (in the bgqueue:removeplayer function for example) failed to get the bg-minlevel cause the bg wasn't created yet

Posted

my patch only touches minlevel (maxlevel gets ignored, i see no reason why disabling a bg for lvl70 players or lvl70+..)

the current problem is that the bg levelranges are only 10-19,20-29,30-39 and so on

my patch makes it generic, so if minlevel is 10 it creates ranges 10-19,20-29..

if minlevel is 51 (alterac minlevel) it creates ranges 51-60,61-70

and if you make 15 it makes 15-24,25-34

if the thing you described is a bug please post it as private message, or create a thread in the bugforum

  • 3 months later...
  • 1 month later...
Posted

through the latest changes, i don't have to cleanup so much code for this branch, so i've rewritten it, so that it applies to the newes mangos-version

the new branch is called generic_queue_id @ git://github.com/balrok/mangos.git

(i have some similar sounding branches, but they are wrong)

again the problem is the same like in my first post described..

my codechanges are mostly getting somehow bgtypeid to call the function with this..

this also worked without any problems in every case, except the "battlegroundqueue::removeplayer" function.. where i have to remove some code, which doesn't work anymore..

i haven't tested it yet, but i guess it works :)

ps: also all patches from above are now wrong and can be ignored..

edit: http://github.com/balrok/mangos/commits/generic_queue_id

×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use