Commit Graph

605 Commits

Author SHA1 Message Date
Killyana
876d9f52ec DB/GameObject: Convert & update support for Jump-a-tron 4000 to DB script
Closes #24668

(cherry picked from commit 6b9a14ca94)
2022-01-06 16:06:40 +01:00
offl
6eb7ed4490 DB/GameObject: Convert & update support for Fel & Bash'ir crystalforges
Closes #24643

(cherry picked from commit c3e4420a2b)
2022-01-06 15:59:18 +01:00
offl
f32f812e29 DB/Quest: Becoming a Spellfire Tailor
Closes #24522

(cherry picked from commit 9638f0ad0b)
2022-01-01 23:22:09 +01:00
zartech22
c57c26d7fb Add realm ID for actions based ip logging (#24453)
* Update SQL queries to insert realm id

* Insert the realm id when logging actions based on IP

* Adding the SQL update file

* Update 9999_99_99_99_auth.sql

* Update auth structure

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 56f20d69a6)
2022-01-01 19:38:40 +01:00
jackpoz
95de1db5fc Scripts/Guards: Fix spell cast spam after killing npc_air_force_bots guards
(cherry picked from commit 0844ad2ff0)
2022-01-01 01:02:17 +01:00
jackpoz
ecdc387df2 Core/Misc: Remove whitespace at the end of lines
(cherry picked from commit caae3886d2)
2022-01-01 01:00:26 +01:00
Lewis Brumby
756ec4e43c Update action_ip_logger.cpp (#24371)
(cherry picked from commit b48c50ba23)
2021-12-31 19:05:27 +01:00
Rushor
862b0ad651 Scripts/Gameobject: Move Orb of Command script to SAI. (#24189)
* Scripts/Gameobject: Move Orb of Command script to SAI.

* Scripts/Gameobject: Move Orb of Command script to SAI.

* Rename 2020_12_23_00_world.sql to 2020_02_28_03_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 0583445c05)
2021-12-22 14:40:38 +01:00
schell244
460549799e Scripts/World: Hourly Bell sound, further improvements (#24147)
* Improvements for hourly bell sound

* TC codestyle

* added missing breaks and improve codestyle

(cherry picked from commit baa87c43ba)
2021-12-21 18:32:22 +01:00
Rushor
2326eac4f9 Scripts/Gameobject: Journal of Jandice Barov- Convert script to SAI. (#24157)
* Scripts/Gameobject: Journal of Jandice Barov- Convert script to SAI. (Thanks to Sunwell)

* Scripts/Gameobject: Journal of Jandice Barov - Update script and move go spawn to bossscript

* Update boss_jandice_barov.cpp

Co-authored-by: Eridium <6587064+Killyana@users.noreply.github.com>
(cherry picked from commit f0bf447cd1)
2021-12-21 16:33:47 +01:00
Rushor
41b10f4bb8 Scripts/Gameobject: Remove deprecated script for Cat Figurine (#24150)
Scripts/Gameobject: Remove deprecated script for Cat Figurine

(cherry picked from commit 596b2d1ed7)
2021-12-21 16:27:45 +01:00
Ovah
a91be4995b Core/Vehicles: implement vehicle seat addon table to specify seat ori… (#24112)
* Core/Vehicles: implement vehicle seat addon table to specify seat orientation offsets and exit positions in form of offsets or absolute positions
* converted Traveler's Tundra Mammoth to seat addon table data

* first follow batch

* whoopsie

* Core/Vehicles: go from local copies to pointers

* Update and rename 2020_99_99_99_world.sql to 2020_02_08_01_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 98d6c501d7)
2021-12-21 15:32:49 +01:00
schell244
eae7379417 Core/Scripting: fixed hourly bell sounds (#24127)
* fixed hourly bell sounds

* use switch and moved variable

* fix typo

(cherry picked from commit f87a4543ad)
2021-12-21 15:21:57 +01:00
Sorikoff
d37547e769 Scripts/Borean Tundra: Plug the Sinkholes (#24085)
* Scripts/Borean Tundra: Plug the Sinkholes

* Scripts/Borean Tundra: Improve SQL

* Scripts/Borean Tundra: Remove item script

* Rename 9999_99_99_99_world.sql to 2020_01_26_03_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 552a638e31)
2021-12-20 23:47:37 +01:00
Giacomo Pozzoni
493fe066f6 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

(cherry picked from commit aeddd417c4)
2021-12-16 22:35:44 +01:00
Wyrserth
96bca1fe2b Script/BoreanTundra: move Pile of Fake Furs' script (related to quest Unfit for Death) from ItemScript to SpellScript.
Closes #21890.

(cherry picked from commit e7cf24d263)
2021-12-16 21:20:39 +01:00
Treeston
2799cdc522 Scripts/World: Rewrite air force trigger bots script, add hostility check along the way. Closes #23307.
(cherry picked from commit 0ae2afe307)
2021-12-15 00:17:32 +01:00
ForesterDev
27886c7f5d 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

(cherry picked from commit b47bb59e2a)
2021-12-13 00:42:20 +01:00
ccrs
4e6c59dca7 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()

(cherry picked from commit 5c09ff51f7)
2021-12-13 00:42:20 +01:00
Wyrserth
819f8b1a2d Script/DarkmoonFaire: fix logical error in go_darkmoon_faire_music.
Closes #23548.

(cherry picked from commit 028d16a812)
2021-12-13 00:42:19 +01:00
Shauren
116285818b Core/Misc: Corrected file headers 2021-12-13 00:42:19 +01:00
Wyrserth
b3e7be5387 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.

(cherry picked from commit d71a0608bf)
2021-12-10 21:12:48 +01:00
Giacomo Pozzoni
5f545f5402 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

(cherry picked from commit 797fba98e9)
2021-12-07 00:02:03 +01:00
Killyana
19ce65c01b Remove deprecated code
(cherry picked from commit fe311260f7)
2021-12-03 22:00:47 +01:00
jackpoz
98863659bb 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.

(cherry picked from commit 844e7ee926)
2021-12-02 00:39:20 +01:00
Langerz82
e61266815f Spell/Script: Guard's Mark
Closes #16888

(cherry picked from commit e840d4967e)
2021-11-24 20:41:03 +01:00
Shauren
8cc6520b89 Core/Spells: SpellHistory updates
* Add duration override argument to StartCooldown (for cooldowns sent to client)
* Research new SMSG_SPELL_COOLDOWN flags
* Send interrupt school lockouts with newly defined SPELL_COOLDOWN_FLAG_LOSS_OF_CONTROL_UI
* Fixed packet structure of SMSG_MODIFY_COOLDOWN
* std::chorno-ification
2021-11-20 00:28:48 +01:00
Aokromes
c44650502c 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

(cherry picked from commit 538c5b8687)
2021-11-16 00:50:23 +01:00
Killyana
a0bac8c53a DB/GameObject: Sacred Fire of Life
(cherry picked from commit 2dc28bc3a7)
2021-11-15 14:17:57 +01:00
Shauren
f2456ff319 Scripts/Areatriggers: Fixed all areatrigger scripts triggering both on enter and exit instead of only on enter 2021-11-10 00:01:50 +01:00
DanVS
28cb2af1c5 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

(cherry picked from commit 5b0f4009df)
2021-11-09 00:26:59 +01:00
Treeston
7c062db94b Core/Player: Clean up duel related code. Fix a check for abusive client behavior, sanitize pointer usage, code style. Closes #22374.
(cherry picked from commit 003cc56d70)
2021-11-08 23:49:15 +01:00
ModoX
faa182cb3b Scripts/Mechagnomes: Added areatrigger teleporter from Mechagon City to Stormwind (#27237) 2021-11-05 22:51:30 +01:00
PolarCookie
9dd2748618 DB: Naxxanar and Voltarus teleporters
Closes #22311

(cherry picked from commit 151ed6f684)
2021-10-23 02:14:04 +02:00
ModoX
6d9ce8e8ba Core/PacketIO: Implemented CMSG_CONVERSATION_LINE_STARTED (#27036)
* Added OnConversationLineStarted hook to ConversationScripts
* Added example for Defender of Azeroth conversation
2021-10-12 00:16:20 +02:00
Meji
5c287929b2 Core/Gossip: Update GossipOptionIcon enum (#26906) 2021-10-03 16:24:07 +02:00
ccrs
426f9f2f92 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).

(cherry picked from commit 982643cd96)
2021-09-28 00:15:13 +02:00
Treeston
f1ac141f25 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.

(cherry picked from commit 081eab3cf5)
2021-09-26 16:07:09 +02:00
Shauren
9709643f50 Core/Misc: Fix copyright headers 2021-09-26 14:22:52 +02:00
ccrs
d59a6af9c6 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.

(cherry picked from commit 2a45418032)
2021-09-26 14:19:36 +02:00
Treeston
bc89e1cdb0 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
(cherry picked from commit 4692e10ca2)
2021-09-23 22:21:29 +02:00
Shauren
8a4e1119ac Core/Spells: Unify spell effect access api in both branches 2021-09-04 15:13:15 +02:00
ariel-
62c571076e Core/Scripts: added nullptr checks to DamageTaken hooks
Since cb9e72e521 attacker may not be in world when hook is called

(cherry picked from commit 0db5c2df3f)
2021-06-16 12:02:14 +02:00
Treeston
4a65dcaecb Scripts/World: New target dummy AI, because I don't trust the existing one in light of #21187.
(cherry picked from commit a23c97a0fc)
2021-05-17 00:02:27 +02:00
Shauren
b9d63c2009 Core/Scripts: Remove deprecated overload of QuestReward without LootItemType argument 2021-05-16 21:56:06 +02:00
Treeston
34c7810fe5 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.

(cherry picked from commit 532ab1c7f8)
2021-05-16 21:56:01 +02:00
Treeston
bce43de7f3 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.
(cherry picked from commit 6113b9dec2)
2021-04-16 20:22:13 +02:00
Treeston
9b141207d1 [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

(cherry picked from commit d507a7e338)
2021-04-16 15:22:42 +02:00
jackpoz
e17e4e6f07 Core/Misc: Replace time(NULL) with GameTime::GetGameTime()
(cherry picked from commit 12701cb0c6)

 Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/AuctionHouse/AuctionHouseMgr.cpp
	src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
	src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
	src/server/game/Battlefield/Battlefield.cpp
	src/server/game/Battlefield/Zones/BattlefieldWG.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.cpp
	src/server/game/Calendar/CalendarMgr.h
	src/server/game/DungeonFinding/LFGQueue.cpp
	src/server/game/Entities/Corpse/Corpse.cpp
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Entities/Item/Item.cpp
	src/server/game/Entities/Pet/Pet.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Grids/ObjectGridLoader.cpp
	src/server/game/Guilds/Guild.cpp
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/BattlefieldHandler.cpp
	src/server/game/Handlers/CalendarHandler.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Handlers/LFGHandler.cpp
	src/server/game/Handlers/MailHandler.cpp
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Handlers/PetHandler.cpp
	src/server/game/Handlers/QueryHandler.cpp
	src/server/game/Handlers/TicketHandler.cpp
	src/server/game/Instances/InstanceSaveMgr.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Spells/Auras/SpellAuras.cpp
	src/server/game/Tickets/TicketMgr.cpp
	src/server/game/Tickets/TicketMgr.h
	src/server/game/World/World.cpp
	src/server/scripts/Commands/cs_gobject.cpp
	src/server/scripts/Commands/cs_instance.cpp
	src/server/scripts/Commands/cs_list.cpp
	src/server/scripts/Northrend/zone_wintergrasp.cpp
	src/server/scripts/Spells/spell_item.cpp
2021-04-15 05:53:27 +02:00
Shauren
6585666e6e Core/Spells: Define all spell modifier types and implement ProcCooldown mod and PeriodicHealingAndDamage for melee periodic damage 2021-03-15 21:03:06 +01:00