Commit Graph

20165 Commits

Author SHA1 Message Date
ariel-
a409287fef Core/Vmaps: build fix 2017-06-08 18:45:12 -03:00
Shauren
cfb0f9fb19 Core/Vmaps: Fixed getting map height near large gameobjects like LK platform
Updates #19865
2017-06-08 21:39:56 +02:00
Golrag
a2c123b529 Core/Maps: Corrected GetWaterOrGroundLevel (#19863)
* When a gameobject was above water like in ToC. It would return water level
2017-06-08 19:25:26 +02:00
jackpoz
f9cfc202e9 Core/Scripts: Simplify code
Partially revert 753e7074d8 and 12c680f9b1 to simplify the code and to only remove GMs from the target list.
2017-06-08 19:07:13 +02:00
kelno
f5fd0b5ef3 Core/Misc: Fix typo in UNDERWARER_INDARKWATER (#19864) 2017-06-08 18:07:01 +02:00
ariel-
753e7074d8 Core/Scripts: filter out corpses from Sindragosa's Fury targetlist
- This would incur in a crash after attempting to convert the Corpse object into Player

Closes #19227
Closes #19862
2017-06-08 12:33:10 -03:00
treeston
e5301e2c98 Fixed a potential crash when resuming a SplineChainMovementGenerator. 2017-06-08 15:34:53 +02:00
Treeston
f6c849729b [3.3.5] Get zone/area IDs from vmap data in the liquid update (#19840)
* Add new method Map::getFullVMapDataForPosition to get area info and liquid info in a single vmap lookup
* Use this lookup in Map:: relocation methods to update m_areaId and m_zoneId fields on WorldObject
* Adjust GetZoneId/GetAreaId on WorldObject to always return these cached fields
* Clean up liquid state handling on Unit and Player
* Hand floor's Z coord up through GetFullTerrainStatusForPosition, use it to update a new field in WorldObject, and use that to feed a new GetFloorZ call on WorldObject.

Closes #16489
2017-06-08 00:25:06 +02:00
Treeston
1660bb7d27 Pet/Guardian AI hook re-organizing (#19824)
* Pet/Guardian AI hook re-organizing:
- Adjust OwnerAttacked/OwnerAttackedBy hooks on CreatureAI to fire for all owned units, not just player pets. This should allow guardians to more reliably recognize valid targets.
- Kill off the AttackedBy hook. While it was defined in CreatureAI.h as virtual, it was only ever invoked for player pets in specific situations. This makes it classic developer bait.
  - Adjust PetAI to use DamageTaken instead of AttackedBy.
  - Adjust behavior of AttackStart on PetAI to compensate.
2017-06-07 02:33:47 +02:00
ariel-
2335b9de1a Core/AI: segregate GameObject ReportUse from normal Use (lock open/normal click)
Closes #19819
2017-06-06 17:57:04 -03:00
Shauren
47d54bf5e2 Core/Movement: Fixed fall damage when teleporting together with transport
Closes #14672
2017-06-06 22:30:04 +02:00
treeston
cb265e02aa SAI fixes follow-up: I missed one. 2017-06-06 22:24:10 +02:00
treeston
823007934a Fix a whole set of possible infinite loop crashes in SAI (events triggering themselves even with cooldown set). 2017-06-06 22:16:14 +02:00
treeston
b983ec11bd Re-check target evade state on projectile impact and adjust accordingly. This fixes the incorrect message ("Absorb" instead of "Evade"), and also removes the root cause of the original evade follow bug (that was prevented in 1945874). 2017-06-06 19:24:14 +02:00
Golrag
c35793941b Core/VMaps: Fix LoS in Strand of the Ancients (#19847)
Core/Collision: Fixed MOPY chunk flags enum.

Also avoid loading destructible WMOs into vmaps.

VMap re-extraction is required.

Closes #15798.
2017-06-05 16:32:35 -05:00
ariel-
da228fd163 Core/Spell: fix weird DBC data for Elixir of Detect Undead
Closes #19853
2017-06-05 17:09:52 -03:00
Shauren
f59bac4d14 Build fix 2017-06-05 20:00:28 +02:00
Shauren
2639056071 Core/Instances: Fixed and optimized instance id reuse 2017-06-05 19:25:42 +02:00
Keader
672bc29df9 Core/Spells: Allows Dispersion under Freeze (stun by hunter trap) 2017-06-05 12:02:05 -03:00
TecDian
3f34c2f5eb Core/Scripts: simplify speech for DK races quests 2017-06-05 13:21:53 +02:00
ariel-
8188511759 Core/Utils: restored previous behaviour of RandomResize 2017-06-05 03:45:24 -03:00
ariel-
866074b689 Core/SAI: properly validate stored targets when using SmartTrigger and fix a related crash 2017-06-04 16:44:43 -03:00
Keader
abc749034e Core/Spells: Allows Dispersion and Barkskin to be used under death coil 2017-06-03 20:01:57 -03:00
sirikfoll
2984def452 Core/Scripts: Updated Sunwell Plateau instance model 2017-06-03 15:34:47 -03:00
treeston
7c87916f78 clang is dumb 2017-06-03 16:51:32 +02:00
treeston
a3b198c7e1 Some improvements to .debug raidreset command. Now supports heroic difficulty 5-man dungeons and outputs sensible text, as opposed to silently doing (or not doing) stuff. 2017-06-03 16:44:54 +02:00
ariel-
a97439e8d6 Core/SAI: Change SmartScript::GetTargets to return an ObjectList instead of a ObjectList*
Applied the same treatment to GetWorldObjectsInDist

Honestly no idea why the original idea insisted so much
on using pointers. No more missing null checks or deletes.

SmartAI's "ObjectList" is now a std::vector instead of a std::list
because no where it was being used as an actual list.

Original idea by DDuarte :P
2017-06-03 05:21:06 -03:00
Shauren
abac1b34bc Core/Utilities: Rename RandomResizeList->RandomResize as it is no longer restricted to a list
* Also fix gcc build

(cherry picked from commit f097e341f5)
2017-06-03 02:27:48 -03:00
Shauren
ff39c27104 Core/Utils: Changed all Trinity::Containers utilities to work on all container types (including arrays where it makes sense)
* Added MapGetValuePtr to allow writing `if (Val* v = MapGetValuePtr(map, key))`
* Added utility IteratorPair class with begin/end methods and MapEqualRange for use in range for syntax with multimaps

(cherry picked from commit a1e3b54e07)
2017-06-03 02:20:50 -03:00
ariel-
96ee23487f Core/Scripts: moved Wild Growth calculation to script and fixed formula
Thanks ccrs for the formula
2017-06-02 14:13:59 -03:00
ariel-
9c24ec5c96 Core/AI: restore old check forcing PetAI on Pets using SmartAI
includes more template love

Closes #19837
2017-06-02 13:55:38 -03:00
ForesterDev
f9a01c4b69 Scripts/Gossip: fix go_ahune_ice_stone (#19835) 2017-06-02 08:26:03 -03:00
ariel-
d56a28afee Core/Globals: add more AIName and MovementType checks to ObjectMgr
- Ninja fix AI factories (restores prev behaviour of not selecting stuff with PERMIT_BASE_NO)

Closes #19831
2017-06-02 04:17:29 -03:00
Keader
0c6829f7f2 Core/Scripts: Fixed some events that not should triggered by non-players on Illidan encounter 2017-06-01 21:20:55 -03:00
Shauren
0222d9fc1a Core/Groups: Fixed calculating canReset attribute
Broken in d6df19cd99.
2017-06-01 23:17:18 +02:00
Shauren
023d252155 Revert "Core/Groups: fix wrong query for loading group instance data. canReset attribute was calculated in the wrong way"
This reverts commit 0c1dd398bd.

Closes #19745
2017-06-01 23:17:11 +02:00
Keader
ed43883160 Core/Spells: Removed duplicated check again followup 3a0417f712
to send some info to client
2017-06-01 09:08:01 -03:00
Keader
3a0417f712 Core/Spells: Removed duplicated check
unitTarget was checked twice in Spell::EffectTaunt
2017-06-01 09:04:40 -03:00
ariel-
ce3787f190 Core/AI: Factory functions cleanup
- Get rid of fugly void pointers
- Streamlined AI selection code, using Permissible as it should've been instead of harcoded checks on the selector code
- Moved IdleMovementGenerator singleton to factory code
2017-06-01 02:29:20 -03:00
treeston
aeaa8ecfab Fix an issue where CanSpawn would never get invoked on creatures without per-guid script. 2017-05-31 14:03:48 +02:00
treeston
302a039b7c Add another helper to ScriptedGossip.h for resolving listId -> action. 2017-05-30 21:50:49 +02:00
sirikfoll
1cc0458b11 Core/Scripts Properly set Freya's BossState do DONE and avoid some loot exploits
Closes #19823
2017-05-29 19:20:13 -03:00
ForesterDev
dd4ff1fe54 Scripts/Command: implement .debug play music command
Closes #19809
2017-05-29 23:17:49 +02:00
Treeston
69fd6245dc Partial revert of 15a207f, which was causing issues (ref #4943 and #19768). Instead, fix the underlying issue from 15a207f one level further down - Unit::getAttackerForHelper() shouldn't return units that we aren't in combat with (victim can be such a unit for players/player pets, which can startattack from a distance without entering combat). (#19814)
Fixes the following issues:
- Player pets would aggro neutral mobs as soon as they start autocasting (Imp's Firebolt) if they're in react range (due to victim != null, autocast counts as autoattack and sets victim)
- Neutral mobs would randomly evade when aggro switched between targets.

Closes #19768, #19485 and #10921.

(from PR #19814)
2017-05-29 16:39:20 +02:00
ariel-
63e502a67d Core/Spell: in case of immunity, check all effects to choose correct procFlags, as none has technically hit 2017-05-28 18:19:15 -03:00
Treeston
1945874f96 Fix evade issues when a spell hits the target just before evading. (#19815)
- Creatures should no longer get stuck in evade mode following a target if a spell hits the creature just as it's entering evade mode.
- Fixes and closes #4943. Finally.
2017-05-28 17:18:22 -03:00
ariel-
69a1386ddb Core/Pools: fix VS dynamic linking 2017-05-27 21:13:03 -03:00
ariel-
c3d0a3c1a8 Core/Misc: fix some clang 5 warnings 2017-05-27 17:23:05 -03:00
treeston
1c528c30f8 Quickfix a bug introduced by 2f19d97 which prevented GTAoE from being cast. 2017-05-27 21:05:26 +02:00
treeston
b6a4e9f3f9 Instances/Ulduar: Fix a super edge case bug where Algalon would evade if his tank successfully tanked a Cosmic Smash and got knocked up. Shadow priests everywhere rejoiced. 2017-05-27 20:49:24 +02:00