Commit Graph

700 Commits

Author SHA1 Message Date
treeston
41eddd59aa Correct some missing auth DB changes from b59ca1c. 2017-06-17 01:24:53 +02:00
treeston
b59ca1cc81 Rename .debug uws to .debug worldstate (clarity change). 2017-06-15 16:56:15 +02:00
treeston
4b6351e6a5 Fixes to all-reputation and all-skill custom option handling:
- Move on-create customs (all explored, all reputations) to CharacterHandler::HandlePlayerLogin for first login. Fixes #19839.
- Add Wrath factions to all reputations custom (it only had BC factions).
- Remove unused ReputationMgr::SendStates. Add ReputationMgr::SendState handling for sending all updated states in arbitrary order if nullptr is passed (used in point #1).
- Fix all weapon skills max custom to properly apply on learning new weapon skills.
2017-06-15 04:19:28 +02:00
treeston
6f29aac936 Add new command 'npc showloot'. Does exactly what it says on the tin. 2017-06-12 19:10:41 +02:00
treeston
ac0f76f8c5 - Add new commands .group set assistant, .group set maintank and .group set mainassist to toggle raid member flags.
- Fix 2017_05_29_00_auth.sql to be reapply safe.
2017-06-12 17:01:47 +02:00
treeston
4e41d3e6bd Removed a now-unused local (ca02629 follow-up) 2017-06-12 13:17:48 +02:00
treeston
ca02629950 Make some adjustments to .summon and .group summon behavior to make them more permissive:
- Now only requires the either target's group leader or target itself to be on your map
- Now summons all applicable group members even if one member fails checks
- No longer has some truly weird edge case instance unbind code that could cause exploit behavior (Really, I have no idea why this existed, because it certainly didn't do what it might've been meant to do.)
2017-06-12 13:08:07 +02:00
treeston
d57307f63d So, I came in trying to fix gameobject LoS. So I restructured some stuff.
Then it turned out that gameobject LoS is already fixed. So all this does, really, is restructure some stuff.
And remove the hack from Sapphiron because I could.
2017-06-10 15:08:35 +02:00
Treeston
f6c849729b [3.3.5] Get zone/area IDs from vmap data in the liquid update (#19840)
* Add new method Map::getFullVMapDataForPosition to get area info and liquid info in a single vmap lookup
* Use this lookup in Map:: relocation methods to update m_areaId and m_zoneId fields on WorldObject
* Adjust GetZoneId/GetAreaId on WorldObject to always return these cached fields
* Clean up liquid state handling on Unit and Player
* Hand floor's Z coord up through GetFullTerrainStatusForPosition, use it to update a new field in WorldObject, and use that to feed a new GetFloorZ call on WorldObject.

Closes #16489
2017-06-08 00:25:06 +02:00
treeston
7c87916f78 clang is dumb 2017-06-03 16:51:32 +02:00
treeston
a3b198c7e1 Some improvements to .debug raidreset command. Now supports heroic difficulty 5-man dungeons and outputs sensible text, as opposed to silently doing (or not doing) stuff. 2017-06-03 16:44:54 +02:00
ForesterDev
dd4ff1fe54 Scripts/Command: implement .debug play music command
Closes #19809
2017-05-29 23:17:49 +02:00
Chazy Chaz
4843544c21 Scripts/Commands: Update reload commands names 2017-05-05 05:52:49 +02:00
ccrs
17579f8d91 Core/Creature: drop method SetPosition
eeeevil, use UpdatePosition. It was there just for old scripts compatibility.
2017-05-02 14:18:42 +02:00
ariel-
4c4dca6d69 Core/Misc: camelize GetFaction/SetFaction properly 2017-04-28 18:37:38 -03:00
Chazy Chaz
fbbe247114 Core/Misc: Sync database schema with master 2017-04-18 13:06:09 +02:00
ccrs
9be7f5f57b Core/Movement: 96f4c7c followup 2017-03-25 13:17:29 +01:00
Chaouki Dhib
a1f2f30c14 Core/Spells: fix wrong distance calculations in AoE spells [Needs testing] (#16290)
Core/Spells: Fix wrong distance calculations in AoE spells.
Pull request #16290 by chaodhib.
God bless, finally.
2017-03-23 00:43:04 +01:00
ariel-
8be85a5408 Core/Misc: cache server MOTD and properly format it for RA and when issuing .server motd 2017-03-21 00:51:13 -03:00
Chazy Chaz
a63bd06ec6 Core/Players: Rename "heroic character" to "death knight"
Closes #19287
2017-03-17 19:03:59 +01:00
xinef1
7567cafec8 Ensure that all actions are compared to fixed point in time (ie. world update start) (#18910)
- Actions will not be dependent on processing moment
- Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999)
- Created GameTime namespace and UpdateTime class and moved there some code out of world
2017-03-01 22:19:25 -03:00
xinef1
ae9d01a324 Store cached static data queries, instead of building them in every query opcode (#18637)
- Added config option to enable / disable cache
- Reinitialize data on reload command use
- Always send WDB fields in item query
2017-02-20 16:27:08 -03:00
xinef1
59ce3d6c9b Core/Misc: Moved CharacterInfo out of world to separate class
Closes #19030
2017-02-05 23:14:19 +01:00
xinef1
e1f14215d8 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
2017-02-05 15:39:22 +01:00
ariel-
6f9e8b6c91 Core: add some missing Player Name normalization on input data 2017-01-28 01:27:39 -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
Keader
15ea5b1b8d Core/Entities: Implemented CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE (#18980) 2017-01-27 20:47:54 -02:00
Rochet2
117d1c31c9 Scripts/Commands: Fix guid usage and enhance commands (#18278)
- Fix targeting gameobjects and creatures for .dist and .gps. The old code used DB guid to search from core generated guid lists.
- Fix some error messages saying 'no player found' even if creatures and gameobjects and players were searched
- Change atoi to atoul when receiving lowguids as string or other uint32 values
- Use ObjectGuid::LowType instead of uint32 for lowguid type
- Allow .gob info to take in gameobject guid link as well as entry link in addition to gameobject entry and update the documentation of the command
- Change .gob delete to post the spawnid (dbguid) instead of the ingame generated guid (which is basically never seen or used by the player in any other commands that I see)
- Allow spawntimesecs to be negative when spawning a gameobject
- Disable searching by ingame spawn id in commands. (it makes little sense for a user to provide a number which is then attempted to be used as DB guid and non DB guid when both could have a match)
- Update .gob turn documentation to tell about possibility to provide orientation in command
- Correct the types in .gob add command result trinity_string
- Correct the creature search for .npc del
- Change .event to .event info
- Add .go offset command
- Remove the .go command for empty string (no subcommand given) because it just used .go xyz
- Extend .gob info to show size, faction, flags and model dimensions
- Remove some unnecessary casts
- Document .wp show better (first and last were not documented)
- Insert spawnid to .wp show info error message
- Fix spawntime printing for .gobject target
- Fix guid targetting for .npc set movetype
- Fix query by spawnid for .wp show info
- Fix deleting of existing waypoints when twice doing the command .wp show on
- Fix deleting of existing waypoints when doing the command .wp show off
- Change wpguid column in DB and in core to uint32, which is what the spawnid type is in core and db.
2017-01-08 04:55:22 +01:00
ariel-
f7f865f818 Core/Scripts: added command to move characters across accounts 2017-01-06 02:34:52 -03:00
ariel-
829deec2bd Core/Scripts: kill one ugly char buffer 2017-01-06 00:45:58 -03:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
Shauren
618cf0e1c2 Core/Units: Cleanup hardcoded magic numbers for byte field offsets
(cherry picked from commit ac1dc758b9)
2016-12-15 08:16:01 -03:00
ariel-
25281ecb31 Core/Guild: avoid data integrity problems wrapping delete+insert statements in a transaction 2016-11-19 23:28:52 -03:00
ariel-
ca1c4525c7 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
2016-11-15 22:39:15 -03:00
ariel-
85143f305d 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)
2016-11-07 20:36:23 -03:00
ariel-
d3a71a8338 Core/Spells: use DamageInfo struct to calc spell absorbs and resists, and use calculated proc hitMask on aura ticks
Closes #18135
2016-10-26 02:16:11 -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
ariel-
e641d0c7d7 Core/Spells: Implementation of QAston proc system
- Move checks from Unit::IsTriggeredAtSpellProcEvent (old system) to Aura::IsProcTriggeredOnEvent (new system)
- Templatize SpellModOp param of Player::ApplySpellMod, also killed charge counter from SpellModifier and Player system for handling charges... no point in having 3 different systems doing the same thing
- Automatically add default entries to spellProcMap, based on spellinfo (else auras won't proc without an entry) Based on old Unit::ProcDamageAndSpellFor
- Old Unit::ProcDamageAndSpellFor renamed to Unit::ProcSkillsAndReactives and made private, will no longer handle auras.
- Start making use of HealInfo::AbsorbHeal in unit calculations, add effective healing info to HealInfo struct
- Changes in spell reflection system, emulates old behaviour, delaying aura drop
- Removed old charge count hacks in SpellMgr::LoadSpellInfoCorrections
- Removed bogus error log when procChance is 0: Some auras have initial 0 procChance but modified by SPELLMOD_CHANCE_OF_SUCCESS
- Fixed TriggerAurasProcOnEvent logic that tried to trigger twice from actor.
- Allow non damaging spells with DamageClass Melee or Ranged to proc character enchants. Ref issue #17034:

  * http://web.archive.org/web/20110309092008/http://elitistjerks.com/f47/t49865-paladin_retribution_pve/
  * When an auto-attack lands (does not dodge/parry/miss) that can proc a seal the of the following things happen independently of each other (see 2 roll system).

  * 1) A "hidden strike" which uses melee combat mechanics occurs. If it lands it refreshes/stacks SoV DoT. Only white swings can trigger a refresh or stack. (This hidden strike mechanic can also proc things like berserking..)
  * 2) A weapon damage based proc will occur if you used a special (CS/DS/judge) or if you have a 5 stack (from auto attacks). This attack can not be avoided.

  * Holy Vengeance is the "hidden strike" it has an apply aura effect and damage class melee.
- Fixed Blood Tap interaction with Death Runes (btw, don't know what was going on with those MiscValueB, spell 45529 doesn't have any MiscValueB in SPELL_EFFECT_ACTIVATE_RUNE)
- Ported some AuraEffect checks from old Unit.cpp function. added new AuraScript hook to check procs of an specific effect
- Allow only AuraEffects that passed the check to proc, this won't block whole aura from proccing (and lose charges) if at least one of the effects procs, though
- Changes in spell mod system (for SPELLMOD_CASTING_TIME). fixes #17558.
- Added an exception for SPELLMOD_CRITICAL_CHANCE too, fixes #15193
2016-10-04 20:21:55 -03:00
Rochet2
c52566a888 Core/Scripts: Enhance quest status hook by making it catch more status changes (#17865) 2016-09-09 21:11:36 +02:00
ariel-
14445d2202 Core/Misc: calculate rotation fields from orientation in some places it's impossible to get:
- SmartScripts: SMART_ACTION_SUMMON_GO
- Spell Effects:
  * SPELL_EFFECT_DUEL
  * SPELL_EFFECT_SUMMON_OBJECT_WILD
  * SPELL_EFFECT_SUMMON_OBJECT_SLOT1
  * SPELL_EFFECT_SUMMON_OBJECT_SLOT2
  * SPELL_EFFECT_SUMMON_OBJECT_SLOT3
  * SPELL_EFFECT_SUMMON_OBJECT_SLOT4
- Command Scripts: .gobject add

Closes #17891
2016-09-03 17:31:29 -03:00
Gustavo
6ee35734e4 Whitespace clean-up 2016-08-29 01:11:04 +02:00
jackpoz
eb9bf314c4 Core/Commands: Code cleanup
Remove commented out code
2016-08-20 20:53:08 +02:00
ariel-
1b44377cda Core/Scripts: allow ".debug arena" and ".debug battleground" commands to be issued in the console 2016-08-16 00:40:56 -03:00
ForesterDev
fdcea5c7ef Core/Command: Check account password max length 2016-08-11 13:32:52 +02:00
treeston
d760219062 Scripts/Commands: Some adjustments to make shutdown commands more user-friendly.
- New error message if a shutdown is delayed due to force threshold.
- New status message indicating that a server shutdown was successfully cancelled.
2016-08-06 14:34:07 +02:00
jackpoz
b37c7101de Scripts/Commands: Change "server shutdown" behavior
Change "server shutdown 0" behavior to delay the shutdown by the force threshold specified in configs if there are still players connected, set to 30 by default
2016-08-04 15:03:58 +02:00
jackpoz
884736b3b2 Scripts/Commands: Change "server shutdown" behavior
Change "server shutdown" behavior to always include [force] optional parameter when issued from local or remote console.
2016-08-03 16:26:30 +02:00
ariel-
62bfee37cb Core/Entities: debloat SummonGameObject parameter list using proper wrappers and enable GO rotation in scripts
- There's still an overload allowing for x, y, z, o to be passed directly
- Fixed default animstate for GameObject creation in many places, it should be 255, not 100 (checked in sniffs)
2016-07-30 18:50:44 -03:00
Tomatoes
29826a92ef Core/Ticket System: Ticket comment visual output bug
* Commenting on a ticket no longer sends the GM's name to the ticket handler for assignment
* Closes #16091
* Closes #17686

Signed-off-by: Naios <naios-dev@live.de>
2016-07-30 22:37:35 +02:00
ariel-
2967bf59b4 Core/GameObjects: Gameobject rotation (from cmangos/mangos-wotlk@2bcbc0f) (#14146)
cmangos/mangos-wotlk@0fe88f35df: [11531] Normalize gameobject's quaternion, thanks to zergtmn for pointing
cmangos/mangos-wotlk@060dfb791b: [11667] Implement transport path rotation
cmangos/mangos-wotlk@565f52c6c1: [11806] A bit gameobject code refactoring
cmangos/mangos-wotlk@6874951: [11807] Add gameobject_addon table

Closes #14146
2016-07-30 11:36:18 +02:00