Add exemplarily support for spells 21387(used with Ragnaros) and 62388(related to Demonic Circle)
Further table columns can be added as required.
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
* Implement Target Type 51 as TARGET_AREAEFFECT_GO_AROUND_SOURCE
* Support spells that fill AoE targets based on source location
Thanks to Reamer for discussing these changes
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
* Allow SCRIPT_COMMAND_KILL_CREDIT to give the kill of an involved npc.
This is marked by datalong (creature-entry) == 0
* Remove immediate execution of commands. This will prevent infinite loops when db-scripts trigger db-scripts which are executed immediately
* Add check for SCRIPT_COMMAND_PLAY_SOUND
* Add check to catch an invalid command
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
* Support to script Dummy spells with spell_scripts
* Support to script TriggerSpell spells which have no existing triggered spell
Note that the order which spell-effect actually triggers the DB script is well-defined (SCRIPT_EFFECT before DUMMY before other)
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Now despawn-time will be treated as TEMPSUMMON_DEAD_DESPAWN as expected. Thanks to Xfurry for pointing.
Also make the DB-scripts work only with players on the map. This might affect a few rare scripts, especially related to far-teleport
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Add a new table `gameobject_template_scripts` to start scripts for any type gameobject.
Scripts in this table are triggered for all gameobjects on GameObject::Use
Note: The table `gameobject_scripts` is expected to not be required very much longer, and will most likely be removed someday
Idea for this patch by Klark20 (maybe he also was the author of this patch as well, I cannot check in this moment)
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This fixes to integrity check to report unused gossip_menu entries. Before only menus used by creatures with gossip_menu_items were reported
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Add new column `search_radius` to `creature_linking_template`.
If this column is used (value > 0), master and slave are linked together if and only if they have their respawn coordinates within this range (point-to-point distance calculation)
Note that linked spawning is slower this way and should only be used if required
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
GetAngle can be called for self from very many places, not only DB-errors, hence adding the assert is too strong in the moment
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Tree-like design idea by Faramir118, thanks for that!
* Add `conditions` table to store conditions.
* REPLACE current handling of conditions for the *_loot_template tables
Convert the old conditions in *_loot_template to the new system by SQL-Queries
* ADD support for new conditions to gossip_menu and gossip_menu_option.
If for these tables no condition_id (new system) is provided, the old conditions will still be used
* Add a small helper python script to contrib/convertConditions, see README there for details
* Add new command to reload the `conditions` table (.reload conditions)
* Add two Meta-Condition types CONDITION_AND (-1) and CONDITION_OR (-2) which are used as:
value1 (as condition_entry) AND / OR value2 (as condition_entry)
With these meta-conditions it is possible to create tree like and very complicated combined conditions (like HasAura && (HasItem || HasQuest))
NOTE about conversion:
For easier convertion all the old table data is still preserved, but will be removed eventually (within a circle of the moon approximately)
The python script will not create an optimal initial fill of the `conditions` table. You might want to tweak it manually or suggest some optimized algorithm :)
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Original idea and improved design for this by PSZ, who also implemented spells 66881 (with diffmodes)
Original patch for spells 28241, 54363 by Azerus
Also fix spell 24811
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Thanks to piroy1337 for version of ICC Decimate,
thanks to ZuSe for bumping the issue of missing implementation
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
You can use .cast 11010 and .unaura 11010 instead
Thanks to stfx for improving patch and porting it for us :)
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Some effects or target-combinations might need exception from the generic rule that calculated targets from one effect are used by other effects with same targets.
This will fix bugs that different random targets for different effects are selected, even when they should be the same.
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>