From 29814275c5e8e793a2782b8bebc86b33ce856d4b Mon Sep 17 00:00:00 2001 From: David Parra Date: Thu, 4 Apr 2024 09:35:12 +0100 Subject: [PATCH] merge core (#5) * fix ProcSystemArguments constructor arg mismatch * [Quest] rework Missing in Action quest using new systems (#660) * [Quest] rework Missing in Action quest using new systems * add changes requested in comments * SpawnGroup: Implement CREATURE_GROUP_FORMATION_MIRRORING * Config: Implement config override with env vars (#502) * 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 CM_DATA_DIR=/usr $ CM_WORLD_SERVER_PORT=8080 ./mangosd * Update env var key format and encapsulated env loading logic. The new env key format: Mangosd_Rate_Health Mangosd_DataDir * Add suggestions from code review. * Add missing includes. * Pet: Tryfix double unsummon crash due to visibility Close https://github.com/cmangos/mangos-wotlk/pull/508 Credit @insunaa for the general idea * [Quest] modernize defias brotherhood escort quest Closes https://github.com/cmangos/mangos-tbc/pull/662 * [Quest] modernize 'Protect the Shipment' escort quest Closes https://github.com/cmangos/mangos-tbc/pull/663 * Remove gameobject los temp fix for playerbots * G3D: Extend Support for new MacOS Versions (+Apple Silicon) * Pet: Fix compilation for pch on linux * Network: Minor rework of code to make it same as wotlk * Move spell to proper section * G3D: Fix MacOS/Apple Silicon compile * Spell/Unit: Remove now redundant default coeff calculation I am expecting trouble, but we need to threat 0 as 0 Closes https://github.com/cmangos/issues/issues/3685 * AC: Add ignore los to shirrak inhibit magic aoe * Playerbots: Fix grid loading issue (#536) - Exxenoz * Spell/Unit: Fix default for coefficient being 0 and fix coeff for npc pets Closes https://github.com/cmangos/issues/issues/3685 again * Playerbots: Handle spell item requirements by the bot system --------- Co-authored-by: cdkr <775481991@qq.com> Co-authored-by: _daanieL Co-authored-by: killerwife Co-authored-by: Anton Popovichenko Co-authored-by: insunaa Co-authored-by: insunaa --- src/game/Spells/Spell.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/game/Spells/Spell.cpp b/src/game/Spells/Spell.cpp index 8d7e3d0402..6066cc4c7b 100644 --- a/src/game/Spells/Spell.cpp +++ b/src/game/Spells/Spell.cpp @@ -6757,6 +6757,17 @@ bool Spell::IgnoreItemRequirements() const if (m_channelOnly || m_ignoreCosts) return true; +#ifdef ENABLE_PLAYERBOTS + if (m_caster->IsPlayer()) + { + PlayerbotAI* bot = ((Player*)m_caster)->GetPlayerbotAI(); + if (bot && bot->HasSpellItems(m_spellInfo->Id, m_CastItem)) + { + return true; + } + } +#endif + // Workaround for double shard problem if (m_IsTriggeredSpell || this->m_spellInfo->Id == 46546) {