aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index c63299f2c81..bf749102080 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4387,12 +4387,12 @@ void Spell::UpdateSpellCastDataAmmo(WorldPackets::Spells::SpellAmmo& ammo)
{
if (ItemEntry const* itemEntry = sItemStore.LookupEntry(item_id))
{
- if (itemEntry->Class == ITEM_CLASS_WEAPON)
+ if (itemEntry->ClassID == ITEM_CLASS_WEAPON)
{
- switch (itemEntry->SubClass)
+ switch (itemEntry->SubclassID)
{
case ITEM_SUBCLASS_WEAPON_THROWN:
- ammoDisplayID = itemEntry->DisplayId;
+ ammoDisplayID = itemEntry->DisplayInfoID;
ammoInventoryType = itemEntry->InventoryType;
break;
case ITEM_SUBCLASS_WEAPON_BOW:
@@ -4405,7 +4405,7 @@ void Spell::UpdateSpellCastDataAmmo(WorldPackets::Spells::SpellAmmo& ammo)
ammoInventoryType = INVTYPE_AMMO;
break;
default:
- nonRangedAmmoDisplayID = itemEntry->DisplayId;
+ nonRangedAmmoDisplayID = itemEntry->DisplayInfoID;
nonRangedAmmoInventoryType = itemEntry->InventoryType;
break;
}
@@ -4960,7 +4960,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->RunicPower * sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME)))
player->ModifyPower(POWER_RUNIC_POWER, int32(rp));
}
@@ -5523,7 +5523,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
uint32 glyphId = m_spellInfo->Effects[i].MiscValue;
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyphId))
- if (m_caster->ToPlayer()->HasAura(gp->SpellId))
+ if (m_caster->ToPlayer()->HasAura(gp->SpellID))
return SPELL_FAILED_UNIQUE_GLYPH;
break;
}
@@ -5714,7 +5714,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
if (!SummonProperties)
break;
- switch (SummonProperties->Category)
+ switch (SummonProperties->Control)
{
case SUMMON_CATEGORY_PET:
if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET) && unitCaster->GetPetGUID())
@@ -5995,7 +5995,7 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
{
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldToZoneId(m_originalCaster->GetZoneId());
if (AreaTableEntry const* area = sAreaTableStore.LookupEntry(m_originalCaster->GetAreaId()))
- if (area->flags & AREA_FLAG_NO_FLY_ZONE || (Bf && !Bf->CanFlyIn()))
+ if (area->Flags & AREA_FLAG_NO_FLY_ZONE || (Bf && !Bf->CanFlyIn()))
return SPELL_FAILED_NOT_HERE;
}
break;
@@ -6395,7 +6395,7 @@ SpellCastResult Spell::CheckRange(bool strict) const
std::tie(minRange, maxRange) = GetMinMaxRange(strict);
// dont check max_range to strictly after cast
- if (m_spellInfo->RangeEntry && m_spellInfo->RangeEntry->type != SPELL_RANGE_MELEE && !strict)
+ if (m_spellInfo->RangeEntry && m_spellInfo->RangeEntry->Flags != SPELL_RANGE_MELEE && !strict)
maxRange += std::min(MAX_SPELL_RANGE_TOLERANCE, maxRange*0.1f); // 10% but no more than MAX_SPELL_RANGE_TOLERANCE
// get square values for sqr distance checks
@@ -6446,7 +6446,7 @@ std::pair<float, float> Spell::GetMinMaxRange(bool strict) const
if (m_spellInfo->RangeEntry)
{
Unit* target = m_targets.GetUnitTarget();
- if (m_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE)
+ if (m_spellInfo->RangeEntry->Flags & SPELL_RANGE_MELEE)
{
// when the target is not a unit, take the caster's combat reach as the target's combat reach.
if (unitCaster)
@@ -6455,7 +6455,7 @@ std::pair<float, float> Spell::GetMinMaxRange(bool strict) const
else
{
float meleeRange = 0.0f;
- if (m_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED)
+ if (m_spellInfo->RangeEntry->Flags & SPELL_RANGE_RANGED)
{
// when the target is not a unit, take the caster's combat reach as the target's combat reach.
if (unitCaster)
@@ -6469,13 +6469,13 @@ std::pair<float, float> Spell::GetMinMaxRange(bool strict) const
{
rangeMod = m_caster->GetCombatReach() + (target ? target->GetCombatReach() : m_caster->GetCombatReach());
- if (minRange > 0.0f && !(m_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED))
+ if (minRange > 0.0f && !(m_spellInfo->RangeEntry->Flags & SPELL_RANGE_RANGED))
minRange += rangeMod;
}
}
if (target && unitCaster && unitCaster->isMoving() && target->isMoving() && !unitCaster->IsWalking() && !target->IsWalking() &&
- ((m_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE) || target->GetTypeId() == TYPEID_PLAYER))
+ ((m_spellInfo->RangeEntry->Flags & SPELL_RANGE_MELEE) || target->GetTypeId() == TYPEID_PLAYER))
rangeMod += 8.0f / 3.0f;
}
@@ -6816,7 +6816,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 /
{
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)
@@ -6842,7 +6842,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 /
{
if (!enchantEntry)
return SPELL_FAILED_ERROR;
- if (enchantEntry->slot & ENCHANTMENT_CAN_SOULBOUND)
+ if (enchantEntry->Flags & ENCHANTMENT_CAN_SOULBOUND)
return SPELL_FAILED_NOT_TRADEABLE;
}
break;
@@ -6859,7 +6859,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 /
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;
}