mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
85
data/sql/updates/db_world/2024_01_23_00.sql
Normal file
85
data/sql/updates/db_world/2024_01_23_00.sql
Normal file
@@ -0,0 +1,85 @@
|
||||
-- DB update 2024_01_21_00 -> 2024_01_23_00
|
||||
-- revert squish 8.0 game_event changes
|
||||
UPDATE `game_event` SET `start_time` = '2021-06-22 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 1;
|
||||
UPDATE `game_event` SET `start_time` = '2021-12-16 01:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 2;
|
||||
UPDATE `game_event` SET `start_time` = '2020-01-05 06:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 3;
|
||||
UPDATE `game_event` SET `start_time` = '2014-09-07 06:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 4;
|
||||
UPDATE `game_event` SET `start_time` = '2014-10-05 06:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 5;
|
||||
UPDATE `game_event` SET `start_time` = '2021-01-01 07:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 6;
|
||||
UPDATE `game_event` SET `start_time` = '2021-01-24 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 7;
|
||||
UPDATE `game_event` SET `start_time` = '2021-02-08 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 8;
|
||||
UPDATE `game_event` SET `start_time` = '2021-04-13 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 9;
|
||||
UPDATE `game_event` SET `start_time` = '2021-05-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 10;
|
||||
UPDATE `game_event` SET `start_time` = '2021-09-29 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 11;
|
||||
UPDATE `game_event` SET `start_time` = '2021-10-19 00:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 12;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 13;
|
||||
UPDATE `game_event` SET `start_time` = '2016-10-29 00:00:00', `end_time` = '2030-12-31 07:00:00' WHERE `eventEntry` = 14;
|
||||
UPDATE `game_event` SET `start_time` = '2016-10-30 14:00:00', `end_time` = '2030-12-31 07:00:00' WHERE `eventEntry` = 15;
|
||||
UPDATE `game_event` SET `start_time` = '2007-08-05 10:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 16;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 17;
|
||||
UPDATE `game_event` SET `start_time` = '2010-05-07 13:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 18;
|
||||
UPDATE `game_event` SET `start_time` = '2010-04-02 13:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 19;
|
||||
UPDATE `game_event` SET `start_time` = '2010-04-23 13:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 20;
|
||||
UPDATE `game_event` SET `start_time` = '2010-04-30 13:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 21;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 22;
|
||||
UPDATE `game_event` SET `start_time` = '2014-09-04 06:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 23;
|
||||
UPDATE `game_event` SET `start_time` = '2021-09-20 03:00:00', `end_time` = '2030-12-31 13:00:00' WHERE `eventEntry` = 24;
|
||||
UPDATE `game_event` SET `start_time` = '2015-07-29 21:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 25;
|
||||
UPDATE `game_event` SET `start_time` = '2021-11-23 01:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 26;
|
||||
UPDATE `game_event` SET `start_time` = '2008-03-24 12:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 27;
|
||||
UPDATE `game_event` SET `start_time` = '2008-04-07 12:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 28;
|
||||
UPDATE `game_event` SET `start_time` = '2008-04-21 12:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 29;
|
||||
UPDATE `game_event` SET `start_time` = '2008-05-05 12:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 30;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 31;
|
||||
UPDATE `game_event` SET `start_time` = '2008-05-16 02:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 32;
|
||||
UPDATE `game_event` SET `start_time` = '2011-03-22 06:10:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 33;
|
||||
UPDATE `game_event` SET `start_time` = '2021-10-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 34;
|
||||
UPDATE `game_event` SET `start_time` = '2021-11-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 35;
|
||||
UPDATE `game_event` SET `start_time` = '2021-12-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 36;
|
||||
UPDATE `game_event` SET `start_time` = '2021-01-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 37;
|
||||
UPDATE `game_event` SET `start_time` = '2021-02-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 38;
|
||||
UPDATE `game_event` SET `start_time` = '2021-03-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 39;
|
||||
UPDATE `game_event` SET `start_time` = '2021-04-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 40;
|
||||
UPDATE `game_event` SET `start_time` = '2021-05-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 41;
|
||||
UPDATE `game_event` SET `start_time` = '2021-06-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 42;
|
||||
UPDATE `game_event` SET `start_time` = '2021-07-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 43;
|
||||
UPDATE `game_event` SET `start_time` = '2021-08-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 44;
|
||||
UPDATE `game_event` SET `start_time` = '2021-09-01 00:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 45;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 48;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 49;
|
||||
UPDATE `game_event` SET `start_time` = '2021-09-19 01:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 50;
|
||||
UPDATE `game_event` SET `start_time` = '2021-11-01 02:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 51;
|
||||
UPDATE `game_event` SET `start_time` = '2021-12-25 06:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 52;
|
||||
UPDATE `game_event` SET `start_time` = '2010-04-09 13:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 53;
|
||||
UPDATE `game_event` SET `start_time` = '2010-04-16 13:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 54;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 55;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 56;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 57;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 58;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 59;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 60;
|
||||
UPDATE `game_event` SET `start_time` = '2010-09-07 06:00:00', `end_time` = '2010-10-10 06:00:00' WHERE `eventEntry` = 61;
|
||||
UPDATE `game_event` SET `start_time` = '2016-10-30 13:00:00', `end_time` = '2030-12-31 07:00:00' WHERE `eventEntry` = 62;
|
||||
UPDATE `game_event` SET `start_time` = '2014-03-22 19:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 63;
|
||||
UPDATE `game_event` SET `start_time` = '2014-03-22 20:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 64;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 65;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 66;
|
||||
UPDATE `game_event` SET `start_time` = '2010-01-02 06:40:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 67;
|
||||
UPDATE `game_event` SET `start_time` = '2010-01-02 06:55:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 68;
|
||||
UPDATE `game_event` SET `start_time` = '2010-01-02 06:10:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 69;
|
||||
UPDATE `game_event` SET `start_time` = '2021-09-17 03:00:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 70;
|
||||
UPDATE `game_event` SET `start_time` = '2013-01-06 07:01:00', `end_time` = '2030-12-31 12:00:00' WHERE `eventEntry` = 71;
|
||||
UPDATE `game_event` SET `start_time` = '2010-01-01 01:00:00', `end_time` = '2030-01-01 01:00:00' WHERE `eventEntry` = 73;
|
||||
UPDATE `game_event` SET `start_time` = '2022-01-01 07:00:00', `end_time` = '2030-01-01 08:00:00' WHERE `eventEntry` = 74;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 75;
|
||||
UPDATE `game_event` SET `start_time` = '2000-01-01 14:00:00', `end_time` = '2000-01-01 14:00:00' WHERE `eventEntry` = 76;
|
||||
UPDATE `game_event` SET `start_time` = '2016-11-06 02:01:00', `end_time` = '2030-12-31 07:00:00' WHERE `eventEntry` = 77;
|
||||
UPDATE `game_event` SET `start_time` = '2021-03-20 07:00:00', `end_time` = '2030-12-31 07:00:00' WHERE `eventEntry` = 78;
|
||||
UPDATE `game_event` SET `start_time` = '2018-10-28 12:00:00', `end_time` = '2030-12-31 18:00:00' WHERE `eventEntry` = 79;
|
||||
UPDATE `game_event` SET `start_time` = '2018-10-28 00:00:00', `end_time` = '2030-12-31 06:00:00' WHERE `eventEntry` = 80;
|
||||
UPDATE `game_event` SET `start_time` = '2011-03-22 01:00:00', `end_time` = '2030-12-31 07:00:00' WHERE `eventEntry` = 85;
|
||||
UPDATE `game_event` SET `start_time` = '2008-01-02 11:55:00', `end_time` = '2030-12-31 06:00:00' WHERE `eventEntry` = 86;
|
||||
UPDATE `game_event` SET `start_time` = '2008-01-02 11:55:00', `end_time` = '2030-12-31 06:00:00' WHERE `eventEntry` = 87;
|
||||
UPDATE `game_event` SET `start_time` = '2016-10-28 18:00:00', `end_time` = '2030-12-30 23:00:00' WHERE `eventEntry` = 88;
|
||||
UPDATE `game_event` SET `start_time` = '2016-10-28 20:00:00', `end_time` = '2030-12-30 23:00:00' WHERE `eventEntry` = 89;
|
||||
UPDATE `game_event` SET `start_time` = '2016-10-30 14:00:00', `end_time` = '2030-12-31 07:00:00' WHERE `eventEntry` = 90;
|
||||
4
data/sql/updates/db_world/2024_01_29_00.sql
Normal file
4
data/sql/updates/db_world/2024_01_29_00.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- DB update 2024_01_23_00 -> 2024_01_29_00
|
||||
-- 20033 and 20034 were 1|2048 and 20047 was 2048
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask` = 0 WHERE `entry` IN (20033, 20034);
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask` = 256|33554432 WHERE `entry` = 20047;
|
||||
@@ -3354,7 +3354,7 @@ Guild.BankTabCost1 = 2500000
|
||||
Guild.BankTabCost2 = 5000000
|
||||
Guild.BankTabCost3 = 10000000
|
||||
Guild.BankTabCost4 = 25000000
|
||||
Guild.BankTabCost5 = 50000000#
|
||||
Guild.BankTabCost5 = 50000000
|
||||
|
||||
#
|
||||
# Guild.MemberLimit
|
||||
|
||||
@@ -81,7 +81,7 @@ InstanceSave* InstanceSaveMgr::AddInstanceSave(uint32 mapId, uint32 instanceId,
|
||||
|
||||
if (difficulty >= (entry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))
|
||||
{
|
||||
LOG_ERROR("instance.save", "InstanceSaveMgr::AddInstanceSave: mapid = {}, instanceid = {}, wrong dificalty {}!", mapId, instanceId, difficulty);
|
||||
LOG_ERROR("instance.save", "InstanceSaveMgr::AddInstanceSave: mapid = {}, instanceid = {}, wrong difficulty {}!", mapId, instanceId, difficulty);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -2355,11 +2355,11 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const* /*triggeredByAura*/)
|
||||
// Ranged autorepeat attack is set as triggered spell - ignore it
|
||||
if (!(m_procAttacker & PROC_FLAG_DONE_RANGED_AUTO_ATTACK))
|
||||
{
|
||||
if (_triggeredCastFlags & TRIGGERED_DISALLOW_PROC_EVENTS &&
|
||||
if (HasTriggeredCastFlag(TRIGGERED_DISALLOW_PROC_EVENTS) &&
|
||||
(m_spellInfo->HasAttribute(SPELL_ATTR2_ACTIVE_THREAT) ||
|
||||
m_spellInfo->HasAttribute(SPELL_ATTR3_NOT_A_PROC)))
|
||||
m_procEx |= PROC_EX_INTERNAL_CANT_PROC;
|
||||
else if (_triggeredCastFlags & TRIGGERED_DISALLOW_PROC_EVENTS)
|
||||
else if (HasTriggeredCastFlag(TRIGGERED_DISALLOW_PROC_EVENTS))
|
||||
m_procEx |= PROC_EX_INTERNAL_TRIGGERED;
|
||||
}
|
||||
// Totem casts require spellfamilymask defined in spell_proc_event to proc
|
||||
@@ -3147,7 +3147,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
|
||||
if (m_originalCaster)
|
||||
{
|
||||
bool refresh = false;
|
||||
bool refreshPeriodic = m_spellInfo->StackAmount < 2 && !(_triggeredCastFlags & TRIGGERED_NO_PERIODIC_RESET);
|
||||
bool refreshPeriodic = m_spellInfo->StackAmount < 2 && !HasTriggeredCastFlag(TRIGGERED_NO_PERIODIC_RESET);
|
||||
m_spellAura = Aura::TryRefreshStackOrCreate(aurSpellInfo, effectMask, unit, m_originalCaster,
|
||||
(aurSpellInfo == m_spellInfo) ? &m_spellValue->EffectBasePoints[0] : &basePoints[0], m_CastItem, ObjectGuid::Empty, &refresh, refreshPeriodic);
|
||||
|
||||
@@ -3481,7 +3481,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
}
|
||||
|
||||
// Fill aura scaling information
|
||||
if (sScriptMgr->CanScalingEverything(this) || m_caster->IsTotem() || (m_caster->IsControlledByPlayer() && !m_spellInfo->IsPassive() && m_spellInfo->SpellLevel && !m_spellInfo->IsChanneled() && !(_triggeredCastFlags & TRIGGERED_IGNORE_AURA_SCALING)))
|
||||
if (sScriptMgr->CanScalingEverything(this) || m_caster->IsTotem() || (m_caster->IsControlledByPlayer() && !m_spellInfo->IsPassive() && m_spellInfo->SpellLevel && !m_spellInfo->IsChanneled() && !HasTriggeredCastFlag(TRIGGERED_IGNORE_AURA_SCALING)))
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
@@ -3522,7 +3522,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
}
|
||||
|
||||
//Prevent casting at cast another spell (ServerSide check)
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->IsNonMeleeSpellCast(false, true, true, m_spellInfo->Id == 75) && m_cast_count)
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->IsNonMeleeSpellCast(false, true, true, m_spellInfo->Id == 75) && m_cast_count)
|
||||
{
|
||||
SendCastResult(SPELL_FAILED_SPELL_IN_PROGRESS);
|
||||
finish(false);
|
||||
@@ -3536,7 +3536,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
m_powerCost = m_CastItem ? 0 : m_spellInfo->CalcPowerCost(m_caster, m_spellSchoolMask, this);
|
||||
|
||||
// Set combo point requirement
|
||||
if ((_triggeredCastFlags & TRIGGERED_IGNORE_COMBO_POINTS) || m_CastItem)
|
||||
if (HasTriggeredCastFlag(TRIGGERED_IGNORE_COMBO_POINTS) || m_CastItem)
|
||||
m_needComboPoints = false;
|
||||
|
||||
SpellCastResult result = CheckCast(true);
|
||||
@@ -3566,7 +3566,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
prepareDataForTriggerSystem(triggeredByAura);
|
||||
|
||||
// calculate cast time (calculated after first CheckCast check to prevent charge counting for first CheckCast fail)
|
||||
m_casttime = (_triggeredCastFlags & TRIGGERED_CAST_DIRECTLY) ? 0 : m_spellInfo->CalcCastTime(m_caster, this);
|
||||
m_casttime = HasTriggeredCastFlag(TRIGGERED_CAST_DIRECTLY) ? 0 : m_spellInfo->CalcCastTime(m_caster, this);
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (m_caster->ToPlayer()->GetCommandStatus(CHEAT_CASTTIME))
|
||||
@@ -3656,13 +3656,13 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
//Containers for channeled spells have to be set
|
||||
//TODO:Apply this to all casted spells if needed
|
||||
// Why check duration? 29350: channelled triggers channelled
|
||||
if ((_triggeredCastFlags & TRIGGERED_CAST_DIRECTLY) && (!m_spellInfo->IsChanneled() || !m_spellInfo->GetMaxDuration()))
|
||||
if (HasTriggeredCastFlag(TRIGGERED_CAST_DIRECTLY) && (!m_spellInfo->IsChanneled() || !m_spellInfo->GetMaxDuration()))
|
||||
cast(true);
|
||||
else
|
||||
{
|
||||
// stealth must be removed at cast starting (at show channel bar)
|
||||
// skip triggered spell (item equip spell casting and other not explicit character casts/item uses)
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS) && m_spellInfo->IsBreakingStealth())
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS) && m_spellInfo->IsBreakingStealth())
|
||||
{
|
||||
// Farsight spells exception
|
||||
uint32 exceptSpellId = 0;
|
||||
@@ -3679,7 +3679,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
SendSpellStart();
|
||||
|
||||
// set target for proper facing
|
||||
if ((m_casttime || m_spellInfo->IsChanneled()) && !(_triggeredCastFlags & TRIGGERED_IGNORE_SET_FACING))
|
||||
if ((m_casttime || m_spellInfo->IsChanneled()) && !HasTriggeredCastFlag(TRIGGERED_IGNORE_SET_FACING))
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_UNIT && !m_caster->ToCreature()->IsInEvadeMode() &&
|
||||
((m_targets.GetObjectTarget() && m_caster != m_targets.GetObjectTarget()) || m_spellInfo->IsPositive()))
|
||||
@@ -3697,7 +3697,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
if (!m_casttime && /*!m_castItemGUID &&*/ GetCurrentContainer() == CURRENT_GENERIC_SPELL)
|
||||
cast(true);
|
||||
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_GCD))
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_GCD))
|
||||
TriggerGlobalCooldown();
|
||||
}
|
||||
|
||||
@@ -3841,7 +3841,7 @@ void Spell::_cast(bool skipCheck)
|
||||
|
||||
SetExecutedCurrently(true);
|
||||
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_SET_FACING))
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_SET_FACING))
|
||||
if (m_caster->GetTypeId() == TYPEID_UNIT && m_targets.GetObjectTarget() && m_caster != m_targets.GetObjectTarget())
|
||||
m_caster->SetInFront(m_targets.GetObjectTarget());
|
||||
|
||||
@@ -3920,7 +3920,7 @@ void Spell::_cast(bool skipCheck)
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_ITEM) && m_CastItem)
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_CAST_ITEM) && m_CastItem)
|
||||
{
|
||||
m_caster->ToPlayer()->StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_ITEM, m_CastItem->GetEntry());
|
||||
m_caster->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_USE_ITEM, m_CastItem->GetEntry());
|
||||
@@ -3929,7 +3929,7 @@ void Spell::_cast(bool skipCheck)
|
||||
m_caster->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, m_spellInfo->Id, 0, (m_targets.GetUnitTarget() ? m_targets.GetUnitTarget() : m_caster));
|
||||
}
|
||||
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_POWER_AND_REAGENT_COST))
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_POWER_AND_REAGENT_COST))
|
||||
{
|
||||
// Powers have to be taken before SendSpellGo
|
||||
TakePower();
|
||||
@@ -4342,7 +4342,7 @@ void Spell::SendSpellCooldown()
|
||||
// xinef: properly add creature cooldowns
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD))
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD))
|
||||
{
|
||||
// xinef: this should be added here
|
||||
//m_caster->AddSpellCooldown(m_spellInfo->Id, 0, 0);
|
||||
@@ -4373,7 +4373,7 @@ void Spell::SendSpellCooldown()
|
||||
}
|
||||
|
||||
// have infinity cooldown but set at aura apply // do not set cooldown for triggered spells (needed by reincarnation)
|
||||
if (m_spellInfo->IsCooldownStartedOnEvent() || m_spellInfo->IsPassive() || ((_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD) && !m_CastItem))
|
||||
if (m_spellInfo->IsCooldownStartedOnEvent() || m_spellInfo->IsPassive() || (HasTriggeredCastFlag(TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD) && !m_CastItem))
|
||||
return;
|
||||
|
||||
_player->AddSpellAndCategoryCooldowns(m_spellInfo, m_CastItem ? m_CastItem->GetEntry() : 0, this);
|
||||
@@ -4665,7 +4665,7 @@ void Spell::SendCastResult(SpellCastResult result)
|
||||
return;
|
||||
|
||||
// Xinef: override every possible result, except for gm fail result... breaks many things and goes unnoticed because of this and makes me rage when i find this out
|
||||
if ((_triggeredCastFlags & TRIGGERED_DONT_REPORT_CAST_ERROR) && result != SPELL_FAILED_BM_OR_INVISGOD)
|
||||
if (HasTriggeredCastFlag(TRIGGERED_DONT_REPORT_CAST_ERROR) && result != SPELL_FAILED_BM_OR_INVISGOD)
|
||||
result = SPELL_FAILED_DONT_REPORT;
|
||||
|
||||
SendCastResult(m_caster->ToPlayer(), m_spellInfo, m_cast_count, result, m_customError);
|
||||
@@ -5231,7 +5231,7 @@ void Spell::TakeCastItem()
|
||||
return;
|
||||
|
||||
// not remove cast item at triggered spell (equipping, weapon damage, etc)
|
||||
if (_triggeredCastFlags & TRIGGERED_IGNORE_CAST_ITEM)
|
||||
if (HasTriggeredCastFlag(TRIGGERED_IGNORE_CAST_ITEM))
|
||||
return;
|
||||
|
||||
ItemTemplate const* proto = m_CastItem->GetTemplate();
|
||||
@@ -5647,10 +5647,10 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
//can cast triggered (by aura only?) spells while have this flag
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_AURASTATE) && m_caster->ToPlayer()->HasPlayerFlag(PLAYER_ALLOW_ONLY_ABILITY))
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_CASTER_AURASTATE) && m_caster->ToPlayer()->HasPlayerFlag(PLAYER_ALLOW_ONLY_ABILITY))
|
||||
return SPELL_FAILED_SPELL_IN_PROGRESS;
|
||||
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD) && m_caster->ToPlayer()->HasSpellCooldown(m_spellInfo->Id))
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD) && m_caster->ToPlayer()->HasSpellCooldown(m_spellInfo->Id))
|
||||
{
|
||||
if (m_triggeredByAuraSpell)
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
@@ -5673,7 +5673,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
|
||||
// Check global cooldown
|
||||
if (strict && !(_triggeredCastFlags & TRIGGERED_IGNORE_GCD) && HasGlobalCooldown())
|
||||
if (strict && !HasTriggeredCastFlag(TRIGGERED_IGNORE_GCD) && HasGlobalCooldown())
|
||||
return SPELL_FAILED_NOT_READY;
|
||||
|
||||
// only triggered spells can be processed an ended battleground
|
||||
@@ -5695,7 +5695,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
// only check at first call, Stealth auras are already removed at second call
|
||||
// for now, ignore triggered spells
|
||||
if (strict && !(_triggeredCastFlags & TRIGGERED_IGNORE_SHAPESHIFT))
|
||||
if (strict && !HasTriggeredCastFlag(TRIGGERED_IGNORE_SHAPESHIFT))
|
||||
{
|
||||
bool checkForm = true;
|
||||
// Ignore form req aura
|
||||
@@ -5741,7 +5741,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
// caster state requirements
|
||||
// not for triggered spells (needed by execute)
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_AURASTATE))
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_CASTER_AURASTATE))
|
||||
{
|
||||
if (m_spellInfo->CasterAuraState && !m_caster->HasAuraState(AuraStateType(m_spellInfo->CasterAuraState), m_spellInfo, m_caster))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
@@ -5791,7 +5791,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
|
||||
Vehicle* vehicle = m_caster->GetVehicle();
|
||||
if (vehicle && !(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE))
|
||||
if (vehicle && !HasTriggeredCastFlag(TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE))
|
||||
{
|
||||
uint16 checkMask = 0;
|
||||
for (uint8 effIndex = EFFECT_0; effIndex < MAX_SPELL_EFFECTS; ++effIndex)
|
||||
@@ -5981,7 +5981,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
|
||||
// not let players cast spells at mount (and let do it to creatures)
|
||||
if (m_caster->IsMounted() && m_caster->GetTypeId() == TYPEID_PLAYER && !(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE) &&
|
||||
if (m_caster->IsMounted() && m_caster->GetTypeId() == TYPEID_PLAYER && !HasTriggeredCastFlag(TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE) &&
|
||||
!m_spellInfo->IsPassive() && !m_spellInfo->HasAttribute(SPELL_ATTR0_ALLOW_WHILE_MOUNTED))
|
||||
{
|
||||
if (m_caster->IsInFlight())
|
||||
@@ -6011,7 +6011,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (castResult != SPELL_CAST_OK)
|
||||
return castResult;
|
||||
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_POWER_AND_REAGENT_COST))
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_POWER_AND_REAGENT_COST))
|
||||
{
|
||||
castResult = CheckPower();
|
||||
if (castResult != SPELL_CAST_OK)
|
||||
@@ -6019,9 +6019,9 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
|
||||
// xinef: do not skip triggered spells if they posses prevention type (eg. Bladestorm vs Hand of Protection)
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_AURAS) || (m_spellInfo->PreventionType > SPELL_PREVENTION_TYPE_NONE && m_triggeredByAuraSpell && m_triggeredByAuraSpell.spellInfo->IsPositive()))
|
||||
if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_CASTER_AURAS) || (m_spellInfo->PreventionType > SPELL_PREVENTION_TYPE_NONE && m_triggeredByAuraSpell && m_triggeredByAuraSpell.spellInfo->IsPositive()))
|
||||
{
|
||||
castResult = CheckCasterAuras(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_AURAS);
|
||||
castResult = CheckCasterAuras(HasTriggeredCastFlag(TRIGGERED_IGNORE_CASTER_AURAS));
|
||||
if (castResult != SPELL_CAST_OK)
|
||||
return castResult;
|
||||
|
||||
@@ -6781,7 +6781,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
SpellCastResult Spell::CheckPetCast(Unit* target)
|
||||
{
|
||||
if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS)) //prevent spellcast interruption by another spellcast
|
||||
if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !HasTriggeredCastFlag(TRIGGERED_IGNORE_CAST_IN_PROGRESS)) //prevent spellcast interruption by another spellcast
|
||||
return SPELL_FAILED_SPELL_IN_PROGRESS;
|
||||
|
||||
// dead owner (pets still alive when owners ressed?)
|
||||
@@ -7245,7 +7245,7 @@ SpellCastResult Spell::CheckItems()
|
||||
else
|
||||
{
|
||||
// Xinef: this is not true in my opinion, in eg bladestorm will not be canceled after disarm
|
||||
//if (!(_triggeredCastFlags & TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT))
|
||||
//if (!HasTriggeredCastFlag(TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT))
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !m_caster->ToPlayer()->HasItemFitToSpellRequirements(m_spellInfo))
|
||||
return SPELL_FAILED_EQUIPPED_ITEM_CLASS;
|
||||
}
|
||||
@@ -7253,7 +7253,7 @@ SpellCastResult Spell::CheckItems()
|
||||
// do not take reagents for these item casts
|
||||
if (!(m_CastItem && m_CastItem->GetTemplate()->Flags & ITEM_FLAG_NO_REAGENT_COST))
|
||||
{
|
||||
bool checkReagents = !(_triggeredCastFlags & TRIGGERED_IGNORE_POWER_AND_REAGENT_COST) && !player->CanNoReagentCast(m_spellInfo);
|
||||
bool checkReagents = !HasTriggeredCastFlag(TRIGGERED_IGNORE_POWER_AND_REAGENT_COST) && !player->CanNoReagentCast(m_spellInfo);
|
||||
// Not own traded item (in trader trade slot) requires reagents even if triggered spell
|
||||
if (!checkReagents)
|
||||
if (Item* targetItem = m_targets.GetItemTarget())
|
||||
@@ -7675,7 +7675,7 @@ SpellCastResult Spell::CheckItems()
|
||||
}
|
||||
|
||||
// check weapon presence in slots for main/offhand weapons
|
||||
if (/*never skip those checks !(_triggeredCastFlags & TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT) &&*/ m_spellInfo->EquippedItemClass >= 0)
|
||||
if (/*never skip those checks !HasTriggeredCastFlag(TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT) &&*/ m_spellInfo->EquippedItemClass >= 0)
|
||||
{
|
||||
// main hand weapon required
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR3_REQUIRES_MAIN_HAND_WEAPON))
|
||||
@@ -8031,7 +8031,7 @@ bool Spell::IsNextMeleeSwingSpell() const
|
||||
|
||||
bool Spell::IsIgnoringCooldowns() const
|
||||
{
|
||||
return (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD) != 0;
|
||||
return HasTriggeredCastFlag(TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD) != 0;
|
||||
}
|
||||
|
||||
bool Spell::IsAutoActionResetSpell() const
|
||||
|
||||
@@ -549,7 +549,8 @@ public:
|
||||
void SetAutoRepeat(bool rep) { m_autoRepeat = rep; }
|
||||
void ReSetTimer() { m_timer = m_casttime > 0 ? m_casttime : 0; }
|
||||
bool IsNextMeleeSwingSpell() const;
|
||||
bool IsTriggered() const { return _triggeredCastFlags & TRIGGERED_FULL_MASK; };
|
||||
bool IsTriggered() const { return HasTriggeredCastFlag(TRIGGERED_FULL_MASK); };
|
||||
bool HasTriggeredCastFlag(TriggerCastFlags flag) const { return _triggeredCastFlags & flag; };
|
||||
bool IsChannelActive() const { return m_caster->GetUInt32Value(UNIT_CHANNEL_SPELL) != 0; }
|
||||
bool IsAutoActionResetSpell() const;
|
||||
bool IsIgnoringCooldowns() const;
|
||||
|
||||
Reference in New Issue
Block a user