mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Merge branch 'dbc' of https://github.com/Intel/TrinityCore into Intel-dbc
Conflicts: src/server/game/DataStores/DBCStores.cpp src/server/game/DataStores/DBCStructure.h src/server/game/Events/GameEventMgr.cpp
This commit is contained in:
@@ -1451,7 +1451,7 @@ void Spell::SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImpli
|
||||
|
||||
void Spell::SelectImplicitChainTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, WorldObject* target, uint32 effMask)
|
||||
{
|
||||
uint32 maxTargets = m_spellInfo->Effects[effIndex].ChainTarget;
|
||||
uint32 maxTargets = m_spellInfo->Effects[effIndex].ChainTargets;
|
||||
if (Player* modOwner = m_caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, maxTargets, this);
|
||||
|
||||
@@ -2626,8 +2626,8 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
|
||||
duration = 0;
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (AuraEffect const* eff = m_spellAura->GetEffect(i))
|
||||
if (int32 amplitude = eff->GetAmplitude()) // amplitude is hastened by UNIT_MOD_CAST_SPEED
|
||||
duration = std::max(std::max(origDuration / amplitude, 1) * amplitude, duration);
|
||||
if (int32 period = eff->GetPeriod()) // period is hastened by UNIT_MOD_CAST_SPEED
|
||||
duration = std::max(std::max(origDuration / period, 1) * period, duration);
|
||||
|
||||
// if there is no periodic effect
|
||||
if (!duration)
|
||||
@@ -4546,7 +4546,7 @@ void Spell::TakeRunePower(bool didHit)
|
||||
|
||||
// you can gain some runic power when use runes
|
||||
if (didHit)
|
||||
if (int32 rp = int32(runeCostData->runePowerGain * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME)))
|
||||
if (int32 rp = int32(runeCostData->RunePowerGain * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME)))
|
||||
player->ModifyPower(POWER_RUNIC_POWER, int32(rp));
|
||||
}
|
||||
|
||||
@@ -4815,7 +4815,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
{
|
||||
if (m_spellInfo->CasterAuraState && !m_caster->HasAuraState(AuraStateType(m_spellInfo->CasterAuraState), m_spellInfo, m_caster))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
if (m_spellInfo->CasterAuraStateNot && m_caster->HasAuraState(AuraStateType(m_spellInfo->CasterAuraStateNot), m_spellInfo, m_caster))
|
||||
if (m_spellInfo->ExcludeCasterAuraState && m_caster->HasAuraState(AuraStateType(m_spellInfo->ExcludeCasterAuraState), m_spellInfo, m_caster))
|
||||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
|
||||
// Note: spell 62473 requres casterAuraSpell = triggering spell
|
||||
@@ -5095,7 +5095,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
{
|
||||
uint32 glyphId = m_spellInfo->Effects[i].MiscValue;
|
||||
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyphId))
|
||||
if (m_caster->HasAura(gp->SpellId))
|
||||
if (m_caster->HasAura(gp->SpellID))
|
||||
return SPELL_FAILED_UNIQUE_GLYPH;
|
||||
break;
|
||||
}
|
||||
@@ -5476,7 +5476,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
InstanceTemplate const* it = sObjectMgr->GetInstanceTemplate(m_caster->GetMapId());
|
||||
if (it)
|
||||
allowMount = it->AllowMount;
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !allowMount && !m_spellInfo->AreaGroupId)
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !allowMount && !m_spellInfo->RequiredAreasID)
|
||||
return SPELL_FAILED_NO_MOUNTS_ALLOWED;
|
||||
|
||||
if (m_caster->IsInDisallowedMountForm())
|
||||
@@ -5812,7 +5812,7 @@ SpellCastResult Spell::CheckRange(bool strict)
|
||||
if (m_spellInfo->RangeEntry->ID == 1)
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
range_type = m_spellInfo->RangeEntry->type;
|
||||
range_type = m_spellInfo->RangeEntry->Flags;
|
||||
}
|
||||
|
||||
Unit* target = m_targets.GetUnitTarget();
|
||||
@@ -6132,7 +6132,7 @@ SpellCastResult Spell::CheckItems()
|
||||
{
|
||||
for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
|
||||
{
|
||||
switch (enchantEntry->type[s])
|
||||
switch (enchantEntry->Effect[s])
|
||||
{
|
||||
case ITEM_ENCHANTMENT_TYPE_USE_SPELL:
|
||||
if (isItemUsable)
|
||||
@@ -6158,7 +6158,7 @@ SpellCastResult Spell::CheckItems()
|
||||
{
|
||||
if (!enchantEntry)
|
||||
return SPELL_FAILED_ERROR;
|
||||
if (enchantEntry->slot & ENCHANTMENT_CAN_SOULBOUND)
|
||||
if (enchantEntry->Flags & ENCHANTMENT_CAN_SOULBOUND)
|
||||
return SPELL_FAILED_NOT_TRADEABLE;
|
||||
}
|
||||
break;
|
||||
@@ -6175,7 +6175,7 @@ SpellCastResult Spell::CheckItems()
|
||||
SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
|
||||
if (!pEnchant)
|
||||
return SPELL_FAILED_ERROR;
|
||||
if (pEnchant->slot & ENCHANTMENT_CAN_SOULBOUND)
|
||||
if (pEnchant->Flags & ENCHANTMENT_CAN_SOULBOUND)
|
||||
return SPELL_FAILED_NOT_TRADEABLE;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user