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
MitchesD
e40d4e6f16
Scripts/Spells: fix logic fail in q9874
2014-03-22 10:04:43 +01:00
jackpoz
9e99db035f
Core/Misc: Fix some static analysis issues
...
Add some asserts and additional NULL checks as sanity checks.
2014-03-21 22:47:58 +01:00
Shauren
ada0598bb0
Core/Transports: Fixed creatures micro movement on transport when attacking something (fixes interrupting melee animation)
2014-03-21 21:11:20 +01:00
Aokromes
33316bde38
Merge pull request #11747 from untaught/Trinity1
...
Core/Scripts: Move 'The Defias Traitor' script to SAI
2014-03-21 00:55:49 +01:00
Aokromes
bcf6edd50b
Merge pull request #11749 from untaught/Trinity2
...
Core/Scripts: Move condition for 'npc_marin_noggenfogger' gossip menu op...
2014-03-21 00:55:30 +01:00
Aokromes
9ad8c32e3d
Merge pull request #11757 from untaught/Trinity3
...
Core/Scripts: Move 'npc_deathly_usher' scripts to SAI.
2014-03-21 00:53:55 +01:00
Aokromes
a9121c6038
Merge pull request #11746 from untaught/Trinity0
...
Core/Scripts: Move condition for 'npc_skorn_whitecloud' gossip menu opti...
2014-03-21 00:53:12 +01:00
Shauren
0c3633e775
Core/GameObjects: Added workaround for elevators having different position for every player
...
Closes #11504
2014-03-21 00:32:03 +01:00
jackpoz
4c27c83efa
Core/Misc: Fix some static analysis issues
2014-03-20 21:34:05 +01:00
untaught
8a9bfbba48
Core/Scripts: Move 'npc_deathly_usher' scripts to SAI.
2014-03-20 20:29:06 +02:00
Shauren
46ccb1d15e
Core/Creatures: Added check for creature_equip_template.id = 0. 0 is a special value telling core to unequip all items
2014-03-20 11:46:17 +01:00
untaught
f59eabdf8f
Core/Scripts: Move condition for 'npc_marin_noggenfogger' gossip menu option to DB and remove 'npc_marin_noggenfogger' script
2014-03-19 18:43:39 +02:00
untaught
38c33f687c
Core/Scripts: Move condition for 'npc_skorn_whitecloud' gossip menu option to DB and remove 'npc_skorn_whitecloud' script
2014-03-19 12:12:59 +02:00
Gacko
4bcbcf53d8
Core/Script: Logical fixes
2014-03-19 10:05:02 +01:00
Gacko
42d53d9891
Core/Game: Logical fix
2014-03-19 10:04:28 +01:00
Gacko
a762f72adb
Authserver: Fix typo
2014-03-19 09:49:22 +01:00
untaught
c31ffd774e
Core/Scripts: Move 'The Defias Traitor' script to SAI
2014-03-18 08:31:23 +02:00
Dehravor
7401ab7eab
Core/Loot: Fix an exploit that allowed players to loot infinite amount of items that have condition(s)
2014-03-17 18:46:17 +01:00
Aokromes
f8938c2092
Merge pull request #11718 from untaught/master
...
Instance Script/Stratholme: Correct logic in Baron Run event and add SAI...
2014-03-16 21:40:35 +01:00
Shauren
69fb9642a3
Fixed build with TRINITY_DEBUG
2014-03-16 21:22:31 +01:00
Shauren
263c5cacf4
Core/Maps: Fixed height calculations used in WorldObject::UpdateGroundPositionZ/WorldObject::UpdateAllowedPositionZ, they will now take vmaps into account.
2014-03-16 20:13:25 +01:00
Shauren
f0f4a620fb
Core/Transports: Added support for DynamicObjects on transports
2014-03-16 20:00:09 +01:00
jackpoz
f26a028d97
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.
2014-03-16 14:18:33 +01:00
untaught
5f7e0f6929
Instance Script/Stratholme: Correct logic in Baron Run event and add SAI for Ysida Harmon
2014-03-16 08:47:27 +02:00
jackpoz
a1aa4547b3
Scripts/Krikthir the Gatewatcher: Fix EVENT_ANUBAR_CHARGE event not being triggered
...
Fix EVENT_ANUBAR_CHARGE not being triggered due to value 0 being set to the EVENT_ANUBAR_CHARGE enum, even if 0 is a special value for EventMap to specify no event was triggered.
Issue added in a127c0e1a7
2014-03-15 20:08:55 +01:00
jackpoz
e30b471f8e
Scripts/AhnKahet: Fix some uninitialized values
...
Initialize all class fields in the constructor, even if they are set in Reset() and they shouldn't be accessed before Reset() is called.
This fixes 2 Coverity reports.
2014-03-15 20:04:59 +01:00
jackpoz
3b247f6bca
Scripts/ZulGurub/Jeklik: Add missing "break"
2014-03-15 19:45:44 +01:00
jackpoz
61c9891d6a
Core/Gossip: Fix crash added in 6c64fa8de3
...
Fix NULL dereference crash caused by a typo in 6c64fa8de3
2014-03-15 19:30:55 +01:00
Rochet2
6c64fa8de3
Core/Gossip: Add security to C++ scripted gossip options by checking guid of the object that the player is interecting with. Idea by @LilleCarl
...
Closes #11567
2014-03-13 20:27:11 +01:00
Rochet2
cfdd9421d2
Core/Gossip: Change max menu items to 32
...
Tested and a gossip menu can show max 32 items on a menu.
When sending 40 options: http://puu.sh/7rqb6.jpg
2014-03-12 10:20:26 +02:00
Shauren
5221bd8c10
Core/Items: Fixed an exploit allowing people to put more gems than number of sockets on items.
...
Closes #11652
2014-03-10 12:58:03 +01:00
Discover-
6f1005ad94
Core/Misc: Get rid of whitespaces added in 96e0a7d71f
2014-03-10 06:54:24 +01:00
Warpten
d4416c0439
Merge pull request #11627 from Rochet2/OnPlayerSave
...
Core/Players: Call sScriptMgr::OnPlayerSave inside Player::SaveToDB rather than before calling it.
2014-03-09 21:51:57 +01:00
Rochet2
1f98435fda
Update Player.cpp
...
Dont trigger save hook on player create
2014-03-09 22:23:48 +02:00
Warpten
96e0a7d71f
Merge pull request #11666 from kontownik/scripting_project
...
Core/Scripts: Introduce ItemScript::OnItemRemove, called when an Item is actually destroyed.
2014-03-09 20:19:23 +01:00
jackpoz
ba28b16d2e
Scripts/TheStormPeaks: Possible crash fix
...
Apply safe NULL checks added in 7d881a0739 to similar code in same script
2014-03-09 17:17:12 +01:00
jackpoz
d357597270
Scripts/Commands: Fix crash in ".kick" command
...
Fix a NULL dereference exception happening when using .kick command caused by a strtok(NULL) call without a previous call to the string to be tokenized.
Issue added in 101cad1f28
2014-03-09 17:09:15 +01:00
kontownik
91850fa9e4
Core/Scripts: New ItemScript trigger, OnItemRemove
2014-03-03 22:18:47 +01:00
joschiwald
3a40d8a887
Core/Player: delete queststatus (weekly/monthly/seasonal) on deleting character thx @Expecto
...
- also rename some prepared statements
Closes #11658
2014-03-02 00:00:39 +01:00
jackpoz
d5d2805771
Core/MMAPs: Replace an assert with error log
...
Replace an assert in PathGenerator::BuildPolyPath() about invalid poly reference with an error log.
Fixes #11493 .
2014-02-27 21:03:57 +01:00
jackpoz
61890bce7c
Scripts/Onyxia Lair: Fix debug assertions about iterators
2014-02-26 21:44:51 +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
50e0c39f84
Core/Battlegrounds: Fix invalidated iterator crash
...
Partially revert e1bee86ee6 and restore 9ba3d07fc2 to store battleground queues as std::list instead of std::deque because deque::erase() invalidates all iterators.
2014-02-23 20:43:37 +01:00
Shauren
81618fb9e9
Merge pull request #11642 from Dehravor/group-state
...
Core/Group: Fix online state when member logs out
2014-02-23 13:44:53 +01:00
jackpoz
f7bc86a17c
Core/MMAPs: Update recast
...
Update recast from https://github.com/memononen/recastnavigation/commit/1be9de72d87dcfdecf6bea30f5461745f7d7afe6 to https://github.com/memononen/recastnavigation/commit/740a7ba51600a3c87ce5667ae276a38284a1ce75 .
This differs from https://github.com/TrinityCore/TrinityCore/commit/aa645683b8b25bfb35cb977678daf5c56c1531e6 because it includes a fix https://github.com/memononen/recastnavigation/commit/77ebf643531c90ea712b496e23c48f0b0671f43d which correctly extract tile connections when using rcMergePolyMeshes(), used by mmaps_generator.
MMAPs version is now set to 5.
Re-extract MMAPs using mmaps_generator , any old extracted MMAPs will not work.
2014-02-23 12:39:16 +01:00
Dehravor
fb90e13fe6
Core/Group: Fix online state when member logs out
2014-02-23 11:54:46 +01:00
Rochet2
b90f07dcb0
Core: Trigger OnSave hook for PlayerScript on all save events
2014-02-19 20:44:58 +02:00
Duarte Duarte
27d69cfcc8
Core/Chat: Fix BuildChatPacket calls so scripts that use OnPlayerChat can actually change the text
...
Closes #11625
2014-02-18 17:34:41 +00:00
Ascathor
c223b88da2
Core/LFR: Fix a theoretical error with item_level
...
Despite the check never happening (player->GetAverageItemLevel() < 0 is impossible), it is more efficient.
Also improves codestyle consistency. Original fix by @emsy.
2014-02-17 01:22:45 +01:00