[Patch] Double Experience Weekend Event

Hello all. I would first like to say that I have very little knowledge of C++. What I am looking for is an event of sorts that will increase the experience gained (from anything) by 50% for a set duration (2 days starting on saturday at 12am (0:00)) and end. It would be nice if it appeared in the calender as an actual event, however that would be considered a perk and is nowhere near necessary. I’ve searched the forums for a couple days now, just to make sure I’m not requesting something that’s already been requested. Thanks in advance.

You can’t add new events to every one on calendar without modify dbcs on client.

What about a general experience increase that just changes server rates for a set amount of time swaps them back at the end? Would this be possible without messing with the client dbcs?

Edit - Thanks for your fast reply /emoticons/default_smile.png

just a suggestion, its rather complicated and maybe complete bull to do but here is an idea…

make 2 configs, basicly the same but only different rates, lets call them configA and configB

let a cronjob move configA to configC and configB to configA ( so you swap it and make config A configC first so that you dont conflict names )

then let the cronjob ( if thats possible ) to do in worldserver a .reload config

thats should in theory do the trick… and then at the end of the weekend do configA to configB and configC to ConfigA then again a reload config in the command.

thats whats basicly my idea of it… but thats amateur work i know, and basicly just maybe bullshit to inplement, there might be better ways to do it i dont know…


This could work, it sounds theoretically sound in my head, ide just have to play with it and see if I can actually do it. I’m not looking for the “golden goose” of scripts or fixes here, just looking for something that will do it automatically at xx time for xx amount of time. Can be as crude as it needs to be.

Edit - Ok i’ve found a crude way of doing it. Instead of using CronJob i can use a batch file to move the files around between the root folder and 2 sub folders (to prevent overrighting the file), I can explain how I did it if anyone is interested. My question is, Is there a way of using a batch file to automatically run a .reload config in the worldserver?

I may have a small patch + SQL for you to do this (not displaying on calendar, but giving the bonus). Just waiting on my compile to finish so I can test it.

edit: See attached patch. This adds a HOLIDAY_CUSTOM_01 in an unused spot along with DBC holiday defines. The optional SQL should work to trigger your holiday start on Saturday, run until Monday, and then repeat like that every weekend. Just tweak it to suit the time you want to start/stop and how long to run otherwise. The bonus granted is currently hardcoded as “magic numbers” – just search and replace 1.5f (50% total bonus) with your own value or a #define value.



Thanks a ton Kline! Definately appreciate your work!

kline, was wondering if you know how to for example raise the loot chance for those that has for example account level 1? So if your account level is 1 you have 10% higher drop chance from all mobs? That would be so awesome!

Hey Kline, once again thanks for that patch, however when i use git to apply the patch im getting the error “Patch Format Detection Failed”. If I was to try to install it by hand where would I put it?

Edit - I answered my own question here. I feel like im learning a little bit with this patch, at least learning to read the language a little better. I was getting error with the patch apply using git bash, as git apply wouldnt work. What im having to do is make a copy of the individual files on the patch to the desktop, patch it, then replace it in the folder, other than that its going well. I’ll let you know when its done if it worked.

If your setup is as such: /some/folder/TrinityCore/src you would place the patch into the TrinityCore folder (one above src) and patch -p0 -i . If your core revision is newer/older than the one I built it against you may have some parts of it fail and have to do them by hand anyways.

Yeah i got them in, it just asked me to designate where the files i was patching were, compiling it now to test it out.

Hmm after compiling it doesnt seem to be working. No errors and checking the event i/g says the event is currently running but exp is the same.

Edit - Im getting this error in a .rej file on the player.cpp


Edit 2 - Also getting “Can’t find file to patch at input line 70” for formulas.h

however, looking into the formula.h file and the patch file, #include “GameEventMgr.h” was added to it.

Edit 3 - I dont have the tc_world that is in the sql patch, i only have world

Yeah tc_world was my own database name, I corrected that in the version on my GitHub page. Sorry about that.

Yeah I got the tc_world situated. I just removed the world part, and directly injected the sql into the database in game_events. My issue is that with it installed, everything is on the correct lines, minus the SharedDefines. Your patch states that it should replace lines 2612 but in reality, line 2612 references the skillbyquestsort. The line for the holiday, is line 2313. Do I need to edit the patch to reflect the new numbers then rerun it? There is also the issues of the above errors that I recieved while patching.

Is it SUCH troubles to add the lines by hand?

I was a little intimidated by it, but it isnt hard at all. It’s just the fact that with the additions from the patch, it doesnt work. I have a working event that is on and labled correctly, just its not applying the 1.5f : 1.0f by detecting it.

I’ll patch and re-check against the latest Core rev when I get some time after work this week. I’ll push to my GitHub folder if I get something added, but for the light testing I gave it the day I wrote it, it did work (after a very long battle with a simple missing set of parenthesis).

Ok there seems to be a problem with leaving the ending date unset in the DB as it rolls back to 1969 and the event never properly starts. Update the event end date to 2020 or something and it should trigger properly. Going to clean some other small stuff up then I’ll push a new one to GitHub.

Ok, new one pushed to https://github.com/Kline-/TrinityCore-Patches/tree/master/custom_holiday

Moved from “Holiday” to “Event” (as a Holiday is just an event with a calendar display – which we don’t have; yet). All config values (event #, experience bonus rate) are also moved to worldserver.conf

Just compiled and ran this myself, working, so hopefully there are no further issues for anybody.