Commit graph

334 commits

Author SHA1 Message Date
Schmoozerd
ae7348f6b0 [12774] Merged cmangos last changes, special thanks for xfurry, Dramacydal, cala, Schmoozerd,
I'm not taking any credits of this commit.

Implement spell effects 62042, 62278 and 64767
Also limit the targets for 62577 and 62603
----------
Update git_id to reflect recent sql formatting changes
----------
Update to a safer code version and also add GO caster scenarios
----------
Allow aura 62038 to stack at every 3 seconds
----------
Improve handling of TargetMMGen
This will have impact on Chase and Follow Movement.
----------
* Refactor code to check if a new position is required for the MMGen into the new function RequiresNewPosition
* Refactor code to get the current targeted distance into function GetDynamicTargetDistance
* Change ChaseMMGen (angle = 0.0f case) chase to best contact point, not zero angle.

Thanks to Cala and X-Savior for testing. Special thanks to cala for also suggesting improved values for the magic numbers
----------
Improve ObjectPosSelector
Now a spot already occupied by the searcher will be prefered
----------
Get rid of bounding radius in GetNearPoint[2D] and ObjectPosSelector
----------
This changes how ObjectPosSelector is used.
It changes the way how the functions Object::GetNearPoint and Object::GetNearPoint2d behave.
----------
So you need to check all places where these functions are used if they are still used correctly.
----------
Especially check your scripts!
----------
Remove not required duplicate indexes
----------
Implement TARGET_92 as TARGET_SUMMONER
This target is used only as TargetA and the related spells are used only by temporary summoned creatures
----------
Implement some spell effects used by Hodir in Ulduar
Dummy spells 62797, 63499, 63545 and 64543
Periodic dummy auras: 61968, 62038, 62039 and 65272
Limit targets for spells: 62797, 63545, 64543, 62476 and 62477
----------
Implement some spells used at Algalon encounter
Spell aura entries 64345, 62018 and 64412
Positive target exception for spell 64996
Aura stacking exception for spells 62169, 62168, 65250 and 64417
----------
Implement effect for spell 63633
----------
EventAI - Ingame output of script state
----------
With this the command .npc aiinfo will give more output about the current state.
Remark that this output is only given if the LogFilter for EventAIDev mode is disabled
----------
FindGit.cmake already ships with CMake
No reason for us to ship it too. Also, we had an outdated version which
had not been used anyway, because we set the include path in such a way,
that the CMake delivered version is always found first.
----------
FindOpenSSL.cmake already ships with CMake
No reason for us to ship it too. Also, we had an outdated version which
had not been used anyway, because we set the include path in such a way,
that the CMake delivered version is always found first.
----------
EventAI - Add more developing error output
----------
Fix some target-type handling for EventAI
Also increase log-output for bad target-types
----------
Fix crash due to bad compiler (author Xfurry)
----------
Add special condition id for Ulduar
Will be used to check the availability of the siege vehicles for players
----------
Update spells 62374 and 62907
* limit spell targets of spell 62374
* implement spell effect for spell 62907
----------
Remove effect for spell 64503
Will be handled in script library. For details please check 8502cdfa64
----------
Implement spells 64489 and 64673
Both are used by Auriaya (Ulduar)
----------
Implement some spells for Ignis the Furnace Master
Spell entries: 62717, 62381, 62488, 62707, 64475 and 64503
----------
Implement spells 61187 and 61190
----------
CMake: generic way to build a script library
Added new parameter INCLUDE_BINDINGS_DIR which can be set to the name of a
folder inside src/bindings/.

Includes the script library in src/bindings/ with the defined name.
The name must correspond to the name of the folder and the folder must contain
a valid CMakeLists.txt

Note: if you currently use a script library, you will probably get a merge
problem on src/bindings/CMakeLists.txt as you will have modified this file
manually. Please use the new version of this file and rerun CMake once with the
parameter -DINCLUDE_BINDINGS_DIR=ScriptDev2 (if you are not using SD2 but
another script library, replace ScriptDev2 with the name of the folder in
src/bindings/).

If you do not use a script library you should not have any merge problems
and you don't need to do anything.
----------
Add CMake source groups to target 'game'
This is the exact same grouping as it is currently in the VC 2012 files.
These groupings will have to be refactored at some point as they are not
very logical.
----------
Add CMake source groups to target 'framework'
This is the exact same grouping as it is currently in the VC 2012 files.
This is part of cmangos/issues#67
----------
Add CMake source groups to target 'shared'
This is the exact same grouping as it is currently in the VC 2012 files.
----------
Add new parameter 'expansion' to command 'account create'
----------
Update some Sunwell Plateau spells

Limit targets and allow positive effect for spell 46650
Implement effect for spells 46289 and 46637
Remove effect for spell 44845 - will be handled in script library
----------
Implement some custom use for Effect Activate Object spells
This will fix the summoning events for the Wind Stones, Ice Stones, Skettis bosses and quest 11865
----------
Sync mangos.sql with other versions
----------
Redump sql databases to unify formatting
The main reason for this was because classic/cata has updated the sql formatting and manually syncing would be a pain so redumping from master->tbc->classic->cata is easier.

Only the formatting was changed. The values were not changed at all.

mysqldump was used however manual modifications had to be done.

Dump the database:
C:/mysql/bin/mysqldump.exe mangos > sql/mangos.sql

Split insert values into multiple rows:
Replace "),(" with "),\n("
Replace "VALUES (" with "VALUES\n("

Remove the character sets by replacing them with an empty string

Custom formatting of mangos.sql:
Move db_version to the very top
Create all dbscripts_on_* tables based on dbscripts_on_creature_movement
Preserve our custom insert formatting of spell_affect (tbc/classic), spell_bonus_data, spell_chain, spell_elixir, spell_proc_event, spell_proc_item_enchant, spell_template, spell_threat
Remove autoincrement values from insert values of pet_name_generation and remove AUTO_INCREMENT=261 value from its table structure

Custom formatting of characters.sql:
Move character_db_version to the very top

Custom formatting of realmd.sql:
Move realmd_db_version to the very top
----------
Immediately remove corpses when ForcedDespawn is used
Thanks to Neotmiren for pointing, special thanks to cala for testing!
----------
Fix use of config values related to quest-status and level
This fixes use of negative value in config values Quests.LowLevelHideDiff and Quests.HighLevelHideDiff
Also add some documentation around the related code
Thanks to Neotmiren for pointing and to cala for testing.
----------
Loot-System: Fix reference loading check
This fixes a false error output for loot references that are only used with spell loot.
Thanks to X-Savior for properly reporting both error messages and use case
----------
Add missing spell 61437 to playercreate spells for bloodelves
Thanks to NeatElves for porting from TC and pointing to this
----------
Fix load bar step for alendarMgr::LoadCalendarsFromDB
----------
Cody Style Improvements
Also remove an unused variable (thanks to Den for this!)
----------
Implement the spells used in the Chess Event encounter
Combat spell entries: 37775, 37824, 39338, 39342, 39341, 39344, 45260
Melee spells: 37142, 37143, 37147, 37149, 37150, 37220, 37227, 37228, 37337, 37339, 37345, 37348
Chess movement spells: 30012, 32312, 37388, 30284, 37144, 37146, 37148, 37151, 37152, 37153
Aura stacking exception: 32261 and 39400
----------
And more hotfixes with these format strings
----------
Hotfix to recent text loading functions
----------
Use possible changed model names with vmap extraction
----------
Fix some warnings
----------
Store how many texts are loaded for validity checks. Use this with EventAI
----------
EventAI: Use generic DoDisplayText and loading of additional text data
----------
Add generic DoDisplayText function and use additional data of dbscripts table
----------
Add const-correctness to Text related functions
----------
Add database changes to support more data for DB Script texts
----------
Add stacking exception for spells 39993 and 40041
----------
Allow spell effect 86 - Activate Object to use the misc value
----------
Allow player pets to swim
----------
Enable resummoning of warlock pets
----------
Do not remove FLY auras on Evade
Also consider npcs which have SPELL_AURA_FLY as being able to fly
----------
EventAI: Improve code
* Drop rather pointless bool to check if the number of assigned events is empty
* Before the phase was resetted on death if and only if the npc has Events defined
* DoMeleeAttackIfReady could have been called even though combat state could have changed while processing events
----------
EventAI: Implement ACTION_T_SET_THROW_MASK (46)
This Action can be used to set which AIEvents should be thrown automatically, if you need more flexibility, you can always use the manual ACTION_TH_THROW_AI_EVENT version.
* Also clean some error-log output a bit.
----------
Forward original caster GUID to script library
----------
Fixup commit 12511 Thanks to Zakamurite for pointing
Also thanks to him for giving a helping hand in correcting the commit
----------
Implement some spells for Felmyst encounter
Spell entries: 45714, 45717 and 45918. Limit targets of spell 45391
Also add stacking exception for auras 45068 and 45582
----------
Fix invisible spirit healers & such on death near them
This fixes an issue that occurs if you die close to a spirit healer/guide.
----------
Fix take ammo for most ranged spells
Fix spells like Arcane Shot not taking ammo while they should
----------
Check cast spell 51690
----------
Fix SpellDamage modifier of SPELL_AURA_MOD_DAMAGE_DONE_CREATURE
This aura modifies a flat value, not a percent value.
----------
Implement proc effect of spells 67712, 67758
related to items 47316, 47477.
----------
Improve proc of spell 50421
----------
Add and implement server-side spell 23770
----------
EventAI: Improve TargetSelection related ErrorLog output
----------
DBScripts Engine: Change behaviour to search for a different npc when using buddy-search
With this an npc buddy will be interpreted as "another npc with entry"
Also toggle command 31 - TERMINATE_SCRIPT to also look only for other npcs of entry
----------
DBScripts Engine: Allow pets as buddy
Add new flag SCRIPT_FLAG_BUDDY_IS_PET (0x20) that will search not for a normal npc with buddy-search, but also for pets
----------
DBScripts Engine: Support buddy search by guid
* Add new `data_flags` flag SCRIPT_FLAG_BUDDY_BY_GUID (0x10)
If this flag is set, the content of `search_distance` is interpreted as db-guid of the requested buddy
* Also switch most error log output to DB-error log output (though this will include false positives)
----------
2020-02-17 09:20:48 +00:00
Schmoozerd
c7a07a7dc6 [12676] AI-Event throwing and receiving implementation
Add new AI hooks to
* SendAIEvent (either around the npc, or to a specified npc)
* ReceiveAIEvent (hook to receive sent events)
2020-02-17 09:20:25 +00:00
billy1arm
c94dbc84c2 [m] Lots of Doxygen fixes/additions - thanks to lfxGroove 2020-02-17 08:59:03 +00:00
billy1arm
ef445ea523 [12632] Revert previous commit (see Notes) 2020-02-17 00:54:15 +00:00
Dramacydal
1cd806c02e [12631] Use uint32 for phaseMasks in core and database 2020-02-17 00:41:55 +00:00
Schmoozerd
dc3de04d62 [c12616] Simplify use of CombatReach 2020-02-17 00:24:44 +00:00
Schmoozerd
ecb5342ed8 [c12602] Reorder handling in Creature::SetDeathState(JUST_ALIVE) case 2020-02-17 00:12:55 +00:00
Schmoozerd
93c35f034d [c12591] Add support for the Rabbit Day 2020-02-16 23:46:09 +00:00
Cyberium
f34e07ae9f [c12577] Avoid creature not respawning when not looted. 2020-02-16 23:19:53 +00:00
Schmoozerd
a27787851c [c12537] Update Authorship information
(based on commit [12388] - 037f217)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
2020-02-16 21:27:46 +00:00
Schmoozerd
a05738717a [c12536] Happy New Year 2013
Update authorship information and prepare for easier ways next year

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12325] - b7dbcda)
2020-02-16 21:25:01 +00:00
Yaki Khadafi
832f9b1a46 [12209] Update mana regen to 4.x
Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
2020-02-16 20:42:27 +00:00
stfx
c8814791e1 [12153] Remove unneeded InBattleGround() as it is already checked by GetBattleGround()
Also call OutdoorPvP handlers before instance script ones
2020-02-16 20:41:31 +00:00
Shyax
5d2dda2e2c [12130] Fix more warnings. close #5
* 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>
2020-02-16 20:41:07 +00:00
evil-at-wow
6fa6eb24a5 [12125] Fix some warnings
* Fix compiler warnings "warning: no newline at end of file" (Linux/GCC).
* Fix compiler warnings "warning: '<class>::<member>' will be initialized after <class>::<member>" (Linux/GCC).
* Fix compiler warnings "warning: unused parameter '<param>'" (Linux/GCC).
* Fix a signed/unsigned warning

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2020-02-16 20:41:02 +00:00
rsa
de95d1d480 [12123] Move BattleGround code to separate BattleGround directory. Also some corrects to unload BG's 2020-02-16 20:40:57 +00:00
Yaki Khadafi
6dd0ba1d14 [0169] Implemented vendors selling currencies.
Also fix crash from recent master merge.

Signed-off-by: Yaki Khadafi <ElSolDolLo@gmail.com>
2020-02-16 20:33:11 +00:00
Yaki Khadafi
3f0db2fbda [0161] Merge mangos changes. Author: @kid10
Fix some corresponding opcodes

Signed-off-by: Yaki Khadafi <ElSolDolLo@gmail.com>
2020-02-16 20:26:20 +00:00
kid10
56674de682 Unify changing movement style for Units 2020-02-16 20:06:46 +00:00
Schmoozerd
7e70e39b9b [12104] Fix some bugs, thanks to LordPsyan for pointing
* Fix an inconsistence between comment and code for model selection
* Improve the macro from recent commit to work with stricter gcc preprocessors
* Fix a bug that caused a crash for not loaded outdoorPvp scripts
2020-02-16 19:33:36 +00:00
Xfurry
e955c3bc8f Add Outdoor PvP handlers to various files 2020-02-16 19:05:40 +00:00
stfx
27fefb1e96 [0062] Send SMSG_DEFENSE_MESSAGE, SMSG_ZONE_UNDER_ATTACK only to players outside of instances
Also remove team argument from SendDefenseMessage as all texts are sent to all teams, use seperate function to send zone attack message, cleanup some send message functions and remove deprecated send text functions
2020-02-16 08:29:01 +00:00
Salja
22bfaa12b0 Mage 400 INTO master/434
Signed-off-by: Salja <salja2012@hotmail.de>
2020-02-16 01:59:51 +00:00
Machiavelli
21a3ee9267 [12079] Remove some redundant explicit NULL checks for pointers before delete or delete[] calls since this check is done implicitly when deleting
Signed-off-by: stfx <stfx@hotmail.de>
2012-08-03 14:30:18 +02:00
Schmoozerd
835d1c7479 [12069] Cleanup comment style 2012-07-22 14:39:31 +02:00
Schmoozerd
e32b9953a1 Cleanup Operator padding 2012-07-20 17:38:23 +02:00
Schmoozerd
c5c09cee3c Various Cleanups (game C-E) 2012-07-19 21:45:58 +02:00
Schmoozerd
0e0a765312 [12026] Replace std containers of ObjectGuids with some predefined types
Based on patch by stfx

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-07-03 18:47:05 +02:00
Schmoozerd
01b6c6b8f4 [12019] Various changes
* Add some const correctness
* Remove unused Unit::isHover() function
* Help compiler optimize code from last commit (thx to vladimir)
2012-06-25 14:54:00 +02:00
Schmoozerd
fb3a990b13 [12017] Add support for getRace() of creatures. Thanks to vladimir for input 2012-06-24 19:40:36 +02:00
stfx
f153193a02 [11951] Unify loot related code and fix engrish.
Also readd the m_groupLootId check in case the StopGroupLoot will be called from other places

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-04-12 17:16:37 +02:00
Schmoozerd
5506b22b38 [11884] Fix missing cast from changes of 11880
Thanks to Rog360 for pointing

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-01-24 23:15:21 +01:00
Schmoozerd
71bdb8e5b6 [11880] Ensure that db saved values and values in memory are in sync
This fixes db-errors for npcs with random movement added with .npc add command.
Patch inspired by NoFantasy and MasterTomas
2012-01-20 02:58:42 +01:00
faramir118
eca3586d74 Fix some combat behaviour of NPC-Pets
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-01-20 00:42:59 +01:00
Schmoozerd
8068dcf6dd [11875] Update Copyright notice to year 2012
Start timemachine and a Happy new year to all!
2012-01-16 17:43:59 +01:00
PSZ
f9a259dc44 [11850] Add additional flag SELECT_FLAG_NOT_IN_MELEE_RANGE
this allows to select targets that are not in melee range with SelectAttackingTarget

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-11-28 16:33:40 +01:00
Schmoozerd
2166621df0 [11843] More improvements to LoadCreatureAddon, Thanks to Shauren and Vladimir for pointing 2011-11-08 18:40:49 +01:00
Schmoozerd
62c4f5e6bf [11842] Add spell difficulty selection for creature*_addon auras
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-11-07 21:48:45 +01:00
Schmoozerd
fbdd79141c [11827] Implement Creature Linking via database
Thanks to Silverice for feedback!

This system interprets the content of the table `creature_linking_template`. To trigger different actions on different events of the npcs that are linked together.
Possible event/ action combinations can be taken form the flags in CreatureLinkingMgr.h::CreatureLinkingFlags
2011-10-16 13:04:58 +02:00
SilverIce
6edfcea7f0 [11826] remove no more needed CORPSE_FALLING state, move FallGround method to more appropriate place 2011-10-16 04:42:31 +03:00
SilverIce
70a6a1ce76 [11825] Implement creature offhand attack. based on patch from maxxx2021
also drop some archaic Unit's code
2011-10-16 00:01:06 +03:00
SilverIce
59f8716542 [11820] implement OrientationFixed splineflag, correct OrientationInversed flag meaning. Add possibility to play landing, liftoff animation at arrive. Thanks to TOM_RUS for AnimType research 2011-10-14 14:50:00 +03:00
SilverIce
df0715284f [11819] move SetActiveObjectState to WorldObject level 2011-10-13 20:08:49 +03:00
SilverIce
012be82c86 [11818] update creature's unit part(update spell events, auras, movement) while in death. thanks to rsa for making tests
this allows us update creature's death persistent auras, fall died creatures in natural, non hacky way

also fix the bug that creature starts waypoint movement not from begining at respawning. thanks to Grz3s for reporting
2011-10-13 15:44:12 +03:00
Schmoozerd
9c70637333 [11817] Improve db error log output for *_addon auras
This clearifies that a problem is caused by already applied auras and not double aura in *_addon table.
The double spell entry as well as the invalid spell are filtered on load.

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-10-11 17:52:11 +02:00
Schmoozerd
0eff04c161 [11793] Add more features to SelectAttackingTarget
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-09-16 20:35:26 +02:00
MaxXx2021
de54e63f7a [11781] Set walking as a default creature movement mode
Signed-off-by: SilverIce <slifeleaf@gmail.com>
2011-08-12 18:13:34 +03:00
VladimirMangos
3e0cacbdaf [11743] Fixed auction crash in case missing localization for only some items
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.
2011-07-19 02:34:16 +04:00
SilverIce
a7fba67225 [11732] Interrupt movement state at dying
TODO: proper solution would be update creatures while in corpse state.
This also would solve problems with death persistent auras that not get updated for died creatures
2011-07-10 22:17:08 +03:00
SilverIce
fc0eb7e9fa [11721] Simplify walk/run movement mode selection code 2011-07-08 19:30:00 +03:00