Skip to content

Commit 197258a

Browse files
committed
Merge branch 'master' into valyndor
2 parents 11e69f6 + a9d6d66 commit 197258a

5 files changed

Lines changed: 11 additions & 4 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--
2+
UPDATE `smart_scripts` SET `event_type` = 1, `event_param1` = 4000, `event_param2` = 5000, `event_param3` = 4000, `event_param4` = 5000, `comment` = "Surveyor Candress - Out of Combat - Cast 'Red Beam'" WHERE `entryorguid` = 16522 AND `source_type` = 0 AND `id` = 0;
3+
4+
DELETE FROM `disables` WHERE `sourceType` = 0 AND `entry` = 31515;
5+
INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES
6+
(0,31515,64,'','',"Disable LOS for spell 'Red Beam'");

src/server/game/Entities/Item/Item.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ uint32 Item::GetSellPrice(bool forVendor /*= false*/) const
11511151
{
11521152
ItemTemplate const* itemTemplate = GetTemplate();
11531153
int32 price = Item::GetSellPrice(itemTemplate);
1154-
if (forVendor)
1154+
if (price && forVendor)
11551155
{
11561156
auto effectWithCharges = std::ranges::find_if(itemTemplate->Effects,
11571157
[](ItemEffect const& itemEffect) { return itemEffect.SpellID && itemEffect.TriggerType == ITEM_SPELLTRIGGER_ON_USE && itemEffect.Charges < 0; });

src/server/game/Spells/Spell.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5176,7 +5176,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
51765176

51775177
if (m_caster->ToUnit() && !m_caster->ToUnit()->GetSpellHistory()->IsReady(m_spellInfo, m_castItemEntry, IsIgnoringCooldowns()))
51785178
{
5179-
if (m_triggeredByAuraSpell || (m_spellInfo->IsCooldownStartedOnEvent() && !m_caster->ToUnit()->GetSpellHistory()->HasOnHoldCooldown(m_spellInfo->Id)))
5179+
if (m_triggeredByAuraSpell || (m_spellInfo->IsCooldownStartedOnEvent() && !m_caster->ToUnit()->GetSpellHistory()->HasCooldownOnHold(m_spellInfo->Id)))
51805180
return SPELL_FAILED_DONT_REPORT;
51815181

51825182
return SPELL_FAILED_NOT_READY;

src/server/game/Spells/SpellHistory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,9 @@ bool SpellHistory::HasCooldown(uint32 spellId, uint32 itemId /*= 0*/, bool ignor
483483
return HasCooldown(sSpellMgr->AssertSpellInfo(spellId), itemId, ignoreCategoryCooldown);
484484
}
485485

486-
bool SpellHistory::HasOnHoldCooldown(uint32 spellId) const
486+
bool SpellHistory::HasCooldownOnHold(uint32 spellId) const
487487
{
488+
// TODO: Delete this function and make SpellHistory::IsReady return enum with reason instead of bool
488489
auto itr = _spellCooldowns.find(spellId);
489490
return itr != _spellCooldowns.end() && itr->second.OnHold;
490491
}

src/server/game/Spells/SpellHistory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class TC_GAME_API SpellHistory
122122
void ResetAllCooldowns();
123123
bool HasCooldown(SpellInfo const* spellInfo, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const;
124124
bool HasCooldown(uint32 spellId, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const;
125-
bool HasOnHoldCooldown(uint32 spellId) const;
125+
bool HasCooldownOnHold(uint32 spellId) const;
126126
uint32 GetRemainingCooldown(SpellInfo const* spellInfo) const;
127127

128128
// School lockouts

0 commit comments

Comments
 (0)