Commit Graph

530 Commits

Author SHA1 Message Date
jackpoz
6dcd8c8545 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about:
- uninitialized values, most of which are false positives, always initialized before being accessed
- unchecked return values
- dead code never executed
- bad formatting leading to wrong behavior

Please ensure EventMap is never used with event id set to 0 or those events will never execute.
2014-03-22 14:54:32 +01:00
jackpoz
272009ebee Core/MMAPs: Add support for raycast
Add an optional parameter "straightLine" to PathGenerator::CalculatePath() which will use raycast instead of path finding and will return only complete path from start to end position.
Implement this new type of path in SPELL_EFFECT_CHARGE , fixing strange behaviors when using Charge with mmaps enabled.
2014-02-24 21:01:50 +01:00
jackpoz
84e73448f2 Core/Spells: Possible crash fix
Get Unit target with the proper method instead of retrieving Object target and then casting it to Unit, possible dereferencing NULL.
Updates #11560
2014-02-06 22:11:06 +01:00
Shauren
d006f4b734 Core/Spells: Fixed AoE damage reduction auras, original patch by @Unholychick 2014-02-04 11:31:13 +01:00
joschiwald
acd46085d1 Core/Spells: drop last leftovers of hardcoded spell target selection and move it into spellscripts
Closes #1719
Closes #3186
2014-01-30 02:40:12 +01:00
joschiwald
fbddda52e7 Core/Spells: move more spells to spellscripts 2014-01-26 02:24:57 +01:00
joschiwald
96060bf007 Core/Spells: move some spells so spellscripts 2014-01-26 01:02:20 +01:00
joschiwald
a5b04e06f7 Core/SpellScripts: Implemeted SpellScript hook OnDestinationTargetSelect to easier modify SpellDestinations 2014-01-23 18:15:59 +01:00
jackpoz
8fcfabe784 Core/Spells: Fix potions cooldown in combat
Fix a cooldown issue related to potions allowing Players in combat to use more than 1 potion in a row, especially with high latency.
This also fixes an exploit about using infinite potions in combat just by skipping the client-side check.
The original implementation c064c2e2e1 was missing a check in Spell::CheckCast() about this particular case since Potion cooldown is added only after the Player goes out of combat.
Fixes #1259 .
2014-01-10 22:39:08 +01:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Malcrom
fe95371d9a Core/Scripting: Replace casted with cast as casted is not a word. 2013-12-25 14:16:55 -03:30
Shauren
a316b86a79 Core/Spells: Prevent adding sockets to items that have 3 sockets in item_template or already had a socket added to them 2013-12-23 14:25:34 +01:00
jackpoz
ca6b9df261 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values.
2013-12-14 19:36:43 +01:00
jackpoz
1c0903e286 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed, while some of them are real issues spotted by valgrind too.
2013-12-14 18:41:26 +01:00
Spp
94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
leguybrush
0a308144a8 Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }. 2013-10-28 14:36:07 -04:00
Shauren
b81bf7d025 Core/Spells: Implemented additional conditions for spells that start cooldown after an event instead of after cast 2013-10-26 14:39:00 +02:00
gerripeach
f8b1b264d1 Core/Spells: Fixed diminishing returns on creatures with CREATURE_FLAG_EXTRA_ALL_DIMINISH
Closes #11073
2013-10-20 12:47:54 +02:00
Shauren
b658c17703 Core/Spells: Fixed summoning players after recent changes 2013-10-05 23:59:52 +02:00
Shauren
a368fae588 Core/Players: Fixed issues with incorrect targets being selected for spells 2013-10-03 17:07:25 +02:00
Nay
7776016106 Core/Quests: Remove CastedCreatureOrGO method
- Remove EAI's ACTION_T_CAST_EVENT and ACTION_T_CAST_EVENT_ALL
- Remove SAI's SMART_ACTION_CALL_CASTEDCREATUREORGO
- Split QUEST_TRINITY_FLAGS_KILL_OR_CAST into QUEST_TRINITY_FLAGS_KILL and QUEST_TRINITY_FLAGS_CAST
- Assign QUEST_TRINITY_FLAGS_CAST to all the quests that were using RequiredSpellCastX
- (unrelated) Fix a warning in Player.cpp
- Replace CastedCreatureOrGO usage in scripts by KilledMonsterCredit

TODO: Convert the two EAI scripts commented out in the .sql to proper SAI

Closes #10667
2013-08-30 19:32:08 +01:00
Nay
78786c7b54 Core&Scripts: Fix clang compiler warnings 2013-08-27 23:47:03 +01:00
Nay
12973de799 Core&Tools: Fix multiple issues found by a static code coverage tool 2013-08-24 22:57:22 +01:00
Vincent-Michael
9eb01d63bd Core: Fix warnings 2013-08-18 13:54:20 +02:00
Shauren
c52f9aa315 Core/Spells: Refactored SpellInfo::CalcCastTime() to prevent accidental mod charge losses caused by its incorrect usage 2013-08-15 16:37:18 +02:00
joschiwald
e87402dd05 Core/Spells:
- corrected structure of SMSG_PET_CAST_FAILED (fixes highlighted action buttons)
- simplified spell focus check
2013-08-14 15:45:36 +02:00
Vincent-Michael
147c7d5243 Core/Spells: Fix Rogue T10 4P bonus
Closes #4153
2013-08-12 13:04:52 +02:00
Shauren
ac10589eda Core/Misc: Fixed some issues found by Coverity Scan 2013-08-01 21:31:11 +02:00
Shauren
d26afd7703 Core/Spells: Fixed crashes happening with spells that had their dbc targets overriden
Closes #10395
2013-07-29 19:00:34 +02:00
Nay
5463f211b4 Merge pull request #10323 from joschiwald/spellranks
Core/Spells: use SpellInfo class to get spellrank node instead of SpellMgr helpers
2013-07-22 16:28:35 -07:00
joschiwald
2d6a48840c Core/Spells: use SpellInfo class to get spell rank instead of SpellMgr helpers 2013-07-21 13:37:34 +02:00
joschiwald
380cf5d241 Core/Misc: replace (Player*) casts with ToPlayer() 2013-07-21 01:38:21 +02:00
Malcrom
ec474a62e5 Core: More Function Renaming. 2013-06-11 21:25:12 -02:30
Malcrom
66978cfc3b Core: Some function renaming. 2013-06-11 19:54:27 -02:30
Malcrom
047608e7de Core/SAI: Add check so npc will not send text to pet. Also updated isPet() to IsPet(). 2013-06-11 18:39:51 -02:30
Shauren
f8d9a8d2e9 Core/Spells: Fixed fishing broken in a recent commit 2013-06-08 23:11:18 +02:00
Shauren
933f50558b Core/Spells: Fixed channeling spells with infinite duration 2013-05-19 10:55:29 +02:00
horn
0a0698b1d4 Scripts/Ulduar: Yogg-Saron
Known issues:
- encounter doesn't start immediately after you enter the room, you need to go closer
- players standing outside of the room are not turned Insane after 15 seconds
- encounter resets if the last living player is gripped by Constrictor Tentacle or encased in Hodir's Flash Freeze
- Hodir won't freeze multiple players when they die at the same moment
- Flash Freeze missile (64176) won't hit anybody, probably cast too soon (cosmetic issue)
- there are some unused spells, don't know when or why they should be cast
- some spell animations hit multiple players, but they shouldn't do that
2013-05-14 17:52:37 +02:00
Spp
d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
Vlad
78195b3c54 Allow use effectIndex in spell_target_position. 2013-05-13 11:30:48 +03:00
kandera
b44f7cdd23 Core/Spells: fix spell cast on damagable gameobjects Author: LiMCrosS Closes #5810 Closes #5625 2013-04-03 02:12:26 -04:00
Nefarion
49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Shauren
bed73397b6 Core/Spells: Improved facing setting for creature casts 2013-03-03 23:15:54 +01:00
Shauren
6be5bc71eb Core/GameObjects
* Removed long deprecated code for mining nodes (multiple uses, artifact of TBC)
* Made fishing pools generate use count only on spawn (and respawn) instead of randomizing use count on every fishing attempt - prevents early despawning in some cases
2013-03-02 23:59:42 +01:00
Shauren
9301e31a4e Core/Spells: Allow free casting of player's own spells on vehicle seats with flag VEHICLE_SEAT_FLAG_CAN_ATTACK 2013-02-27 13:17:20 +01:00
QAston
e49e470787 Merge pull request #9165 from Phantons/spellFixes
Core/Spells: spell implicit targets fix
2013-02-25 23:08:44 -08:00
Shocker
20e913efa6 Core/Spells: Implement TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT to allow ignoring equipped item requirements on triggered casting 2013-02-25 05:38:34 +02:00
Shauren
d926ad63c0 Core/Spells: Fixed charge effects with non-explicit targets 2013-02-13 20:21:26 +01:00
Phantons
e072ba4f56 Core/Spells: Allow script only one effect with OnObjectTargetSelect or ObjectAreaTargetSelectHandler hooks when target, radius and conditions are the same. 2013-02-09 00:50:22 +01:00
Gacko
745eb9732e Core/Spell: Consider disables for LOS check 2013-02-05 19:39:51 +01:00