mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-12-06 02:30:26 -08:00
Compare commits
5 commits
d7677e12c1
...
20326e7330
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20326e7330 | ||
|
|
88078c81f4 | ||
|
|
7552832462 | ||
|
|
0df6156271 | ||
|
|
4ddb6e6293 |
5 changed files with 50 additions and 26 deletions
9
data/sql/updates/db_world/2025_12_05_00.sql
Normal file
9
data/sql/updates/db_world/2025_12_05_00.sql
Normal 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)');
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue