Commit Graph

19909 Commits

Author SHA1 Message Date
Mikhail Redko
72a4fccaab Core/Misc: Improvement item durability repair logic. (#26911)
* Core/Misc: Improvement item durability repair logic.

* Move item repair cost calculation logic from Player::DurabilityRepair to Item::CalculateDurabilityRepairCost
* Make item repair cost calculation more congruent with client logic (std::round)
* Do not repair items if player does not have enough money to pay for the repair of all items at once
* Withdrawing money from guild bank only once to avoid spam in the guild bank log and reduce number of transactions in the database

Closes #25937

* Fix build

* Remove unnecessary scope

* Fix visual studio warning and one more check for reliability

(cherry picked from commit 3cef126d0a)
2022-03-19 16:55:55 +01:00
Keader
42de9d9cd8 Scripts/ICC: Implemented spell Dark Reckoning
Closes #26941

(cherry picked from commit bddf41e718)
2022-03-18 00:06:15 +01:00
offl
e80777cb39 Core/SAI: Split set/remove unit_flags actions (#26954)
(cherry picked from commit 0a2fca1aed)
2022-03-18 00:04:03 +01:00
offl
5f40959687 Scripts/Spells: Mount check aura for Gryphon Hatchling & Wind Rider Cub (#26897)
Closes #26600

(cherry picked from commit 5f71c40b96)
2022-03-17 23:59:01 +01:00
offl
4e42ea2aca Core/Misc: Link CREATURE_FLAG_EXTRA_INSTANCE_BIND to corresponding static flag
(cherry picked from commit f89bb43419)
2022-03-16 00:06:34 +01:00
offl
f55e86d907 Core/SAI: Remove possibility to set/remove unit_flags2
So far I see that only Cannot Turn flag can be changed by scripts and action to change it didn't existed in 3xx. If someone will need to change that flag, it should be implemented by action which will change only that flag and not any flag of that type.

(cherry picked from commit c8061d8ba6)
2022-03-15 23:59:35 +01:00
offl
340091f8ff Core/Misc: Leave detailed description for UNIT_FLAG_NON_ATTACKABLE
(cherry picked from commit 8a70efed8c)
2022-03-15 23:55:41 +01:00
offl
122b2e4665 Core/Misc: Update comments of static flags
(cherry picked from commit b4bb2bc0c5)
2022-03-15 23:55:32 +01:00
offl
8bd9a211fe Core/Misc: Update enums of static flags
(cherry picked from commit f381e18244)
2022-03-15 23:55:19 +01:00
offl
9161c93d09 Core/Misc: Rename few type flags
(cherry picked from commit 4b028e599e)
2022-03-15 23:55:08 +01:00
offl
5de542610f Core/Misc: Name unknown CreatureEliteType
(cherry picked from commit 8047532605)
2022-03-15 23:53:31 +01:00
offl
7cba68ca17 Core/Misc: Rename UNIT_FLAG_PVP to UNIT_FLAG_PVP_ENABLING
Ref #26912

(cherry picked from commit 4e291caff8)
2022-03-15 23:47:46 +01:00
offl
ad0ebedd9b Core/Misc: Rename UNIT_FLAG_SWIMMING to UNIT_FLAG_CAN_SWIM
Ref #26912

(cherry picked from commit e4a82ee97a)
2022-03-15 23:47:31 +01:00
offl
661a24b7b1 Core/Misc: Rename UNIT_FLAG_TAXI_FLIGHT to UNIT_FLAG_ON_TAXI
Ref #26912

(cherry picked from commit a50ce8755b)
2022-03-15 23:32:27 +01:00
offl
756ef6799a Core/Creature: Add first 4 enums of static flags (#26914)
(cherry picked from commit 1a9b914ac0)
2022-03-15 23:11:44 +01:00
offl
c4906ce60b Core/Misc: Rename UNIT_FLAG_NOT_SELECTABLE to UNIT_FLAG_UNINTERACTIBLE (#26913)
(cherry picked from commit c4741a131a)
2022-03-15 23:03:26 +01:00
offl
6a5f3835f3 Scripts/Misc: Remove useless comments & Varos' Centrifuge Shield adjustments
(cherry picked from commit b2fffe674d)
2022-03-15 22:24:44 +01:00
offl
2d4f087f85 Scripts/Creature: Update Dancing Flames (#26883)
(cherry picked from commit 70c3e58327)
2022-03-15 00:11:06 +01:00
offl
0506f21f5e DB/Creature: Remove remaining non-static flags from DB, finally (#26884)
(cherry picked from commit 0e12e23f77)
2022-03-14 23:56:38 +01: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
Gildor
81e9f0ef79 Core/Disables: Fixed params_1 (SPELL_DISABLE_AREA) data loading for DISABLE_TYPE_SPELL (#26878)
(cherry picked from commit 188b074f3c)
2022-03-14 23:53:42 +01:00
offl
94840f791c DB/GameObject: Update Toy Train Set
(cherry picked from commit fd9d04062c)
2022-03-14 23:51:23 +01:00
Giacomo Pozzoni
318e0e2406 Handle deprecated SAI actions and events (#26846)
* Core/SAI: Show a clear error for no longer supported SAI actions

* Core/SAI: Show a warning for deprecated SAI events, still loading them.

Disable log "sql.sql.deprecation" in config if you want to ignore the warning

(cherry picked from commit 3af4d17188)
2022-03-14 00:09:26 +01:00
trickerer
c783ba38d2 Core/Combat Fix first autoattack being skipped after charging (#26860)
Fixes #25014
Fixes #24626

(cherry picked from commit 8729bec844)
2022-03-13 23:43:50 +01:00
Giacomo Pozzoni
a19c71a770 Core/SAI: Change error to warning for unused parameters (#26848)
Change error to warning for unused parameters and load the scripts instead of skipping them

(cherry picked from commit cb764a932d)
2022-03-13 23:43:28 +01:00
Gildor
9b7c55921f Core/Unit: improve SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL immunities (#26849)
(cherry picked from commit 0fad28e4ab)
2022-03-13 23:36:57 +01:00
ccrs
a00c4f80bb Scripts/VioletHold: f661bc6 follow-up - remove remnants of SetVisible calls from npc_sinclari_vh
(cherry picked from commit 505e91a016)
2022-03-13 22:41:14 +01:00
ccrs
4387c8ab13 Scripts/VioletHold: corrections to violet_hold_trashAI to prevent trash npcs being stuck in place forever if SPELL_DESTROY_DOOR_SEAL is no longer being casted for w/e reason
(cherry picked from commit 4c0ff09171)
2022-03-13 22:40:13 +01:00
Shauren
ff80b5ad67 Core/Vehicles: Remove unused field
(cherry picked from commit 203f175ec9)
2022-03-13 22:39:40 +01:00
Giacomo Pozzoni
b7addbafe8 Core/DB: Improve MySQL version check messages (#26866)
* Core/DB: Improve MySQL version check messages

* Make it more clear that any version above the required one is supported

* Implement feedback

(cherry picked from commit d9a0db79a8)
2022-03-13 22:37:07 +01:00
offl
0b50fd183f DB/Quest: Rework 'Bitter Departure' (12832)
(cherry picked from commit afafff57a8)
2022-03-13 22:13:20 +01:00
offl
4164d55158 DB/Creature: Get rid of more flags
Ref #25764

(cherry picked from commit 2f02c2fb86)
2022-03-13 21:16:26 +01:00
offl
0ce5a2e7a5 DB/Creature: Get rid of more Feign Death flags
Ref #25764

(cherry picked from commit 354a45b09d)
2022-03-13 19:31:14 +01:00
Ovah
a5889ba3eb Core/Quests: check PreviousQuestID values as well when trying to make quest groups available to players (#26769)
* Core/Quests: check PreviousQuestID values as well when trying to make a quest available to support quest group requirements for another quest group

* checking for previous quests via NextQuestID only works for single followup quests. However, if we want to make multiple quests available after rewarding all quests of an exclusive group we have to consider PreviousQuestID values as well as every single quest of the next quest group has to check the rewarded exclusive group

* only check for previous quests that must be rewarded instead of being active

(cherry picked from commit a0aa9730e2)
2022-03-13 19:31:14 +01:00
jackpoz
015b4e4578 Scripts/Commands: Fix ".wp show info" showing wrong event chance values
(cherry picked from commit b64ef1a39a)
2022-03-13 19:31:14 +01:00
Anton Popovichenko
8447f627ba Core/Config: Implement config override with env vars (#26811)
* Core/Config: Implement config override with env vars

Implement overriding of configuration from the .conf file with environment variables.
Environment variables keys are autogenerated based on the keys defined in .conf file.
Usage example:
$ export TC_DATA_DIR=/usr
$ TC_WORLD_SERVER_PORT=8080 ./worldserver

* Core/Config Fix typo in logs

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>

* Core/Config Fix code style in EnvVarForIniKey

Co-authored-by: Shauren <shauren.trinity@gmail.com>

* Update tests/common/Config.cpp

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

Co-authored-by: Anton Popovichenko <anton.popovichenko@mendix.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>
(cherry picked from commit 1ddd9dc19c)
2022-03-13 16:37:01 +01:00
ccrs
1e9327d92c Scripts/Ahnkahet: adjust timer on Conjure Flame Spheres in Prince Taldaram encounter
values sniffed

(cherry picked from commit 0bdc55b07c)
2022-03-13 16:32:25 +01:00
ccrs
f097b8ab74 Scripts/Ahnkahet: 57fe05f2 followup
cause staging is hard

(cherry picked from commit b00486e108)
2022-03-13 16:21:10 +01:00
ccrs
c92003b0ab Build: fix no-pch build
(cherry picked from commit 994227fbb3)
2022-03-13 16:20:45 +01:00
ccrs
ec70cff006 Scripts/Ahnkahet: rescript Ahn'kahar Spell Flinger SAI + spell scripts + spelldifficulty_dbc entries
(cherry picked from commit 57fe05f270)
2022-03-13 16:19:47 +01:00
Shauren
9d437961a2 Scripts: Fix warnings introduced in 7360c2d156
(cherry picked from commit 50ab4254a3)
2022-03-13 14:27:30 +01:00
Kelno
6b8d03d71e Don't count character pending deletion towards character per account limit (#26837)
* Don't count character pending deletion towards character per account limit

* Never show more than 10 characters char enum

* Use constants

(cherry picked from commit e2f20aff8a)
2022-03-13 14:27:10 +01:00
ccrs
eff9b5042d Scripts/Ahnkahet: implement Herald Volazj's Twisted Visage AI + small corrections to Herald's own AI
sorry about indentation
timers are guessed
summoning logic unchanged, remains not blizzlike
visage's spells missing spelldifficulty_dbc entries

(cherry picked from commit 7360c2d156)
2022-03-13 14:15:01 +01:00
Aokromes
0a77534245 Core/DB: Updated missing check (#26834)
* Core/DB: Updated missing check

TrinityCore does not support MySQL versions below 5.7, please update your MySQL server

(cherry picked from commit 3c84972a36)
2022-03-13 14:05:23 +01:00
Shauren
bbde3b54b9 Scripts/Commands: Avoid copies of RBACCommandData
Silences the PVS V1002 warning:
"The 'RBACCommandData' class, containing pointers, constructor and destructor, is copied by the automatically generated copy constructor."

(cherry picked from commit 7c7b4760d8)
2022-03-13 00:35:31 +01:00
ccrs
e1115e30c2 Scripts/Ahnkahet: small corrections to boss_prince_taldaram script
(cherry picked from commit f8f50bef50)
2022-03-13 00:23:10 +01:00
ccrs
a0736c4544 Scripts/Ahnkahet: corrections to boss_jedoga_shadowseeker script
(cherry picked from commit f087850508)
2022-03-13 00:22:28 +01:00
Keader
6bc9674167 Scripts/Misc: Moved Submerge script to spell_generic
(cherry picked from commit 9153ad621e)
2022-03-13 00:17:25 +01:00
Carbenium
9bee960880 Scripts/Commands: Convert argument parsing of instance commands to new system
(cherry picked from commit b90a4f1798)
2022-03-13 00:15:35 +01:00
Keader
105e2e3358 Scripts/Ulduar: Moved UNIT_FLAG_NOT_SELECTABLE to inside XT002 Script
Spell is used for some world quests too

(cherry picked from commit 8014054ef9)
2022-03-12 23:51:32 +01:00