Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Tutorials => Topic started by: stoneharry on May 11, 2012, 10:03:56 pm
-
(http://dl.dropbox.com/u/1102355/Read/cover.jpg)
With Schlumpf's (http://modcraft.io/memberlist.php?mode=viewprofile&u=59") guidance I was able to successfully implement a way to send custom patches to the client through WoW rather than a custom launcher.
The implications for this are quite clear. It allows one to:
- Require the latest patch to login.
- Send incremental patches.
- Send any data.
I wrote up a guide to do this which Schlumpf (http://modcraft.io/memberlist.php?mode=viewprofile&u=59) has heavily edited to create a, hopefully, useful publication.
The link to this can be found here: https://www.dropbox.com/s/fovh9mtrj9tgqd4/Implementing%20in-client%20patching%20for%20World%20of%20Warcraft.pdf?dl=0
~Harry & Schlumpf
Edit: 21/06/2014:
You will have to edit the binary to allow unsigned patches: <!-- l -->viewtopic.php?f=59&t=1829 (http://modcraft.io/viewtopic.php?f=59&t=1829" onclick="window.open(this.href);return false;)<!-- l -->
This is my code changes for a more recent TrinityCore version in order to get patching to work: <!-- m -->https://dl.dropboxusercontent.com/u/110 ... nity.patch (https://dl.dropboxusercontent.com/u/1102355/Patching-Trinity.patch" onclick="window.open(this.href);return false;)<!-- m -->
-
You may want to add links to code excerpts or even the whole zip for ease of copying.
-
Awsome guys!
You sure you just want to keep it at drop boxs?
You could also upload it to the forum if you want to.
Very nice.
Thanks to both of you!
PS:I corrected your links btw.
-
Thanks, yeah when I posted this before I was ready by mistake. Now every time I try to edit the post it disapproves the post. FML.
http://dl.dropbox.com/u/1102355/PatchThroughClient.zip (http://dl.dropbox.com/u/1102355/PatchThroughClient.zip" onclick="window.open(this.href);return false;)
That is the full archive.
Also attached to this post.
-
Did you test it only on ArcEmu or Trinity?
-
Did you test it only on ArcEmu or Trinity?
I tested it on ArcEmu, and Schlumpf tested it on TrinityCore.
-
I add the change for Windows 335a binary.
Huge thanks to Schlumpf for all the help and explanations.
55 push ebp
8B EC mov ebp, esp
B9 05 00 00 00 mov ecx, 5
8B 45 0C mov eax, [ebp+authresult]
89 08 mov [eax], ecx
B8 01 00 00 00 mov eax, 1
5D pop ebp
C2 18 00 retn 18h
-
This is epic work guys. It's been needed for quite some time. Personally really don't like launchers at all. Thanks for sharing.
-
This is epic work guys. It's been needed for quite some time. Personally really don't like launchers at all. Thanks for sharing.
The sad part is that this technique is known and working since years but emulator people never correctly implemented it.
-
getting a patch error on the trinity core diff patch .
line 769 : corrupt patch
-
getting a patch error on the trinity core diff patch .
line 769 : corrupt patch
You'll need to apply it manually.
-
I've compiled trinitycore with the patch, modified the wow.exe to allow the MPQ, made the patch and authserver loads it. But when I try to login I just get an unable to validate game version message and it does not go further.
I'm using 3.3.5a esES.
thanks.
-
it really works well? :shock:
-
For some reason that i cant fathom, 'usleep(1000);' in the diff script for Trinity is unrecognized.
Error 3 error C3861: 'usleep': identifier not found D:Trinity335srcserverauthserverServerAuthSocket.cpp 458 1 authserver
any ideas?
-
use Sleep(1);
-
Anyone have a Trinity patch for this that works since they redid logging? In August of 2012 the TrinityCore community was told there would be something added to the wiki to help people understand the logging system changes but it must not have been important enough to actually get done. :(
I am attempting to manually patch into my copy of the Stable TDB335.51 (2013/02/14) that I am using.. I have everything patched in. But when I go to compile it, I get a bunch of fatal errors centered around the logging, mainly "error C2039: 'outString' : is not a member of 'Log'" and one "error C2039: 'outStaticDebug' : is not a member of 'Log'"
I looked in Log.h and Log.cpp to try to grasp what functions I might need to replace them with. In the Log class I see that they added LOG_FILTER_TYPE in the parameters but again, no real documentation anywhere on what those might be.
While a patch using the new logging system would be awesome, I'm not opposed to figuring this out on my own if I need to. After several hours searching the Trinity forums and trying to get a grasp on what I might need to do, I could really use a nudge in the right direction. Or if this "phantom" documentation exists somewhere, a link would rock!
Thanks in advance if anyone is able to help! :)
-
Just remove those logging related lines. Logging isn't important.
-
Just remove those logging related lines. Logging isn't important.
Thanks Schlumpf! I had hoped to keep them for debugging purposes. But knowing they aren't critical and that I can remove them helps. I'll comment them out for now in case I can find out more about the logging system later.. Or maybe even just convert them to generic outInfo messages without worrying about all the different variables and such that were passed through in the messages before. But then I guess I'd have to figure out the whole LOG_FILTER_TYPES and how to modify it in the worldserver.conf for logging.. lol
Thanks again for your response! You rock! :)
-
I followed the tutorial, but I ran into an issue related to logging on to the server.
Here is the error.
i(.)imgur(.)com/9XOiSCy(.)png
I seem to have tracked it down to these lines if this is any help.
pastebin(.)com/6p7EnF5t
In the core folder I have the folder called 'patches' with a MPQ file inside it called '12340-enUS', my client being 12340 as well.
I got my hands on a client patched to 12346, and tried to change allowed patches to 12347 instead of 12341, and change the name of the MPQ too, but it didn't work, so I doubt it's related to the client, but again, I could be wrong.
Thanks,
Jpp
-
I followed the tutorial, but I ran into an issue related to logging on to the server.
Here is the error.
i(.)imgur(.)com/9XOiSCy(.)png
I seem to have tracked it down to these lines if this is any help.
pastebin(.)com/6p7EnF5t
In the core folder I have the folder called 'patches' with a MPQ file inside it called '12340-enUS', my client being 12340 as well.
I got my hands on a client patched to 12346, and tried to change allowed patches to 12347 instead of 12341, and change the name of the MPQ too, but it didn't work, so I doubt it's related to the client, but again, I could be wrong.
Thanks,
Jpp
Pretty sure it needs to be 12340enUS.mpq. Can't remember off the top of my head. Trace the find patch function in the if statement you linked.
-
Pretty sure it needs to be 12340enUS.mpq. Can't remember off the top of my head. Trace the find patch function in the if statement you linked.
Already checked that.
pastebin(.)com/89VBWrLJ
Thanks though.
-
I've got the same Problem.
Patch is definatly named correct and the authserver loads the Patch.
Clients says, unable to validate Game Version.
-
I've got the same Problem.
Patch is definatly named correct and the authserver loads the Patch.
Clients says, unable to validate Game Version.
The TrinityCore code is based of the 2011 code base. http://pastebin.com/0BwqxVGf (http://pastebin.com/0BwqxVGf" onclick="window.open(this.href);return false;)
TrinityCore have most likely updated it somehow now that requires different changes to be made. Put a debugger in and follow through the code to see what is happening. A condition could not be being matched and/or the entire patching process not being initialized. *shrug*
-
after downloading patch i have patch.mpq for example - how automaticly rename it to wow-update-base-15596.mpq and put to data for example?
-
This is my updated code on my local branch of TrinityCore that has patching working:
https://dl.dropboxusercontent.com/u/110 ... nity.patch (https://dl.dropboxusercontent.com/u/1102355/Patching-Trinity.patch" onclick="window.open(this.href);return false;)
-
The newest patch for trinitycore is not working for me. I think that code of trinitycore has recently changed.
Some files of trinitycore can´t be patched. (Main.cpp , AuthSocket.cpp, AuthCodes.cpp) :cry: (I have the newest trinitycore).
-
The newest patch for trinitycore is not working for me. I think that code of trinitycore has recently changed.
Some files of trinitycore can´t be patched. (Main.cpp , AuthSocket.cpp, AuthCodes.cpp) :cry: (I have the newest trinitycore).
Have you tried manually merging it? I doubt they've changed it that much.
-
Thank you , it works now ... but I have a two questions. The first one is Where should I setup a path to custom patch. (Core ? in define ?) and The second one is What syntax shoud have the name of patch file.
I am using Linux (debian) , compilation of core was succesfull. I have folder "patches" in my "bin"(where i have authserver and worldserver) folder and there I have custom patch (Patch-x.mpq ..I have tried 12340-enUS.mpq too), but when I log in nothing happens. I have modified wow.exe too. In the auth console is only "Entering _HandleLogonProof".
-
Update AuthCodes to deny 12340 as a build.
Path is:
+#ifndef _WIN32
+#define PATCH_PATH "../var/patches/"
+#else
+#define PATCH_PATH "./patches/"
+#endif
So if windows, just make a folder called patches. If not windows, ../var/patches. I am not sure what linux is for ../ but I assume it is the same as windows - back a directory, vars folder, patches folder.
Patch name should look something like this:
12340-enGB.mpq
-
Okay, so authserver has found new patches , I have commented line
{12340, 3, 3, 5, 'a'},
from
RealmBuildInfo const PostBcAcceptedClientBuilds[] ...
so it looks now
static RealmBuildInfo const PostBcAcceptedClientBuilds[] =
{
//{12340, 3, 3, 5, 'a'},
{0, 0, 0, 0, ' '} // terminator
};
When I log in, downloading starts , but then it shows message box "Patch Required, press the restart button below to exit World of Warcraft and download the patch." When I click on restart button it shows message box "Failed to apply patch..." , after restart game still not working.
Output in console:
Client with version 12340 and locale enUS (53556e65) looking for patch.
Client with version 12340 and locale enUS (53556e65) looking for patch.
Patch: ../var/patches/12340-enUS.mpq
PatcherRunnable::run(): 0 -> 65580
patcher done.
-
The server side changes are working fine then. You need to disable the client check for Blizzard signed patches and make sure the patch is formatted correctly.
-
hm... I recently changed sleep timer to lower value. When timer was set to 1 second , downloading was really slow, so I changed it .. then it was faster , but only part of patch was downloaded. Can it cause a problem ?
EDIT:// I set timer to default (1sec) still not working , so I am gonna try modify WoW.exe
I have modified wow.exe , still not working ... my WoW is not installed , it´s only portable , so maybe it can´t find path to my Data folder.
-
viewtopic.php?f=59&t=1829 (http://modcraft.io/viewtopic.php?f=59&t=1829" onclick="window.open(this.href);return false;)
-
that can be fixed for trinitycore because now is using boost not ace anymore and not have no clue how to do it. :)
-
Greetings $N
I updated the code for a recent TrinityCore version.
Here is the commit :
https://github.com/Hlkz/Acore/commit/82 ... 0e04542608 (https://github.com/Hlkz/Acore/commit/82b46e3617b6b14752113e7d853dec0e04542608" onclick="window.open(this.href);return false;)
PS: Thank's so much for your work guys...
-
Updated :
http://pastebin.com/Vdp9wpBT (http://pastebin.com/Vdp9wpBT" onclick="window.open(this.href);return false;)
-
Any updates to this? Chaya's patch made my server crash on bootup - or did I do something majorly wrong?
Also no clue how to properly use the database with it. I might be dumb, but I did try for hours until I eventually gave up!
-
Hi, can someone rewrite it for OC? i tryed but not successfully ..... :'(
-
Could someone take the time to update this to latest TC revision? Please, I would really appreciate it.