Commit Graph

413 Commits

Author SHA1 Message Date
dkmbasura
08b2cf6cba Scripts/The Barrens: Make BIG WILL attackable in quest id 1719 (the affray)
Closes #13072
Ref #4764
2014-09-09 22:57:57 +01:00
Nyeriah
8907904757 Scripts/Onyxia Lair: Slight change so we don't call Reset() in the 'ctor 2014-09-08 18:02:06 -03:00
Nyeriah
e181af1b1c Scripts/Onyxia Lair: Some small improvements to GUID storage as it's only used locally 2014-09-08 17:10:46 -03:00
jackpoz
df7f188cfe Core/Misc: Refactor scripts to fix static analysis warnings
Fourth batch of fixes targeting 100 issues reported by Coverity
2014-09-07 20:12:54 +02:00
joschiwald
ef9b4aea5e Core/InstanceScript: refactored load and save methods 2014-09-07 00:42:14 +02:00
Duarte Duarte
4e9a976829 Merge pull request #13008 from mik1893/onyxia
Scripts/Onyxia Lair: small rework
2014-09-05 21:55:29 +01:00
jackpoz
6df2ff5efa Core/Misc: Refactor scripts to fix static analysis warnings
Third batch of fixes targeting 100 issues reported by Coverity
2014-09-05 22:44:24 +02:00
mik1893
87ed5de7e6 Scripts/Onyxia Lair: small rework
- fix crash on boss death
- avoid abusing during phase switch
- added better facing through trigger
- corrected some timers
- corrected inhabit type
- cleanup and inheriting some BossAI functionalities instead of custom stuff
2014-09-04 18:08:09 +02:00
DDuarte
430b3adfe8 Scripts: Correct despawn time of multiple objects
WorldObject::SummonGameObject respawn time is in seconds and not milliseconds
2014-08-26 13:37:55 +01:00
jackpoz
7fe7f30521 Core/Misc: Fix some -Wconversion warnings 2014-08-23 19:56:41 +02:00
joschiwald
ccfa82e7d5 Core/Creature: update creature_template and some other small things
http://www.trinitycore.org/f/topic/9572-creature-damage/
2014-08-14 16:09:14 +02:00
jackpoz
8402570bb8 Scripts/Misc: Fix static analysis issues
Replace CAST_AI() macro with ENSURE_AI() when dynamic_cast is not supposed to return NULL.
2014-08-09 00:12:20 +02:00
Vincent-Michael
24a14979fe Scripts/BloodmystIsle: Fix StartUp Errors 2014-07-29 20:16:37 +02:00
Dr-J
6a6351d98c Update razorfen_downs.cpp 2014-07-28 23:41:17 +01:00
DDuarte
3de1714350 Scripts&DB/Feralas Convert npc_screecher_spirit to SAI
SAI by @Rushor and gossip by @malcrom

Closes #12630
2014-07-24 16:38:18 +01:00
untaught
3009bb4808 Scripts/Darkshore: Fix an issue with the quest Gyromast's Revenge
TODO: Rewrite the script in SAI

Closes #11987

Signed-off-by: DDuarte <dnpd.dd@gmail.com>
2014-07-24 15:18:04 +01:00
Rushor
79c83dc4db Scripts/Feralas: Make Screecher Spirit disappear after clicking on them
This is a temporary solution, the script should be rewritten in SAI

Closes #12298

Signed-off-by: DDuarte <dnpd.dd@gmail.com>
2014-07-24 03:25:32 +01:00
jackpoz
3388587b7a Core/Misc: Replace rand() calls with SFMT 2014-07-22 21:43:19 +02:00
Subv
dfdc19f3bc Merge branch master into boost
Conflicts:
               BattlegroundMgr.h
2014-07-13 16:52:38 -05:00
Aokromes
5f1b52acf4 Remove github fuckup 2014-06-24 06:35:42 +02:00
Aokromes
41eb262172 Script/Dustwallow mars: Remove no longer needed script 2014-06-24 06:33:44 +02:00
Sebastian Valle Herrera
36102bea64 Merge pull request #12039 from Trisjdc/creature_ai_talk
Core/CreatureAI: Implement CreatureAI::TalkToMap for all your map-wide talking needs
2014-06-05 10:50:23 -05:00
jackpoz
1083dbb993 Core/Misc: Remove Unit::Get* wrappers for ObjectAccessor::Get* 2014-05-20 21:21:33 +02:00
Shauren
f9c7bb4171 Partially revert f296095191 "Fix various warnings. The core, the scripts and the tools now compile without warnings with -Wall -Wextra -pedantic."
Visual studio does not support constexpr
Made semicolon after "Prepare*Script" mandatory - workaround for dumb IDEs inserting extra indentation level after newline
2014-05-18 12:50:10 +02:00
Praetonus
f296095191 Fix various warnings. The core, the scripts and the tools now compile without warnings with -Wall -Wextra -pedantic.
-Fix warnings from -Woverflow on implicit constant conversion.
-Fix warnings from -pedantic.
-Fix warnings from -pedantic.
-Fix warnings from -Wformat.

Two minor changes in addition :

-Replace a defined value equal to 2^31 - 1 by std::numeric_limits<int>::max().
-Remove useless null-check on pointer returned by new. New doesn't returns nullptr on failure, it throws std::bad_alloc.
2014-05-15 21:32:47 +02:00
Trisjdc
106c54cf25 Core/CreatureAI: Implement CreatureAI::TalkToMap for all your map-wide talking needs. Could also replace Battleground::SendChatMessage 2014-05-09 10:19:44 +01:00
Dehravor
cbd36d5a4e Core/Misc: Remove remaining COMPILER_HAS_CPP11_SUPPORT related macros 2014-05-01 11:19:32 +02:00
Dehravor
24ae6a6802 Core/Misc: Remove obsolete C++11 backward compatibility macros
OVERRIDE, FINAL, DELETE_MEMBER
2014-04-29 16:35:11 +02:00
joschiwald
84bff76ba0 Core/Misc: remove some obsolete parameters 2014-04-28 20:05:36 +02:00
MitchesD
0c0d0ed9e5 Scripts/Azuregos: converted to EventMap and WorldBossAI 2014-04-28 19:52:08 +02:00
jackpoz
2585e799f9 Core/Misc: Change how Position struct is retrieved
Update Position::GetPosition() and similar methods signatures to reflect 2a4c9bcaf9 changes by return a Position object instead of accepting a Position parameter by reference.
2014-04-25 21:19:30 +02:00
jackpoz
fb6365ac68 Core/Misc: Check GetVictim() for NULL before dereferencing it
Add additional NULL checks all around the code before dereferencing GetVictim() result.
Keep in mind UpdateVictim() result has nothing to do with GetVictim() result and the caller shouldn't assume anything about GetVictim() based on UpdateVictim().
2014-04-20 00:38:25 +02:00
jackpoz
8ca6371793 Core/Misc: Ensure GetVictim() returns a valid reference when expected
Add a new method EnsureVictim() which asserts a valid not NULL reference will be returned to the caller. Use this whenever the GetVictim() would be dereferenced .
2014-04-19 21:48:22 +02:00
jackpoz
0930482fa4 Core/Misc: Fix uninitialized values
Fix Position members not being always initialized.
Valgrind log:
 at : Position::NormalizeOrientation(float) (Object.h:388)
 by : Position::SetOrientation(float) (Object.h:315)
 by : Position::Relocate(Position const&) (Object.h:310)
 by : spell_ulduar_stone_grip::spell_ulduar_stone_grip_AuraScript::OnRemoveVehicle(AuraEffect const*, AuraEffectHandleModes) (boss_kologarn.cpp:592)
2014-04-02 20:42:46 +02:00
Vincent-Michael
0b615ec159 Scripts/Misc: Small code optimizations 2014-03-29 20:58:49 +01:00
jackpoz
8c44259fae Core/Misc: Fix some static analysis issues
Fix uninitialized values, most of which are false positives, always initialized before being accessed.
Add some asserts and additional NULL checks as sanity checks. Use SpellMgr::EnsureSpellInfo() if the spell id is valid and always supposed to return a valid not-NULL SpellInfo* .
2014-03-27 21:43:59 +01:00
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
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
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
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
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
jackpoz
61890bce7c Scripts/Onyxia Lair: Fix debug assertions about iterators 2014-02-26 21:44:51 +01:00
Vincent_Michael
46e1b93c2b Scripts: A lots of changes here and there (maybe useless?!?) 2014-01-23 22:54:01 +01:00
joschiwald
d6c5307a81 Scripts/Spells: use new hook in some spellscripts 2014-01-23 20:55:47 +01:00
Vincent_Michael
101ac7f511 Misc: Minor cosmetic changes here and there 2014-01-21 20:20:38 +01:00
w1sht0l1v3
c18fd0378d Core/Scripts: Fix the cleanup in 54dbf870b8. 2014-01-19 03:20:36 +02:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
jackpoz
64b42c75d2 Scripts/Misc: Code cleanup
Remove some NULL checks not needed anymore after 3744c14184 .
Fix an invalid Creature to TempSummon cast.
2013-12-30 23:36:49 +01:00
jackpoz
3744c14184 Scripts/Misc: Ensure Creatures are in instances when required
Create ScriptedAIs that require a InstanceScript reference only if the InstanceScript exists, so if these Creatures are in an instance. ScriptedAIs that don't require a InstanceScript reference have not been modified.
This fixes many possible NULL dereference crashes happening when spawning a scripted Creature outside of an instance.
Fixed a GetOwner() and a ToPlayer() NULL dereference crashes too.
2013-12-29 01:19:52 +01:00