Commit Graph

103 Commits

Author SHA1 Message Date
Treeston
daf423a6c3 Scripts/Commands: .account ban no longer fails if an account containing the specified account name is already banned (f.ex. attempting to ban 'test' if 'test2' is already banned) - closes #22990 2019-07-12 13:37:27 +02:00
ForesterDev
e71773140c Scripts/Commands: update .wp commands to use orientation field from DB (PR #23566)
Closes #23330
2019-07-08 14:16:10 +02:00
zartech22
678e0e606a Core/Instance : Fix instance resetting exploit (#23263)
* Push offline players out of instance

Push offline players out of instance when reseting dungeon with a raid mode group

* Add SQL request to character

Add a SQL request to update the position of a player in a specified map

* Teleport to graveyard instead
2019-06-22 19:23:42 +02:00
Giacomo Pozzoni
d5fb0a30ec Core/CreatureTemplate: Outsourced resistances and spells into creatur… (#23343)
* Core/CreatureTemplate: Outsourced resistances and spells into creature_template_spell and creature_template_resistance

* Rename 2019_99_99_00_world.sql to 2019_06_15_01_world.sql
2019-06-15 14:46:31 +02:00
jackpoz
12de860b4a Scirpts/Commands: Fix crash in ".reload creature_template <entry>" 2019-06-09 18:58:03 +02:00
jackpoz
f88a5b12bd Core/Database: Delete gameobject_addon data when deleting a GameObject from the database
Close #23076
2019-04-17 21:01:32 +02:00
Giacomo Pozzoni
3230ca74d2 Core/Database: Close the MySQL connection only after getting the last error code 2019-04-12 08:08:57 +02:00
r00ty-tc
2a7a1b27d5 Core/Database: Correction for later MariaDB version
- Removed unused define CR_INVALID_CONN_HANDLE which was removed entirely in more modern MariaDB versions
2019-04-05 21:51:20 +01:00
jackpoz
1d04a3b216 Core/Misc: Fix GCC 8 warnings 2019-03-31 17:34:28 +02:00
TheWinchesters
a0056951f7 [3.3.5] Commands: lookup player shows which character is online (#23039)
* Show 'online' for every online player in lookup player commands
2019-02-15 20:18:58 +01:00
Treeston
fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
Ghaster
bf3ab6d9c4 Core/Creatures: Port trainer changes from master
Closes #20493
2018-12-30 19:51:36 +01:00
Shauren
be47254a4f Core/Auras: Fixed saving auras with same spell id but different item source 2018-11-09 20:51:20 +01:00
jackpoz
7634a57f64 Core/SAI: Add a 4th target parameter to SAI 2018-09-21 17:56:20 +02:00
Kittnz
9f945d2f42 Core/Guild: Implement character gender and send in packet. (#22436)
Closes #22433
Credit xvwyh
2018-09-16 13:17:03 +02:00
Shauren
8411ec7ed6 Core/Players: Fixed saving quest item progress 2018-07-09 18:32:40 +02:00
Gooyeth
a3198cbddc Typo fix contry -> country (#22075) 2018-06-23 02:30:26 +02:00
Gooyeth
2fe4ab94c5 Common: Replace ip2nation by ip2location. (#21957)
Replace ip2nation by ip2location.

Download: https://lite.ip2location.com/database/ip-country
2018-06-23 01:32:39 +02:00
Shauren
3eefbc9469 Core/DBLayer: Escape more keywords 2018-05-20 23:16:10 +02:00
Shauren
389092ab23 Core/DBLayer: Escape new mysql 8 keywords 2018-05-20 19:58:53 +02:00
Gooyeth
8cec3ffe43 Core/Player: Skip the cinematic of the first login if the character is teleported before. (#21776) 2018-04-27 09:41:50 +02:00
Gooyeth
768968f0c0 Core/Database: Add columns on *_banned (#21748)
* Add columns on ban character query

* Add columns on ban account query
2018-04-01 11:14:41 +02:00
Shauren
ddd60a948c Buildsystem: Separate strict database type checks from TRINITY_DEBUG/WITH_COREDEBUG option 2018-03-14 20:50:54 +01:00
Shauren
592516ae69 Core/Creatures: Reworked setting move types in database
* Each move type has its own field instead of trying to combine everything in InhabitType
* Allow overriding movement separately for each spawn
2018-03-08 23:13:51 +01:00
Jildor
edd6e7d524 Whitespace cleanup in Transaction.cpp
Removing white space after commit 54b0b8f5ea
2018-02-11 13:23:53 +01:00
jackpoz
54b0b8f5ea Shared/Database: Improve dead-lock error handling
Improve dead-lock error handling in async transactions by retrying the transaction for up to 60 seconds instead of just 5 times
2018-02-10 16:07:56 +01:00
ariel-
cb9e72e521 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

Closes #19876
2018-01-13 06:45:21 -03:00
jackpoz
1c60af6328 Core/SAI: Add a 5th parameter to SAI events 2018-01-12 20:17:53 +01:00
kelno
70eb18d0e5 Core/Creature: improve DB linked_respawn handling (#21172)
* Fixed SetCreatureLinkedRespawn function possible erasing/replacing a GameObject link (instead of a creature one)
2018-01-08 00:32:22 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
Wyreth
ae878e18ef Core/Creature: implement school immunity for creatures in creature_template (#20709) 2017-12-17 16:29:22 +01:00
iridinite
9d454eb3df [3.3.5] Core/AuctionHouse: Auction bidders (#18328)
* Save more auction bidders than the highest bidder only
2017-11-27 23:00:30 +01:00
Aokromes
59e94fd9bb Misc: More cleanup 2017-11-25 02:39:27 +01:00
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
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
ariel-
f7f865f818 Core/Scripts: added command to move characters across accounts 2017-01-06 02:34:52 -03:00