mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-12-05 18:20:24 -08:00
Compare commits
9 commits
dde4c4cb4c
...
4d16a5ccee
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d16a5ccee | ||
|
|
dfe44b7e86 | ||
|
|
d90d3904e0 | ||
|
|
af00045267 | ||
|
|
ede6868e14 | ||
|
|
a20bc6fe28 | ||
|
|
3bc6f0536b | ||
|
|
aaedccd2b8 | ||
|
|
9f60a1c6b7 |
10 changed files with 103 additions and 20 deletions
6
data/sql/updates/db_world/2025_11_26_05.sql
Normal file
6
data/sql/updates/db_world/2025_11_26_05.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
-- DB update 2025_11_26_04 -> 2025_11_26_05
|
||||
--
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 1200 AND `source_type` = 0 AND `id` IN (2, 3);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(1200, 0, 2, 0, 0, 0, 100, 0, 0, 0, 0, 6000, 0, 0, 11, 3108, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Morbent Fel - In Combat - Cast \'Touch of Death\''),
|
||||
(1200, 0, 3, 0, 0, 0, 100, 0, 5000, 25000, 22500, 27500, 0, 0, 11, 3109, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Morbent Fel - In Combat - Cast \'Presence of Death\'');
|
||||
12
data/sql/updates/db_world/2025_11_26_06.sql
Normal file
12
data/sql/updates/db_world/2025_11_26_06.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-- DB update 2025_11_26_05 -> 2025_11_26_06
|
||||
|
||||
-- Remove row 5 (set range 100) and update comments.
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 32769;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 32769);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(32769, 0, 0, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 31406, 80, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Out of Combat - Start Attacking'),
|
||||
(32769, 0, 1, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 32512, 80, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Out of Combat - Start Attacking'),
|
||||
(32769, 0, 2, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 31838, 80, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Out of Combat - Start Attacking'),
|
||||
(32769, 0, 3, 0, 1, 0, 100, 0, 5000, 10000, 3000, 6000, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 32513, 80, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Out of Combat - Start Attacking'),
|
||||
(32769, 0, 4, 0, 9, 0, 100, 0, 0, 0, 1500, 1500, 0, 40, 11, 60239, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gargoyle Ambusher - Within 0-40 Range - Cast \'Gargoyle Ambusher Strike\'');
|
||||
41
data/sql/updates/db_world/2025_11_27_00.sql
Normal file
41
data/sql/updates/db_world/2025_11_27_00.sql
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
-- DB update 2025_11_26_06 -> 2025_11_27_00
|
||||
--
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 30474);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(30474, 0, 0, 1, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - On Reset - Set Event Phase 1'),
|
||||
(30474, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - On Reset - Remove Flags Immune To Players'),
|
||||
(30474, 0, 2, 0, 0, 1, 100, 0, 1000, 3000, 8000, 11000, 0, 0, 11, 61662, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - In Combat - Cast \'Cyclone\' (Phase 1)'),
|
||||
(30474, 0, 3, 0, 0, 1, 100, 0, 1000, 8000, 12000, 16000, 0, 0, 11, 61663, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - In Combat - Cast \'Gust of Wind\' (Phase 1)'),
|
||||
(30474, 0, 4, 0, 2, 0, 100, 1, 0, 20, 0, 0, 0, 0, 80, 3047400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Between 0-20% Health - Run Script (No Repeat)');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 3047400);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(3047400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Set Event Phase 2'),
|
||||
(3047400, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Stop Attack'),
|
||||
(3047400, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Disable Evade'),
|
||||
(3047400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Set Faction 35'),
|
||||
(3047400, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Set Flags Immune To Players'),
|
||||
(3047400, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 46957, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Cast \'Cosmetic - Stun (Permanent)\''),
|
||||
(3047400, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Say Line 0'),
|
||||
(3047400, 9, 7, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 30388, 100, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Say Line 0'),
|
||||
(3047400, 9, 8, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Say Line 1'),
|
||||
(3047400, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 30388, 100, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Say Line 1'),
|
||||
(3047400, 9, 10, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 56892, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Cast \'Drop Horn of Elemental Fury\''),
|
||||
(3047400, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 46598, 0, 0, 0, 0, 0, 19, 30388, 100, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Remove Aura \'Ride Vehicle Hardcoded\''),
|
||||
(3047400, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 60000, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'The North Wind - Actionlist - Despawn In 60000 ms');
|
||||
|
||||
DELETE FROM `creature_template_spell` WHERE (`CreatureID` = 30388) AND (`Index` IN (0, 2));
|
||||
INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES
|
||||
(30388, 0, 56896, 12340),
|
||||
(30388, 2, 56897, 12340);
|
||||
|
||||
-- eject forward and to the right
|
||||
DELETE FROM `vehicle_seat_addon` WHERE `SeatEntry` = 2245;
|
||||
INSERT INTO `vehicle_seat_addon` (`SeatEntry`, `SeatOrientation`, `ExitParamX`, `ExitParamY`, `ExitParamZ`, `ExitParamO`, `ExitParamValue`) VALUES
|
||||
(2245, 0.0, 3.0, -4.0, 3.0, 0.0, 1);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 1 AND `entryorguid` = 194123);
|
||||
UPDATE `gameobject_template` SET `AIName` = '' WHERE (`entry` = 194123);
|
||||
|
||||
-- Remove duplicate spawn of 'The North Wind'
|
||||
DELETE FROM `creature` WHERE `guid` = 1955014 AND `id1` = 30474;
|
||||
BIN
src.zip
Normal file
BIN
src.zip
Normal file
Binary file not shown.
|
|
@ -15,12 +15,13 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "Containers.h"
|
||||
#include "GameTime.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Spell.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
|
|
@ -141,6 +142,23 @@ Creature* SummonList::GetCreatureWithEntry(uint32 entry) const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
Creature* SummonList::GetRandomCreatureWithEntry(uint32 entry) const
|
||||
{
|
||||
std::vector<ObjectGuid> candidates;
|
||||
candidates.reserve(storage_.size());
|
||||
|
||||
for (auto const guid : storage_)
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, guid))
|
||||
if (summon->GetEntry() == entry)
|
||||
candidates.push_back(guid);
|
||||
|
||||
if (candidates.empty())
|
||||
return nullptr;
|
||||
|
||||
ObjectGuid randomGuid = Acore::Containers::SelectRandomContainerElement(candidates);
|
||||
return ObjectAccessor::GetCreature(*me, randomGuid);
|
||||
}
|
||||
|
||||
bool SummonList::IsAnyCreatureAlive() const
|
||||
{
|
||||
for (auto const& guid : storage_)
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ public:
|
|||
uint32 GetEntryCount(uint32 entry) const;
|
||||
void Respawn();
|
||||
Creature* GetCreatureWithEntry(uint32 entry) const;
|
||||
Creature* GetRandomCreatureWithEntry(uint32 entry) const;
|
||||
|
||||
private:
|
||||
Creature* me;
|
||||
|
|
|
|||
|
|
@ -6308,7 +6308,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
|
|||
++slot;
|
||||
}
|
||||
|
||||
LOG_DEBUG("entities.player.loading", "Quest status is {{}} for quest {{}} for player ({})", questStatusData.Status, quest_id, GetGUID().ToString());
|
||||
LOG_DEBUG("entities.player.loading", "Quest status is ({}) for quest ({}) for player ({})", questStatusData.Status, quest_id, GetGUID().ToString());
|
||||
}
|
||||
} while (result->NextRow());
|
||||
}
|
||||
|
|
@ -6419,7 +6419,7 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result)
|
|||
continue;
|
||||
|
||||
m_weeklyquests.insert(quest_id);
|
||||
LOG_DEBUG("entities.player.loading", "Weekly quest {{}} cooldown for player ({})", quest_id, GetGUID().ToString());
|
||||
LOG_DEBUG("entities.player.loading", "Weekly quest ({}) cooldown for player ({})", quest_id, GetGUID().ToString());
|
||||
} while (result->NextRow());
|
||||
}
|
||||
|
||||
|
|
@ -6442,7 +6442,7 @@ void Player::_LoadSeasonalQuestStatus(PreparedQueryResult result)
|
|||
continue;
|
||||
|
||||
m_seasonalquests[event_id].insert(quest_id);
|
||||
LOG_DEBUG("entities.player.loading", "Seasonal quest {{}} cooldown for player ({})", quest_id, GetGUID().ToString());
|
||||
LOG_DEBUG("entities.player.loading", "Seasonal quest ({}) cooldown for player ({})", quest_id, GetGUID().ToString());
|
||||
} while (result->NextRow());
|
||||
}
|
||||
|
||||
|
|
@ -6464,7 +6464,7 @@ void Player::_LoadMonthlyQuestStatus(PreparedQueryResult result)
|
|||
continue;
|
||||
|
||||
m_monthlyquests.insert(quest_id);
|
||||
LOG_DEBUG("entities.player.loading", "Monthly quest {{}} cooldown for player ({})", quest_id, GetGUID().ToString());
|
||||
LOG_DEBUG("entities.player.loading", "Monthly quest ({}) cooldown for player ({})", quest_id, GetGUID().ToString());
|
||||
} while (result->NextRow());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18388,7 +18388,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
|
|||
}
|
||||
|
||||
// dismount players when charmed
|
||||
if (IsPlayer())
|
||||
if (IsPlayer() && type != CHARM_TYPE_POSSESS)
|
||||
RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||
|
||||
if (charmer->IsPlayer())
|
||||
|
|
|
|||
|
|
@ -6609,8 +6609,13 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
if (target->IsCreature() && target->ToCreature()->IsVehicle())
|
||||
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
|
||||
|
||||
// Allow SPELL_AURA_MOD_POSSESS to work on mounted players,
|
||||
// but keep the old restriction for everything else.
|
||||
if (target->IsMounted())
|
||||
return SPELL_FAILED_CANT_BE_CHARMED;
|
||||
{
|
||||
if (!(target->IsPlayer() && m_spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_POSSESS))
|
||||
return SPELL_FAILED_CANT_BE_CHARMED;
|
||||
}
|
||||
|
||||
if (target->GetCharmerGUID())
|
||||
return SPELL_FAILED_CHARMED;
|
||||
|
|
@ -7905,7 +7910,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
|
|||
case SPELL_AURA_AOE_CHARM:
|
||||
if (target->IsCreature() && target->IsVehicle())
|
||||
return false;
|
||||
if (target->IsMounted())
|
||||
if (target->IsMounted() && m_spellInfo->Effects[eff].ApplyAuraName != SPELL_AURA_MOD_POSSESS)
|
||||
return false;
|
||||
if (target->GetCharmerGUID())
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
|
||||
#include "AchievementCriteriaScript.h"
|
||||
#include "Containers.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
|
@ -209,7 +208,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
|||
}
|
||||
}
|
||||
|
||||
sacraficeTarget_GUID.Clear();
|
||||
sacrificeTargetGUID.Clear();
|
||||
sayPreachTimer = 120000;
|
||||
ritualTriggered = false;
|
||||
volunteerWork = true;
|
||||
|
|
@ -268,12 +267,12 @@ struct boss_jedoga_shadowseeker : public BossAI
|
|||
}
|
||||
case NPC_TWILIGHT_VOLUNTEER:
|
||||
{
|
||||
if (sacraficeTarget_GUID && summon->GetGUID() != sacraficeTarget_GUID)
|
||||
if (sacrificeTargetGUID && summon->GetGUID() != sacrificeTargetGUID)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (killer != me && killer->GetGUID() != sacraficeTarget_GUID)
|
||||
if (killer != me && killer->GetGUID() != sacrificeTargetGUID)
|
||||
{
|
||||
volunteerWork = false;
|
||||
}
|
||||
|
|
@ -315,7 +314,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
|||
{
|
||||
if (action == ACTION_SACRAFICE)
|
||||
{
|
||||
if (Creature* target = ObjectAccessor::GetCreature(*me, sacraficeTarget_GUID))
|
||||
if (Creature* target = ObjectAccessor::GetCreature(*me, sacrificeTargetGUID))
|
||||
{
|
||||
Unit::Kill(me, target);
|
||||
}
|
||||
|
|
@ -395,9 +394,9 @@ struct boss_jedoga_shadowseeker : public BossAI
|
|||
me->SetFacingTo(5.66f);
|
||||
if (!summons.empty())
|
||||
{
|
||||
sacraficeTarget_GUID = Acore::Containers::SelectRandomContainerElement(summons);
|
||||
if (ObjectAccessor::GetCreature(*me, sacraficeTarget_GUID))
|
||||
if (Creature* creature = summons.GetRandomCreatureWithEntry(NPC_TWILIGHT_VOLUNTEER))
|
||||
{
|
||||
sacrificeTargetGUID = creature->GetGUID();
|
||||
events.ScheduleEvent(EVENT_JEDGA_START_RITUAL, 3s, 0, PHASE_RITUAL);
|
||||
}
|
||||
// Something failed, let players continue but do not grant achievement
|
||||
|
|
@ -518,15 +517,16 @@ struct boss_jedoga_shadowseeker : public BossAI
|
|||
}
|
||||
case EVENT_JEDGA_START_RITUAL:
|
||||
{
|
||||
sacraficeTarget_GUID = Acore::Containers::SelectRandomContainerElement(summons);
|
||||
if (Creature* volunteer = ObjectAccessor::GetCreature(*me, sacraficeTarget_GUID))
|
||||
if (Creature* creature = summons.GetRandomCreatureWithEntry(NPC_TWILIGHT_VOLUNTEER))
|
||||
{
|
||||
sacrificeTargetGUID = creature->GetGUID();
|
||||
Talk(SAY_SACRIFICE_1);
|
||||
sacraficeTarget_GUID = volunteer->GetGUID();
|
||||
volunteer->AI()->DoAction(ACTION_RITUAL_BEGIN);
|
||||
creature->AI()->DoAction(ACTION_RITUAL_BEGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -546,7 +546,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
|||
private:
|
||||
GuidList oocSummons;
|
||||
GuidList oocTriggers;
|
||||
ObjectGuid sacraficeTarget_GUID;
|
||||
ObjectGuid sacrificeTargetGUID;
|
||||
uint32 sayPreachTimer;
|
||||
bool combatSummonsSummoned;
|
||||
bool ritualTriggered;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue