Commit Graph

494 Commits

Author SHA1 Message Date
Peter Keresztes Schmidt
418c3b1fd5 game/AI: Convert SelectAggroTarget to enum class (#24818)
* game/AI: Convert SelectAggroTarget to enum class

* game/AI: Rename SelectAggroTarget to SelectTargetMethod
2020-06-16 23:08:56 +02:00
ForesterDev
e3b232fe0e Core/AI: refactor SpellHit and SpellHitTarget. (#24691)
* Core/AI: refactor SpellHit and SpellHitTarget.

- now caster/target is WorldObject instead of Unit
- remove SpellHitByGameObject / SpellHitTargetGameObject (handled by SpellHit / SpellHitTarget)
- rename parameters in scripts according parent methods

* Restore logic in Algalon script

* Changed check for REMORSELESS_WINTER hit to avoid dublicate call, because it has TARGET_UNIT_CASTER for effects 0/1 and TARGET_GAMEOBJECT_SRC_AREA for effect 2

* Fix build after merge
2020-06-07 10:22:13 +02:00
offl
0e7cabd7f1 DB/Quest: Convert & update support for 'Cuergo's Gold' to SAI
Closes #24675
2020-05-25 23:10:12 +02:00
offl
2008cb7dd3 DB/Quest: Convert & update support for 'Prisoners of Wyrmskull' to SAI
Closes #24650
2020-05-22 00:32:06 +02:00
offl
0cfd63fd26 DB/GameObject: Convert & update support for Shrine of the Eagle / Falcon / Hawk to SAI
Closes #24647
2020-05-21 23:52:02 +02:00
offl
626aeb5817 DB/Creature: Convert Sayge to SAI
Closes #24663
2020-05-21 23:34:59 +02:00
offl
9c1c34a794 DB/GameObject: Convert & update support for Tablet of Madness
Closes #24670
2020-05-21 21:21:38 +02:00
Killyana
6b9a14ca94 DB/GameObject: Convert & update support for Jump-a-tron 4000 to DB script
Closes #24668
2020-05-21 02:05:44 +02:00
offl
c3e4420a2b DB/GameObject: Convert & update support for Fel & Bash'ir crystalforges
Closes #24643
2020-05-19 22:46:31 +02:00
Killyana
d3578c3474 Item/Script: Remove unused script, related to the previous commit
Ref #24522
2020-04-30 19:58:13 +02:00
offl
9638f0ad0b DB/Quest: Becoming a Spellfire Tailor
Closes #24522
2020-04-30 19:37:22 +02:00
zartech22
56f20d69a6 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>
2020-04-18 14:26:05 +02:00
jackpoz
0844ad2ff0 Scripts/Guards: Fix spell cast spam after killing npc_air_force_bots guards 2020-04-05 20:23:46 +02:00
jackpoz
caae3886d2 Core/Misc: Remove whitespace at the end of lines 2020-04-05 19:11:00 +02:00
Lewis Brumby
b48c50ba23 Update action_ip_logger.cpp (#24371) 2020-03-31 22:49:18 +02:00
Shauren
fe1003bdbd Core/DBLayer: Prevent using prepared statements on wrong database
(cherry picked from commit e8e89f58fb)

# Conflicts:
#	src/server/bnetserver/REST/LoginRESTService.cpp
#	src/server/bnetserver/Server/Session.cpp
#	src/server/database/Database/DatabaseWorkerPool.cpp
#	src/server/database/Database/Implementation/HotfixDatabase.h
#	src/server/database/Database/MySQLConnection.cpp
#	src/server/database/Database/MySQLConnection.h
#	src/server/database/Database/PreparedStatement.cpp
#	src/server/database/Database/PreparedStatement.h
#	src/server/database/Database/QueryHolder.cpp
#	src/server/database/Database/SQLOperation.h
#	src/server/database/Database/Transaction.h
#	src/server/game/Accounts/BattlenetAccountMgr.cpp
#	src/server/game/Achievements/AchievementMgr.cpp
#	src/server/game/AuctionHouse/AuctionHouseMgr.cpp
#	src/server/game/AuctionHouseBot/AuctionHouseBot.cpp
#	src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
#	src/server/game/BattlePets/BattlePetMgr.cpp
#	src/server/game/Battlegrounds/ArenaTeam.cpp
#	src/server/game/BlackMarket/BlackMarketMgr.cpp
#	src/server/game/Chat/Channels/Channel.cpp
#	src/server/game/Entities/Corpse/Corpse.cpp
#	src/server/game/Entities/Creature/Creature.cpp
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/Item/Item.cpp
#	src/server/game/Entities/Pet/Pet.cpp
#	src/server/game/Entities/Player/CollectionMgr.cpp
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Garrison/Garrison.cpp
#	src/server/game/Globals/ObjectMgr.cpp
#	src/server/game/Groups/Group.cpp
#	src/server/game/Guilds/Guild.cpp
#	src/server/game/Guilds/GuildFinderMgr.cpp
#	src/server/game/Guilds/GuildMgr.cpp
#	src/server/game/Handlers/AuctionHouseHandler.cpp
#	src/server/game/Handlers/CharacterHandler.cpp
#	src/server/game/Handlers/ItemHandler.cpp
#	src/server/game/Handlers/MailHandler.cpp
#	src/server/game/Handlers/MiscHandler.cpp
#	src/server/game/Handlers/PetitionsHandler.cpp
#	src/server/game/Handlers/SpellHandler.cpp
#	src/server/game/Handlers/TicketHandler.cpp
#	src/server/game/Loot/Loot.cpp
#	src/server/game/Mails/Mail.cpp
#	src/server/game/Maps/Map.cpp
#	src/server/game/Movement/Waypoints/WaypointManager.cpp
#	src/server/game/OutdoorPvP/OutdoorPvP.cpp
#	src/server/game/Pools/PoolMgr.cpp
#	src/server/game/Quests/QuestObjectiveCriteriaMgr.cpp
#	src/server/game/Reputation/ReputationMgr.cpp
#	src/server/game/Scenarios/InstanceScenario.cpp
#	src/server/game/Server/WorldSession.cpp
#	src/server/game/Server/WorldSocket.cpp
#	src/server/game/Spells/SpellHistory.cpp
#	src/server/game/Support/SupportMgr.cpp
#	src/server/game/Tools/PlayerDump.cpp
#	src/server/game/World/World.cpp
#	src/server/scripts/Commands/cs_account.cpp
#	src/server/scripts/Commands/cs_ban.cpp
#	src/server/scripts/Commands/cs_battlenet_account.cpp
#	src/server/scripts/Commands/cs_group.cpp
#	src/server/scripts/Commands/cs_lfg.cpp
#	src/server/scripts/Commands/cs_list.cpp
#	src/server/scripts/Commands/cs_message.cpp
#	src/server/scripts/Commands/cs_misc.cpp
#	src/server/scripts/Commands/cs_npc.cpp
#	src/server/scripts/Commands/cs_tele.cpp
#	src/server/scripts/Commands/cs_wp.cpp
#	src/server/shared/DataStores/DB2DatabaseLoader.cpp
#	src/server/shared/Realm/RealmList.cpp
2020-03-31 13:42:01 +00:00
Rushor
0583445c05 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>
2020-02-28 19:21:50 +01:00
schell244
baa87c43ba Scripts/World: Hourly Bell sound, further improvements (#24147)
* Improvements for hourly bell sound

* TC codestyle

* added missing breaks and improve codestyle
2020-02-16 13:27:36 +01:00
Rushor
f0bf447cd1 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>
2020-02-15 20:18:58 +01:00
Rushor
596b2d1ed7 Scripts/Gameobject: Remove deprecated script for Cat Figurine (#24150)
Scripts/Gameobject: Remove deprecated script for Cat Figurine
2020-02-14 23:28:14 +01:00
Ovah
98d6c501d7 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>
2020-02-08 20:47:46 +01:00
schell244
f87a4543ad Core/Scripting: fixed hourly bell sounds (#24127)
* fixed hourly bell sounds

* use switch and moved variable

* fix typo
2020-02-08 20:35:05 +01:00
Sorikoff
552a638e31 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>
2020-01-26 21:15:00 +01:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
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