* Remove unused MoveRandom function
* Add MotionMaster::MoveRandomAroundPoint function
* Toggle DB-command COMMAND_MOVEMENT to be able to move around current position or respawn position (depending on data_flags)
Note: It seems that atm a bunch of spells are broken, that had seem to work before.
There will follow up a few more changes to spell targeting, so please report issues you find.
Implementation based on original work by fallenangelX, thx to stfx for bumping the topic
Implements spells:
* 28859 (used for normal summer festival flames)
* 29126, 29135-29139, 46671, 46672 (used for city summer festival flames)
Also reorder a few dummy effects.
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
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>
* Add special field markers to fill a column in SQLStorage with default values
* Add a safeguard to DBCStorage::EraseEntry, Add helper function DBCStorage::InsertEntry to store content
Note: If required similar adjustments to DBCStorage might be reasonable if required
* 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