* Remove warning: format '<format>' expects type '<type1>', but argument has type 'size_t'
* Remove warning: statement has no effect
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
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>
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>
Added commands are:
.mmap [on|off] to show state of mmaps, or to enable/disable mmaps globally
.mmap stats to show information about current state of mmaps
.mmap loadedtiles to show which tiles are currently loaded
.mmap path to calculate and show a path to current select unit
.mmap loc to print on which tile one is
.mmap testarea to calculate paths for all nearby npcs to player
Authorship goes to qsa in addition
Source crash in missing locale strings array size check before access
to it in locale structure.
Also move repeating code for access to wide used localization string arrays to ObjectMgr functions.
Spline movement controls movements of server-side controlled units (monster movement, taxi movement, etc).
Proper implementation of effects such as charge, jump, cyclic movement will rely on it.
However, need improve our states system before.
Technical changes:
1. Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
2. Precission increased. There are no more position desync issues since client's position calculation formulas used.
3. Now possible to move by paths with multiple points, send whole path to client.
* New command allow place auction from chat/console and create auction without owner.
* Same code can be used in other place when server code want create generated auction
without need have associated player. Auction code update for support this case.
* MailDraft::SendMailTo now allow "send" mails to non-players. It correcly drop items in like case.
Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.
Please _not_ add new uint64 storages (local and in structures) for guid values.