Commit Graph

196 Commits

Author SHA1 Message Date
ModoX
dd15d763cc Core/Creatures: Implemented UNIT_NPC_FLAG_GOSSIP as viewer dependent and update npcflags on quest changes (#29646) 2024-02-24 15:05:21 +01:00
ModoX
b3dce0ac08 Core/Creatures: Added possibility to automatically despawn personal summons on quest remove (#29114) 2024-01-08 21:51:46 +01:00
Shauren
41a20b1e40 Core/Achievements: Fixed achievement criteria StartEvent and FailEvent
* Criteria using StartEvent cannot be updated without that event triggering first (not only for timed achievements)
* Implemented most StartEvent and FailEvent types
* Fixed saving criteria removed by RemoveCriteriaProgress
2023-09-25 00:53:56 +02:00
Aqua Deus
a9d459962b Core/Quest: Allow quests flagged as QUEST_FLAGS_AUTO_COMPLETE to be valid in CMSG_QUESTGIVER_REQUEST_REWARD (#29244)
Co-authored-by: Ovahlord <dreadkiller@gmx.de>
2023-08-24 16:24:58 +02:00
Shauren
0fb8765a66 Core/Items: Item bonus generation improvements
* Pass ItemContext to item creation wherever possible
* Support scaling item levels with m+ keystone levels (not used currently)
* Fixed item link validation when client sends it as default uninitialized bonus list with context only
* Support scaling items depending on current active season (seasons not implemented)
* Implemented content tuning redirection
2023-06-17 16:29:59 +02:00
Shauren
0cb8965de2 Core/Quests: New FlagsEx implementations
* QUEST_FLAGS_EX_REWARDS_IGNORE_CAPS
* QUEST_FLAGS_EX_NO_CREDIT_FOR_PROXY
* QUEST_FLAGS_EX_RECAST_ACCEPT_SPELL_ON_LOGIN
* QUEST_FLAGS_EX_REMOVE_ON_PERIODIC_RESET
* QUEST_FLAGS_EX_NO_ABANDON_ONCE_BEGUN
2023-06-11 19:29:42 +02:00
Shauren
4d4c7e6893 Core/Quests: Quest flag fixups
* Update flag names
* Implemented QUEST_FLAGS_COMPLETION_NO_DEATH and QUEST_FLAGS_FAIL_ON_LOGOUT
* Started using QUEST_FLAGS_COMPLETION_EVENT and QUEST_FLAGS_COMPLETION_AREA_TRIGGER instead of a custom SpeclalFlag
* Renamed Quest::IsAutoComplete to Quest::IsTurnIn to better describe what it means (a quest that can be turned in without accepting it to quest log)
* Implemented QUEST_FLAGS_UPDATE_PHASESHIFT and removed forced phaseshift updates on every quest status change
* Implemented QUEST_FLAGS_LAUNCH_GOSSIP_ACCEPT - reopens gossip menu with questgiver
2023-06-10 20:31:33 +02:00
ModoX
36044a9470 Core/Creature: Added possibility to give creatures multiple gossip menu ids and control them via conditions (#28159) 2023-04-05 23:49:46 +02:00
Shauren
0956873613 Core/Creatures: Allow overriding default gossip menu id 2023-03-12 00:13:49 +01:00
Seyden
b5886f6a2d Core/Quests: Dont immediately update object visibility at PhaseShift and wait for the AI Hooks to be called in Player::RewardQuest (#28516) 2023-01-28 15:36:28 +01:00
Shauren
4bec7233ba Core: Updated to 10.0.5 2023-01-28 01:53:26 +01:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren
5dca7309f4 Core/Battlegrounds: Fixed AV turnins being counted when opening quest completion UI instead after completing the quest 2022-07-09 00:09:54 +02:00
HelloKitty
c50c877bdb Core/QuestHandler: Fix potential crash caused by QUEST_FLAGS_PARTY_ACCEPT with conditions (#26880)
(cherry picked from commit 5a60082e5d)
2022-03-14 23:55:09 +01:00
Kelno
b6af6634f4 Core/Misc: Clear unused undef leftover in a refactor (#26616)
Previously this function was using a macro that was #undef at the end of the function. Since then it uses a lambda function and the undef is not needed anymore.

(cherry picked from commit 17ed3fd1dc)
2022-03-11 12:14:39 +01:00
Giacomo Pozzoni
5180abfb19 Core/Creature: Add new db field InteractionPauseTimer (#25880)
* Core/Creature: Add new db field InteractionPauseTimer

Add new db field InteractionPauseTimer to allow to define different interaction pause timers for each creature (the previous system was a global setting in worldserver.conf Creature.MovingStopTimeForPlayer)

* Set all columns in creature_template_movement as optional (can be NULL, default NULL). Fill only the columns that should override the default C++ value

* Use the InteractionPauseTimer value throughout the code instead of Creature.MovingStopTimeForPlayer

* Handle InteractionPauseTimer set to 0 as "don't stop at all"

* Implement InteractionPauseTimer in creature_movement_override

creature_movement_override allows NULL values, in which case the values from creature_template_movement will be used for those columns that are NULL, falling back to default C++ values if creature_template_movement has NULL values too (or no rows for the creature)

* Read default InteractionPauseTimer from worldserver.conf

* Rename 2021_99_99_99_world.sql to 2021_01_22_00_world.sql

(cherry picked from commit a22bc236eb)
2022-03-06 00:56:46 +01:00
Giacomo Pozzoni
bfdabb8c37 Core/Quest: Fix wrong feedback sent to the quest sharing sender with auto-accept quests. (PR #25477) Closes #25474.
Co-authored-by: Treeston <treeston.mmoc@gmail.com>
(cherry picked from commit e2d643f551)
2022-02-27 23:03:06 +01:00
Treeston
c13d7df72b Scripts/ChatCommands: Constrain how char const* may be used as a command handler parameter. It may now only be used in the legacy configuration, as the only argument.
(cherry picked from commit 9fda67d016)
2022-02-27 20:59:37 +01:00
ModoX
8de5053a65 Core/Quests: Fixes response selection to use correct referenced identifier (#27808) 2022-02-26 23:07:43 +01:00
Maks Szokalski
bc04acb726 Add "On" to some gossip methods in AI (#25415)
* Add "On" to some methods

* Update npc_innkeeper.cpp

* Update zone_borean_tundra.cpp

(cherry picked from commit 41188eb535)
2022-02-05 22:18:19 +01:00
ModoX
a17944e91e Core/Quests: Set quest slot earlier when abandoning a quest (#27584)
* fixes quest objective conditions still being true when quest is abandoned
2022-01-13 20:31:51 +01:00
Giacomo Pozzoni
a9e325f6b7 Core/Logs: Log full guid instead of just low guid, part 2
(cherry picked from commit 3def52c1c4)
2022-01-01 00:51:54 +01:00
Giacomo Pozzoni
6ec933f281 Core/Logs: Log full guid instead of just low guid
(cherry picked from commit 468ecb7252)
2021-12-31 21:56:40 +01:00
Treeston
51fbda4223 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

(cherry picked from commit a5e73e41c0)
2021-12-18 15:28:45 +01:00
Wyrserth
ecce30a807 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).

(cherry picked from commit c8289ada7f)
2021-12-13 00:42:19 +01:00
Shauren
122fe7549d Core/PacketIO: Updated SMSG_QUEST_PUSH_RESPONSE to 9.1.5 2021-11-02 22:51:05 +01:00
Meji
0a83f74876 Core/Achievements: Update CriteriaType enum (#26856) 2021-09-08 22:07:01 +02:00
Shauren
0b2087ae41 Core/Criteria: Add all values of CriteriaStartEvent 2021-06-01 21:16:41 +02:00
Shauren
b9d63c2009 Core/Scripts: Remove deprecated overload of QuestReward without LootItemType argument 2021-05-16 21:56:06 +02:00
Shauren
dd8aed421a Core/Quests: Drop unneeded QuestSpecialFlags 2021-05-09 16:01:34 +02:00
Treeston
0aed5a35ef Core/AI: Kick Gossip functions upstairs, from UnitAI to CreatureAI - they only make sense for Creatures anyway.
Also change a very ugly hack in GetDialogStatus. Ew.

(cherry picked from commit eacfa9d89a)
2021-04-27 23:49:36 +02:00
Shauren
f269f60d8a Scripts/Quests: Implemented new quest scripting hook, OnQuestAcknowledgeAutoAccept, used when player closes quest frame after viewing details of autoaccept quests 2021-02-26 20:42:29 +01:00
Shauren
1000f670d2 Core/Quests: Fixed crash happening when a player is quest ender
Closes #257625
2020-12-24 21:26:19 +01:00
Shauren
5f3a2d2abf Core/Quests: Fixed questgiver icons
Closes #25702
2020-12-11 22:19:19 +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
cab4c87d2d Core/PacketIO: Updated most packet structures to 9.0.1 2020-12-08 18:16:41 +01:00
Shauren
f922c6e7a4 Core/PacketIO: Renamed a bunch of opcodes based on more research (only those added after 6.0) 2020-09-19 12:44:42 +02: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
ccrs
0a133e77d6 Core/Movement: 7fff83d675 followup
remove home position set from creature PauseMovement, and use it when necessary
change log level on DelayedDelete

(cherry picked from commit cd4775420a)
2020-08-23 00:48:46 +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 7fff83d675)
2020-08-23 00:45:46 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Cannix
c12ee97f12 Core/Player: Keep shared quests through map changes instead of getting stuck in busy state (#19821)
(cherry picked from commit c14b448d63)
2020-07-16 22:00:29 +02:00
ariel-
6604849716 Core/Scripts: unified scripted gossip/quest api
- Changed self-accessor on GameObjectAI to "me", like UnitAI
- Moved all related functions to AI, now Unit and GameObject have the same function names with identical behaviour
- Remove "OnUpdate" from CreatureScript/GameObjectScript, was never used and we already have AI Update method
- Quest methods no longer return a bool, the return value was used to call the AI version if the ScriptMgr one returned false
- Implemented GameObjectAI::Destroyed hook (was never called), implemented Damaged method
- Rename OnStateChanged to OnLootStateChanged to reflect when it's really called, and created a new hook OnStateChanged that only gets called on GOState change
- Since the functions are now only getting called from AI, made GetAI methods full virtual. (CanSpawn method is anyways going to be used on creatures with AI)

(cherry picked from commit f913f3bb89)
2020-05-03 03:04:32 +02:00
ariel-
3eee76b1c6 Core/Quests: implemented MSG_QUEST_PUSH_RESULT notifications
- Allow to share already completed (but not rewarded) quests, restriction was unblizzlike

thanks Cannix for the heads up

(cherry picked from commit 157e9311c4)
2020-04-28 13:32:46 +02:00
Xyventh
2bd7c9aa40 [3.3.5] Core/Quest: always send the specified RewardNextQuest regardless of eventual scripts (#19498)
- Fixes certain situations in which the quest window would get stuck after completing a quest

(cherry picked from commit f0bf1fc77a)
2020-04-27 18:23:07 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
0a2d9ad2f7 Core/Items: Add ItemContext param to Item::Create function 2019-11-23 00:03:42 +01:00
Lopfest
7d2cbd4e7c Core/Quests: Implement new logic for selecting spell casters for accept/reward spells based on quest flags (#21316) 2019-08-30 19:36:10 +02:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00