Compare commits

...

5 commits

Author SHA1 Message Date
Tereneckla
20326e7330
fix(Core/Player): reapply talent auras on item change (#24048)
Co-authored-by: r0m1ntik <40755539+r0m1ntik@users.noreply.github.com>
2025-12-05 06:36:13 -03:00
github-actions[bot]
88078c81f4 chore(DB): import pending files
Referenced commit(s): 4ddb6e6293
2025-12-05 03:32:32 +00:00
blinkysc
7552832462
fix(DB/Quest): Westguard Sergeant despawns when leaving Skorn (#23978)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
2025-12-05 00:32:03 -03:00
sogladev
0df6156271
fix(Scripts/Naxxramas): Save Horsemen Hub Portal between sessions (#24034)
Co-authored-by: Dinkledork <118951051+Day36512@users.noreply.github.com>
2025-12-05 00:31:30 -03:00
sogladev
4ddb6e6293
fix(Scripts/Naxxramas): Thaddius says intro only once (#24036) 2025-12-05 00:31:07 -03:00
5 changed files with 50 additions and 26 deletions

View file

@ -0,0 +1,9 @@
-- DB update 2025_12_04_00 -> 2025_12_05_00
-- DB/Quest: Westguard Sergeant despawns when leaving Skorn
DELETE FROM `smart_scripts` WHERE `entryorguid` = 24060 AND `source_type` = 0 AND `id` = 2;
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
(24060, 0, 2, 0, 1, 0, 100, 0, 3000, 5000, 3000, 5000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Westguard Sergeant - Out of Combat - Despawn Instant (Outside Skorn)');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceGroup` = 3 AND `SourceEntry` = 24060 AND `SourceId` = 0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(22, 3, 24060, 0, 0, 23, 1, 4002, 0, 0, 1, 0, 0, '', 'Westguard Sergeant - Despawn script only triggers when NOT in Skorn (area 4002)');

View file

@ -7158,18 +7158,34 @@ void Player::ApplyItemDependentAuras(Item* item, bool apply)
{
if (apply)
{
PlayerSpellMap const& spells = GetSpellMap();
for (auto itr = spells.begin(); itr != spells.end(); ++itr)
for (auto [spellId, playerSpell]: GetSpellMap())
{
if (itr->second->State == PLAYERSPELL_REMOVED)
if (playerSpell->State == PLAYERSPELL_REMOVED)
continue;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo || !spellInfo->IsPassive() || spellInfo->EquippedItemClass < 0)
continue;
if (!HasAura(itr->first) && HasItemFitToSpellRequirements(spellInfo))
AddAura(itr->first, this); // no SMSG_SPELL_GO in sniff found
if (!HasAura(spellId) && HasItemFitToSpellRequirements(spellInfo))
AddAura(spellId, this); // no SMSG_SPELL_GO in sniff found
}
// Check talents (they are stored separately from regular spells)
for (auto [spellId, playerTalent] : GetTalentMap())
{
if (playerTalent->State == PLAYERSPELL_REMOVED)
continue;
if (!(playerTalent->IsInSpec(GetActiveSpec())))
continue;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo || !spellInfo->IsPassive() || spellInfo->EquippedItemClass < 0)
continue;
if (!HasAura(spellId) && HasItemFitToSpellRequirements(spellInfo))
AddAura(spellId, this);
}
}
else

View file

@ -683,22 +683,18 @@ public:
};
};
class at_thaddius_entrance : public AreaTriggerScript
class at_thaddius_entrance : public OnlyOnceAreaTriggerScript
{
public:
at_thaddius_entrance() : AreaTriggerScript("at_thaddius_entrance") { }
at_thaddius_entrance() : OnlyOnceAreaTriggerScript("at_thaddius_entrance") { }
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
bool _OnTrigger(Player* player, const AreaTrigger* /*trigger*/) override
{
InstanceScript* instance = player->GetInstanceScript();
if (!instance || instance->GetData(DATA_THADDIUS_INTRO) || instance->GetBossState(BOSS_THADDIUS) == DONE)
return true;
if (Creature* thaddius = instance->GetCreature(DATA_THADDIUS_BOSS))
thaddius->AI()->Talk(SAY_GREET);
instance->SetData(DATA_THADDIUS_INTRO, 1);
return true;
if (InstanceScript* instance = player->GetInstanceScript())
if (instance->GetBossState(BOSS_THADDIUS) != DONE)
if (Creature* thaddius = instance->GetCreature(DATA_THADDIUS_BOSS))
thaddius->AI()->Talk(SAY_GREET);
return false;
}
};

View file

@ -547,12 +547,17 @@ public:
}
case DONE:
{
if (!horsemanKilled) // if no horsemen are found, assume wing is cleared
{
ActivateWingPortal(DATA_HORSEMAN_PORTAL);
break;
}
_events.RescheduleEvent(EVENT_AND_THEY_WOULD_ALL_GO_DOWN_TOGETHER, 15s);
if (horsemanKilled != HorsemanCount)
return false;
// all horsemans are killed
if (Creature* cr = GetCreature(DATA_BARON_RIVENDARE_BOSS))
cr->CastSpell(cr, SPELL_THE_FOUR_HORSEMAN_CREDIT, true);

View file

@ -75,17 +75,15 @@ enum NaxxramasData
DATA_DANCE_FAIL = 301,
DATA_SPORE_KILLED = 302,
DATA_FRENZY_REMOVED = 303,
DATA_THADDIUS_INTRO = 304,
DATA_CHARGES_CROSSED = 305,
DATA_HUNDRED_CLUB = 306,
DATA_ABOMINATION_KILLED = 307,
DATA_CHARGES_CROSSED = 304,
DATA_HUNDRED_CLUB = 305,
DATA_ABOMINATION_KILLED = 306,
};
enum NaxxramasPersistentData
{
PERSISTENT_DATA_THADDIUS_INTRO = 0,
PERSISTENT_DATA_KELTHUZAD_DIALOG = 1,
PERSISTENT_DATA_IMMORTAL_FAIL = 2,
PERSISTENT_DATA_KELTHUZAD_DIALOG = 0,
PERSISTENT_DATA_IMMORTAL_FAIL = 1,
PERSISTENT_DATA_COUNT
};