Commit Graph

96 Commits

Author SHA1 Message Date
r00ty-tc
59db2eeea0 Dynamic Creature/Go spawning:
- True blizzlike creature spawn/respawn behavior - new creature = new object
 - Toggleable spawn groups (with C++/SAI/command options to use them)
 - Custom feature: dynamic spawn rate scaling. Accelerates respawn rate based on players in the zone.
 - Backward compatibility mode (set via group and for summons)
   to support creatures/gos that currently don't work well with this
   (this should be removed once the exceptions are fixed)

Fixes and closes #2858
Tags #8661 as fixable.
Fixes and closes #13787
Fixes #15222.
2017-07-31 21:21:04 +02:00
Shauren
5024813fe3 Buildsystem: Minor PCH building changes
* *PCH.cpp are now only compiled with MSVC, other compilers use custom helper commands to generate the precompiled header
* Don't call the linker for pch helpertargets

(cherry picked from commit 137f5e7887)
2017-06-22 02:33:12 -03:00
ariel-
85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
Chazy Chaz
d17a45ee7e Core/Misc: Update locales_creature_text to simple system 2017-05-04 16:46:53 +02:00
jackpoz
65aeeafad3 Core/Misc: Fix static analysis issues 2017-04-25 14:27:53 +02:00
ariel-
4c593f12ca 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
2017-04-12 02:19:55 -03:00
xinef1
9dc3de10f0 Core/Loot: implement Loot Item Storage (#19018)
* Created Item Loot Storage, no more synchronous DB selects
* Fixed buyback case, where stored loot was not removed from db
* Added Primary key, and changed field types to be unsigned for table item_loot_money
2017-04-11 22:22:50 -03:00
ariel-
affee140c6 Core/Database: Prepared statement parameter preallocation (#18999)
- Pass prepared statement size to the helper class to prevent runtime resizing.
- Rename CheckValidIndex -> AssertValidIndex
- Cached prepared size on the worker pool as it's shared among all connections
- Cached query data only for each connection, done lookup in map instead of possibly creating a new element
- Kill the prepared statement map, and store raw sql string on the MySQLPreparedStatement class
(This info is only used for logging, and there is no need of keeping a second container just for it)
2017-03-01 22:20:53 -03:00
Shauren
c2a36c9e89 Fixed clang segmentation fault in nopch mode
(cherry picked from commit 787adc24b2)
2017-01-30 17:22:01 +01:00
ariel-
60dd803bbe Core/Server: fix duplicated inserts into tutorials table for newly created characters 2017-01-29 14:00:19 -03:00
xinef1
b955456008 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
2017-01-28 01:00:28 -03:00
Shauren
d7b02a0624 Removed debug leftovers
(cherry picked from commit e8273b7b37)
2017-01-25 23:38:19 -03:00
Shauren
580f46693d Build fix
(cherry picked from commit 0314abc26a)
2017-01-25 23:38:16 -03:00
Shauren
4c27203c8f Core/DBLayer: Convert async queries to new query callbacks and remove old callback handling
(cherry picked from commit 8e2634b2b4)

Conflicts:
	src/server/bnetserver/Server/Session.cpp
	src/server/bnetserver/Server/Session.h
	src/server/database/Database/QueryCallback.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/SocialHandler.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Server/WorldSocket.h
	src/server/game/World/World.cpp
	src/server/game/World/World.h
2017-01-25 23:38:13 -03:00
Shauren
8af3cccc83 Core/DBLayer: Refine new query callback for chaining
(cherry picked from commit 73e61fa652)
2017-01-25 23:38:10 -03:00
Shauren
b879a6cae5 Core/DBLayer: Added new async query callback api
(cherry picked from commit fcabeed754)
2017-01-25 23:38:07 -03:00
joschiwald
62b62ddd63 Core/Packets: updated some contactlist packets
(cherry picked from commit e01bb91887)

Conflicts:
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Entities/Player/SocialMgr.cpp
	src/server/game/Entities/Player/SocialMgr.h
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Server/Packets/MiscPackets.cpp
	src/server/game/Server/Protocol/Opcodes.cpp
	src/server/game/Server/Protocol/Opcodes.h
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/shared/Database/Implementation/CharacterDatabase.cpp
	src/server/shared/Database/Implementation/CharacterDatabase.h
2017-01-25 23:36:24 -03:00
Aokromes
1957c9c114 Core/Updater: Better log for fresh installations 2017-01-15 08:55:11 +01:00
ariel-
f7f865f818 Core/Scripts: added command to move characters across accounts 2017-01-06 02:34:52 -03:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
myran2
6c21ddd9b9 Core/Pets: Use prepared statements in Pet::SavePetToDB
Very partial cherry pick
(cherry picked from commit bc1a81747a)
2016-12-15 08:43:10 -03:00
ariel-
e84dfff4ce Core/Auras: don't save auras casted by items
- Drop useless field from DB (itemGuid was being saved, but never used, see Prepared Statements)
- This type of auras (like Water Bucket, Precious Ribbon, etc) will be recasted on login anyways.

This reverts commit 16cfd59f5b
2016-10-30 07:31:42 -03:00
ariel-
66688a7855 Core/Channel: revamp channel system (#17980)
* Core/Channel: change the way channels are stored and sent to client.

- Fixes multiple channels per zone when using different locales
- Connected clients will receive locally the name of the channel for their apropiate locale (if available)
- In other cases default locale name will be sent, so as to prevent breaking channel chat for those players

Closes #8411
2016-10-07 00:59:56 -03:00
joschiwald
ec221c5500 Core/Auth: removed unneeded sub query 2016-09-25 18:06:01 +02:00
SnapperRy
6f1e823cac Core/Fishing: implement retail-like fishing skill-up functionality (#17528) 2016-09-13 04:16:05 +02:00
Aokromes
9250680680 Update DBUpdater.cpp 2016-09-12 01:04:15 +02:00
Aokromes
fb048a4cdb Update DBUpdater.cpp 2016-09-12 01:00:27 +02:00
Aokromes
fe9f79780e Core/Updater: Clarify more 2 errors 2016-09-12 00:51:06 +02:00
joschiwald
f5890941b1 Core/Logging: delete old logs of the own realm only
(cherry picked from commit beedf737c8)
2016-08-27 15:28:33 +02:00
ariel-
fbfcfe4c1d Core/Globals: delete another synch query using CharacterInfo map 2016-08-18 01:45:44 -03:00
Trond B Krokli
70b3373da1 Core/DB/Updater: English grammar corrections (#17207)
Improve English text in strings and comments in UpdateFetcher.cpp
- replace incorrect text with the intended words in some output strings
- corrections in the comments to point out the intention of the code
(cherry picked from commit 186375d997)
2016-08-10 18:11:36 +02:00
jackpoz
7616f796d0 Server/Database: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-10 16:57:21 +02:00
jackpoz
abe37e458c Server/Database: Reduce differences between 3.3.5 and 6.x branches
Cherry-pick 1bea52fd46 and 543bea32 to add support to TYPE_BINARY MySQL field type
2016-08-10 16:02:22 +02:00
ForesterDev
6a87524204 Core\Command: remove account_muted data on account deletion 2016-08-04 17:24:41 +04:00
Aokromes
09a1cfdf77 Core/Updater: Clarify even more this error 2016-07-23 03:37:09 +02:00
Aokromes
5868509a63 Update DBUpdater.cpp
Because nature wins race....
2016-07-20 21:46:59 +02:00
ariel-
1a52c1cd36 Core/Misc: remove two synch queries and replace them with CharacterInfo cache 2016-07-16 20:51:32 -03:00
Aokromes
90cff479ac Core/Misc: Better description for a log 2016-07-02 19:53:38 +02:00
psayafan
fe2aed6047 Core/Player: Add option to prevent rename during character customization
Closes #17420
2016-06-23 21:31:09 +02:00
Trond B Krokli
8fe8501712 Core/DB/Updater: engrish corrections in DBUpdater.cpp (#17262)
English grammar and syntax corrections in DBUpdater.cpp
- string texts corrected, source code unchanged
- comments improved and checked for typos
2016-06-01 21:10:20 +01:00
Aokromes
862d068cde * DB/Graveyards: Added a comment field to describe the graveyards in graveyard_zone 2016-05-25 19:08:52 +02:00
Naios
d4d199d765 Core/Common: Move the query callback header to the database project
* Also renames the header to it's correct name QueryCallback
2016-05-10 18:16:13 +02:00
Shauren
40b0f03d5c Core/Misc: Fixed warnings found by GCC 6
(cherry picked from commit 67fd3ee726)

# Conflicts:
#	src/server/game/Spells/Auras/SpellAuras.cpp
2016-04-28 16:21:20 +01:00
Naios
dadc02d77a Core/Updater: Correct the config key hint of a log message 2016-04-23 17:13:38 +02:00
Naios
3271f328de Core/Cryptography: Move the SHA1 calculate helper to the SHA1 header 2016-04-17 19:30:13 +02:00
Naios
f93617c3c9 Core/Common: Capsule boost process into helper functions
* For easier usage, the processes output it routed
  correctly to the TC logger line by line now.
* Add support for asynchronous process execution
  and process termination.

(cherry picked from commit 3497b4960b)
2016-04-11 21:40:59 +02:00
Shauren
39abb8acb3 Core/Misc: MSVC warning fixes
(cherry picked from commit 70412e7e25)
2016-04-09 18:13:30 +02:00
Shauren
702cfefddb Buildsystem: Initial changes to support building with vs clang toolset
(cherry picked from commit 4a3a178d7f)
2016-04-09 12:38:20 +02:00
Naios
205556b226 Core/Database: Converted the database library to a shared library.
* There is still the possibility to static link against database.

(cherry picked from commit 6cfea2d8f7)
2016-03-24 02:46:01 +01:00
Naios
469f2d3ade CMake: Use inherited dependencies in database, shared and game 2016-03-18 02:52:59 +01:00