This will assert controlled behaviour when loading a `gameobject_template` entry of type Capture Point with bad data
Patch improved by stfx
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>
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>
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>
* Moved actual script processing code to ScriptMgr
* Unifed and improved log output. Now table-name is passed to each script execution
* Added the "buddy concept" to all commands (except the outdated direct field change commands):
Now all commands support to search a creature (or go for some commands) in a radius, with which to do some stuff.
See doc/script_commands.txt for more details and information
Attention DB Devs:
Current DB-Scripts are converted automatically as far as possible, but some old target selecting mechanics were not reasonable to do automated.
For such cases the command is marked with data_flags & 0x10 (==16), which will throw DB-Errors to track them down faster
Thanks to NeatElves and especially Grz3s for testing!
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Remove the actually not required faction check in Player::GetNPCIfCanInteractWith - this is done by IsHostileTo a line before
Improve the Player-login AtWar selection to also consider forced reactions
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Add options 1/ 2 in second argument to check if a quest is INCOMPLETE/ COMPLETE, default will behave like currently
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
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.
This cleanup small code and let catch some missing check cases
when 0 guid attempt searched by real DB query.
This also make function call more safe if it used with non-player guid by
some reason.
Item spells with this trigger mode expected casted at item add
to inventory/equip slots (exclude bank), and spell auras (if any)
applied while item in like slots. Item expected destroyed at aura
remove by some reason.
Implementation note: because 2 step way item moves from slot to slot
related auras not removed at internal RemoveItem call and removed only
at directly item destroy/remove from player function calles, or at StoreItem
(if item added to not appropriate slot). So need in future careful with new
RemoveItem call cases.
Example: items 44623->44625->44627 convertion chain
* New table `item_enchantment_template` store original->final item pairs
Original item must have duration setup.
* Small change in GetItemConvert for consistence (now 0 returned if no convert pair instead original entry id)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Rename barGoLink -> BarGoLink as expected by mangos code style
* Add uint32/uint6 constructor versions for BarGoLink,
and remove lot casts required before for BarGoLink use
* Show race/class specific min level in trainer list (for weapon master for example)
and use it for check spell traing possibility.
* Hide for specific race/class some spells marked by flag ABILITY_SKILL_NONTRAINABLE
This possible in cases when spell available for race/class but learned from talent/etc
and then don't must be show for race/calss pair in trainer list. Single case in 3.3.5a.
* Add to code tables for profession ranks for seelct correct rank related reqlevel
and check DB side data for it. Note: DB reqlevel values redundant for profession rank
spells now.
* Use for reqlevel selection (if DB value not provided) learned spell insteed cast-spell
spellLevel field. This let in more cases select training reqlevel without provided DB value.
For LogFilter_DbStrictedCheck = 0 mode output data about like redundant reqlevel values
in traner tables.