46
Miscellaneous / Re: [QUESTION] Unsheathe aura
« on: July 09, 2015, 10:59:47 pm »
Maybe try messing with Player::SetSheath?
Could be that sheathing cant be forced from server.
Could be that sheathing cant be forced from server.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to. 46
Miscellaneous / Re: [QUESTION] Unsheathe aura« on: July 09, 2015, 10:59:47 pm »
Maybe try messing with Player::SetSheath?
Could be that sheathing cant be forced from server. 47
Miscellaneous / Re: [QUESTION] - Quest Bonus Objectives.« on: July 09, 2015, 07:36:02 pm »
All the quest handling like how many objectives and when the quest is complete and what are the requirements to complete the quest and so on are decided by the core.
You just alter the system like stoneharry said. Assuming the method isnt some flag for the client to bypass requirements .. If it is, there is a chance that the client only is able to require all requirements or none. The client probably has a limit for objectives, hence there are only so many fields in the database by default. You should make some way to identify if an objective is optional by some extra column that is possibly boolean (1, 0) or similar. Making whole new columns for bonus objectives all together might need more work and you might hit the max amount of objectives cap. (not that I checked for any caps) You can already name the objectives, so just adding the "(optional)" part to the end of the name is probably enough. Think about what there is and what in it you can edit to make it work differently. 48
Serverside Modding / Re: [C++] Set PvP FFA when player enter map« on: July 09, 2015, 03:31:43 pm »Quote from: "bizzlesnaff" So..the strange thing is, with your script I'm ffa flaged..except in orgrimmar, stormwind etc. Its not so strange because that is how the FFA code works by default as well. On FFA pvp realms the cities are not FFA PVP either. And the stuff there is using the existing system. .. I think. If you want to disable the sanctuary stuff etc as well, setting the info to the pvpinfo should be enough before calling the update I think... 49
Serverside Modding / Re: [C++] Set PvP FFA when player enter map« on: July 09, 2015, 12:11:03 pm »
As said on TC forums, this works for me on non custom maps.
Hmm .. I guess the naming of the event and such could be changed though .. Code: [Select] #include "ScriptPCH.h"
50
Serverside Modding / Re: [QUESTION] [TrinityCore] Gameobject instant move for pla« on: July 07, 2015, 03:40:30 pm »
Not with the current functionality it seems.
You would need to respawn the object. However these might interest you https://github.com/TrinityCore/TrinityC ... -109640599 https://github.com/TrinityCore/TrinityC ... f39eb524d6 51
Serverside Modding / Re: [C++] Set PvP FFA when player enter map« on: July 06, 2015, 03:47:53 pm »
Try using this hook instead.
https://github.com/TrinityCore/TrinityC ... #L766-L767 The FFA flags are updated on zone update, which might trigger when you start moving (makes you change the zone specific channels and stuff): You still need the timed event since the hook triggers before the flag setting etc work is done by core normal code. 52
Serverside Modding / Re: [C++] Set PvP FFA when player enter map« on: July 06, 2015, 12:42:26 pm »
Try use the override keyword.
In this case you happened to write the OnMapChanged hook wrong in the new script of yours as well. Correct the hook name to OnMapChanged and it should start triggering again. 53
Serverside Modding / Re: [C++] Set PvP FFA when player enter map« on: July 05, 2015, 08:23:06 am »
Hmm, dont see a reason for it to crash.
Only that it has a thread safety issue. Removed some of the useless code: Code: [Select] #include "ScriptPCH.h" Maybe you should try build in debug mode and or run it under a debugger? 54
Serverside Modding / Re: [C++] Set PvP FFA when player enter map« on: July 04, 2015, 09:02:32 pm »
Most likely (did not check) the player enter map hook runs before updatezone function is called for the player.
In that function call the pvp flags are set again. Incase you want to have the pvp flag on even though the player changes zones, you might want to use the update zone hook. For the timed event, See how BasicEvent is used. It goes about like this: Code: [Select] class MyEvent : public BasicEvent Wrote that from memory so dont expect it to work without edits. 55
Serverside Modding / Re: [C++] Set PvP FFA when player enter map« on: July 04, 2015, 04:27:26 pm »
OnPlayerEnterMap is not a hook.
If you look in ScriptMgr.cpp you see that OnPlayerEnterMap triggers the hook OnMapChanged, which is what you should be using as well. C++ has this great new keyword "override" and I recommend using it. It makes sure the function actually overrides a virtual function like it is supposed to. Code: [Select] #include "ScriptPCH.h" By adding prints Kaev meant that you should add code that outputs something to the worldserver console or elsewhere so you can see that the code actually runs. For example Code: [Select] printf("Does this appear in console?n"); If the code above still does not work, it might be that the flags are reverted back after the hook runs. Many hooks actually execute BEFORE the event actually happens. You can make a function trigger after the event by using a timed event with 0 as the delay so it will execute "as soon as possible". 56
Miscellaneous / Re: Morph while keeping armor?« on: July 03, 2015, 04:56:28 pm »
Maybe try or see my DressNPCs patch?
rochet2.github.io/Dress%20NPCs.html I cant post links yet so .. uh .. right. It is based on abusing mirror image packet and allows making NPCs of any race with any equipment. However same method can be used on players. 57
Serverside Modding / Re: [C++] Command crashes on usage« on: July 02, 2015, 11:48:45 pm »
Maybe this helps?
Code: [Select] static bool HandleNewCommand(ChatHandler* handler, char const* args) Usually wrong database queries call abort and close the server. Better get those database types and columns right. 58
Serverside Modding / Re: [QUESTION] Morphing item« on: July 02, 2015, 10:18:53 pm »
You either need to use a spell or a script.
Spell would nicely take use of the aura system incase the player has multiple morphs. Lets say he has your trinket and noggenfogger, the spell system would probably be able to restore the other when the other wears out and maybe take into account other things. If you apply the morph on equip (or on spell cast) and then the player morphs to something else (noggenfogger) it might be a hassle to try to restore the morph from the trinket after that without checking all the time for the correct displayid. What core do you use for the server? Mangos based cores (mangos, cmangos, trinitycore.. ) do not have an "on equip" hook in their C++ scripting API. Unsure about arcemu ?_? This means that you would need to modify the core to add such a hook. A workaround for this could be .. yet again .. using a spell. By using a spell on use for the item you can script the spell to do what you want in C++. You can use the same spell for all items you create since you can script it to do different things according to the item entry or other data. Did I mention a spell yet? :3 Quote from: "bizzlesnaff" No that's not possible. But i thought u try to morph the player when the item is worn...maybe it is an translation mistake by me...worn means damaged so in wow the item is shown "red". trinkets, rings, back, neck etc. can never lose durability.by worn he probably meant that he wanted the morph to be visible when the item is equipped/weared. 59
Random / Re: Become lootable on death?« on: June 28, 2015, 10:58:46 am »
You can probably hack that into the insignia loot code.
When you click that ingame, make it send a loot table with the player's gear. Here is one way: https://youtu.be/8cSs4KtbeDI?t=118 But I guess having it without any additional object would be possible as well. /me waves |