Commit Graph

410 Commits

Author SHA1 Message Date
Nyeriah
04cfcf523d Scripts/Auchindoun: Update Talon King Ikiss' script to EventMaps
Codestyle

Missing include
2014-08-30 18:43:50 -03:00
Duarte Duarte
10dfe19f9c Scripts/BladesEdge: Fix a typo introduced in 430b3ad
Thanks @Nihilianth
2014-08-26 15:10:58 +01: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
joschiwald
bc42c48d97 DB/Spells: added a few spells to spelldifficulty_dbc 2014-08-26 04:35:37 +02:00
jackpoz
7fe7f30521 Core/Misc: Fix some -Wconversion warnings 2014-08-23 19:56:41 +02:00
MitchesD
d109fc0d7c Scripts/SteamVault: Hydromancer Thespia rewritten to BossAI 2014-08-22 16:34:18 +02:00
Dr-J
9f7075215d Remove Manaforges CPP Script
Remove script
2014-08-12 13:36:21 +01: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
jackpoz
3388587b7a Core/Misc: Replace rand() calls with SFMT 2014-07-22 21:43:19 +02:00
Shauren
7532864264 Buildsystem/MSVC: Warning fixes
C4800 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4127 conditional expression is constant
2014-07-17 15:42:57 +02:00
Subv
dfdc19f3bc Merge branch master into boost
Conflicts:
               BattlegroundMgr.h
2014-07-13 16:52:38 -05:00
joschiwald
7b3141bfde Scripts/Gurtogg:
* fixed bloodboil targeting
* fel rage should only hit players

Closes #12193
2014-06-15 17:41:42 +02:00
Gacko
d2d1b97cff Script: Minor optimization in spell_unlocking_zuluheds_chains 2014-06-08 15:56:28 +02:00
Gacko
26370223a0 Script/Shadowmoon Valley: Remove hack in npc_shadowmoon_tuber_node.
This script will be converted to SAI (if possible) later.
2014-06-01 19:39:57 +02:00
Gacko
8ef34535a4 Scripts: Remove unused variables (kept as comment) 2014-06-01 19:34:34 +02: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
Dehravor
24ae6a6802 Core/Misc: Remove obsolete C++11 backward compatibility macros
OVERRIDE, FINAL, DELETE_MEMBER
2014-04-29 16:35:11 +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
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
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
w1sht0l1v3
2df3fe3a00 Core/Scripts: Fix quest The Totem of Kar'dash alliance version.
Remove some hungarian notation for horde side version.

Closes #11035
2014-02-01 19:07:48 +02:00
Vincent_Michael
46e1b93c2b Scripts: A lots of changes here and there (maybe useless?!?) 2014-01-23 22:54:01 +01:00
Vincent_Michael
516a6344fe Misc: Fix warnings 2014-01-22 07:31:37 +01:00
Vincent_Michael
101ac7f511 Misc: Minor cosmetic changes here and there 2014-01-21 20:20:38 +01:00
zengwf
23acf75d3b Core/Movement: Add LOS check for fleeingmovement target point.
Prevents fleeing or feared units from going to upper floor ignoring walls/ceilings with mmaps on(and usually get stucked).

Current implementation just randomly selects a distance and angle against the frighting unit, when in narrow circumstance such as underground caves, such targeting point would be at another floor.

Closes #11300
Ref #9475 (needs fixed confirmation)
2014-01-12 00:33:33 +00:00
joschiwald
6fff9d08b2 Fix build 2014-01-09 23:31:52 +01:00
joschiwald
e80d1f3465 Scripts/BloodFurnace:
* cleanup InstanceScript
* fix broggok poison cloud

Scripts/Naxxramas/Grobbulus:
* fix poison cloud
* fix mutating injection
2014-01-09 23:17:02 +01: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
5c64dade0f Scripts/Misc: Fix uninitialized values
Fix uninitialized values in scripts reported by valgrind.
Fix target and GetOwner() NULL dereferences .
2013-12-29 23:01:00 +01:00
jackpoz
90c63e4818 Scripts/Misc: Fix uninitialized values
Fix uninitialized values in scripts reported by valgrind.
2013-12-29 16:05:31 +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
jackpoz
9b88a789e6 Scripts/Blood Furnace: Fix crash in Broggok script
Fix a NULL dereference exception in Broggok npc id 17380 script, happening when spawning it outside of an instance.
Fixes #11344
2013-12-25 19:17:44 +01:00
Malcrom
fe95371d9a Core/Scripting: Replace casted with cast as casted is not a word. 2013-12-25 14:16:55 -03:30
Malcrom
b8e626199c Scripting/Multi: Some cleanup. 2013-12-24 17:56:38 -03:30
Malcrom
9d2d4ba921 Scripting/Hellfire: Moved some gossip to db and fix some magic numbers. 2013-12-24 12:15:41 -03:30
joschiwald
fd6167cf66 Scripts:
- cleanup obsidian sanctum script
- prevent yelling texts if non player died in some scripts
2013-12-23 23:55:15 +01:00
Malcrom
59eca906ef Scripting/Blades Edge: Moved gossip to db for Overseer Nuaar and Sai'kkal the Elder. 2013-12-23 11:19:21 -03:30
Shauren
107af52853 Core/Chat: Refactored building chat packets
* Moved everything into one specialized method instead of being scattered all over the place
* Allow localizing creature names in chat messages (when using $N)
* Send SMSG_GM_MESSAGECHAT for gm messages
2013-12-23 14:23:49 +01:00
Malcrom
5055a8fde4 Scripting/Bloodmaul Brute: CombatAI moved to cpp for quest 10512. 2013-12-22 14:41:37 -03:30
Malcrom
0b7a9a4559 DB/Misc: Three more creature moved to SAI only. 2013-12-19 22:14:24 -03:30
Malcrom
57332e1d3e DB/SAI: Scripted all ogres in Blades Edge Mountains.
Sorry I had to remove the awesome cpp script.
2013-12-19 16:28:08 -03:30