Commit Graph

453 Commits

Author SHA1 Message Date
Shauren
20e2f3632a Core/Maps: Added optional *.tilelist file to map_extractor output which contains a list of existing tiles to speed up map creation in worldserver 2020-07-06 16:36:30 +02:00
Shauren
deca201f77 Core/DataStores: Simplified string memory allocation in db2 files, dropped unneccessary level of indirection 2020-06-27 13:33:17 +02:00
Peter Keresztes Schmidt
bab5fd87a3 Core/Misc: Replace Trinity::make_unique with std (#24869) 2020-06-23 08:54:12 +02:00
Shauren
eba31dea27 Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids
* Handle child maps being entered
* Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
2020-05-24 22:34:25 +02:00
ariel-
7dcc185a15 Core/Instance: stop updating the instance resettimes based on creature respawns
- Rather update normal instance reset time to 2 hours after last creature kill
- This fixes yet another integer overflow due to the possibility of having time_t max showing up
- Also change respawntime and resettime fields to bigint on respawn/instance related tables
- Start using prepared statements on the InstanceSaveMgr

(cherry picked from commit 4c593f12ca)
2020-04-27 12:25:52 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
0a2d9ad2f7 Core/Items: Add ItemContext param to Item::Create function 2019-11-23 00:03:42 +01:00
Shauren
f6e2b8cdc1 Core/DBLayer: Prevent committing transactions started on a different database 2019-07-27 10:52:33 +02:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
xinef1
4f65dc5e20 Core/Misc: Various crash fixes (#19059)
* Replaced some FindPlayer calls with GetPlayer
Fixed some more crashes

* Correction

(cherrypicked from 14dfc377b4)
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
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
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
217a9bb34d Core/Vmaps: Changed error message when loading outdated vmaps
Closes #18431
Closes #18857

(cherry-picked from c90882ed6e)
2018-12-09 14:18:42 +01:00
HelloKitty
46c69df3a7 Core/Vmaps: Stop M2s from occluding for spellcast LoS
Closes #18528

(cherry-picked from 01d715eaef)
2018-12-09 14:18:42 +01:00
Shauren
738f37d3cf Core/Maps: Replaced spawnmask with difficulty list 2018-09-15 17:55:26 +02:00
Traesh
a8a071e9d9 Core/AreaTrigger: handle AREATRIGGER_FLAG_HAS_CIRCULAR_MOVEMENT (#21778) 2018-08-05 18:57:35 +02:00
Shauren
b773d9997b Core/Maps: Fixed loading vmaps and mmaps in instances 2018-05-06 00:39:13 +02:00
Shauren
2c64bb97e6 Tools:
* mapextractor - fixed fatigue in Thousand Needles
* mapextractor - fixed compressing liquid data
* vmapextractor - fixed extracting liquids inside WMOs
* vmapextractor - implemented new WMO flags
* vmapextractor - store model type for gameobject models
* mmap_generator - fixed processing liquids broken in e5d23103f3
2018-04-07 21:56:19 +02:00
Shauren
f31d907112 Core/Maps: Fixed map min height calculation 2018-03-31 17:09:47 +02:00
Shauren
198828dad6 Core/Maps: Fixed child/parent map crash in garrison maps 2018-03-29 20:48:18 +02:00
Shauren
42f9deb21e Core/Maps: Implemented getting area id from gameobject spawns
Yes, you can now spawn LK platform anywhere and it will treat you as inside Icecrown Citadel
2018-03-28 22:01:22 +02:00
Shauren
8f53ba3854 Core/Phasing: Rewrite GetTerrainMapId 2018-03-25 19:28:36 +03:00
Shauren
3743d04201 Core/MMaps: Implemented loading phased tiles
Closes #16909
2018-03-25 19:28:36 +03:00
Shauren
be0f2c297c Core/Maps: Implemented loading swapped maps 2018-03-25 19:28:36 +03:00
Shauren
bea7faa8f9 Core/Entities: Take terrain swaps into account when calculating LoS/height/area 2018-03-25 19:28:36 +03:00
Shauren
91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
Shauren
007b5a68c5 Core/DataStores: Fixed db2 structures after 7.3.5 2018-03-12 23:11:49 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
6eb9973947 Core/Weather: Fixed weather updates to be thread safe 2017-09-14 22:33:40 +02:00
roc13x
503a382804 Core/Instances: Fix loading entrance location 2017-08-21 09:05:01 +02:00
Shauren
b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Shauren
a0a158b5b8 Core/Scripts: Include cleanup 2017-05-28 16:34:44 +02:00
Shauren
3d7c2ef88f Core/Game: Include cleanup, part 4 - packets and largest headers (after preprocessing, except player/objectmgr) 2017-05-21 23:18:43 +02:00
Shauren
c5d3dd90be Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
2017-05-18 23:53:25 +02:00
Traesh
c73ce93f4c Core/Entities : Basic Conversation Implementation (#18010) 2017-05-14 11:40:55 +02:00
Shauren
9299e9bde0 Core/Grids: Ported cmangos/mangos-wotlk@ea99457e50 2017-05-13 19:37:33 +02:00
Shauren
8fc527f404 Core/Items: Set and save item context field 2017-05-08 23:56:35 +02:00
joschiwald
036f67c0c1 Core/Collision: Replaced phasemask with proper phases in GameObject collision calculation 2017-05-05 21:22:58 +02:00
Shauren
713783531c Core/Corpses: Misc fixes
* Updated corpse flags
* Fixed corpse guid during creation
* Properly set corpse faction
* Fixed setting weapon inventory types if transmogrified
* Fixed corpse location query response when corpse cannot be found
2017-05-01 20:20:18 +02:00
treeston
ec9c5b19ac Map/InstanceMap: Ease up on a somewhat overzealous error message regarding instance saves.
(cherry picked from commit 820e843391)

# Conflicts:
#	src/server/game/Maps/Map.cpp
2017-03-02 21:09:24 +01:00
Treeston
9b4ad0022b Map/Instances: Greatly simplify PermBindAllPlayers logic. (#17940)
(cherry picked from commit cf628880d5)
2017-02-28 20:25:20 +01:00
r00ty-tc
8a71e4255e [Core/Maps] Activate creatures and objects during opening cinematics and other flyby cameras (sunwell etc).
Requires re-running map extractor to extract camera m2 files from data
files. These are very small.
2017-02-19 14:47:20 +01:00
Aokromes
92b746eb88 Core/Misc: Even better description for logs
(cherry picked from commit fad58ad099)

# Conflicts:
#	src/server/game/Maps/Map.cpp
2017-02-04 18:38:56 +01:00
Aokromes
84fded2e42 Core/Misc: Even better description for a log
(cherry picked from commit bd7dc87b02)

# Conflicts:
#	src/server/game/Maps/Map.cpp
2017-02-01 22:53:24 +01:00
Aokromes
10bb5fa86e Core/Misc: Better description for a log
(cherry picked from commit 54d4769d4b)

# Conflicts:
#	src/server/game/Maps/Map.cpp
2017-02-01 22:53:23 +01:00
Traesh
6ab3877c91 Core/Entities: Basic AreaTrigger System (#18035)
* Implemented AreaTrigger Templates
* Implemented AreaTrigger Splines
* Implemented SPELL_AURA_AREA_TRIGGER
* and many more
2017-01-29 00:00:43 +01:00
jackpoz
954b3c9617 Core/VMaps: Fix some vmap height edge cases
Fix Map::GetWaterOrGroundLevel() checking dynamic object only in phase 1 instead of current Unit phase.
Improve DynamicMapTree::getHeight() dynamic object check by casting the ray at +0.5f from the passed Z coordinate, this value will be tuned to improve even more the results.

(cherry picked from commit 1347d7cf7a)
2017-01-12 00:13:55 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00