Commit Graph

1464 Commits

Author SHA1 Message Date
Giacomo Pozzoni c7974bdf90 Core/Combat: Improve sanctuary combat stop (#24266)
Stop combat when a Player moves to a Sanctuary area only if there is any PvP combat (it would be nice to keep PvE combat but that's still an issue)
2020-03-07 18:08:30 +01:00
ForesterDev ffede34ba9 Core/Misc: Moved CanSpeak() method to WorldSession class (#24209)
* Core/Misc: Moved CanSpeak() method to WorldSession class

(cherry picked from commit 93aa30f447)

# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Handlers/ChatHandler.cpp
#	src/server/game/Server/WorldSession.cpp

* fix merge conflicts
2020-02-28 19:53:35 +01:00
ForesterDev 58313fc330 Core/PacketIO: update cinematic packets to new system. Implement CMSG_OPENING_CINEMATIC and CMSG_COMPLETE_MOVIE (#24135)
* Server/PacketIO: Enable SMSG_TRIGGER_CINEMATIC & SMSG_TRIGGER_MOVIE.

* Update SMSG_TRIGGER_CINEMATIC & SMSG_TRIGGER_MOVIE to new Format.

Signed-off-by: AriDEV <aridev666@gmail.com>

# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Server/Packets/MiscPackets.cpp
#	src/server/game/Server/Packets/MiscPackets.h
#	src/server/game/Server/Protocol/Opcodes.cpp

* Core/Scripts: Add server-side script support for movie completion (#18308)

# Conflicts:
#	src/server/game/Entities/Player/Player.h
#	src/server/game/Handlers/MiscHandler.cpp
#	src/server/game/Scripting/ScriptMgr.h
#	src/server/game/Server/Packets/MiscPackets.h
#	src/server/game/Server/Protocol/Opcodes.cpp
#	src/server/game/Server/WorldSession.h

* Core/PacketIO: CMSG_COMPLETE_CINEMATIC, CMSG_NEXT_CINEMATIC_CAMERA and enabled some opcodes

# Conflicts:
#	src/server/game/Server/Protocol/Opcodes.cpp
#	src/server/game/Server/WorldSession.h

* Core/Protocol: Implemented CMSG_OPENING_CINEMATIC

# Conflicts:
#	src/server/game/Handlers/GuildHandler.cpp
#	src/server/game/Server/Protocol/Opcodes.cpp
#	src/server/game/Server/WorldSession.h

* fix build

Co-authored-by: Krudor <erikstrandberg93@hotmail.com>
Co-authored-by: MitchesD <majklprofik@seznam.cz>
Co-authored-by: Kaelima <kaelima@live.se>
2020-02-08 20:37:34 +01:00
ForesterDev ba1e5cd413 Core/PacketIO: convert some packets to to new packet class (#24100)
* Core/PacketIO: updated SMSG_INVALIDATE_PLAYER, SMSG_BINDER_CONFIRM, SMSG_BIND_POINT_UPDATE, SMSG_PLAYER_BOUND and SMSG_LOGIN_SET_TIME_SPEED

* small corrections
2020-02-01 14:49:38 +01:00
ForesterDev 573ddf4d22 Core/Items: implement some helper methods for easier readability (#24113) 2020-02-01 14:45:58 +01:00
Aokromes ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
Michael 6b19f4a0ab additional output for additem command (#24006)
* additional output for additem command

when removing items with additem:

if the user provides an amount too large of a negative amount, the command will now output the amount of items that could not be destroyed.

* renamed sql file to hopefully avoid conflicts

* added clarification to failure string

* changed unneeded else if condition to else

* code style; braces

* Update and rename 9999_99_99_99_world.sql to 2019_12_28_01_world.sql
2019-12-28 22:58:18 +01:00
ForesterDev f4be544629 Core/Achievements: fixed bug with counting honorless units for achievement type ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL (#23844)
* Core/Achievements: fixed bug with counting honorless units for achievement type ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL

* Remove codestyle changes

* Remove codestyle changes
2019-10-12 20:51:31 +02:00
jackpoz f9d6c57006 Core/Quest: Fix quests not being shareable 2019-09-21 18:26:55 +02:00
AlιAѕѕaѕѕιN 92d83c3c2e [3.3.5] Fix spell_area not checking for zoneID for quests (#23719)
* Fix spell_area not checking for zoneID for quests

* Addendum to bdffe0a4a641414fe26c9b75b00f8e70ff0f1cb8

* Fix spell_area handle same spell with the same quests

Also fix not checking for quest_end at all.

* Addendum to 2d6b0545e3762b3a25005726d4093cf4a7945a8d

* Better commenting for 7a50189de3104f000d8b31fa6c415bb69cf1a3e7

* Addendum to 2d6b0545e3762b3a25005726d4093cf4a7945a8d
2019-08-28 08:03:41 +02:00
Treeston 464b0b059b Core/Channels: Fix a bug that would cause channel settings to disappear in certain settings. Fix a bug that would cause channels to not be saved on .server shutdown without delay. Closes #23699. 2019-08-09 12:04:20 +02:00
Treeston a5e73e41c0 Core/Pooling: Quest pooling rewrite: (PR#23627)
- Split quest pooling from PoolMgr (into QuestPoolMgr)
- Proper saving/restoring on server restart
- No more hacking into sObjectMgr to insert/remove available quests
2019-08-04 12:22:57 +02:00
Giacomo Pozzoni 15e85f882f Core/Vehicle: Change vehicle accessories' phase according to the player on the vehicle (#23646)
* Core/Vehicle: Change vehicle accessories' phase according to the player on the vehicle

* Get the root vehicle to set the phase to all accessories.
Attempt to get the accessories to stay mounted on the vehicle.

* Fix the accessories to stay mounted on the vehicle
2019-08-04 11:33:29 +02:00
Giacomo Pozzoni a0f8ce14e9 3.3.5 Don't allow to summon dead hunter pets (#23271)
* Core/Player: Add support to SMSG_PET_TAME_FAILURE

* Core/Pet: Don't summon dead pets when using "Call pet"
2019-08-02 16:09:02 +02:00
Treeston fedf1f557b Core/Chat: Custom channel preservation rewrite. Channel data is now loaded at startup, and written to the DB periodically, instead of both things happening in real time. 2019-08-01 23:42:14 +02:00
Treeston c0f8e8535a build fix after d1dc0e2 2019-07-19 20:37:22 +02:00
ccrs ba8d3254c2 Core/Player: d1dc0e2 followup
build error going to be fixed soon..ish
2019-07-19 18:52:07 +02:00
ccrs bca46aa750 Core/Player: d1dc0e2 followup 2019-07-19 15:43:30 +02:00
Wyrserth 3db4fbbcef Core/Pet: generate a new name for Death Knights' Ghouls when a new one is summoned.
Unlike Warlock pets, whose names are generated only once because they're the same demon that is summoned over and over, Death Knight pets are different entities generated from different corpses (or corpse dust). So each has their own, randomly generated, name.
2019-07-17 20:17:10 +02:00
Wyrserth c52c0f0b7d Core/GameObject: do not allow players to interact with gameobjects that use the "Point" icon.
Updates #21890.
2019-07-17 19:56:02 +02:00
Wyrserth 91f214cd22 Core/Quest: when receiving an item required for a quest, update every quest in the quest log instead of stopping at the first objective that matches the received item.
Closes #10586.
2019-07-17 18:08:21 +02:00
Wyrserth ad039c0999 Core/Player: always set the player's dugeon/raid difficulty to the group's dungeon/raid difficulty, regardless of level.
Fixes cases where players could enter heroic dungeons without meeting the heroic version requirements.
2019-07-17 17:15:07 +02:00
Wyrserth a4ddb30489 Core/Player: don't send errors to client from Satisfy* methods when Player::CanRewardQuest() is called with msg = false.
Fixes cases where people would get strange errors like "You are not high enough level for that quest" when entering WotLK instances.
2019-07-17 16:11:54 +02:00
ccrs 6826b8cb2c Build: fix build error
In file included from /home/circleci/project/src/server/game/Entities/Player/Player.cpp:19:
In file included from /home/circleci/project/src/server/game/Entities/Player/Player.h:22:
In file included from /home/circleci/project/src/server/game/Entities/Unit/Unit.h:22:
In file included from /home/circleci/project/src/server/game/Entities/Object/Object.h:22:
In file included from /home/circleci/project/src/common/Common.h:23:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/memory:63:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/allocator.h:46:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8/bits/c++allocator.h:33:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ext/new_allocator.h:136:23: fatal error: no matching constructor for initialization of 'WorldPackets::Spells::ResyncRune'
        { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
                             ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/alloc_traits.h:475:8: note: in instantiation of function template specialization '__gnu_cxx::new_allocator<WorldPackets::Spells::ResyncRune>::construct<WorldPackets::Spells::ResyncRune, unsigned char &, unsigned int &>' requested here
        { __a.construct(__p, std::forward<_Args>(__args)...); }
              ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/vector.tcc:103:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<WorldPackets::Spells::ResyncRune> >::construct<WorldPackets::Spells::ResyncRune, unsigned char &, unsigned int &>' requested here
            _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
                           ^
/home/circleci/project/src/server/game/Entities/Player/Player.cpp:24611:22: note: in instantiation of function template specialization 'std::vector<WorldPackets::Spells::ResyncRune, std::allocator<WorldPackets::Spells::ResyncRune> >::emplace_back<unsigned char &, unsigned int &>' requested here
        packet.Runes.emplace_back(type, cooldown);
                     ^
/home/circleci/project/src/server/game/Server/Packets/SpellPackets.h:117:16: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
        struct ResyncRune
               ^
/home/circleci/project/src/server/game/Server/Packets/SpellPackets.h:117:16: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
/home/circleci/project/src/server/game/Server/Packets/SpellPackets.h:117:16: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided
1 error generated.
2019-07-14 14:20:39 +02:00
ccrs bbb9d94acc Core/Server: 3785a35 followup 2019-07-14 13:21:49 +02:00
ccrs 3785a35511 Server/Packets: implement SMSG_RESYNC_RUNES packet structure 2019-07-13 18:58:04 +02:00
ccrs d1dc0e2dc1 Scripts/DK: correctly handle Blood Tap 2019-07-13 17:57:07 +02:00
Treeston 8c16f318fe Core/Chat: Rewrite some custom channel handling. Channel creation now properly saves passwords. Closes #23589. 2019-07-13 17:44:41 +02:00
Treeston af082664ca Battleground/Arena: Properly check RBAC arena join permission before allowing queue. Closes #23000. 2019-07-12 14:14:01 +02:00
Shauren 6eecb685ce Core/Weather: Fixed weather updates to be thread safe
(cherry picked from commit 6eb9973947)
2019-07-09 21:17:59 +02:00
Treeston a1fd404b64 Core/Quest: Do not allow quests to be turned in if the player no longer satisfies level/skill/reputation requirements. Fixes #226. Yes, you read that issue tag right. 2019-07-08 21:35:57 +02:00
Treeston 671052575a Entities/Player: Properly restore PvP-enabled state on login 2019-07-08 14:09:57 +02:00
Wyrserth 7fc1ecca8a Core/Player: fix crash happening when trying to send drunken state to nearby players while the character is loading. 2019-07-05 16:23:06 +02:00
Wyrserth 12e545f7e2 Core/Conditions: allow spellclick conditions to properly work for aura apply/remove (#23527) 2019-07-05 14:11:15 +02:00
ForesterDev c44fb37f74 Core/Unit: Implement more helper methods (#23555) 2019-07-05 14:07:35 +02:00
Giacomo Pozzoni 2cb4517303 Core/Quest: Fix repeatable quest mark (#23338) 2019-07-04 15:11:35 +02:00
Treeston 4e767f1c7c Entities/Player: Fix an edge case where overlapping CCs could prevent player movement from being re-enabled. f6f1c48 follow-up. 2019-07-03 19:26:43 +02:00
Wyrserth 670085d8c0 Core/Quest: fix money reward for quests turned in at level cap. (#23495) 2019-07-03 17:42:23 +02:00
Wyrserth 858fa4d2dd Core/Reputation: don't allow quests to reward Honor Hold/Alliance Vanguard reputation to Horde players or Thrallmar reputation to Alliance players (#23552) 2019-07-03 16:09:21 +02:00
Treeston f6f1c48aa5 Entities/Player: Clean up client control handling behavior around possession. Mind Control should no longer cause various weirdness. Closes #23539. 2019-07-02 11:58:12 +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 c8289ada7f Core/Quest: do not send SMSG_QUESTGIVER_OFFER_REWARD right after SMSG_QUESTGIVER_QUEST_FAILED.
Allows the gossip window to close after the client receives a quest failed error (for example: not enough inventory space to store the reward).
2019-07-01 01:19:31 +02:00
jackpoz de88691e25 Core/Misc: Fix static analysis issues reported by Coverity Scan 2019-06-28 22:18:30 +02:00
Wyrserth cb524a06b7 Core/GameObject: trigger an update of nearby objects when the player completes a quest objective.
Prevents quest-related gameobjects from staying lootable after the player looted the last quest item from another gameobject.
2019-06-27 20:30:26 +02:00
ccrs 337de2b61e Core/Player: 72fc79a followup
safer approach, please report any returning issue
2019-06-24 14:32:59 +02:00
Treeston f4b06fd0b7 Entities/Unit: Fix an issue where Unit pointers could be left dangling if a channeled Charm was interrupted by a control aura application. Closes #23440. 2019-06-23 16:45:32 +02:00
Treeston 396f87c30d Entities/Unit: Cleanup all the direct accesses to m_unitMovedByMe. Refactor the field to be protected. Add assertions to catch dangling pointers. 2019-06-23 16:44:37 +02:00
Wyrserth 4320cd7d37 Core/Loot: don't allow to regenerate chest loot inside instances and raids. (#23449) 2019-06-20 08:13:38 +02:00
Wyrserth cb8b1069c4 Core/Packet: send SMSG_QUESTGIVER_STATUS_MULTIPLE when the player levels up. (#23434)
Ensures that nearby questgivers are properly updated and will offer quests unlocked at the new level reached.
2019-06-18 08:58:06 +02:00