Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Miscellaneous => Topic started by: Krang Stonehoof on July 11, 2015, 09:12:17 pm
-
Greetings,
I have a few questions:
Is it possible to spawn a permanent object using spells? For example, the default spell Campfire, it spawns the Campfire object but it lasts for a minute or so.
Is it possible to change the Trinity Core command .gob delete to delete a game object you are hovering mouse with? For example, you have your cursor on that campfire and when you type .gob delete to delete the campfire. Sorry for bad english, I'm doing my best.
Thanks.
-
Is it possible to spawn a permanent object using spells?
No, not permanent, but you can spawn them. Spend time exploring the Spell dbcs a little. Use a Basic Campfire as a template. Find where the DisplayID is defined and the length of the spawn. Then substitute your own data.
When spawning objects with spells, they actually function like map objects. So instead of disappearing at short render distances like gameobjects typically do, they never disapppear and you will never fall through them.
However they will disappear when you restart the server unless you modify the core I think. but Idk how
Is it possible to change the Trinity Core command .gob delete to delete a game object you are hovering mouse with?.
Dunno, doubt it.
-
Check WAYWO thread, someone there was explaining how to make them permanent. Would require some spell code editing probably.
-
I was thinking to make a Lua / C++ Script which change the DB Query from GameObjects every time. For example, it checks every minute if there are new entries into the Gameobject Table and change the duration to -1 to all, except the ones I don't want to be permanent.
Would that work?
But I cannot figure out which row holds the duration / make them permanent.
-
Only already saved objects are in the database.
You should make it so that the default action is cancelled for the spell and then use the spell position and spawn a saved object there.
See the way objects are save spawned from .gob add command.
Many spell scripts work as an example for the spell script part.
You need to hook to the effect and call PreventDefaultAction() or similar function that is a member of the SpellScript class.
-
Hmm, I'm really confused now.
-
Create this small script that works with the spell
http://www.wowhead.com/spell=62743/undercity-banner (http://www.wowhead.com/spell=62743/undercity-banner" onclick="window.open(this.href);return false;)
as an example to save the spawned object to the database.
https://gist.github.com/Rochet2/d6212b5a2289eeac2d56 (https://gist.github.com/Rochet2/d6212b5a2289eeac2d56" onclick="window.open(this.href);return false;)
What it does?
It stops the default behavior and uses the spell's data to make a permanent spawn.