Commit Graph

9541 Commits

Author SHA1 Message Date
jackpoz 9da8123959 Core/MovementGenerator: Add more details to asserts
Implement GetDebugInfo in MovementGenerator, PathMovementBase, FlightPathMovementGenerator, WaypointMovementGenerator.
Add an additional assert in FlightPathMovementGenerator::DoEventIfAny(), the input node must not be null
2019-05-30 19:50:00 +02:00
Wyrserth 88c6c61b95 Core/Script: add script hook to allow overriding of a vehicle passenger's exit position (#23322)
* Core/Script: add script hook to allow overriding of a vehicle passenger's exit position.

* Allow to change orientation, and fix nopch.

* Keep original orientation, thanks jackpoz!

* Update Unit.cpp

Code cleanup

* Update Unit.cpp
2019-05-30 17:35:18 +02:00
jackpoz 7b8f294c02 Core/Channel: Sanitize channel names 2019-05-29 23:02:40 +02:00
jackpoz f0bd90cc35 Core/Channel: Fix CRT Debug Assert triggered with invalid channel names 2019-05-29 21:12:50 +02:00
Giacomo Pozzoni 5d7f0eef6e Core/Movement: Fix assertion triggered in SplineChainMovementGenerator
Fix an assertion triggered in SplineChainMovementGenerator happening when a new generator is added while last spline of the SplineChainMovementGenerator is being processed but is not finalized yet.
Fix #23077
2019-05-29 14:16:20 +02:00
Ovah 635cefc67e Core/Players: out of range group updates will now get sent every 5 seconds instead of as soon as they are available to reflect retail behaivior. (#23323)
* according to sniffs the group update packet for out of range members has a fixed 5 seconds interval instead of spaming packets like crazy for example when updating positions. On 4.x and above this will fix a very nasty and ugly fps drop
* validated with 4.3.4 and 3.3.5 sniffs
2019-05-27 16:37:47 -03:00
Ovah a70845c93d Core/GameObjects: goober gameobjects may reset only if they have a lock id or a reset time specified (#23298)
* Core/GameObjects: goober gameobjects may reset only if they have a lock id

Tests have shown that Goobers without a lock id (Data0=0) are not allowed to reset their go state such as the teleporters in Ulduar and Icecrown Citadel. The tests has been expanded by checking 4.x goobers as well and the perfect example that confirms that result is the Ancient Bell for Atramedes' intro which also is not suposed to reset after using it.

* Core/GameObjects: allow to reset goobers without a lock id if a reset time is defined

* fixed a typo
2019-05-26 21:54:09 +02:00
jackpoz 9e58ef6940 Core/SmartAI: Improve SMART_EVENT_GOSSIP_HELLO
Add another value to event_param1 for SMART_EVENT_GOSSIP_HELLO to support all cases of OnGossipHello/OnReportUse in GameObjects:
- event_param1 set to 0: execute the action for both OnGossipHello and OnReportUse. This might result in the action being executed twice when clicking the GameObject
- event_param1 set to 1: execute the action for only OnGossipHello
- event_param1 set to 2: execute the action for only OnReportUse
2019-05-26 12:44:58 +02:00
Kittnz cf05c3dd2c Core/Weather: Define WEATHER_STATE_DRIZZLE state 2019-05-25 18:17:53 +02:00
Gildor ad89472fe3 Core/Spells: Fix spells with Health Leech effect, now check damage absorb when calculate Heal (#23312)
Closes: #23311
2019-05-24 21:44:26 +02:00
jackpoz 507a56d627 Core/SmartAI: Implement SMART_EVENT_SUMMONED_UNIT and SMART_EVENT_SUMMON_DESPAWNED for GameObject owners 2019-05-24 20:52:54 +02:00
Giacomo Pozzoni 797fba98e9 3.3.5 gameobject summoner (#23289)
* Scripts/Misc: Change IsSummonedBy(Unit*) to IsSummonedBy(WorldObject*)

* Scripts/Misc: Fix build

* Core/TempSummons: Rename GetSummoner() to GetSummonerUnit()

* Core/TempSummons: Add support to TempSummons::GetSummoner() to return GameObject too

* Fix build

* Core/TempSummons: Allow GameObject to be owner of TempSummon

* Core/TempSummons: Add support to SAI for GameObject owner of TempSummon

* Scripts/Misc: Fix no-pch build

* Core/TempSummons: Implement PR comments
2019-05-23 21:08:29 +02:00
jackpoz 457fc22473 Core/SmartAI: Fix SMART_EVENT_SUMMON_DESPAWNED
Fix SMART_EVENT_SUMMON_DESPAWNED not working when event_param1 was set to any value other than 0
2019-05-23 20:54:09 +02:00
Shauren 9dbedb6b64 Core/GameObjects: Validate rotation quaternion at startup
Ref #23306
2019-05-23 20:00:35 +02:00
ccrs e4a1556e09 Core/PetAI: apply some movement related corrections
Unit::StopMoving() is evil, and so is MotionMaster::Clear()

the first can really mess up existing movement generators
the second can interrupt "controlled" movements... can do it literally mid-air
2019-05-19 23:59:52 +02:00
ccrs c826ec0a3c Core/Handlers: apply some movement related corrections
Unit::StopMoving() is evil, and so is MotionMaster::Clear()

the first can really mess up existing movement generators
the second can interrupt "controlled" movements... can do it literally mid-air
2019-05-19 11:58:03 +02:00
ccrs 48208b8dde Core/Handlers: random PetHandler cosmetics & codestyle 2019-05-19 11:55:33 +02:00
ccrs 2b78c70810 Core/Movement: move DelayedAction into MotionMaster and add a couple defines 2019-05-19 11:38:10 +02:00
jackpoz 3828596847 Core/Packet: Clean up packet creation
Clean up packet creation by removing some unneeded checks to specify the exact packet size to reserve.
It's cheaper and easier to just always specify the max size as it's a matter of a few bytes only anyway.
2019-05-18 20:37:18 +02:00
jackpoz a0bd68cf46 Core/Misc: Fix static analysis issues reported by Coverity 2019-05-18 16:12:23 +02:00
Killyana a0d41c314f Spell/Scripts: Add cooldown for Arcano-Scorp spells
Closes #23287
2019-05-18 01:31:41 +02:00
Wyrserth 404c4f8091 Core/Scripts: implement a PlayerScript hook called when a quest's objective receives progress (#23286) 2019-05-17 20:38:15 +02:00
Wyrserth 4d04344b41 Core/Spell: add proper cooldowns to some spells used by vehicles (#23260)
* Core/Spell: add proper cooldowns to some spells used by vehicles, thanks to jackpoz and sirikfoll.

* Add Wing Buffet and Stampy's Stompy-Stomp.

* Add Tag Greater Felfire Diemetradon and Touch of Darkness.

* Rename 9999_99_99_99_world.sql to 2019_05_17_00_world.sql
2019-05-17 12:08:20 +02:00
ccrs 71e7394b74 Build: fix variable order initialization error
fatal error: field 'Action' will be initialized after field 'Validator' [-Wreorder]
2019-05-17 01:13:42 +02:00
ccrs b2b85dedb6 Core/Movement: implement MotionMasterDelayedAction validator 2019-05-17 01:07:27 +02:00
ccrs acbfac7b13 Core/AI: PetAI method reordering 2019-05-17 00:18:09 +02:00
ccrs 74678b247e Core/PetAI: apply some movement related corrections
Unit::StopMoving() is evil, and so is MotionMaster::Clear()

the first can really mess up existing movement generators
the second can interrupt "controlled" movements... can do it literally mid-air
2019-05-16 01:11:13 +02:00
ccrs a4e94dcf6b Core/PlayerAI: apply some movement related corrections
Unit::StopMoving() is evil, and so is MotionMaster::Clear()

the first can really mess up existing movement generators
the second can interrupt "controlled" movements... can do it literally mid-air
2019-05-16 00:44:50 +02:00
ccrs 79b90f9d3a Core/Misc: remove incorrect ClearUnitState calls related to movement
these unit states should never be removed outside motionmaster's handlings
2019-05-16 00:21:09 +02:00
Aokromes 61ba477c77 Core/Creature: equipment_id field on creature table is not working correctly, if it's set to 0 the npc still spawn with the equipement. (#23273)
By Malcrom
Closes #16416
2019-05-15 23:12:38 +02:00
ccrs f309b49eb1 Core/AI: couple movement related corrections in FollowerAI
plus EnterEvadeMode streamline
2019-05-15 22:23:04 +02:00
ccrs d3b8d69e38 Core/AI: streamline FollowerAI::MoveInLineOfSight with SmartAI and EscortAI
plus another method reorganization
2019-05-15 22:04:24 +02:00
ccrs 0e22d61d4a Core/AI: streamline FollowerAI::AssistPlayerInCombatAgainst with SmartAI and EscortAI
plus couple method reorganizations
2019-05-15 21:59:10 +02:00
ccrs fdb71ce19e Core/AI: logs, codestyle & cosmetics standarization 2019-05-15 19:23:28 +02:00
ccrs 0eb5d240fa Core/AI: silence a freaking annoying VS IntelliSense warning 2019-05-15 16:42:28 +02:00
ccrs 179c7da1fc Core/AI: variable naming standarization
plus minimum codestyle changes
2019-05-15 01:33:55 +02:00
jackpoz df7f166e5e Core/Misc: Fix GCC 8 warning 2019-05-11 19:46:23 +02:00
Shauren 3e9239a1e5 Core/Movement: Use correct root check 2019-05-10 23:32:57 +02:00
Shauren 99a9129a72 Core/Movement: Prevent rooted units from falling
* Fixes a client freeze

Closes #23042
2019-05-10 23:30:50 +02:00
brotalnia 49d0a5bbb6 Core/Spells: Return CheckCast result from CastSpell (#23236)
* Return CheckCast result from CastSpell

* Return cast result from UnitAI methods too.
2019-05-10 18:58:26 +02:00
Aokromes cc1a520299 Core/Movement: Fix Warrior's Charge launch visual while jumping backw… (#23243)
* Core/Movement: Fix Warrior's Charge launch visual while jumping backwards

By Natureknight

* fix no-pch
2019-05-10 17:54:54 +02:00
Wyrserth 49dc8a8e44 Core/Quest: improve source item deletion logic for items that give quests (#23250)
* Core/Quest: improve source item deletion logic for items that give quests.

Prevent deletion of items that aren't supposed to be destroyed (like Demon Scarred Cloak).

* Whoops.
2019-05-10 17:49:46 +02:00
Trond B. Krokli 1e97dfec53 Core/Spells: make Four Horsemen debuffs negative (#23253)
By Riztazz
Closes #23248
2019-05-08 15:42:54 -03:00
Killyana ce562415ed Spell/Script: Throw Torch must hit only one target 2019-05-07 21:36:29 +02:00
Wyrserth b76bcc836c Core/Achievement: fix mistake related to ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM. (#23252) 2019-05-07 19:49:25 +02:00
Wyrserth 0a25069db4 Core/Achievement: correctly credit progress for skill-related achievements when learning a new skill. (#23249) 2019-05-07 10:45:37 +02:00
Giacomo Pozzoni 06d8f4dc78 Core/Misc: Fix no-pch build 2019-05-07 09:41:44 +02:00
jackpoz 991b2a11bd Core/Misc: Log Map name in asserts 2019-05-06 21:00:59 +02:00
jackpoz 4130384f2e Core/Misc: Log Spell/Aura name in Spell/Auras asserts 2019-05-06 20:20:10 +02:00
jackpoz 6dae4a747d Core/Vehicles: Fix accessories disappearing on reset 2019-05-05 17:20:10 +02:00