Commit Graph

1582 Commits

Author SHA1 Message Date
ForesterDev
af6d207add Core/PacketIO: update some combat packets to new system (#24236) 2020-03-12 17:06:15 +01:00
NoName
6067a99632 Core/Spell: Proper SPELL_EFFECT_PULL_TOWARDS_DEST implementation for players (#24178)
* Core/Spell: Proper SPELL_EFFECT_PULL_TOWARDS_DEST implementation for players
Closes ##23203 and also reverts 9a1282a

thnx to xvwyh

* Make it optional
2020-03-01 20:15:54 +01:00
ForesterDev
f6e6baa293 Core/PacketIO: update SMSG_EMOTE / CMSG_EMOTE packets to new system (#24200)
* Core/PacketIO: update SMSG_EMOTE / CMSG_EMOTE packets to new system

* Change int32 to uint32
2020-02-28 19:29:05 +01:00
Ovah
6cbfda2fce Core/Units: UNIT_FLAG_PACIFIED will no longer block victim updates (#24190)
* Core/Units: UNIT_FLAG_PACIFIED will no longer block victim updates

* pacified units should only have their melee attacks blocked as counterpart to silence mechanics

* Core/Spells: removed unnecessary attack stop call from pacify aura effect handler
2020-02-28 19:22:25 +01:00
NoName
40542f01e3 Core/Movement: Implement MoveSplineFlag::Enter_Cycle (#24049)
by xvwyh
#22448
2020-02-28 19:03:52 +01:00
Ovah
98d6c501d7 Core/Vehicles: implement vehicle seat addon table to specify seat ori… (#24112)
* Core/Vehicles: implement vehicle seat addon table to specify seat orientation offsets and exit positions in form of offsets or absolute positions
* converted Traveler's Tundra Mammoth to seat addon table data

* first follow batch

* whoopsie

* Core/Vehicles: go from local copies to pointers

* Update and rename 2020_99_99_99_world.sql to 2020_02_08_01_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-02-08 20:47:46 +01:00
Ovahlord
01584cb0b9 Core/Movement: reset position update interrupt info after the interrupt checks have been executed
* for discussion see: 02daf1bf3a (r36916229)
2020-01-22 20:40:09 +01:00
Ovah
02daf1bf3a Core/Movement: properly fix aura interrupts during movement (#24068)
We want our movement to be fully updated before even thinking about interrupting anything. The old logic was updating positions, interrupting stuff and afterwards updating movement generators. This way we were ending up with false interrupts.

properly fixes #22908
2020-01-22 13:32:38 +01:00
NoName
b3b7f0761d Core/Spells: SPELL_AURA_48 implementation (#24054)
by xvwyh
2020-01-17 16:50:50 +01:00
Kelno
2b024e8fbf Fixed PvP Combat timer never getting refreshed (#24058)
* Fixed PvP Combat timer never gets refreshed while meleeing

* Apply Treeston feedback

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-01-14 21:16:23 +01:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
Giacomo Pozzoni
4ccf01de39 Fix fleeing speed to 66% run speed (#24025)
* Core/Movement: Fix fleeing speed to 66% run speed

Fix fleeing speed to 66% run speed until the creature starts returning home

* Fix build

* Don't check speed type

* Don't apply speed reduction twice

* Fix no-pch (1st try)

* Make sure every spell focus is interrupted when seeking assistance
2020-01-01 16:28:33 +01:00
Giacomo Pozzoni
e698c17a26 Core/Movement: Fix wrong orientation set when pausing movement (#23986)
* Core/Movement: Fix wrong orientation set when pausing movement

* Update MoveSpline.h

* Update Unit.cpp
2019-12-29 16:24:53 +01:00
Giacomo Pozzoni
18a4cbee5e Core/Creatures: Fix spell_school_immune_mask being applied against positive spells too (#23999) 2019-12-26 13:58:45 +01:00
ccrs
d033032d33 Core/Movement: delay movement update in MotionMaster until its owner signals AddToWorld
ref #23199
closes #23876
2019-10-21 13:55:23 +02:00
ForesterDev
c03c88d0c0 Core/Defines: define UNIT_FLAG_SWIMMING (#23630) 2019-10-13 17:43:23 +02:00
Gildor
f8d7b26047 Core/Misc: Fix parry-haste mechanic. (#23773)
* Should check victim that do a parry instead of the unit that deal the damage (Wrong implementation of this commit: 4a46fee03e )

Closes #23754
2019-09-07 12:57:02 +02:00
Giacomo Pozzoni
15e85f882f Core/Vehicle: Change vehicle accessories' phase according to the player on the vehicle (#23646)
* Core/Vehicle: Change vehicle accessories' phase according to the player on the vehicle

* Get the root vehicle to set the phase to all accessories.
Attempt to get the accessories to stay mounted on the vehicle.

* Fix the accessories to stay mounted on the vehicle
2019-08-04 11:33:29 +02:00
Wyrserth
0b87dffc35 Core/Spell: honor IsStackableOnOneSlotWithDifferentCasters() when deciding if an aura should stack from different casters or not. (#23579)
Fixes #23387 and #22818.
2019-08-03 09:29:56 +02:00
Ovah
d629bad7a1 Core/Spells: fixed root behaivior of creatures that are being rooted via movement template while getting a root aura removed (#23216)
* Core/Spells: do not allow root auras to bypass the root movement template state when getting removed

* yeah....
2019-08-01 15:40:07 +02:00
Treeston
0b722e23cf Entities/Unit: fix an unrelated check from doing nothing because somebody didn't understand how type-casting works 2019-08-01 01:27:10 +02:00
Treeston
a8b1b9a3c6 Entities/Unit: Add a missing underflow check to prevent really really low damage from underflowing when paired with flat damage modifiers. Closes #23655. 2019-08-01 01:27:10 +02:00
Treeston
9c603ea87f Core/Combat: Properly unset engagement flag on death. 2019-07-31 13:17:32 +02:00
jackpoz
9b292f4369 Core/Spells: Fix infinite loop
Fix an infinite loop caused by a mix of item 25498 and liquid damage
2019-07-28 17:13:48 +02:00
ForesterDev
915f8a9d2c Core/Totems: update select display for shaman totems (#23583)
(cherry picked from commit 8ca6a20e73)

# Conflicts:
#	src/server/game/Entities/Totem/Totem.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Entities/Unit/Unit.h
#	src/server/game/Spells/SpellMgr.cpp
#	src/server/game/Spells/SpellMgr.h
#	src/server/game/World/World.cpp
2019-07-24 23:53:31 +02:00
Treeston
0e7c66cb4c Core/AI: Finally move the "is creature engaged" flag to be a property of the creature AI, where it honestly always belonged. Fixes #17981 and #23602 for real this time. 2019-07-21 01:50:52 +02:00
jackpoz
560b7e3397 Core/MovementGenerator: Add more details to asserts
Include movespline in Unit::GetDebugInfo() and the Player owner in FlightPathMovementGenerator::DoEventIfAny() assert
2019-07-18 20:09:00 +02:00
Wyrserth
5f5d2028df Core/Creature: don't set guardian stats in Creature::UpdateEntry(), because stat calculation from guardians is already done in Guardian::InitStatsForLevel.
Closes #281.

Signed-off-by: Wyrserth <wyrserth@protonmail.com>
2019-07-18 02:20:36 +02:00
ccrs
294a3a2789 Core/Unit: movement related corrections prior to getting Charmed 2019-07-12 20:06:27 +02:00
ccrs
4fa3c04b72 Core/Unit: f869c49 followup
Movement Pause/Clear is already handled in Unit::SetCharmedBy and Unit::RemoveCharmedBy, respectively

TODO: missing PAUSE handling in RandomMovementGenerator
2019-07-07 17:41:36 +02:00
Wyrserth
f869c4969e Core/Vehicle: prevent creature vehicles from following their old movement generator when a player enters them in some cases.
Closes #21731 and #22368.
2019-07-07 17:12:22 +02:00
Wyrserth
12e545f7e2 Core/Conditions: allow spellclick conditions to properly work for aura apply/remove (#23527) 2019-07-05 14:11:15 +02:00
ForesterDev
c44fb37f74 Core/Unit: Implement more helper methods (#23555) 2019-07-05 14:07:35 +02:00
Treeston
f6f1c48aa5 Entities/Player: Clean up client control handling behavior around possession. Mind Control should no longer cause various weirdness. Closes #23539. 2019-07-02 11:58:12 +02:00
ForesterDev
b47bb59e2a Core/Player: add helper methods GetNativeGender/SetNativeGender/SetGender (#23520)
* Core/Player: add helper methods GetNativeGender/SetNativeGender/SetGender and fix some cases, where we should get player gender, instead of modified by display gender

* fix merge

* Add virtual methods for Unit class
2019-07-02 10:17:02 +02:00
ccrs
401777d024 Core/Unit: rename several getters to follow codestyle
uint8 GetLevel()
        uint8 GetLevelForTarget(WorldObject const* /*target*/)
        void SetLevel(uint8 lvl)
        uint8 GetRace()
        uint32 GetRaceMask()
        uint8 GetClass()
        uint32 GetClassMask()
        uint8 GetGender()
2019-07-01 21:36:32 +02:00
jackpoz
de88691e25 Core/Misc: Fix static analysis issues reported by Coverity Scan 2019-06-28 22:18:30 +02:00
Wyrserth
efc999227d Core/Spell: allow damage from binary spells to go through elemental resistance's damage reduction. (#23479) 2019-06-26 18:25:06 +02:00
Aokromes
fe744977c9 Coding standards (#23514)
* Coding standards

* revert part
2019-06-26 08:56:20 +02:00
Treeston
1158f267df Combat/Threat: Split ThreatManager::NotifyDisengaged off from ThreatManager::ClearAllThreat. NotifyDisengaged signifies intent to clear the engagement flag, and should only be called from AI. Fixes #23490. 2019-06-23 23:31:51 +02:00
Treeston
aeed616c22 Entities/Unit: Adjust an overzealous assert to not catch self references, and add the inverse assert too. 396f87c follow-up. 2019-06-23 16:56:15 +02:00
Treeston
f4b06fd0b7 Entities/Unit: Fix an issue where Unit pointers could be left dangling if a channeled Charm was interrupted by a control aura application. Closes #23440. 2019-06-23 16:45:32 +02:00
Treeston
396f87c30d Entities/Unit: Cleanup all the direct accesses to m_unitMovedByMe. Refactor the field to be protected. Add assertions to catch dangling pointers. 2019-06-23 16:44:37 +02:00
Treeston
632a300dd2 Core/Misc: Rename Unit::AttackedTarget to Unit::AtTargetAttacked to match naming scheme for these notifiers 2019-06-23 00:32:59 +02:00
Treeston
dbe3bbefe7 Core/Entities: Kick engagement logic upstairs to Unit (from ThreatManager), since all Units with AI need it (not just those with threat list). Fixes #17981. 2019-06-23 00:32:13 +02:00
jackpoz
c90f789eac Core/Unit: Ignore On Transport spline movements if the Unit isn't on a transport anymore
On Transport splines use coordinates relative to the transport but if the transport is not found anymore than there is no way to get the absolute coordinates, leading to relative coordinates being used as absolute instead. The result is a Unit being set at position (0, 0, 0) or close by.
2019-06-15 20:49:34 +02:00
ForesterDev
865ab86173 Core/Entities: fix excessive damage of exotic pets and some creatures (#23403)
* Core/Conditions: implement CONDITION_GAMEMASTER

* Core/Entities: fix excessive exotic pet and some creatures damage
2019-06-15 15:09:52 +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
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
a0bd68cf46 Core/Misc: Fix static analysis issues reported by Coverity 2019-05-18 16:12:23 +02:00