Commit Graph

757 Commits

Author SHA1 Message Date
Treeston
51e28ae76a DB/SpawnGroup: Instance spawn group data for Tempest Keep: The Eye and Hellfire Citadel: Ramparts.
(also some minor adjustments to command output for convenience)
2018-01-25 13:45:11 +01:00
Treeston
6c3c200cc5 Misc: assert -> ASSERT 2018-01-25 12:39:19 +01:00
Treeston
6ce078d8e8 Scripts/Commands: new command '.debug instancespawn' 2018-01-24 22:52:42 +01:00
ariel-
c099174ff7 Core/Misc: fix some /W4 warnings and some reported by GCC 6.3 2018-01-22 23:55:33 -03:00
ariel-
73cc613dc8 Core/Formations: update codestyle and fix crash
Closes #21288
2018-01-22 02:43:34 -03:00
ariel-
b75ff7d4bf Core/Globals: revert back to unordered_map for templates
Partial revert of commit b64c504314
See discussion on b64c504314
2018-01-18 01:07:29 -03:00
ariel-
b64c504314 Core/Globals: throw some RAII into ObjectMgr, and load templates into vectors
Ref #14274
2018-01-17 02:17:49 -03:00
ariel-
f1986c6aaf Core/Entities: implement secondary damage for some weapons and removal of old voodoo
- Fixed correct Retaliation damage spell according to sniffs is 20240
- CalcArmorReducedDamage insisted on dealing a minimum of 1 damage even if damage was 0
- CalculateDamage was zero-phobic too: it defaulted to arbitrary max 5 damage

Closes #19081
2018-01-14 09:23:34 -03: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
ariel-
f50a333418 Core/Misc: kill whitespace 2018-01-12 00:07:29 -03:00
Treeston
45168f9612 nopch fix 2018-01-09 22:04:35 +01:00
Treeston
d283f96f70 missing return 2018-01-09 18:23:50 +01:00
Treeston
f45c211987 Scripts/Commands: New command: .debug threatinfo 2018-01-09 18:09:24 +01:00
Treeston
3bb33e3108 Core/Map: New Map::ForceRespawn to override objections and force a respawn (equivalent to force = true). Use this to fix various GM commands.
Scripts/Valithria: Fix an issue that could get the encounter stuck in an unloaded state.
2018-01-07 19:53:39 +01:00
Treeston
cbf5535b74 Revert "Scripts/Commands: Allow to use .tele in combat only to GMs"
This reverts commit 3ae5b72075 - see discussion on commit.
2018-01-06 13:32:11 +01:00
Shauren
b2b4f9d1e4 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

(cherry picked from commit dfd2660a85)
2018-01-06 12:30:28 +01:00
jackpoz
3ae5b72075 Scripts/Commands: Allow to use .tele in combat only to GMs
Allow to use .tele in combat only to players who can be GMs (even if they have .gm off)
2018-01-06 10:34:54 +01:00
Treeston
fdacf12739 Core/Combat: Some more sanity check asserts to try and track down #21187.
Also, some anti-annoyance treatment for dot tele.
2018-01-06 01:40:31 +01:00
Treeston
e0b609a178 Core/Map: Fix a crash that could happen if a player moved very far away from a creature they were in combat with. Closes #21177. 2018-01-04 15:19:37 +01:00
Treeston
9f9507e6a1 Core/Misc: A variety of clean-up changes, mostly following up on 532ab1c to fix legacy bugs exposed by it:
- Triggers can no longer have a threat list (this may expose some ugliness in old legacy scripts)
- Threat entries are forced to OFFLINE if the AI refuses to attack the target
- Clean up passive creature evade behavior to be more consistent
- Fix a months old issue in spawn group management that would cause "Inactive" to incorrectly show in .list respawns for system groups outside of map 0
- Valithria script cleanups, remove old hacks and make it work with the new system. Closes #21174.
- Some strings cleanup
2018-01-04 04:46:41 +01:00
Treeston
532ab1c7f8 Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.
2018-01-03 20:04:19 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
jackpoz
513e153a13 Core/Misc: Removed unneeded checks 2017-12-31 14:41:31 +01:00
Treeston
d507a7e338 [3.3.5] CastSpell unclusterfucking (that's a word now) (#21123)
Core/Spell: The giant CastSpell unclusterfucking (that's a word now) of this generation.

- CastSpell now always takes three arguments - target, spellId, and a struct containing extra arguments
- This struct (CastSpellExtraArgs, see SpellDefines.h) serves as a conglomerate of every previous combination of the 20 billion different CastSpell overloads, all merged into one
  - It has some great utility constructors - check them out! All of these can be used to implicitly construct the ExtraArgs object.
- A gajillion refactors to make everything behave the way it always has
2017-12-30 20:28:41 +01:00
Jeremy
e42903ec16 Core/Entities: Fix some weird movement due to los issues (#21125)
* Core/Entities: Fix some weird movement due to los issues
- Made LoS check use collisionHeight instead of midsection. Value was too low.
- Gnomes will now have a breath bar more quickly than for example a tauren.
- Changes have been made to checking for ground z as well, some tweeking might be needed but removed most of the scattered +2.0f/+0.5f/we
* Add 0.05f to isInAir check in Creature::UpdateMovementFlags
2017-12-29 22:32:07 +01:00
ariel-
e2a97ba7e7 Core/Scripts: fix codestyle 2017-12-29 18:08:19 -03:00
Rochet2
4d9fa4ea5f Core/Commands: Fix .modify mount (#21137) 2017-12-29 21:47:53 +01:00
jackpoz
12701cb0c6 Core/Misc: Replace time(NULL) with GameTime::GetGameTime() 2017-12-24 22:50:59 +01:00
Gogs
fbb2b1650f Core/Accounts: prevent existing account ban from being updated
Signed-off-by: jackpoz <giacomopoz@gmail.com>
2017-12-17 19:11:06 +01:00
Andrew Letson
1cedcf0bf3 Scripts/Commands: Add failure state for quest remove (#20611)
Add more verbose messaging to the .quest remove command
2017-12-17 15:51:11 +01:00
ForesterDev
661dfee80e Scripts/Commands: modify command .dismount to target any selected player (#19788)
- change security lvl for command .dismount to 2 (gamemasters). For players there is /dismount command

Closes #19788
2017-12-17 04:36:59 +01:00
ariel-
78a1c687a2 Core/Misc: minor typo and codestyle fixes
- Replace NULL uses in new code with nullptr
- Fix wrong (accumulated) load time log when loading calendar invites
- Make Creature::CanRegenerateHealth const as its just a getter
- Mark OnlyOnceAreaTriggerScript::OnTrigger as final in case someone wants to override that (you are supposed to use protected _OnTrigger hook)
2017-12-13 14:43:12 -03:00
Ovah
869affa893 Core/Creatures: Implemented extra flag to use offhand attacks (#21008)
* Fixed initial offhand attack timer so the main and offhand attacks will now act blizzlike instead of getting executed at the same time

Note: since some creature equipment items cannot be identified as weapon since they are only visual items there is no way to detect this automaticly
2017-12-07 17:41:11 +01:00
Hristiyan
0725f608aa Core/Commands: Allow using display ids higher than std::numeric_limits<uint16>::max() for .modify morph command (#21022) 2017-12-03 12:31:47 +01:00
jackpoz
97f33dc779 Core/Misc: Fix static analysis issues 2017-11-11 20:27:30 +01:00
ccrs
e10d7dd45c Core/Misc: waypoint movement
- Creature: update current waypoint to store nodeId and pathId
- MotionMaster: change variable type on GetMotionSlotType and GetMotionSlot to keep consistency and prevent errors (ASSERT is now no longer needed)
- UnitAI: add new waypoint hooks WaypointPathStarted and WaypointPathEnded
- SAI: handle WAYPOINT related events if creature is no escorting
* SMART_EVENT_WAYPOINT_RESUMED still not implemented for no escorting

TODO: the new hooks can save, now duplicated, logic on EscortAI and SAI

closes #20777
updates #20310
updates 21bd52cb99
2017-11-06 22:19:23 +01:00
ForesterDev
a64d1ec51e Core/Quests: implement Quest Greeting (DB table quest_greeting)
* Core/Quests: implement Quest Greetings. Partial port 22e230ecec
2017-10-29 10:15:22 +01:00
Treeston
37dff2b7a1 Core/Misc: random refactors 2017-08-27 13:35:03 +02:00
Treeston
f279207d48 Core/Spawn: Move spawn group state management from sObjectMgr to the Map object, which makes it actually function as intended with instances. Woops. 2017-08-26 13:14:25 +02:00
Treeston
cac99beffd Scripts/Commands: .npc delete and .gobj delete now work while the specified guid is despawned. Fixes #20145. 2017-08-21 17:07:53 +02:00
sirikfoll
e2565c2597 Core/Misc: Remove Whitespaces 2017-08-11 23:06:37 -03:00
ccrs
7fff83d675 Core/Movement: waypoint movement (#20121)
Following the work done in #19361 this is the cleanup and improvement of the related logic of waypoint management.

Ref 28050f3 #18020
(taking the good parts and ignoring the incomplete work)
2017-08-12 01:40:25 +02:00
Treeston
759357049c Scripts/Commands: Fix some quirkiness and potential crashes with live DB modification commands (npc move and npc delete), which are horrible and should be deleted anyway.
Fixes #20104.
2017-08-02 22:05:40 +02:00
Treeston
c70b328eda more unneeded checks (follow-up 3b02029) 2017-08-01 18:14:55 +02:00
Treeston
3b02029cb6 remove an unused variable (follow-up fcd6fe0) 2017-08-01 17:58:17 +02:00
Treeston
fcd6fe0aac Scripts/Commands: New utility command: .list spawnpoints.
(I just needed it for dynspawn follow-up work, really.)
2017-08-01 03:42:11 +02:00
Aokromes
41721642f7 NoPCH Build fix 2017-07-31 22:56:21 +02: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
treeston
e0194e4a2c Revert "Scripts/Commands: Fix a potential crash when summoning players that are just logging on." - the check was unnecessary (already done in extractPlayerTarget).
This reverts commit 05cdcdb230.
2017-07-17 23:23:54 +02:00
treeston
05cdcdb230 Scripts/Commands: Fix a potential crash when summoning players that are just logging on. 2017-07-17 23:00:46 +02:00