Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: kojak488 on December 20, 2012, 09:39:00 am

Title: [QUESTION] You are in the wrong zone.
Post by: kojak488 on December 20, 2012, 09:39:00 am
I'm on TrinityCore rev. 2012-06-28 22:37:43 -0700 (799b2c146ba5) (Win32, Release).  This isn't as much an issue as seeking guidance on removing the 'You are in the wrong zone' message and zone requirement from a certain spell.  The spell is 29519 'Silithyst'.

The spell puts a buff on the player that can be taken off and places object 181597 (via drop spell 29533) on the ground.  This object can be picked up, which then places the buff 29519 on the player.  This can only be done in Silithus.

I need to be able to use this spell/object outside of Silithus.  I've searched all day for ways to do this.  Logically somewhere is a field in a db or dbc that says it can only be used in Silithus, but I can't find it.  I've looked in world--->conditions, world--->event_scripts, and world--->spell_area.  None of them seem to have any reference to this spell.

So does anyone know where to look for it?

Second, is there a way to copy this set of spells so that I can make the new set drop a different object?  Basically I need one set of the spell for a 'Heaven' object and the other for an 'Earth' object.  Any help would be appreciated.  After not making any progress today all the steam has been taken out of my sail on this one.  Thanks!
Title: Re: [QUESTION] You are in the wrong zone.
Post by: schlumpf on December 20, 2012, 09:41:58 am
Spell.dbc.
Title: Re: [QUESTION] You are in the wrong zone.
Post by: kojak488 on December 20, 2012, 09:48:29 am
I looked there and can't find anything in 29,519 that makes any zone reference.  Unless I completely missed it; I checked it three times.
Title: Re: [QUESTION] You are in the wrong zone.
Post by: schlumpf on December 20, 2012, 10:01:23 am
Seaching for "area" in the documentation at http://pxr.dk/wowdev/wiki/index.php?title=Spell.dbc (http://pxr.dk/wowdev/wiki/index.php?title=Spell.dbc" onclick="window.open(this.href);return false;) came up with a hit.
If that does not help, look in the code of the emulator.
Title: Re: [QUESTION] You are in the wrong zone.
Post by: kojak488 on December 20, 2012, 10:04:38 am
Boy I feel like an idiot.  I even looked specifically at that field.  It wen't completely over my head.  That solves the zone requirement at least so thanks for that.
Title: Re: [QUESTION] You are in the wrong zone.
Post by: schlumpf on December 20, 2012, 10:13:21 am
For copying it, just copy the spell entry in spell.dbc and copy the code for dropping the object in the spell scripts of your emulator.
Title: Re: [QUESTION] You are in the wrong zone.
Post by: kojak488 on December 20, 2012, 10:21:20 am
Spell scripts in the emulator code rather than the spell_scripts in the DB?  Editing the emulator code is going to be a bit above me.  Thanks for sending me in the right direction though!
Title: Re: [QUESTION] You are in the wrong zone.
Post by: schlumpf on December 20, 2012, 12:25:38 pm
The script for silithus world pvp is at https://github.com/TrinityCore/TrinityC ... rPvPSI.cpp (https://github.com/TrinityCore/TrinityCore/blob/master/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp" onclick="window.open(this.href);return false;) and https://github.com/TrinityCore/TrinityC ... oorPvPSI.h (https://github.com/TrinityCore/TrinityCore/blob/master/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h" onclick="window.open(this.href);return false;).

In case you want to do exactly the same, just copy that and replace everything related to silithus with your own stuff. (and add the script to the build system etc).

If you don't want  world pvp, you need to do the script by yourself and most likely different.