Commit Graph

1625 Commits

Author SHA1 Message Date
Ovah
e811b9cdc2 Core/Movement: fix units falling through the ground when hover mode is disengaged (PR #25518) 2020-10-01 04:41:08 +02:00
Shauren
d29274f3a1 Core/Pets: Fixed crash happening when summoning a different pet than one that was unsummoned by summoning a guardian (imp -> infernal -> felhunter)
Closes #25478
2020-09-23 22:37:11 +02:00
Treeston
bb3d3a82d7 Core/Movement: MoveSplineFlag::animId -> animTier, MoveSpline::GetAnimation() -> GetAnimationTier(), dad1876 follow-up 2020-09-08 17:32:35 +02:00
NoName
dad187615d Core/Movement: Corrected Animation Tier handling (PR #24875)
Co-authored-by: Warpten <vertozor@gmail.com>
Co-authored-by: Ovahlord <dreadkiller@gmx.de>
Co-authored-by: Carbenium <carbenium@outlook.com>
2020-09-08 17:12:52 +02:00
Giacomo Pozzoni
ff26027453 Core/Unit: Fix units on vehicles not dismounting on death (#25404)
* Core/Unit: Fix units on vehicles not dismounting on death

Closes #23095
Issue added in 982643cd96

* Remove leftovers from previous tries
2020-09-05 22:07:17 +02:00
Shauren
1e446b021b Core/Players: Directly store PlayerSpell in m_spells, not as pointer
Closes #25402
2020-09-05 18:00:00 +02:00
Treeston
88d446dadf Scripts/Commands: Convert argument parsing of .npc commands
(And I snuck some chat command cleanup in there, more de-cluttering!)
2020-09-04 00:58:23 +02:00
Jinnaix
7e6f17a701 Core/Unit: send npcs home after fear runs out (#25347)
* Core/Unit: send npcs home after fear runs out

* Whoops, wrong
2020-08-29 14:31:58 +02:00
Treeston
534a2388b7 Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327) 2020-08-28 00:11:16 +02:00
robinsch
aaa089ab7f Core/Unit: Fixed race condition when loot recipient is in different map (#25312) 2020-08-22 23:09:13 +02:00
Shauren
5c1fc5e387 Core/Pets: Pet management refactoring (#25191)
* Core/Pets: Pet management refactoring

* Preload basic pet data on character login with async query
* Load additional pet data (declined names/auras/spells/cooldowns) using async query after we are sure pet loading will succeed
* Remove all select queries related to pet stable/unstable
* Remove all silent pet deletions except explicit UI-triggered abandons
* Fixed displaying stable master content when current pet is not summoned
* Allow to stable/swap unsummoned current pet

Closes #3610
Closes #21266
2020-08-16 21:39:25 +02:00
Peter Keresztes Schmidt
6c7837f947 Core/Unit: Make HandleEmoteCommand typesafe (#25249)
* Scripts/ScarletMonastery: Fix wrong emote during Headless Horseman encounter

* Scripts/HoR: Fix wrong emote during escape event

* Core/Unit: Make improve type safety of HandleEmoteCommand

Change argument type to the expected enum type Emote

* Scripts/CoS: Use SetUInt32Value to set UNIT_NPC_EMOTESTATE

UNIT_NPC_EMOTESTATE is no flag field
2020-08-15 15:29:43 +02:00
Ovah
764f22fc91 Core/Units: add new functionality for units to block or enable combat interactions (#25168)
* Core/Units: add new functionality for units to block or enable combat entirely via helper to reflect what CREATURE_DIFFICULTYFLAGS_IGNORE_COMBAT and client AI functions imply

* yeah...

* Nuke Creature::IsCombatDisallowed helper as its unused by now

* no combat extra flag may now be changed on transforms if the transformed entry does not have the flag
2020-08-07 14:51:40 +02:00
jackpoz
3c28573d02 Core/Misc: Code cleanup 2020-08-06 22:04:46 +02:00
Jinnaix
db9072a183 Core/Unit: Creatures' minions now engage in combat if their controller is attacked (PR #25219)
Closes #24340
2020-08-06 20:03:09 +02:00
Giacomo Pozzoni
07fd84b679 Core/Misc: Fix static analysis issues (#25194) 2020-08-04 11:36:47 +02:00
Carbenium
c39eb9b504 Core/Misc: Use std::chrono overload of Creature::DespawnOrUnsummon 2020-07-26 22:17:36 +02:00
Peter Keresztes Schmidt
e6e5775be8 Build: Enable -Wimplicit-fallthrough on clang (#25056)
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

Related: #25006

* Misc: Add some missing breaks (no-ops) to satisfy clang

Related: #25006
Closes #25055

* Build: Enable -Wimplicit-fallthrough on clang

Closes #25006
2020-07-18 20:43:16 +02:00
Peter Keresztes Schmidt
85b5b842ca Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs (#25054)
Related: #25006
2020-07-18 20:42:28 +02:00
Treeston
896b68d5c2 Core/Time: Rename GetGameTime{System, Steady}Point methods
The names are a bit unhandy. Rename them (shorter but still meaningful).

GetGameTimeSystemPoint() -> GetSystemTime()
GetGameTimeSteadyPoint() -> Now()

Also add 2 new typedefs:

typedef std::chrono::steady_clock::time_point TimePoint;
typedef std::chrono::system_clock::time_point SystemTimePoint;

Closes #25042
2020-07-17 17:05:55 +02:00
Peter Keresztes Schmidt
c92950b3e1 Core/DataStores: Update DBC field names to generated ones (#24999) 2020-07-12 15:36:55 +02:00
Max Drosdo.www
e20e51a385 Core/Unit: Prevent gaining weapon and defense skillups in pvp (#24895) 2020-07-06 18:34:42 +02:00
jackpoz
49da3533cd Core/Common: Add macro ASSERT_WITH_SIDE_EFFECTS to be used when asserting conditions that have side effects 2020-06-26 23:21:49 +02:00
Gildor
18692ad20c Core/Unit: SPELL_INTERRUPT_FLAG_ABORT_ON_DMG should only affect player spells (#24836) 2020-06-19 22:56:46 +02:00
Keader
d81a9e5bc3 Core/Misc: Fixed resistance calculate for Mutated Transformation and Twilight Bloodbolt (#24717)
Ref: 9f7b464a6a
- Implemented a new SpellScript hook that allow control Resistance/Absorb amount of a damage spell.
2020-06-03 22:05:08 -03:00
Ovah
43ef610fe0 Core/Units: flight and hover checks will now consider movement template data as well as manually set flight states
- manually set flight states via auras and scripts will no longer be ignored
- restored movement template consideration when generating pathings
- renamed IsLevitating to IsGravityDisabled to reflect the referenced movement flag's name
2020-06-01 15:58:31 +02:00
jackpoz
48c5c0d7a2 Core/Misc: Fix Clang 10 build warnings 2020-05-31 15:52:28 +02:00
Giacomo Pozzoni
bd2d60c267 Fixes/3.3.5 aura infinite loop (#24631)
* Core/Auras: Attempt to fix infinite loop with aura 18950 on map unload

* Core/Auras: Log a detailed error and assert when failing to remove all auras after a few tries

* Code cleanup

* Fix build warnings

* Fix more build warnings
2020-05-16 11:06:03 +02:00
HelloKitty
43b595111d Further improve ChrRace DBC handling (#24508)
* Core/DBC: Added ChrRacesAllianceType for ChrRaces.dbc

* Core/Character: Check ChrRace DBC playable in HandleCharCreateOpcode

* Core/DBC: Implement ChrRacesFlags removing literals

Cannot take credit for this enum, derived from documentation in
https://wowdev.wiki/DB/ChrRaces

* Core/Character: Check CHRRACES_FLAGS_NOT_PLAYABLE on creation

* Core/DBC: Fix formatting of ChrRaces enums

* Core/DBC: Use ChrRaces CreatureType instead of hardcoded humanoid assumption

* Address enum style code changes
2020-05-15 20:41:16 +02:00
HelloKitty
772f506a3b Improve Creature DBC Handling (#24509)
* Core/DBC: Add CreatureModelDataFlags to remove hardcoded literals

* Core/DBC: Use CreatureType flags in Creature::CanGiveExperience calculation

* Core/DBC: Fixed CreatureType Flags Misinterpretation

Meaning of this was wrong, wowdev wiki was incorrect. Partially reverts
0d61e653f4841d5c9745639a6bdf7487b4d082fe

* Address enum codestyle

* Update DBCStructure.h

* Update DBCfmt.h

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-05-10 14:30:25 +02:00
Shauren
1fecbc6892 Core/Units: Allow mind controlling non-controllable vehicles (for example players that become vehicle during boss encounters or creatures that only are vehicles to show non standard power type)
Closes #24562
2020-05-06 16:45:03 +02:00
Shauren
829cf38c67 Core/Spells: Relaxed aura exclusivity check to allow casting spells that have other, non-aura effects even if aura will not be applied
Closes #24553
2020-05-03 16:19:19 +02:00
Shauren
50576fa1f5 Core/Auras: Prevent getting negative scale with auras
Closes #24040
2020-04-28 18:03:51 +02:00
Shauren
43d9ffd1bc Core/Spells Fixed scroll stacking check when not targeting self
* Reuse code that removes non-stackable auras at apply to check before casting the spell to keep reagents/cast item
2020-04-28 11:02:27 +02:00
Ovah
f1e4ee21f8 Core/AI: Implemented OnSpellCastInterrupt and OnSuccessfulSpellCast hooks
Ported from: 020825902c and 1aa42e97a8
2020-04-25 16:07:18 -03:00
Gildor
5e15406278 Core/Unit: Improve HitInfo absorb and resist flags logic in Unit::CalculateMeleeDamage (#24460) 2020-04-18 15:21:15 +02:00
ForesterDev
e1a8ebc064 Core/PacketIO: updated SMSG_DURABILITY_DAMAGE_DEATH (#24442)
- use RATE_DURABILITY_LOSS_ON_DEATH for death from falling
- add note, that RATE_DURABILITY_LOSS_ON_DEATH doesn't change log message

(cherry picked from commit a1831e0c1e)

# Conflicts:
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Server/Packets/GameObjectPackets.h
#	src/server/game/Server/Protocol/Opcodes.cpp

Co-authored-by: MitchesD <majklprofik@seznam.cz>
2020-04-14 14:00:53 +02:00
jackpoz
eb31ae9b18 Core/Misc: Fix linux build 2020-04-11 11:45:44 +02:00
jackpoz
9c9f4d6d20 Core/Unit: Ceil damage instead of rounding it
a0d5088850 followup, use std::ceil instead of std::round . This ensures at least 1 damage point will be done after applying armor reducing.
2020-04-10 23:24:29 +02:00
jackpoz
a0d5088850 Core/Unit: Round damage instead of truncating it
Round damage instead of truncating it when calculating armor-reduced damage. This fixes some level 1 creatures doing 0 damage (displayed as "Miss" ingame)
2020-04-10 00:11:54 +02:00
Ovah
bea850fb73 Core/Objects: cache current liquid status of objects when updating position data and use it to replace unnecessary vmap lookups (#24399)
* dropped unneeded IsUnderwater override for players since the default position data update considers collision height already so we don't have to rely on that tempfix anymore. This actually fixes breathing bars showing up depending on your characters size (gnomes get their breathing bar earlier, taurens later etc)
2020-04-07 23:28:44 +02:00
Giacomo Pozzoni
3def52c1c4 Core/Logs: Log full guid instead of just low guid, part 2 2020-04-05 19:10:58 +02:00
Giacomo Pozzoni
468ecb7252 Core/Logs: Log full guid instead of just low guid 2020-04-05 19:10:57 +02:00
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