Commit Graph

16227 Commits

Author SHA1 Message Date
xinef1
ad4e63bae1 Core/Misc: Moved CharacterInfo out of world to separate class
Closes #19030

(cherrypicked from 59ce3d6c9b)
2019-07-21 21:06:54 +02:00
Keader
d400d3d8e9 Core/Scripts: Illidan Stormrage Rewrite (#18963)
Closes #5018

(cherrypicked from 8731975187 and 3194d089cb)
2019-07-21 21:06:54 +02:00
xinef1
36a4e008d0 Corrected immunity checking after recent changes (#19049)
- Shouldn't compare immunity to spells without schoolmask

(cherrypicked from 78a729b6a4)
2019-07-21 21:06:54 +02:00
xinef1
fe63cd3dbb 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

(cherrypicked from e1f14215d8)
2019-07-21 21:06:54 +02:00
xinef1
ca26c33145 Implemented binary resistances and some more (#18933)
- Fixed possible exploit with tamed pets having template immunities
- Implemented binary resistances
- Corrected resistances calculations
- Pets properly inherit players spell penetration
- Fixed doubled block calculation for damaging melee spells
- Auras removing snare effects will only remove the snaring component
- Shapeshifting will properly remove movement impairing auras only and not crowd control (dragon's breath)
- Immunities are properly checked versus all schools appearing in spell, unit is immune only if immune to all schools
- Spells with melee and magic school mask should compare armor reduction with resistances and select smaller reduction
- Demonic Circle: Teleport no longer removes root effects

(cherrypicked from 93746e8c4a)
2019-07-21 21:06:54 +02:00
xinef1
ad008c43b7 Core/Misc: Fix various crashes, also related to multithreading (#19012)
* When iterating groups we have to either do it not in multithreaded context (map updates) or start with checking maps (they are guaranteed to change in single thread update).
* Properly clear ComboPoint references on player remove
* remove some possible references item may have when it is deleted during save.
* Also clear all hostile references when unit is removed from map.

(cherrypicked from 86da1a19bb)
2019-07-21 21:06:54 +02:00
xinef1
92e95ddf55 Core/Spells: Fixed spell effect 93 (SPELL_EFFECT_FORCE_DESELECT) (#19001)
(cherrypicked from 9e1b286984)
2019-07-21 21:06:54 +02:00
ariel-
26fe949619 Core/Server: fix duplicated inserts into tutorials table for newly created characters
(cherrypicked from 60dd803bbe)
2019-07-21 21:06:54 +02:00
xinef1
192f088248 Core/Achievements: Mountain o' Mounts and similar achievement will be properly awarded when you have required amount of mounts, not earlier (#19002)
(cherrypicked from 8646e72f18)
2019-07-21 21:06:54 +02:00
Gerhood
7e83cce81f Core/Spells: implement Mad/Crazy Alchemist's potions
(cherrypicked frombab59b28faad262dc5d9873ca7c0856477ec4d66)
2019-07-21 21:06:54 +02:00
ariel-
894c667d32 Core/World: readd lines lost in rebase
(cherrypicked from d3d6c55650)
2019-07-21 21:06:54 +02:00
ariel-
7f490819f5 Misc: fixed some headers.
Updated year, bye bye 2016!

(cherrypicked from 6245b0703e)
2019-07-21 21:06:54 +02:00
xinef1
07d02d744f Remade who list processing (#18636)
* Remade who list processing, requests are now processed in maps. Player entries are now copied every 5 seconds to dedicated storage (avoids usage of hashmapholder mutex)

(cherrypicked from 88f746935f)
2019-07-21 21:06:54 +02:00
ariel-
b742c87222 Core: add some missing Player Name normalization on input data
(cherrypicked from 6f9e8b6c91)
2019-07-21 21:06:54 +02:00
xinef1
b485f3e673 Few small optimizations here and there (#18684)
Changes list:
- Added CharacterGuidByNameContainer which contains name -> guid unordered map (updated along CharacterInfo)
- Extended CharacterInfo structure with GuildId
- Extended CharacterInfo structure with ArenaTeamId[3], for all possible teams (2v2, 3v3, 5v5)
- Removed CHAR_SEL_GUID_BY_NAME and CHAR_SEL_CHAR_GUID_BY_NAME synchronous queries, name -> guid can be now retrieved in World::GetCharacterGuidByName
- Removed CHAR_SEL_GUID_RACE_ACC_BY_NAME synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_CHAR_LEVEL synchronous query, level can be retrieved by guid
- Changed CHAR_SEL_CHARACTER_ACTIONS_SPEC to asynchronous query, action bars are now loaded asynchronously
- Removed CHAR_SEL_CHARACTER_NAME_CLASS synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_PLAYER_ARENA_TEAMS and CHAR_SEL_ARENA_TEAM_ID_BY_PLAYER_GUID synchronous queries, arena teams are now stored in CharacterInfo
- Replaced synchronous db calls with CharacterInfo lookups
- Removed ObjectMgr::GetPlayerGUIDByName, as it used db query
- Replaced some unnecessary UpdateObjectVisibility() calls because they were either duplicated (called few lines above in other function) or it is enough to call DestroyForNearbyPlayers because object is being removed or should be invisible and DestroyForNearbyPlayers is faster
- Corrected typo in Player::DestroyForPlayer, only items in slots 0 to EQUIPMENT_SLOT_END are sent to other players
- Renamed Player::GetGuildIdFromDB to Player::GetGuildIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetArenaTeamIdFromDB to Player::GetArenaTeamIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetLevelFromDB to Player::GetLevelFromCharacterInfo and changed the function to use CharacterInfo structure
- Removed GameEventMgr::_questToEventLinks and associated functions, eventId is now stored in Quest class under _eventIdForQuest variable
- Changed some functions checking quest status to use other functions for quest status check instead of duplicating code
- Removed callback from add friend, because we can get the guid from appropriate storage, no need to make db query
- Removed callback from add ignore, because we can get the guid from appropriate storage, no need to make db query
- Added callback to unwrap wrapped items asynchronously
- Removed synchronous select in tutorials to check if we have any entries in db, if any entry exists in db, m_TutorialsChanged variable will have TUTORIALS_FLAG_LOADED_FROM_DB flag added and it is no longer necessary to query database

(cherrypicked from b955456008)
2019-07-21 21:06:54 +02:00
ariel-
17703e8924 Core/Spell: remove duplicated SPELL_AURA_MOD_DEBUFF_RESISTANCE handling.
Each spell had two rolls in which it could be resisted, effectively adding to the resist chance.

Closes #7406

(cherrypicked from 23f76b563f)
2019-07-21 21:06:54 +02:00
Keader
9bd8ca0e5f Core/Scripts: Palehoof rewritten & Utgarde Pinnacle updated (#18712)
Closes #15405

(cherrypicked from ba1df45d36)
2019-07-21 21:06:54 +02:00
Shauren
ff334ae707 Core/Conditions: Reimplemented CONDITION_OBJECT_ENTRY_GUID and CONDITION_TYPE_MASK under new values to allow easier porting conditions between branches. Old data is dynamically converted during startup 2019-07-21 17:12:34 +02:00
Shauren
3058d8c5ab Core/bnetserver: Fixed crash happening when sending packets larger than 4096 bytes 2019-07-21 16:32:49 +02:00
Shauren
7dc057fedb Warning fix 2019-07-15 18:25:57 +02:00
Shauren
87bcf6c3c1 Warning fix 2019-07-15 18:03:48 +02:00
r00ty-tc
75efb5d431 Core/Database: Correction for later MariaDB version
- Removed unused define CR_INVALID_CONN_HANDLE which was removed entirely in more modern MariaDB versions

(cherry picked from commit 2a7a1b27d5)
2019-07-15 15:08:19 +02:00
Shauren
4d0910d9c2 Fix nopch build 2019-07-14 19:45:58 +02:00
Shauren
857bb68deb Core/Spells: Fixed creating enchant scrolls 2019-07-14 19:20:45 +02:00
Shauren
3262bc827d Core/DataStores: Updated db2 structures to 8.2 2019-07-14 19:20:45 +02:00
Shauren
3714bf8e7a Core/Misc: Updated GameObjectTemplate structure 2019-07-14 19:20:45 +02:00
Shauren
74a801182a Core/PacketIO: Updated packet encryption to 8.2 2019-07-14 19:20:45 +02:00
Shauren
0e4c569770 Core/PacketIO: Updated packet structures to 8.2 2019-07-14 19:20:44 +02:00
Shauren
07572fd12c Core/PacketIO: Fixed writing update masks for SMSG_UPDATE_OBJECT 2019-07-04 22:25:44 +02:00
Shauren
d39354e3a3 Core/Misc: Fixed log/query formatting with Difficulty 2019-06-27 21:54:07 +02:00
Ovah
867458a424 Core/Spells: define and implement TARGET_UNIT_CONE_ENTRY_129 (#23496) 2019-06-26 15:06:07 +02:00
funjoker
d11b9a6992 Core/DataStores: Fix field order for some DB2s (#23439) 2019-06-18 19:33:29 +02:00
Shauren
357e0ec394 Scripts/Quests: Fix Quest 14386 Leader of the Pack
By Malcrom
2019-06-17 21:17:14 +02:00
funjoker
eef87a9cc0 Core/Creatures: Modify creature_template_model structure to accept unmodified sniffed data (#23427) 2019-06-16 21:32:01 +02:00
Shauren
1ce8bf22fc Nopch fix 2019-06-15 19:04:21 +02:00
Gustavo
7fbae7530d Core/Scripts Rework boss Terestian Illhoof (Karazhan) (#19057)
(cherrypicked from 87f2cb04ca)
2019-06-15 18:41:09 +02:00
Keader
77a73a737c Build fix and codestyle
(cherrypicked from 8f00aa92de)
2019-06-15 18:41:09 +02:00
Afgann
afade22ffb Core/Scripts: Moorabi encounter updated. (#19013)
(cherrypicked from 21b5a377e4)
2019-06-15 18:41:09 +02:00
Shauren
be87c0e8b8 fix typo
(cherrypicked from 09cc6b3c33)
2019-06-15 18:41:09 +02:00
Shauren
48cc6f384d Core/Maps: Adjusted WorldObject::GetGridActivationRange() to never be less than map visibility distance for active objects to ensure equal ranges for activation/deactivation of grids
Updates #19072

(cherrypicked from 74bb92a582)
2019-06-15 18:41:09 +02:00
ariel-
248fd9691b Core/Spell: properly add SPELLMOD_COOLDOWN to spells without initial cooldown
Closes #15605

(cherrypicked from 3a65c70657)
2019-06-15 18:41:09 +02:00
Kittnz
5291842a33 Game/Scripting: Add OnPlayerRepop hook
Called when a player presses release when he died

(cherrypicked from d550ba7392)
2019-06-15 18:41:09 +02:00
treeston
cc020b2a0f Core/Creature: Prevent boss creatures from ever respawning naturally.
(cherrypicked from 3ddcf40037)
2019-06-15 18:41:09 +02:00
ariel-
a29a157e34 Core/SmartAI: Delay SMART_ACTION_FORCE_DESPAWN by at least one world tick
- Restore old despawn behavior of SmartAI despawning (without reintroducing the run time logs caused by IsSmart)
- Some SAIs relied on this to function (for example #1249)

Partial reverts commit 4fc4c81e89

(cherrypicked from aa7ef797d6)
2019-06-15 18:41:09 +02:00
xinef1
3f7fe6f8a5 Core/Spells: Remade trajectory target selection (#19048)
* Remade trajectory target selection
* Added possibility to apply conditions to trajectory spells
* Properly recalculate delay time if CMSG_UPDATE_PROJECTILE_POSITION is received

(cherrypicked from c6060dd0c5)
2019-06-15 18:41:09 +02:00
Gustavo
c53df2adb0 Core/Scripts Update boss Maiden of Virtue (#19058)
(cherrypicked from d06391d062)
2019-06-15 18:41:09 +02:00
xinef1
b711f0bcae Core/Spells: Added SPELL_FAILED_NOTHING_TO_STEAL error (#19036)
Corrected Dispel check in sanctuary area
Added root check for SPELL_EFFECT_JUMP and SPELL_EFFECT_JUMP_DEST

(cherrypicked from 3c605ba614)
2019-06-15 18:41:09 +02:00
xinef1
68cc366d88 Core/Spells: Corrected summon category SUMMON_CATEGORY_VEHICLE (#19052)
(cherrypicked from 227d5a9288)
2019-06-15 18:41:09 +02:00
Gustavo
384f2d636c Core/Scripts: boss The Curator (Karazhan) rework (#19040)
Closes #16099
(cherrypicked from 169e150628)
2019-06-15 18:41:09 +02:00
xinef1
8d6d00dc15 Core/Spells: Corrected execution time calculation for dst targets (#19039)
(cherrypicked from c1ca852e16)
2019-06-15 18:41:09 +02:00