Commit Graph

1105 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
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
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
Shauren
82c7b6c568 Core/Items: Drop item random property and suffix - all random stats must be given using bonus lists 2019-06-08 17:09:20 +02:00
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
Shauren
50cfeb9aa4 Core/Misc: Improved ip2location code and set it to disabled by default
(cherry picked from commit 0ead73516a)
2019-01-09 17:35:18 +01:00
Gooyeth
8ed2e3602b Typo fix contry -> country (#22075)
(cherry picked from commit a3198cbddc)
2019-01-09 17:35:18 +01:00
Gooyeth
163c487be7 Common: Replace ip2nation by ip2location. (#21957)
Replace ip2nation by ip2location.

Download: https://lite.ip2location.com/database/ip-country
(cherry picked from commit 2fe4ab94c5)
2019-01-09 17:35:13 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
38e05e33a8 Core/Commands: Fixed .gobject move and turn
(cherry picked from commit 7eb25f1af6)

Closes #3802
Closes #15598

(cherry picked from commit e68ff4186e)

# Conflicts:
#	src/server/game/Entities/GameObject/GameObject.h
#	src/server/scripts/Commands/cs_gobject.cpp
2018-12-17 19:34:55 +01:00
Shauren
f94deace76 Merge branch 'bfa' 2018-12-09 14:45:03 +01:00
Keader
2e45423537 Core/Entities: Implemented CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE (#18980)
(cherry-picked from 15ea5b1b8d)
2018-12-09 14:18:42 +01:00
ariel-
ea0cd93662 Core/Scripts: added command to move characters across accounts
(cherry-picked from f7f865f818)
2018-12-09 14:18:42 +01:00
Shauren
5bfb1cc960 Core/Chat: Updated quest chat link format 2018-11-12 23:27:28 +01:00
Traesh
9d210476e5 Core/Creatures: Update creature model handling with new display scale (#22567) 2018-11-07 20:23:30 +01:00
Shauren
7512ffb058 Core/Entities: Update updatefields to 8.0.1.27980 2018-10-10 22:11:41 +02:00
Shauren
a6fb448b44 Core/DataStores: Updated hotfix database structure
* Updated handling for removed db2s
2018-09-26 23:08:22 +02:00
Shauren
738f37d3cf Core/Maps: Replaced spawnmask with difficulty list 2018-09-15 17:55:26 +02:00
joschiwald
56877d2360 Fixed build 2018-08-25 22:47:35 +02:00
joschiwald
5132547ab3 Scripts/Command: Use packet builder in .debug send channelnotify 2018-08-25 20:13:19 +02:00
Shauren
b172ba7b8a Core/Quests: Implemented quest greeting locales 2018-04-24 23:59:37 +02:00
Roc13x
e27d7c8e8f Core/Accounts: prevent existing account ban from being updated (#21836)
Cherry-picked from fbb2b165
2018-04-18 12:32:37 +02:00
joschiwald
01b01c9b15 Scripts/Commands: Added missing changes in bc88d3bc15 2018-04-08 14:28:26 +02:00
Shauren
32563ef25b Core/Commands: Allow GMs to enter water while .gm fly is on 2018-04-05 18:04:53 +02:00
Shauren
0be08dd79c Core/Commands: Allow modifying gameobject destructible state with .gobject set state command 2018-03-25 18:41:05 +02: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
5bd61e91bf Core/Misc: Graveyards can now use conditions, SourceType = 27, SourceEntry = graveyard_zone.ID 2018-03-14 23:31:49 +01:00
Aokromes
bc88d3bc15 Scripts/Commands: implemented command .server debug
- Shows detailed information about server setup, useful when reporting a bug:
 * rev. hash
 * versions of mysql, openssl, boost, cmake
 * info about autoupdater
 * info about ports (realmlist and current)
 * vmap/map/mmap status and folder sizes
 * available DBC locales
 * TDB version

cherry pick of d18f8b94b0

Running this command when reporting bugs is MANDATORY (you can censor paths)
2018-03-14 11:41:09 +01:00
Shauren
007b5a68c5 Core/DataStores: Fixed db2 structures after 7.3.5 2018-03-12 23:11:49 +01:00
Mihapro
16a7a414ab Core/Creatures: Updated power type handling (#20981)
Closes #17476
Closes #12487
2018-03-04 12:48:22 +01:00
Shauren
8467503b90 Core/MMaps: Remove phased tile support
* Extremely slow
* Needs to be implemented partially in tools
* Conflicts with upcoming phasing rewrite
2018-02-20 22:33:38 +01:00
joschiwald
6226189a16 Core/Entities: Created factory methods to create new areatriggers, creatures and gameobjects 2018-01-27 23:02:46 +01:00
ariel-
ad8d47b137 Core/Guild: avoid data integrity problems wrapping delete+insert statements in a transaction
(cherry picked from commit 25281ecb31)
2018-01-21 22:01:15 +01:00
Shauren
3d7af56f5c Warning fixes 2018-01-10 23:22:27 +01:00
Shauren
bb718b5578 Core/Entities: Remove phasemask 2018-01-10 22:01:40 +01:00
joschiwald
5e3e4182c8 Core/Entities: Extended SpawnMask to 64 bit 2018-01-06 19:56:11 +01:00
Shauren
dfd2660a85 Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173

Closes #21171
Closes #21173
2018-01-06 01:21:59 +01:00
Mihapro
8199eef81c Core/Misc: Added helper function Unit::SetFullPower
* Also renamed Unit::getPowerType and Unit::setPowerType to follow style guidelines

Ref #20981
2018-01-03 16:39:32 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Traesh
89c91c271b Core/Quests: Implemented player choices
* Implemented SPELL_EFFECT_LAUNCH_QUEST_CHOICE
* Script hook for player choices
2017-12-31 23:22:55 +01:00
joschiwald
299fad57fc Core/Misc: Fixed type mismatch 2017-12-30 23:09:45 +01:00
ariel-
5bcf14cdb8 Core/Unit: damage immune improvements (9f5df023b7 follow up)
- Handling checked in sniffs: Spell 63710 Void Barrier vs 49143 Frost Strike
  * Send spell miss immune only if spell consists of damage effects
- Checked with 348 Immolate:
  * No packets sent if damage immune, aura is applied normally

Also... who the fuck uses 0 to compare against pointers

(cherry picked from commit ca1c4525c7)

Core/Unit: fix build

Ctrl-S failure
(cherry picked from commit f3bdd705c0)
2017-12-30 22:56:48 +01:00
ariel-
70a89debfe Core/Spell: make a distinction between triggered flags with debugging purposes, and don't use them when casting triggered spells
Fixes #9721 (also other spells affected, example Threat of Thassarian, Stormstrike)

(cherry picked from commit 85143f305d)
2017-12-10 18:37:00 +01:00
Traesh
422ad436c7 Core/Scripts: Added new QuestScript hooks (#20950)
* OnQuestStatusChange and OnQuestObjectiveChange
2017-12-04 17:35:37 +01:00
Shauren
331c70e695 Core/Players: Fixed DK runes and runic power
Closes #19595
2017-11-12 02:42:06 +01:00
Shauren
bf0ae32d18 Core/Commands: Added .modify power command allowing to change any power as long as player class can use it
* Power names are taken from PowerType.db2 (lowercase, using _ is optional)

Closes #20833
2017-11-11 22:41:05 +01:00