Commit Graph
1185 Commits
Author SHA1 Message Date
Matan Shukry 3b578fc6b9 Core/Chat: Load chat language data from db2 and implement serverside chat translations 2021-05-03 23:53:24 +02:00
jackpoz 4f643e3f32 Core/Misc: Removed unneeded checks
(cherry picked from commit 513e153a135ab51941fafe452aaa4e91faa285a0)
2021-04-16 20:53:41 +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 d507a7e3388382960108b24143da48e5f912b4a7)
2021-04-16 15:22:42 +02:00
Jeremy 446fc391f0 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

(cherry picked from commit e42903ec16f4849b71bc8736e3151a1e11d3cd25)
2021-04-15 05:53:27 +02:00
ariel- 61585de8ae Core/Scripts: fix codestyle
(cherry picked from commit e2a97ba7e789748aaa46ace153382573fd7d7df5)
2021-04-15 05:53:27 +02:00
jackpoz e17e4e6f07 Core/Misc: Replace time(NULL) with GameTime::GetGameTime()
(cherry picked from commit 12701cb0c6c45eb105ad449eb9a56e76d84d691e)

 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
Andrew Letson dbd9f88bf0 Scripts/Commands: Add failure state for quest remove (#20611)
Add more verbose messaging to the .quest remove command

(cherry picked from commit 1cedcf0bf349581b6fff210e4c325e25b51ccf0c)
2021-04-15 05:53:27 +02:00
Matan Shukry 079bc7800e Core/Cheats: Power - set max power on all powers initially + on regenerate (#26235) 2021-04-13 19:05:36 +02:00
Shauren d29dd1eeb5 Core/Misc: Change all unix time columns in character database to bigint (signed) 2021-04-05 23:47:05 +02:00
ForesterDev 7bd3914663 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

(cherry picked from commit 661dfee80ec3c56fa3f386d370f41ea7568c7da4)
2021-03-15 20:17:31 +01:00
ariel- 88ae43fa51 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)

(cherry picked from commit 78a1c687a25d91dd6b13251f28d03ec6a0a49b8a)
2021-03-15 20:17:31 +01:00
Shauren 6879440acb Core/Commands: Fixed .bnetaccount gameaccountcreate command generating too long passwords 2021-03-03 17:43:04 +01:00
Ovah 2a51edc5bc 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
(cherry picked from commit 869affa89300c24b85896a050b58241714786454)
2021-02-25 18:50:55 +01:00
jackpoz 1c24819741 Core/Misc: Fix static analysis issues
(cherry picked from commit 97f33dc77945d8f284d14e0eaa994ae1405a3f20)
2021-02-06 21:41:51 +01:00
ccrs bf12bae467 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

(cherry picked from commit e10d7dd45cfc073c791cd5e5f3f964d14b37df3d)
2021-01-29 19:23:53 +01:00
Robingad 5274f5ea54 Core/Commands: Fixed .go zonexy command (#25825) 2021-01-25 18:29:59 +01:00
Matan Shukry 1d51013b71 Scripts/Commands: Fixed .modify gender not setting correct customizations (#25920) 2021-01-23 15:35:22 +01:00
Shauren 4ca15ec065 Core/Commands: Add .reload vehicle_template 2020-12-31 14:13:29 +01:00
Shauren d94f0d23b3 Core/Commands: Add optional broadcast text id argument to .debug play sound command 2020-12-30 23:01:37 +01:00
Shauren 2e4609f6e1 Core/Chat: Send broadcast text id in sound packets to allow playing encrypted sound files 2020-12-27 22:43:36 +01:00
Shauren bff8f2ff4e Core/Players: Introduce configurable allied race starting level and fix default level selection for pandaren death knights 2020-12-23 00:04:43 +01:00
Shauren b82a3a557a Core/DataStores: Updated db2 structures to 9.0.2
* Includes support for new character customization
2020-12-08 18:16:47 +01:00
Shauren 83eecaf2c4 Core/PacketIO: Fill new packet fields with data 2020-12-08 18:16:46 +01:00
Shauren 4ca29f3cb0 Core/Misc: First set of required db changes for 9.0 2020-12-08 18:16:46 +01:00
Shauren cab4c87d2d Core/PacketIO: Updated most packet structures to 9.0.1 2020-12-08 18:16:41 +01:00
Shauren b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Treeston 06a1271a50 Core/Misc: random refactors
(cherry picked from commit 37dff2b7a1850f9f751c472e277277305a660229)
2020-08-23 17:47:41 +02:00
Treeston 27806eeac9 Core/Spawn: Move spawn group state management from sObjectMgr to the Map object, which makes it actually function as intended with instances. Woops.
(cherry picked from commit f279207d482b886fc8b049e94b46653325ec4d2d)
2020-08-23 17:00:59 +02:00
Treeston 2924ae0803 Scripts/Commands: .npc delete and .gobj delete now work while the specified guid is despawned. Fixes #20145.
(cherry picked from commit cac99beffd66218c6cbdd873d4a90461d04b25c4)
2020-08-23 14:47:48 +02:00
sirikfoll 7586daad62 Core/Misc: Remove Whitespaces
(cherry picked from commit e2565c2597a72ea7868eef3156014dc3a83c058f)
2020-08-23 00:48:19 +02:00
ccrs 97585597f0 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)

(cherry picked from commit 7fff83d67526efff63867d41b9e036a19a9287b3)
2020-08-23 00:45:46 +02:00
Treeston f15b4f5043 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.

(cherry picked from commit 759357049cdbe9a2f97bbab6e61299cd65ba1bec)
2020-08-22 13:16:34 +02:00
Treeston 703910d71b Scripts/Commands: New utility command: .list spawnpoints.
(I just needed it for dynspawn follow-up work, really.)

(cherry picked from commit fcd6fe0aac0b906e2cf8e2379d94a7d73384c160)
2020-08-22 13:11:34 +02:00
r00ty-tc 03b125e6d1 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.

(cherry picked from commit 59db2eeea0a35028779fd76372ae06cc98c8086f)
2020-08-22 12:59:57 +02:00
Regigicas e43d81cd68 Scripts/Commands: Fix a crash on summon when no group is avaible (#20029)
Closes #20027

(cherry picked from commit d9c83a6c0143b17286f853f8b81e3dc6fd86642d)
2020-08-18 19:16:04 +02:00
Shauren 1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Treeston 8be23fcbbd [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.

(cherry picked from commit e2a1ccd118d129b96e09ff1a15ed0adb1d4a3897)
2020-08-13 22:46:44 +02:00
Treeston e9392ad287 Core/Authserver: Authserver cleanup (PR#25093)
- Fix a handful of 1/256 bugs with most significant byte zero in BigNumber
- Get rid of (most of) the C-style arrays in authserver
- CryptoRandom as a unified source for cryptographic randomness
- Bring our other crypto APIs into 2020
- BigNumber usability improvements
- Authserver is now actually readable as a result of all of the above

(cherry picked from commit 210176fd915cf4ba16f428d3c1a249a71f4aa7a7)
2020-08-03 19:39:00 +02:00
Aokromes c9e3356ba4 Core/Creatures: Fix typo 2020-07-31 12:37:31 +02:00
Shauren 1340f2cdb3 Core/Creatures: Move gossip trainer assignment to creature_trainer table - same gossip can open different trainers depending on which creature it is assigned to
Closes #21723
2020-07-31 11:21:24 +02:00
treeston 118e53f1b8 Combat/threat rewrite prep - merge RBAC/DB changes.
(cherry picked from commit e35092c6a164e929f9684b350093b2beefee5d86)
2020-07-16 22:06:56 +02:00
S.V ced4820252 Core/Scripts: Fixed GAMEOBJECT_TYPE_DOOR closing automatically after being opened with .gobj act (#19342)
Closes #19261.

(cherry picked from commit 3eba0937047a1586d42f813ee21fb1752ae85853)
2020-07-16 22:00:30 +02:00
treeston f8fa4d734c Correct some missing auth DB changes from b59ca1c.
(cherry picked from commit 41eddd59aa3c911ba77f9ffbb85af42a4e6c2b53)
2020-07-16 22:00:30 +02:00
treeston 29db04c3c9 Rename .debug uws to .debug worldstate (clarity change).
(cherry picked from commit b59ca1cc81c08bbe043f8974f41fee191e7fd6ad)
2020-07-16 22:00:29 +02:00
treeston 64d8b183de Add new command 'npc showloot'. Does exactly what it says on the tin.
(cherry picked from commit 6f29aac93626ce37922c3c9a85d20b2e4d9d3bbc)
2020-07-16 22:00:29 +02:00
treeston 17a0139b0e - 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.

(cherry picked from commit ac0f76f8c57bba195b773a6a31ade2e8e2318aeb)
2020-07-16 22:00:29 +02:00
treeston 7df8546d7e Removed a now-unused local (ca02629 follow-up)
(cherry picked from commit 4e41d3e6bd90047e2f9e228b6f3adc52012d7b08)
2020-07-16 22:00:29 +02:00
treeston f543e570d6 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.)

(cherry picked from commit ca0262995053e0e5baef7e97211fec8f81664ea7)
2020-07-16 22:00:29 +02:00
treeston 5392212799 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.

(cherry picked from commit d57307f63d8deb51003d61163adccce4e2c1bd47)
2020-07-16 22:00:28 +02:00
Treeston 51ce3b1c1d [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

(cherry picked from commit f6c849729b27b77228704b595de3adaf24da2c10)
2020-07-16 22:00:24 +02:00