Rochet2 / Issues

Issues about anything and everything
https://rochet2.github.io/
0 stars 0 forks source link

Issues with the item/player gossip patch #30

Closed loud21 closed 8 years ago

loud21 commented 8 years ago

Let me start off by saying that I'm pretty new to the whole emulation scene.

I'm having issues with the item gossip patch. I manually applied it to my eluna source. I don't know if it works on eluna, couldn't find any topics about it, and while compiling i got some errors and misplaced some brackets, so I've edited that and compiled without any errors.

Then I've added the example item script and made an item in the database with a dummy effect on it and connected the script to it. Once i logged on and tried testing it in game it didn't bring up the gossip menu. I'm trying to make a teleportation device for my 335 fun server and lua is just not cutting it since c++ gives me a lot more options to work with. It would be great if the patch could work on the eluna source, and if possible could you please tell me what i have to modify to make it compatible with my source? If not i will just stick with lua scripts.

Anyways thanks for taking the time to read all of this. Oh and i love you work. I've applied the transmog patch to my source and its working perfectly. Looking forward to your future releases, have a great day!

Rochet2 commented 8 years ago

Eluna and the gossip patch are not compatible with eachother. What I mean by that is that you can not directly apply the item gossip on a core that has Eluna by using just git apply itemgossip.diff or any other method. Applying the patch requires using --reject flag in the git apply command or solving merge conflicts from git pull (git merge). Solving the conflicts or applying the --reject generated *.rej files is manual work and may need some basic idea of what the code does and should do.

What installation method did you use? (patch, git pull/merge, diff) How did you get it to apply to the core even though the method fails by default? (what was the exact command you used in git or elsewhere)

loud21 commented 8 years ago

Thank you for responding in such short notice. As I've said above I manually applied the patch

Rochet2 commented 8 years ago

Can you possibly show the code you have in MiscHandler.cpp in the WorldSession::HandleGossipSelectOptionOpcode function? This is the most likely place to fail.

Also temporarily try using hearthstone or a copy of the hearthstone item as the scripted item that opens the gossip window. Hearthstone has been tested and known working, so if the issue is with the item and not the code then this would show it.

loud21 commented 8 years ago

Ok so i removed the eluna part of it, don't know if that was wise, it looks like this now http://pastebin.com/EWFsDusF

Rochet2 commented 8 years ago

Try using this instead: https://gist.github.com/Rochet2/12f26971e030e39b4cc7

I tried adding in both eluna code and the itemgossip. The above code should be fine if you are using a source from year 2015. Older might not work.

loud21 commented 8 years ago

1>------ Build started: Project: revision_data.h, Configuration: Release x64 ------ 2>------ Build started: Project: game, Configuration: Release x64 ------ 2> MiscHandler.cpp 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(220): error C2059: syntax error : 'else' 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(221): error C2143: syntax error : missing ';' before '{' 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(221): error C2447: '{' : missing function header (old-style formal list?) 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(227): error C2059: syntax error : 'if' 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(230): error C2059: syntax error : 'if' 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(231): error C2143: syntax error : missing ';' before '{' 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(231): error C2447: '{' : missing function header (old-style formal list?) 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(240): error C2059: syntax error : 'if' 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(241): error C2143: syntax error : missing ';' before '{' 2>D:\servers\testing part 2\ElunaTrinityWotlk\src\server\game\Handlers\MiscHandler.cpp(241): error C2447: '{' : missing function header (old-style formal list?) 3>------ Skipped Build: Project: INSTALL, Configuration: Release x64 ------ 3>Project not selected to build for this solution configuration ========== Build: 1 succeeded, 1 failed, 16 up-to-date, 1 skipped ==========

Will try to fix these errors. brb

Rochet2 commented 8 years ago

updated code a bit

loud21 commented 8 years ago

Alright compiled with 0 errors using the new code. Let's test it in game. Oh and thanks for all the help again

loud21 commented 8 years ago

Eh, still not working.. Should I just stick to the lua script? I don't want to waste any more of your time

Rochet2 commented 8 years ago

BTW. did you add the script to scriptloader :)? and did you try with hearthstone or copy of it?

loud21 commented 8 years ago

Tried the heartstone copy didn't work, and my script loader looks like this

ifdef SCRIPTS

/* This is where custom scripts' loading functions should be declared. */ void AddSC_PWS_Transmogrification(); void AddSC_CS_Transmogrification(); void AddSC_example_ItemGossip();

endif

void AddCustomScripts() {

ifdef SCRIPTS

/\* This is where custom scripts should be added. */
AddSC_PWS_Transmogrification();
AddSC_CS_Transmogrification();
AddSC_example_ItemGossip();

endif

}

Once again, the transmog script is mind-blowingly good!

loud21 commented 8 years ago

Hey, I've been messing around with some scripts today, and I decided to test out this script right here:

https://www.lordcraft.net/topic/9998-item-gossip-teleporter-example/

I made it as a new custom script, even tho I almost lost all hope i decided to test it out and hoped for the best. And once I recompiled I just right clicked my hearthstone out of curiosity, and the gossip menu showed up. Probably one of the greatest random moments of my life, so I'm guessing the error was somewhere in the example script or I didn't compile it properly the first time I tried, idk. Anyways you can mark this thread as solved. Thanks again for all the help! Can't wait for your future releases!