Commit Graph
967 Commits
Author SHA1 Message Date
Ovahlord 0f035fe940 Core/Units: refactor rage generation to reflect patch 4.0.1 changes:
* melee attacks will now send their awarded rage within SMSG_ATTACKER_STATE_UPDATE and moved the rage reward mechnic from Unit::DealDamage into Unit::AttackerStateUpdate

* killed CleanDamage struct and provide plain unmitigated damage values instead as since patch 4.0.1 the rage gained from damage taken is fully normalized and ignores any kind of damage reduction or negation
2023-12-10 18:26:24 +01:00
Shauren 7d57ef7299 Core/Random: Changed random functions returning doubles to return floats
* They were all cast to float at use anyway
* Improves roll_chance_f performance (rand32() is now called internally by uniform_real_distribution once instead of twice)
2023-10-31 22:00:52 +01:00
Shauren 3c0cf32b43 Core/Spells: Named and implemented most of SpellAttr7 2023-10-21 20:32:32 +02:00
Jeremy f8aa09f253 Core/Areas: Update AreaFlags from EnumeratedStings values 2023-10-09 20:41:30 +02:00
Ovahlord 2bcc645cd3 Core/Spells: ported radius entry indexing from master branch and dropped several now deprecated spell 'fixes' from spellMgr 2023-08-06 12:54:05 +02:00
Shauren 9480f79c2a Core/Scripts: Added damage and healing calculation hook to spell and aura scripts allowing to override base damage amount, flat value mod and percent value mod separately 2023-08-03 21:32:20 +02:00
Ovahlord a3dd0d75cf Core/Quests: ported quest flag and visbility update changes from master branch 2023-07-11 15:21:09 +02:00
Ovahlord 76a9918b0d Core/Spells: check for valid SPELL_AURA_CONTROL_VEHICLE effects when using SummonPropertiesParamType::RideSpell 2023-07-09 11:51:09 +02:00
Ovahlord b489a905e1 Core/Misc: fixed another bunch of GCC warnings 2023-07-08 21:33:08 +02:00
Ovahlord 7c43726ef3 Core/Spells: allow negative effect values for SPELL_EFFECT_INEBRIATE in order to sober up the player 2023-07-01 18:00:01 +02:00
Shauren 07376de9fc Core/Spells: Always remove spell target from transport on teleport spells if spell destination does not target a position on the transport 2023-06-29 20:31:45 +02:00
Ovahlord c3ecb8ba30 Core/Spells: also allow gaining experience from chests that do not require skills 2023-01-17 22:27:34 +01:00
Ovahlord 6ecaebb19e Core/GameObject: implement gaining experience from unlocking chests
* this handles gathering experience as well as getting some extra xp from opening hidden treasure chests
2023-01-17 22:05:16 +01:00
Ovahlord f18a592a7e Core/GameObjects: remove incorrect gathering experience implementation 2023-01-17 19:56:25 +01:00
Ovahlord acaf42798a Core/GameObjects: sync gameobject data field names with master branch and added some missing entries for Cataclysm 2023-01-17 19:45:56 +01:00
Ovahlord 9cd71ae75a Core/Spells: allow any worldobject to summon creatures via spells 2023-01-02 15:24:57 +01:00
Shauren 81b2ff0d94 Core/Maps: Removed MapInstanced - no longer neccessary for grid data reference counting (moved to TerrainInfo) 2022-12-29 22:10:44 +01:00
Ovahlord bc773afaec Core/Spells: slightly modernize Spell::EffectTransmitted codestyle 2022-12-20 09:47:40 +01:00
Ovahlord 8eb605f67d Core/Packets: converted SMSG_SPELL_DISPEL_LOG to packet class 2022-11-26 17:59:42 +01:00
Shauren 0ca955897f Core/Spells: Remove all hardcoded restrictions for pick pocket spell effect and rely only on presence of pickpocket loot in db 2022-10-04 12:42:10 +02:00
Shauren c3b52fd29f Core/Auras: Improve aura interactions with immunities on spell effect level
* Effects that target is immune to will be suppressed instead of completely removed
2022-09-30 12:49:31 +02:00
Ovahlord eb0a5b607c buildfix 2022-09-30 10:49:43 +02:00
Shauren a7dc339a6a SHA-1: 8d16a79dea4c0100d36e13b068c42499a3a48154
* Core/Spells: Rename SpellAttr4 to use official attribute names

* Corrected implementation of SPELL_ATTR4_CLASS_TRIGGER_ONLY_ON_TARGET
* Implemented SPELL_ATTR4_NO_HELPFUL_THREAT
* Implemented SPELL_ATTR4_NO_PARTIAL_IMMUNITY
* Implemented SPELL_ATTR4_ALLOW_PROC_WHILE_SITTING
* Implemented SPELL_ATTR4_USE_FACING_FROM_SPELL
* Implemented SPELL_ATTR4_BOUNCY_CHAIN_MISSILES
* Implemented SPELL_ATTR4_AURA_NEVER_BOUNCES
* Implemented SPELL_ATTR4_AURA_BOUNCE_FAILS_SPELL
* Implemented SPELL_ATTR4_AURA_IS_BUFF
* Implemented SPELL_ATTR5_MELEE_CHAIN_TARGETING

* Implemented SpellEffectAttributes::ChainFromInitialTarget
2022-09-30 01:16:39 +02:00
Ovahlord ef3632109d Core/Spells: ported SpellModOp definitions from master branch 2022-09-17 11:56:54 +02:00
Shauren ea4bc6c02a Core/Spells: Rename SpellAttr2 to use official attribute names
* Corrected implementation of SPELL_ATTR1_ALLOW_WHILE_STEALTHED
* Implemented SPELL_ATTR2_RETAIN_ITEM_CAST
* Implemented SPELL_ATTR2_ALLOW_WHILE_INVISIBLE
* Implemented SPELL_ATTR0_PROC_FAILURE_BURNS_CHARGE
* Implemented SPELL_ATTR2_PROC_COOLDOWN_ON_FAILURE
* Implemented SPELL_ATTR2_NO_TARGET_PER_SECOND_COSTS
* Implemented SPELL_ATTR2_DO_NOT_REPORT_SPELL_FAILURE
* Implemented SPELL_ATTR1_REQUIRE_ALL_TARGETS
* Implemented SPELL_ATTR2_CHAIN_FROM_CASTER
* Implemented SPELL_ATTR2_NO_ACTIVE_PETS
* Implemented SPELL_ATTR2_ENCHANT_OWN_ITEM_ONLY
2022-09-13 14:36:32 +02:00
Ovahlord e76b43d2e9 warning fix 2022-09-12 09:15:34 +02:00
Ovahlord 6a71b6d053 Core/Units: consider summoned units with a creator guid also as party or raid member
the old logic was built on the false assumption that all units like totems have a ownerguid - they do not. They only have a creatorguid. Ownerguids (as the name implies) is only applied on units that the player is actively controlling. 3.3.5 has this implemented in a wrong way while 4.x does not.

*also fixed up more cherrypick mistakes while at it
2022-09-12 09:15:31 +02:00
Shauren ca7d36873f Core/Spells: Rename SpellAttr1 to use official attribute names
* Implemented SPELL_ATTR1_NO_SKILL_INCREASE, SPELL_ATTR1_AURA_STAYS_AFTER_COMBAT, SPELL_ATTR1_DISPEL_ALL_STACKS
2022-09-12 09:15:31 +02:00
Shauren 16aef47f61 Core/Spells: Fixed implementation of Spell::EffectRechargeManaGem when it is not the first effect on a spell (0 cases, sync code between branches) 2022-09-12 09:15:30 +02:00
Ovahlord 068e9004f5 fixed build 2022-09-12 09:15:30 +02:00
Meji dec6c7d537 Core/Spells: Fixed spell effect 43 (SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER) (#25945) 2022-09-12 09:15:29 +02:00
Wyrserth 2f5fd3f227 Core/Spells: don't allow spells with SPELL_EFFECT_CREATE_ITEM_2 to be cast if there isn't enough space in inventory 2022-09-12 09:15:24 +02:00
Gildor 85893e9a44 Core/Spells: Fix spells with Health Leech effect, now check damage absorb when calculate Heal 2022-09-12 09:15:24 +02:00
ariel- c889b81f2c Core/Spell: fix target checks
- Aura will be applied at last moment possible (after damage) to prevent regressions on #18395
- Partial revert of 9b38a6352c0fe2499de54fd769aa1c721a410bda as it wasnt handling correctly checks without spells
2022-09-12 09:15:15 +02:00
ariel- 5e6167ce46 Core/Spells: register and apply individual aura effects on hit handler
- Remove area aura processing from spell system, they're fully handled by aura owner update now
2022-09-12 09:15:15 +02:00
ariel- b6fac86b71 Core/Spells: rework part 5: GameObject casting 2022-09-12 09:15:14 +02:00
ariel- 4bb8c93df8 Core/Spells: rework part 4: iterate over effects first
Implement far spell queue processing

# Conflicts:
#	src/server/game/Spells/Spell.cpp
2022-09-12 09:15:13 +02:00
ariel- 3fbbea61bd Core/Spells: rework part 3: spells only handle at most one UnitAura and one DynObjAura during its lifetime
# Conflicts:
#	src/server/game/Spells/Auras/SpellAuras.h
2022-09-12 09:15:13 +02:00
ariel- dc46f0621b Core/Spells: remove 'Vanish Purge' hack, the spell is present on DB and is copy of one in vanilla DBC
Thanks to killerwife for the heads-up
2022-09-12 09:15:10 +02:00
ariel- a804af7219 Core/Spell: SpellValueOverrides encapsulation
- No sense to let scripts use SpellValueOverrides, we already have modifiers in CastSpellExtraArgs struct
2022-09-12 09:15:04 +02:00
ariel- 1d3fbff332 Core/Auras: removed caster dependency from core
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling
2022-09-12 09:15:04 +02:00
Ovahlord fd27f0020d Core/Units: defined all faction template flags and properly implemented FactionTemplateFlags::HatesAllExceptFriends
*refactored FactionTemplateEntry helpers to use pointers instead of references since we use datastore pointers in all cases so there is no need to create references
2022-08-10 20:28:47 +02:00
Shauren 25465699f7 Core/GameObjects: Transport (type 11) improvements
* Fully synchronize serverside animation progress with client
* Implemented updating passenger positions on elevators
* Removed visibility hack for elevators that always forced CreateObject packet to be sent to client
2022-06-18 21:36:17 +02:00
Shauren 2b7b0b0db1 Core/Scripts: Begin unifying triggering gameevents (not the game_event db stuff) 2022-06-18 19:05:57 +02:00
Ovahlord 6e9ec1a4bf Core/Transports: undo all custom transport changes as preparation for cherry picks 2022-06-18 18:37:14 +02:00
Ovahlord c63c81ef6c Core/Packets: enable and implement SMSG_SUMMON_RAID_MEMBER_VALIDATE_FAILED
* refactored target based summoning to not longer store targets in the target map and pull the directly from the caster's target update field in the effect handler
* implement support for party based summoning and use the new opcode to send error messages when a player cannot be summoned. Note: this packet does support sending multiple reasons for multiple members but sniffs show that they are still being sent one by one instead. Just Blizzard things
2022-05-17 20:43:49 +02:00
Ovahlord 78896a132f Core/Spells: ported proc flag updates from master branch 2022-02-22 21:19:09 +01:00
Chaouki Dhib 17c4d8f6d9 Core/Spells: fix wrong distance calculations in AoE spells [Needs testing] (#16290)
Core/Spells: Fix wrong distance calculations in AoE spells.
Pull request #16290 by chaodhib.
God bless, finally.

(cherry picked from commit a1f2f30c145f6ad9c4baeffeff32618e71ff537c)
2022-02-16 04:49:24 +01:00
xinef1 df9738aaa9 Core/Misc: Fixed player corpse looting, added player corpse loot and some more (#19122)
* Fixed corpse looting in wintergrasp
Added corpse loot for wintergrasp quests and To the Looter Go the Spoils (1166) achievement
Don't generate money for loot if no loot mode is available
Simplified few things

(cherry picked from commit 2412886ef69d305df1bd6e6422ca3134c0ab1449)
2022-02-16 04:49:24 +01:00
xinef1 f431459063 Core/Creatures: Various fixes for creatures, regarding combat conditions, despawning, and few others (#18998)
* Made some changes to kiting mechanics, simplified code and made taunt auras prolong combat no matter the distance from the spawn
Unified some creature despawning code, removed some brutal direct calls in scripts
Don't play death anim on forced despawn
Removed some redundant visibility changes on creature despawn
Fixed possible problem with pet initializing template info from difficulty greater than normal
Properly keep UNIT_FLAG_IN_COMBAT on UpdateEntry call
Moved RegenerateMana function to general Regenerate(Power) function
Fixed increased health regeneration from polymorph for pets
Implemented CREATURE_TYPE_FLAG_GHOST_VISIBLE, those creatures will be properly seen when player is dead also
Removed hackfix from Gaeriyan and Franclorn Forgewright, fixed properly
Simplified ForcedRespawnTime code in ForcedDespawn
Do not allow to assist unit while evading or when enemy is evading
Do not allow to attack other units when evading or when the unit is evading
Corrected distance checking code before creature is allowed to evade, should fix some common problems
Properly return summon position for summoned creatures as their respawn position
Properly stop all moving units on gossip hello, no matter their npc flags

(cherry picked from commit e1f14215d86fc9f0cd041f0e87bf0a689c086329)
2022-02-16 04:49:24 +01:00