Commit Graph

470 Commits

Author SHA1 Message Date
Giacomo Pozzoni
aeddd417c4 Core/Misc: Handle timezones for hour-specific events specifieds in worldserver.conf (#23540)
* Core/Misc: Handle timezones for hour-specific events specifieds in worldserver.conf

* Handle Respawn.RestartQuietTime too

* Handle XP.Boost.Daymask too

* Core/Misc: Code cleanup

* Core/Misc: Code cleanup

* Update Util.cpp

* Update boosted_xp.cpp
2019-07-19 21:24:56 +02:00
Wyrserth
e7cf24d263 Script/BoreanTundra: move Pile of Fake Furs' script (related to quest Unfit for Death) from ItemScript to SpellScript.
Closes #21890.
2019-07-17 19:57:21 +02:00
Treeston
0ae2afe307 Scripts/World: Rewrite air force trigger bots script, add hostility check along the way. Closes #23307. 2019-07-09 18:24:43 +02:00
ForesterDev
b47bb59e2a Core/Player: add helper methods GetNativeGender/SetNativeGender/SetGender (#23520)
* Core/Player: add helper methods GetNativeGender/SetNativeGender/SetGender and fix some cases, where we should get player gender, instead of modified by display gender

* fix merge

* Add virtual methods for Unit class
2019-07-02 10:17:02 +02:00
ccrs
401777d024 Core/Unit: rename several getters to follow codestyle
uint8 GetLevel()
        uint8 GetLevelForTarget(WorldObject const* /*target*/)
        void SetLevel(uint8 lvl)
        uint8 GetRace()
        uint32 GetRaceMask()
        uint8 GetClass()
        uint32 GetClassMask()
        uint8 GetGender()
2019-07-01 21:36:32 +02:00
Wyrserth
028d16a812 Script/DarkmoonFaire: fix logical error in go_darkmoon_faire_music.
Closes #23548.
2019-07-01 14:39:52 +02:00
Wyrserth
d71a0608bf Script/Creature: calculate Traveler's Tundra Mammoth's NPCs' exit position based on current player's position (#23344)
* Script/Creature: calculate Traveler's Tundra Mammoth's NPCs' exit position based on current player's position.

* Comment out unused argument.
2019-06-02 21:42:24 +02:00
Giacomo Pozzoni
797fba98e9 3.3.5 gameobject summoner (#23289)
* Scripts/Misc: Change IsSummonedBy(Unit*) to IsSummonedBy(WorldObject*)

* Scripts/Misc: Fix build

* Core/TempSummons: Rename GetSummoner() to GetSummonerUnit()

* Core/TempSummons: Add support to TempSummons::GetSummoner() to return GameObject too

* Fix build

* Core/TempSummons: Allow GameObject to be owner of TempSummon

* Core/TempSummons: Add support to SAI for GameObject owner of TempSummon

* Scripts/Misc: Fix no-pch build

* Core/TempSummons: Implement PR comments
2019-05-23 21:08:29 +02:00
Killyana
fe311260f7 Remove deprecated code 2019-05-04 16:52:59 +02:00
jackpoz
844e7ee926 Scripts/Guards: Fix infinite loop in npc_air_force_bots
Fix infinite loop in npc_air_force_bots happening when aura 38067 was removed, triggering MoveInLineOfSight() that would add back the aura. Only 1 aura add/remove for guard for player is allowed now.
2019-04-27 16:32:41 +02:00
Langerz82
e840d4967e Spell/Script: Guard's Mark
Closes #16888
2019-03-08 15:13:32 +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
Aokromes
538c5b8687 Core/GameEvent: weekend xp rate (#17782)
* Core/GameEvent: weekend xp rate
by kline

* Update to recent code

* compile fix try
things of copy and paste 4 years old code xd

* more code update

* forgot to change this

* Update worldserver.conf.dist

* Added function to calculate weekend event xp rates

By greenbagels

* Cleaning using scripts

* Implement daymask and rename variables etc.

* Rename script file weekend -> boosted

* Update src/server/game/World/World.cpp

Co-Authored-By: Aokromes <Aokromes@users.noreply.github.com>

* Fix xp multiplier not applying to quest rewards

* Disable xp boost script when no boosted days selected
2018-11-28 16:44:28 +01:00
Killyana
2dc28bc3a7 DB/GameObject: Sacred Fire of Life 2018-10-18 18:44:15 +02:00
DanVS
5b0f4009df Core/Scripts: Unify Chrono Literals (#22420)
* Unify Chrono Literals

* Retire IN_MILLISECONDS

* Build fix

* Build fix (sequel)

* Retire urand()

* Edge cases

* Build

* Whitespaces

* More edge cases

* Additional cases
2018-09-17 18:38:22 +02:00
Treeston
003cc56d70 Core/Player: Clean up duel related code. Fix a check for abusive client behavior, sanitize pointer usage, code style. Closes #22374. 2018-09-17 12:40:42 +02:00
PolarCookie
151ed6f684 DB: Naxxanar and Voltarus teleporters
Closes #22311
2018-08-26 16:15:54 +02:00
ccrs
982643cd96 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
2018-06-03 10:06:57 -07:00
Treeston
081eab3cf5 Core/Unit: UNIT_FLAG renames
[UNIT_FLAG_PLAYER_CONTROLLED -> UNIT_FLAG_POSSESSED]
[UNIT_FLAG_PVP_ATTACKABLE -> UNIT_FLAG_PLAYER_CONTROLLED]
Signed off by: Shauren, Warlockbugs.
2018-05-02 19:09:37 +02:00
ccrs
2a45418032 Core/Movement: move MoveSplineInit (#21857)
The number of edge cases in which weirdness is seen on "effect movements" will be kinda reduced, plus consistency, plus movementInform on custom movement spline initalizations.
2018-04-23 20:33:14 +02:00
Treeston
4692e10ca2 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good. 2018-04-01 13:52:36 +02:00
ariel-
6e0b9a7916 Core/Creatures: port power type updates from master branch
Core/Misc: Added helper function Unit::SetFullPower
Cherry-picked from 8199eef81c

Core/Creatures: Updated power type handling (#20981)
Cherry-picked from 16a7a414ab
2018-03-07 03:34:45 -03:00
ariel-
0db5c2df3f Core/Scripts: added nullptr checks to DamageTaken hooks
Since cb9e72e521 attacker may not be in world when hook is called
2018-01-18 13:58:40 -03:00
Treeston
a23c97a0fc Scripts/World: New target dummy AI, because I don't trust the existing one in light of #21187. 2018-01-09 23:34:50 +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
Treeston
100ecf69f1 nopch fix 2 for d507a7e 2018-01-01 15:27:51 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
Treeston
6113b9dec2 Core/AI: Some more refactoring prep for #19930. CreatureAI::EnterCombat is now called CreatureAI::JustEngagedWith. There's also two new methods on UnitAI, though they're never invoked right now. 2017-12-31 03:23:42 +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
jackpoz
12701cb0c6 Core/Misc: Replace time(NULL) with GameTime::GetGameTime() 2017-12-24 22:50:59 +01:00
Shauren
95ea4b5090 Scripts/Events: Fixed memory leak in npc_bountiful_table added in 75df296bb6 2017-11-25 22:33:15 +01:00
Aokromes
59e94fd9bb Misc: More cleanup 2017-11-25 02:39:27 +01:00
ccrs
5241c1ad71 Fix build 2017-11-22 20:40:45 +01:00
ccrs
299323ce5d Scripts/World: update guard scripts
Also remove deprecated method from Creature
2017-11-22 20:11:22 +01:00
sirikfoll
6e7e43172e Core/Scripts Fix issues with Midsummer's Ribbon Pole
Closes #6876

Fixed achievement Burning Hot Pole Dance
Update scripts for quest Torch Tossing, using all correct spells and timers
Updated script register model
2017-11-17 23:41:11 -02:00
Killyana
7fd8603ec5 Creature/script: Add locales to innkeepers gossip options 2017-11-16 18:35:58 +01:00
Killyana
4455c50447 Gameobject/Script: Remove outdated script
Ref 04da37c4fb
2017-11-16 17:26:34 +01:00
jackpoz
97f33dc779 Core/Misc: Fix static analysis issues 2017-11-11 20:27:30 +01:00
Wyreth
0811067c0f Script/Trainer: move alchemy specialization-related script to DB and fix some wrong texts 2017-10-30 00:55:30 +01:00
PolarCookie
cfc09449fd Scripts/Quest: The Missing Diplomat part 14 (ID 1265) 2017-10-29 23:56:21 +01:00
Wyreth
17143938d7 Scripts/World: move Leviroth's item_script to SAI 2017-10-21 11:54:12 +02:00
Kittnz
f909d4f195 Event/Brewfest: Fix logic for Brewfest Music
Closes #20589
2017-10-18 18:26:56 +02: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
c7896f3102 Core/Unit: For convenience, explicitly redirect CastSpell with nullptr as first argument to the Unit* overloads. No more ->CastSpell((Unit*)nullptr, ...) all over the place! 2017-07-21 18:02:48 +02:00
treeston
74af880217 Hi, I'm Treeston, and welcome to Combat PR Prep Refactors.
Today, we're moving UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC to higher-level abstraction so combat manager can react to it.
New methods on Unit:
- void SetImmuneTo<All/PC/NPC>(apply, keepCombat = false);
- bool IsImmuneTo<All/PC/NPC>() const;
2017-07-09 02:07:29 +02:00
Keader
3aadb72eaa Build fix 2017-07-08 13:13:01 -03:00
Keader
e254ebebbe Core/Custom: Fixed SPELLMOD_COOLDOWN exploit on Duel Reset system
Followup 0048d4b618
Closes #17419
2017-07-08 13:08:50 -03:00
Keader
0048d4b618 Core/Custom: Fixed Duel Reset Exploits
Close #17419
*Fixed exploit with SPELLMOD_COOLDOWN
*Fixed exploit with some items (like Sylvanas' Music Box)
*Little cleanup
2017-07-01 16:56:30 -03:00
Treeston
e2a1ccd118 [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2017-07-01 20:18:02 +02:00