Commit Graph

20834 Commits

Author SHA1 Message Date
Chaouki Dhib
0fb133013c Core/Movement: Correct distance checking
Distance checking should always be in 3D, independently on if the mover has the ability to fly or not.
2018-02-28 13:40:41 +01:00
Treeston
9fc6b13027 Core/Creature: Temporarily let Creatures violate dynspawn assumptions for pooled creatures. This should fix startup crashes until I can investigate and find a long-term fix. Tag #21519. 2018-02-27 22:10:36 +01:00
Treeston
3eab2d7efc Core/Creature: Add another aggressive compatibility mode assertion to catch faulty dynspawn code. 2018-02-27 16:18:38 +01:00
ariel-
c9b730c767 Core/Globals: use proper type for smallint 2018-02-26 16:13:03 -03:00
Treeston
ec916db294 Core/VMap: Use fuzzy equality and gridmap tolerance for floor-finding. Closes #21338. Supersedes #21479. 2018-02-26 18:11:29 +01:00
Treeston
e79c595b69 Core/VMap: Add outdoor state to Map::GetFullTerrainStatusForPosition. Add WorldObject::IsOutdoors, basic member access.
Ref #21479.
2018-02-26 17:40:40 +01:00
Treeston
71b5ed6832 Core/Threat: Fix taunt logic relying on unspecified behavior by unordered boost heap iterators. Use ordered iterators instead, this is cheap for our use case anyway. This will make taunt behave consistently again.
Closes #21499.
2018-02-26 00:10:21 +01:00
ariel-
34967e9c32 Core/GameObject: implemented gameobject_overrides table to change faction and flags values on a per-spawn basis
Updates #20957
Closes #20958
2018-02-24 20:57:55 -03:00
ariel-
02739c2cbb Core/GameObject: kill uninitialized, unused field from GameObjectTemplateAddon struct 2018-02-24 19:33:46 -03:00
ariel-
98d6258efd Core/Entities: kill unused return value from Unit::HandleSpellClick
- AI hook will now receive the result by copy, as modifying it had no effect
- Some renaming: result->spellClickHandled, clickPair is actually clickBounds, the clickPair is the pair <creatureID, SpellClickInfo>
2018-02-24 15:52:09 -03:00
Treeston
bb04fbcbe8 Core/Log: Clean up some log output to include spawnId instead of lowguid. 2018-02-24 19:46:27 +01:00
jackpoz
16b5f39de6 Core/DBUpdater: Code cleanup 2018-02-24 14:54:42 +01:00
jackpoz
ff04121c83 Core/DBUpdater: Fix error message
Fix error message when trying to populate the database showing free'd memory data instead of the sql file name
2018-02-24 13:09:00 +01:00
ariel-
83292cd983 Core/Auras: check conditions against referer caster, just as spells do
Closes #21492
2018-02-24 02:55:49 -03:00
Treeston
0850b5ff39 Core/SmartScripts: Rename SMART_ACTION_RESPAWN_TARGET -> SMART_ACTION_ENABLE_TEMP_GOBJ, since that's the only thing it still does in the dynspawn model. Adjust body accordingly to warn on misuse. 2018-02-24 02:26:35 +01:00
Treeston
9f92896c52 Core/GameObject: Force compatibility mode for stupid ridiculous junk legacy hack gameobjects, ref 27e7906. 2018-02-23 19:58:22 +01:00
Treeston
27e7906814 Core/GameObject: fix stupid ridiculous junk legacy hack code with negative gobj respawn time to work again 2018-02-23 19:52:56 +01:00
ariel-
1074a9b053 Core/Scripts: remove hack that caused aura to not be applied and saved twice on owned auras, causing an error on save
- This is handled by group stack rules actually
- Also reset removed aura counter when cleaning removed auras

Closes #21486
2018-02-23 13:16:42 -03:00
Treeston
691c67f0be AI/SmartAI: New SMART_ACTION_RESPAWN_BY_SPAWNID (hi kilyana) 2018-02-23 03:20:03 +01:00
Treeston
94b5d9bfa1 Core/Spawning: Actually check spawn group state before processing a respawn. It feels like that is something that should've been noticed at some point.
Also remove CreatureScript::CanSpawn since nobody uses it, and spawn groups do the same thing.
2018-02-22 20:31:42 +01:00
ariel-
3753ec5647 Core/Scripts: apply resilience on Vampiric Touch and Unstable Affliction dispel effect
- Spell with SPELL_ATTR4_FIXED_DAMAGE won't do it by itself to avoid applying resilience twice, but because those are triggered from a periodic aura, those apply resilience on tick, not saved to amount.
- This is one of the cases where you have to call Unit::SpellDamageBonusTaken directly

Closes #21393
2018-02-22 02:37:00 -03:00
ariel-
7cff1b540c Core/Auras: restrict target map update only to area auras as player requires to have auras registered on load
Closes #21472
2018-02-22 01:35:01 -03:00
ariel-
fc678bb3c2 Core/Unit: clear charmed/possessed state before returning client control. Works like a charm
Closes #21471
2018-02-21 23:24:25 -03:00
ariel-
640dd138a5 DB/Spells: fix proc regression with Missile Barrage
Closes #21466
2018-02-21 10:33:50 -03:00
ariel-
eb7d22d23e Core/Vehicles: fix crash
- Aura could be removed in Unit::SetCharmedBy (StopMoving->Relocate->ProcessTerrainStatusUpdate->RemoveAurasWithInterruptFlags)
- By not passing AuraApplication parameter execution continued with a removed application leaving vehicle in a invalid state (m_sharedVision not empty)

Closes #18281
2018-02-20 19:34:58 -03:00
ariel-
ba27711145 Core/Entities: unit states cleanup
- Added new UNIT_STATE_FOCUSING for creature focus system, this will stop creatures adding/clearing the UNIT_STATE_CANNOT_TURN mask (eg UNIT_STATE_STUNNED if stunned while focusing a spell)
- Added UNIT_STATE_CHARMED that gets set/removed on any charm type (UNIT_STATE_POSSESSED is only for possess as it's name suggests)
- The new states are checked against mask to know whenever client needs to regain character control

Closes and fixes #21460
2018-02-20 17:34:12 -03:00
DDuarte
3945a010d2 Core/DBUpdater: Improve message when base SQL file is missing
(cherry picked from commit 844755aa07)

GCC build fix

(cherry picked from commit a15985edc6)
2018-02-18 16:23:47 +00:00
jackpoz
e482d9f303 Core/Spells: Revert SPELL_ATTR2_IGNORE_ITEM_CHECK to unknown
Revert SPELL_ATTR2_IGNORE_ITEM_CHECK to unknown, too many spells unrelated to items have this attribute and the current handling was causing exploits with "Mote of Water" and other elements.
Fix #19547
2018-02-18 12:20:25 +01:00
Wilcalaf
2dd5735bd9 Scripts/Nexus: Fixed a rare bug when sometimes Magus telestra managed to die while invisible preventing players from looting. (#21436) 2018-02-17 23:02:58 -03:00
jackpoz
db5c9867e2 Core/Misc: Add PERFORMANCE_PROFILING CMake option
Add a new CMake option called PERFORMANCE_PROFILING that should be used only when profiling the performance.
This option is unsupported, do not report any issue happening when enabling this option.
2018-02-17 23:29:34 +01:00
jackpoz
572eab1c35 Core/Misc: ASSERT() cleanup
Move some functions calls out of ASSERT() calls. ASSERT() should only apply checks without modifying any object and without having any side effect.
2018-02-17 23:26:50 +01:00
sirikfoll
076bd11002 Scripts/Icecrown Citadel: Prevent Lady Deathwhisper movement during first phase. 2018-02-17 20:11:37 -02:00
ariel-
1ac87b6c60 Core/Auras: fixed Drain Mana breaking early if caster has Mana Feed talent but no active pet 2018-02-17 17:50:05 -03:00
ariel-
a6673f6aa7 Core/Scripts: implement Drain Mana breaking some auras on hit
Updates #20234
2018-02-17 17:46:38 -03:00
Cannix
7e71b4535a Core/Spells: Execute item casts immediately instead (#21396) 2018-02-17 16:46:26 +01:00
Wyreth
56874b44f0 Core/Entities: remove grid-wide visibility from setActive and implement another method for it (#20725) 2018-02-17 15:09:54 +01:00
jackpoz
d3d0640a8d Core/Misc: Fix static analysis issues
Fix static analysis issues reported by Coverity
2018-02-16 21:39:52 +01:00
Jeremy
9e0faace9a Core/Entities: Reduce the probability of units dropping under the map (#21322)
Reduce the probabilty of going under the map
2018-02-16 20:59:19 +01:00
Killyana
8aa10f6c65 Core/SAI: Move enum to the correct file 2018-02-16 18:39:50 +01:00
ariel-
5b4287e683 Core/Events: update holiday code and remove misleading log (event date is the one from game_event)
- add siign to DBC struct member CalendarFilterType as it was being used as such
- kill localtime usage as it's deprecated

Closes #18542
2018-02-16 03:02:10 -03:00
ariel-
7dc78d8e3f Core/Scripts: implemented Fungal Decay & Tail Sting
Refs #18542
2018-02-16 00:54:53 -03:00
ariel-
ab1aa8e384 Core/Scripts: fix Glyph of Renew interaction with Empowered Renew
- Get actual ticks from aura, because glyph reduces them by 1
2018-02-16 00:54:53 -03:00
ariel-
5f38b92340 Core/Auras: remove obsolete check that was preventing some auras to proc even if they met conditions otherwise 2018-02-16 00:54:53 -03:00
Keader
f609589e22 Scripts/Ulduar: Fixed amount of Mole Machines in Razorscale 10 man 2018-02-16 00:03:40 -03:00
Killyana
ca4f1e334a Core/SAI: Add an action_param3 to "summon gob" to control when the object will despawn
0 - For despawn when creature dies or time runs out
1 - For despawn after time
Closes #11601
2018-02-16 02:19:19 +01:00
Treeston
789f3c5d37 Scripts/TotC: Reduce Twin Val'kyr berserk timer from 10 minutes to 8 minutes on normal mode (match DBM). This closes #15367, no matter what ccrs' bong says. 2018-02-16 00:13:43 +01:00
ariel-
29f7258dc8 Core/Spells: prevent creatures to focus channeled spells without SPELL_ATTR1_CHANNEL_TRACK_TARGET
- Creatures stuck here wouldn't try attacking because of this
- Remove one workaround in halion script, now it's unneeded

Ref #11311
2018-02-15 17:50:15 -03:00
ariel-
a36be9ebdb Core/Auras: skip target map update for one world tick if owner is not yet in world
Closes #21426
2018-02-15 13:53:41 -03:00
Gooyeth
42a11e97d5 Scripts/Commands: add AI/ScriptName to .gobject info (PR #21419) 2018-02-15 16:11:28 +01:00
Treeston
4da9321d2b Core/Combat: Unify combat permitted checks between CvC and PvC - only require "not friendly" in all cases. Fixes Yogg-Saron encounter. Closes #21380.
Also some bonus cleanup to Yogg's script to make transition cleaner.
2018-02-15 12:23:05 +01:00