mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[12716m] More 541 changes. Thanks Dramacydal, TC and OpenWow
This commit is contained in:
parent
7bd00e484f
commit
0224c980d2
34 changed files with 1721 additions and 1298 deletions
|
|
@ -2221,11 +2221,12 @@ SpellEntry const* Creature::ReachWithSpellAttack(Unit* pVictim)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
|
uint32 rangeIndex = spellInfo->GetRangeIndex();
|
||||||
|
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(rangeIndex);
|
||||||
float range = GetSpellMaxRange(srange);
|
float range = GetSpellMaxRange(srange);
|
||||||
float minrange = GetSpellMinRange(srange);
|
float minrange = GetSpellMinRange(srange);
|
||||||
|
|
||||||
float dist = GetCombatDistance(pVictim, spellInfo->rangeIndex == SPELL_RANGE_IDX_COMBAT);
|
float dist = GetCombatDistance(pVictim, rangeIndex == SPELL_RANGE_IDX_COMBAT);
|
||||||
|
|
||||||
// if(!isInFront( pVictim, range ) && spellInfo->AttributesEx )
|
// if(!isInFront( pVictim, range ) && spellInfo->AttributesEx )
|
||||||
// continue;
|
// continue;
|
||||||
|
|
@ -2285,11 +2286,12 @@ SpellEntry const* Creature::ReachWithSpellCure(Unit* pVictim)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
|
uint32 rangeIndex = spellInfo->GetRangeIndex();
|
||||||
|
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(rangeIndex);
|
||||||
float range = GetSpellMaxRange(srange);
|
float range = GetSpellMaxRange(srange);
|
||||||
float minrange = GetSpellMinRange(srange);
|
float minrange = GetSpellMinRange(srange);
|
||||||
|
|
||||||
float dist = GetCombatDistance(pVictim, spellInfo->rangeIndex == SPELL_RANGE_IDX_COMBAT);
|
float dist = GetCombatDistance(pVictim, rangeIndex == SPELL_RANGE_IDX_COMBAT);
|
||||||
|
|
||||||
// if(!isInFront( pVictim, range ) && spellInfo->AttributesEx )
|
// if(!isInFront( pVictim, range ) && spellInfo->AttributesEx )
|
||||||
// continue;
|
// continue;
|
||||||
|
|
@ -2623,9 +2625,9 @@ bool Creature::LoadCreatureAddon(bool reload)
|
||||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(*cAura); // Already checked on load
|
SpellEntry const* spellInfo = sSpellStore.LookupEntry(*cAura); // Already checked on load
|
||||||
|
|
||||||
// Get Difficulty mode for initial case (npc not yet added to world)
|
// Get Difficulty mode for initial case (npc not yet added to world)
|
||||||
if (spellInfo->SpellDifficultyId && !reload && GetMap()->IsDungeon())
|
//if (spellInfo->SpellDifficultyId && !reload && GetMap()->IsDungeon())
|
||||||
if (SpellEntry const* spellEntry = GetSpellEntryByDifficulty(spellInfo->SpellDifficultyId, GetMap()->GetDifficulty(), GetMap()->IsRaid()))
|
// if (SpellEntry const* spellEntry = GetSpellEntryByDifficulty(spellInfo->SpellDifficultyId, GetMap()->GetDifficulty(), GetMap()->IsRaid()))
|
||||||
spellInfo = spellEntry;
|
// spellInfo = spellEntry;
|
||||||
|
|
||||||
CastSpell(this, spellInfo, true);
|
CastSpell(this, spellInfo, true);
|
||||||
}
|
}
|
||||||
|
|
@ -2720,14 +2722,14 @@ bool Creature::MeetsSelectAttackingRequirement(Unit* pTarget, SpellEntry const*
|
||||||
|
|
||||||
if (pSpellInfo)
|
if (pSpellInfo)
|
||||||
{
|
{
|
||||||
switch (pSpellInfo->rangeIndex)
|
switch (pSpellInfo->GetRangeIndex())
|
||||||
{
|
{
|
||||||
case SPELL_RANGE_IDX_SELF_ONLY: return false;
|
case SPELL_RANGE_IDX_SELF_ONLY: return false;
|
||||||
case SPELL_RANGE_IDX_ANYWHERE: return true;
|
case SPELL_RANGE_IDX_ANYWHERE: return true;
|
||||||
case SPELL_RANGE_IDX_COMBAT: return CanReachWithMeleeAttack(pTarget);
|
case SPELL_RANGE_IDX_COMBAT: return CanReachWithMeleeAttack(pTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(pSpellInfo->rangeIndex);
|
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(pSpellInfo->GetRangeIndex());
|
||||||
float max_range = GetSpellMaxRange(srange);
|
float max_range = GetSpellMaxRange(srange);
|
||||||
float min_range = GetSpellMinRange(srange);
|
float min_range = GetSpellMinRange(srange);
|
||||||
float dist = GetCombatDistance(pTarget, false);
|
float dist = GetCombatDistance(pTarget, false);
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ CanCastResult CreatureAI::CanCastSpell(Unit* pTarget, const SpellEntry* pSpell,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for power (also done by Spell::CheckCast())
|
// Check for power (also done by Spell::CheckCast())
|
||||||
if (m_creature->GetPower((Powers)pSpell->powerType) < Spell::CalculatePowerCost(pSpell, m_creature))
|
if (m_creature->GetPower((Powers)pSpell->GetPowerType()) < Spell::CalculatePowerCost(pSpell, m_creature))
|
||||||
{
|
{
|
||||||
return CAST_FAIL_POWER;
|
return CAST_FAIL_POWER;
|
||||||
}
|
}
|
||||||
|
|
@ -78,12 +78,12 @@ CanCastResult CreatureAI::CanCastSpell(Unit* pTarget, const SpellEntry* pSpell,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (const SpellRangeEntry* pSpellRange = sSpellRangeStore.LookupEntry(pSpell->rangeIndex))
|
if (const SpellRangeEntry* pSpellRange = sSpellRangeStore.LookupEntry(pSpell->GetRangeIndex()))
|
||||||
{
|
{
|
||||||
if (pTarget != m_creature)
|
if (pTarget != m_creature)
|
||||||
{
|
{
|
||||||
// pTarget is out of range of this spell (also done by Spell::CheckCast())
|
// pTarget is out of range of this spell (also done by Spell::CheckCast())
|
||||||
float fDistance = m_creature->GetCombatDistance(pTarget, pSpell->rangeIndex == SPELL_RANGE_IDX_COMBAT);
|
float fDistance = m_creature->GetCombatDistance(pTarget, pSpell->GetRangeIndex() == SPELL_RANGE_IDX_COMBAT);
|
||||||
|
|
||||||
if (fDistance > (m_creature->IsHostileTo(pTarget) ? pSpellRange->maxRange : pSpellRange->maxRangeFriendly))
|
if (fDistance > (m_creature->IsHostileTo(pTarget) ? pSpellRange->maxRange : pSpellRange->maxRangeFriendly))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -810,9 +810,9 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||||
{
|
{
|
||||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
|
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
|
||||||
|
|
||||||
if (spellInfo && !(spellInfo->rangeIndex == SPELL_RANGE_IDX_COMBAT || spellInfo->rangeIndex == SPELL_RANGE_IDX_SELF_ONLY) && target != m_creature)
|
if (spellInfo && !(spellInfo->GetRangeIndex() == SPELL_RANGE_IDX_COMBAT || spellInfo->GetRangeIndex() == SPELL_RANGE_IDX_SELF_ONLY) && target != m_creature)
|
||||||
{
|
{
|
||||||
SpellRangeEntry const* spellRange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
|
SpellRangeEntry const* spellRange = sSpellRangeStore.LookupEntry(spellInfo->GetRangeIndex());
|
||||||
if (spellRange)
|
if (spellRange)
|
||||||
m_LastSpellMaxRange = spellRange->maxRange;
|
m_LastSpellMaxRange = spellRange->maxRange;
|
||||||
}
|
}
|
||||||
|
|
@ -1586,7 +1586,7 @@ void CreatureEventAI::SpellHit(Unit* pUnit, const SpellEntry* pSpell)
|
||||||
if (i->Event.event_type == EVENT_T_SPELLHIT)
|
if (i->Event.event_type == EVENT_T_SPELLHIT)
|
||||||
// If spell id matches (or no spell id) & if spell school matches (or no spell school)
|
// If spell id matches (or no spell id) & if spell school matches (or no spell school)
|
||||||
if (!i->Event.spell_hit.spellId || pSpell->Id == i->Event.spell_hit.spellId)
|
if (!i->Event.spell_hit.spellId || pSpell->Id == i->Event.spell_hit.spellId)
|
||||||
if (pSpell->SchoolMask & i->Event.spell_hit.schoolMask)
|
if (pSpell->GetSchoolMask() & i->Event.spell_hit.schoolMask)
|
||||||
{
|
{
|
||||||
ProcessEvent(*i, pUnit);
|
ProcessEvent(*i, pUnit);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((temp.spell_hit.schoolMask & pSpell->SchoolMask) != pSpell->SchoolMask)
|
if ((temp.spell_hit.schoolMask & pSpell->GetSchoolMask()) != pSpell->GetSchoolMask())
|
||||||
{
|
{
|
||||||
sLog.outErrorEventAI("Creature %u has param1(spellId %u) but param2 is not -1 and not equal to spell's school mask. Event %u can never trigger.", temp.creature_id, temp.spell_hit.schoolMask, i);
|
sLog.outErrorEventAI("Creature %u has param1(spellId %u) but param2 is not -1 and not equal to spell's school mask. Event %u can never trigger.", temp.creature_id, temp.spell_hit.schoolMask, i);
|
||||||
}
|
}
|
||||||
|
|
@ -746,7 +746,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||||
if (!sLog.HasLogFilter(LOG_FILTER_EVENT_AI_DEV) && spell)
|
if (!sLog.HasLogFilter(LOG_FILTER_EVENT_AI_DEV) && spell)
|
||||||
{
|
{
|
||||||
// spell must be cast on self, but is not
|
// spell must be cast on self, but is not
|
||||||
if ((IsOnlySelfTargeting(spell) || spell->rangeIndex == SPELL_RANGE_IDX_SELF_ONLY) && action.cast.target != TARGET_T_SELF && !(action.cast.castFlags & CAST_FORCE_TARGET_SELF))
|
if ((IsOnlySelfTargeting(spell) || spell->GetRangeIndex() == SPELL_RANGE_IDX_SELF_ONLY) && action.cast.target != TARGET_T_SELF && !(action.cast.castFlags & CAST_FORCE_TARGET_SELF))
|
||||||
{
|
{
|
||||||
sLog.outErrorEventAI("Event %u Action %u uses SpellID %u that must be self cast (target is %u)", i, j + 1, action.cast.spellId, action.cast.target);
|
sLog.outErrorEventAI("Event %u Action %u uses SpellID %u that must be self cast (target is %u)", i, j + 1, action.cast.spellId, action.cast.target);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ bool DynamicObject::Create(uint32 guidlow, Unit* caster, uint32 spellId, SpellEf
|
||||||
bytes |= 0x00 << 16;
|
bytes |= 0x00 << 16;
|
||||||
bytes |= 0x00 << 24;
|
bytes |= 0x00 << 24;
|
||||||
*/
|
*/
|
||||||
SetUInt32Value(DYNAMICOBJECT_BYTES, spellProto->SpellVisual[0] | (type << 28));
|
SetUInt32Value(DYNAMICOBJECT_BYTES, spellProto->GetSpellVisual(0) | (type << 28));
|
||||||
|
|
||||||
SetUInt32Value(DYNAMICOBJECT_SPELLID, spellId);
|
SetUInt32Value(DYNAMICOBJECT_SPELLID, spellId);
|
||||||
SetFloatValue(DYNAMICOBJECT_RADIUS, radius);
|
SetFloatValue(DYNAMICOBJECT_RADIUS, radius);
|
||||||
|
|
|
||||||
|
|
@ -1084,7 +1084,7 @@ void GameObject::TriggerLinkedGameObject(Unit* target)
|
||||||
|
|
||||||
if (trapSpell) // checked at load already
|
if (trapSpell) // checked at load already
|
||||||
{
|
{
|
||||||
range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(trapSpell->rangeIndex));
|
range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(trapSpell->GetRangeIndex()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// search nearest linked GO
|
// search nearest linked GO
|
||||||
|
|
|
||||||
|
|
@ -2125,9 +2125,9 @@ void ObjectMgr::LoadItemPrototypes()
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (proto->Unk0 != dbcitem->Unk0)
|
if (proto->Unk0 != dbcitem->SoundOverrideSubclass)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Item (Entry: %u) not correct %i Unk0, must be %i (still using DB value).", i, proto->Unk0, dbcitem->Unk0);
|
sLog.outErrorDb("Item (Entry: %u) not correct %i Unk0, must be %i (still using DB value).", i, proto->Unk0, dbcitem->SoundOverrideSubclass);
|
||||||
// It safe let use Unk0 from DB
|
// It safe let use Unk0 from DB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3490,6 +3490,10 @@ void ObjectMgr::LoadPlayerInfo()
|
||||||
if (sWorld.getConfig(CONFIG_UINT32_EXPANSION) < EXPANSION_CATA && (race == RACE_WORGEN || race == RACE_GOBLIN))
|
if (sWorld.getConfig(CONFIG_UINT32_EXPANSION) < EXPANSION_CATA && (race == RACE_WORGEN || race == RACE_GOBLIN))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// skip expansion classes / races if not playing with expansion
|
||||||
|
if (sWorld.getConfig(CONFIG_UINT32_EXPANSION) < EXPANSION_MOP && (class_ == CLASS_MONK || race == RACE_PANDAREN_NEUTRAL || race == RACE_PANDAREN_ALLI || race == RACE_PANDAREN_HORDE))
|
||||||
|
continue;
|
||||||
|
|
||||||
// fatal error if no level 1 data
|
// fatal error if no level 1 data
|
||||||
if (!pInfo->levelInfo || pInfo->levelInfo[0].stats[0] == 0)
|
if (!pInfo->levelInfo || pInfo->levelInfo[0].stats[0] == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -3699,6 +3703,16 @@ void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, Play
|
||||||
info->stats[STAT_AGILITY] += (lvl > 38 ? 2 : (lvl > 8 && (lvl % 2) ? 1 : 0));
|
info->stats[STAT_AGILITY] += (lvl > 38 ? 2 : (lvl > 8 && (lvl % 2) ? 1 : 0));
|
||||||
info->stats[STAT_INTELLECT] += (lvl > 38 ? 3 : (lvl > 4 ? 1 : 0));
|
info->stats[STAT_INTELLECT] += (lvl > 38 ? 3 : (lvl > 4 ? 1 : 0));
|
||||||
info->stats[STAT_SPIRIT] += (lvl > 38 ? 3 : (lvl > 5 ? 1 : 0));
|
info->stats[STAT_SPIRIT] += (lvl > 38 ? 3 : (lvl > 5 ? 1 : 0));
|
||||||
|
break;
|
||||||
|
case CLASS_MONK:
|
||||||
|
info->stats[STAT_STRENGTH] += (lvl > 38 ? 2 : (lvl > 6 && (lvl % 2) ? 1 : 0));
|
||||||
|
info->stats[STAT_STAMINA] += (lvl > 32 ? 2 : (lvl > 4 ? 1 : 0));
|
||||||
|
info->stats[STAT_AGILITY] += (lvl > 38 ? 2 : (lvl > 8 && (lvl % 2) ? 1 : 0));
|
||||||
|
info->stats[STAT_INTELLECT] += (lvl > 38 ? 3 : (lvl > 4 ? 1 : 0));
|
||||||
|
info->stats[STAT_SPIRIT] += (lvl > 38 ? 3 : (lvl > 5 ? 1 : 0));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4014,10 +4028,18 @@ void ObjectMgr::LoadQuests()
|
||||||
"DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4,"
|
"DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4,"
|
||||||
// 154 155 156 157 158 159
|
// 154 155 156 157 158 159
|
||||||
"IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4,"
|
"IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4,"
|
||||||
// 160 161 162 153
|
// 160 161 162 163
|
||||||
"OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4,"
|
"OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4,"
|
||||||
// 164 165 166 167
|
// 164 165 166 167
|
||||||
"SoundAccept, SoundTurnIn, StartScript, CompleteScript"
|
"SoundAccept, SoundTurnIn, StartScript, CompleteScript,"
|
||||||
|
// 168 169 170 171 172 173 174
|
||||||
|
"ReqSpellLearned, PortraitGiver, PortraitTurnIn, PortraitGiverName, PortraitGiverText, PortraitTurnInName, PortraitTurnInText, "
|
||||||
|
// 175 176 177 178 179 180 181 182
|
||||||
|
"ReqCurrencyId1, ReqCurrencyId2, ReqCurrencyId3, ReqCurrencyId4, ReqCurrencyCount1, ReqCurrencyCount2, ReqCurrencyCount3, ReqCurrencyCount4, "
|
||||||
|
// 183 184 185 186 187 188 189 190
|
||||||
|
"RewCurrencyId1, RewCurrencyId2, RewCurrencyId3, RewCurrencyId4, RewCurrencyCount1, RewCurrencyCount2, RewCurrencyCount3, RewCurrencyCount4, "
|
||||||
|
// 191 192 193 194
|
||||||
|
"RewSkill, RewSkillValue, SoundAccept, SoundTurnIn "
|
||||||
" FROM quest_template");
|
" FROM quest_template");
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
|
|
@ -8727,7 +8749,7 @@ bool PlayerCondition::Meets(Player const* player, Map const* map, WorldObject co
|
||||||
{
|
{
|
||||||
Unit::SpellAuraHolderMap const& auras = player->GetSpellAuraHolderMap();
|
Unit::SpellAuraHolderMap const& auras = player->GetSpellAuraHolderMap();
|
||||||
for (Unit::SpellAuraHolderMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
for (Unit::SpellAuraHolderMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||||
if ((itr->second->GetSpellProto()->HasAttribute(SPELL_ATTR_CASTABLE_WHILE_MOUNTED) || itr->second->GetSpellProto()->HasAttribute(SPELL_ATTR_UNK4)) && itr->second->GetSpellProto()->SpellVisual[0] == 3580)
|
if ((itr->second->GetSpellProto()->HasAttribute(SPELL_ATTR_CASTABLE_WHILE_MOUNTED) || itr->second->GetSpellProto()->HasAttribute(SPELL_ATTR_UNK4)) && itr->second->GetSpellProto()->GetSpellVisual(0) == 3580)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13357,8 +13357,8 @@ void Player::ApplyReforgeEnchantment(Item* item, bool apply)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemReforgeEntry const* reforge = sItemReforgeStore.LookupEntry(item->GetEnchantmentId(REFORGE_ENCHANTMENT_SLOT));
|
// ItemReforgeEntry const* reforge = sItemReforgeStore.LookupEntry(item->GetEnchantmentId(REFORGE_ENCHANTMENT_SLOT));
|
||||||
if (!reforge)
|
/* if (!reforge)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -13584,7 +13584,7 @@ void Player::ApplyReforgeEnchantment(Item* item, bool apply)
|
||||||
case ITEM_MOD_MASTERY_RATING:
|
case ITEM_MOD_MASTERY_RATING:
|
||||||
ApplyRatingMod(CR_MASTERY, int32(addValue), apply);
|
ApplyRatingMod(CR_MASTERY, int32(addValue), apply);
|
||||||
break;
|
break;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SendEnchantmentDurations()
|
void Player::SendEnchantmentDurations()
|
||||||
|
|
@ -22528,7 +22528,7 @@ uint32 Player::GetResurrectionSpellId()
|
||||||
for (AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
for (AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
||||||
{
|
{
|
||||||
// Soulstone Resurrection // prio: 3 (max, non death persistent)
|
// Soulstone Resurrection // prio: 3 (max, non death persistent)
|
||||||
if (prio < 2 && (*itr)->GetSpellProto()->SpellVisual[0] == 99 && (*itr)->GetSpellProto()->SpellIconID == 92)
|
if (prio < 2 && (*itr)->GetSpellProto()->GetSpellVisual(0) == 99 && (*itr)->GetSpellProto()->Id == 92)
|
||||||
{
|
{
|
||||||
switch ((*itr)->GetId())
|
switch ((*itr)->GetId())
|
||||||
{
|
{
|
||||||
|
|
@ -26026,11 +26026,11 @@ float Player::GetCollisionHeight(bool mounted) const
|
||||||
return GetCollisionHeight(false);
|
return GetCollisionHeight(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureModelDataEntry const* mountModelData = sCreatureModelDataStore.LookupEntry(mountDisplayInfo->ModelId);
|
//CreatureModelDataEntry const* mountModelData = sCreatureModelDataStore.LookupEntry(mountDisplayInfo->ModelId);
|
||||||
if (!mountModelData)
|
//if (!mountModelData)
|
||||||
{
|
//{
|
||||||
return GetCollisionHeight(false);
|
// return GetCollisionHeight(false);
|
||||||
}
|
//}
|
||||||
|
|
||||||
CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId());
|
CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId());
|
||||||
if (!displayInfo)
|
if (!displayInfo)
|
||||||
|
|
@ -26038,16 +26038,16 @@ float Player::GetCollisionHeight(bool mounted) const
|
||||||
sLog.outError("GetCollisionHeight::Unable to find CreatureDisplayInfoEntry for %u", GetNativeDisplayId());
|
sLog.outError("GetCollisionHeight::Unable to find CreatureDisplayInfoEntry for %u", GetNativeDisplayId());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CreatureModelDataEntry const* modelData = sCreatureModelDataStore.LookupEntry(displayInfo->ModelId);
|
//CreatureModelDataEntry const* modelData = sCreatureModelDataStore.LookupEntry(displayInfo->ModelId);
|
||||||
if (!modelData)
|
//if (!modelData)
|
||||||
{
|
//{
|
||||||
sLog.outError("GetCollisionHeight::Unable to find CreatureModelDataEntry for %u", displayInfo->ModelId);
|
// sLog.outError("GetCollisionHeight::Unable to find CreatureModelDataEntry for %u", displayInfo->ModelId);
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
float scaleMod = GetObjectScale(); // 99% sure about this
|
//float scaleMod = GetObjectScale(); // 99% sure about this
|
||||||
|
|
||||||
return scaleMod * mountModelData->MountHeight + modelData->CollisionHeight * 0.5f;
|
//return scaleMod * mountModelData->MountHeight + modelData->CollisionHeight * 0.5f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -26058,14 +26058,15 @@ float Player::GetCollisionHeight(bool mounted) const
|
||||||
sLog.outError("GetCollisionHeight::Unable to find CreatureDisplayInfoEntry for %u", GetNativeDisplayId());
|
sLog.outError("GetCollisionHeight::Unable to find CreatureDisplayInfoEntry for %u", GetNativeDisplayId());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CreatureModelDataEntry const* modelData = sCreatureModelDataStore.LookupEntry(displayInfo->ModelId);
|
//CreatureModelDataEntry const* modelData = sCreatureModelDataStore.LookupEntry(displayInfo->ModelId);
|
||||||
if (!modelData)
|
//if (!modelData)
|
||||||
{
|
//{
|
||||||
sLog.outError("GetCollisionHeight::Unable to find CreatureModelDataEntry for %u", displayInfo->ModelId);
|
// sLog.outError("GetCollisionHeight::Unable to find CreatureModelDataEntry for %u", displayInfo->ModelId);
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
return modelData->CollisionHeight;
|
//return modelData->CollisionHeight;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
#include "BattleGround/BattleGroundMgr.h"
|
#include "BattleGround/BattleGroundMgr.h"
|
||||||
#include "MapManager.h"
|
#include "MapManager.h"
|
||||||
#include "Unit.h"
|
#include "Unit.h"
|
||||||
|
#include "DB2Structure.h"
|
||||||
|
|
||||||
bool IsPrimaryProfessionSkill(uint32 skill)
|
bool IsPrimaryProfessionSkill(uint32 skill)
|
||||||
{
|
{
|
||||||
|
|
@ -71,7 +72,7 @@ int32 GetSpellDuration(SpellEntry const* spellInfo)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
SpellDurationEntry const* du = sSpellDurationStore.LookupEntry(spellInfo->DurationIndex);
|
SpellDurationEntry const* du = sSpellDurationStore.LookupEntry(spellInfo->GetDurationIndex());
|
||||||
if (!du)
|
if (!du)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -85,7 +86,7 @@ int32 GetSpellMaxDuration(SpellEntry const* spellInfo)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
SpellDurationEntry const* du = sSpellDurationStore.LookupEntry(spellInfo->DurationIndex);
|
SpellDurationEntry const* du = sSpellDurationStore.LookupEntry(spellInfo->GetDurationIndex());
|
||||||
if (!du)
|
if (!du)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -149,7 +150,7 @@ uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell const* spell)
|
||||||
else
|
else
|
||||||
castTime = uint32(spellScalingEntry->castTimeMax);
|
castTime = uint32(spellScalingEntry->castTimeMax);
|
||||||
}
|
}
|
||||||
else if (SpellCastTimesEntry const* spellCastTimeEntry = sSpellCastTimesStore.LookupEntry(spellInfo->CastingTimeIndex))
|
else if (SpellCastTimesEntry const* spellCastTimeEntry = sSpellCastTimesStore.LookupEntry(spellInfo->GetCastingTimeIndex()))
|
||||||
{
|
{
|
||||||
if (spell)
|
if (spell)
|
||||||
{
|
{
|
||||||
|
|
@ -540,7 +541,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||||
{
|
{
|
||||||
// Well Fed buffs (must be exclusive with Food / Drink replenishment effects, or else Well Fed will cause them to be removed)
|
// Well Fed buffs (must be exclusive with Food / Drink replenishment effects, or else Well Fed will cause them to be removed)
|
||||||
// SpellIcon 2560 is Spell 46687, does not have this flag
|
// SpellIcon 2560 is Spell 46687, does not have this flag
|
||||||
if (spellInfo->HasAttribute(SPELL_ATTR_EX2_FOOD_BUFF) || spellInfo->SpellIconID == 2560)
|
if (spellInfo->HasAttribute(SPELL_ATTR_EX2_FOOD_BUFF) || spellInfo->GetSpellIconID() == 2560)
|
||||||
{
|
{
|
||||||
return SPELL_WELL_FED;
|
return SPELL_WELL_FED;
|
||||||
}
|
}
|
||||||
|
|
@ -599,7 +600,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||||
// "Well Fed" buff from Blessed Sunfruit, Blessed Sunfruit Juice, Alterac Spring Water
|
// "Well Fed" buff from Blessed Sunfruit, Blessed Sunfruit Juice, Alterac Spring Water
|
||||||
if (spellInfo->HasAttribute(SPELL_ATTR_CASTABLE_WHILE_SITTING) &&
|
if (spellInfo->HasAttribute(SPELL_ATTR_CASTABLE_WHILE_SITTING) &&
|
||||||
(interrupts && interrupts->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK) &&
|
(interrupts && interrupts->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK) &&
|
||||||
(spellInfo->SpellIconID == 52 || spellInfo->SpellIconID == 79))
|
(spellInfo->GetSpellIconID() == 52 || spellInfo->GetSpellIconID() == 79))
|
||||||
return SPELL_WELL_FED;
|
return SPELL_WELL_FED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -637,7 +638,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip Heart of the Crusader that have also same spell family mask
|
// skip Heart of the Crusader that have also same spell family mask
|
||||||
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x00000820180400)) && spellInfo->HasAttribute(SPELL_ATTR_EX3_UNK9) && (spellInfo->SpellIconID != 237))
|
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x00000820180400)) && spellInfo->HasAttribute(SPELL_ATTR_EX3_UNK9) && (spellInfo->GetSpellIconID() != 237))
|
||||||
{
|
{
|
||||||
return SPELL_JUDGEMENT;
|
return SPELL_JUDGEMENT;
|
||||||
}
|
}
|
||||||
|
|
@ -1181,7 +1182,7 @@ bool IsSingleTargetSpells(SpellEntry const* spellInfo1, SpellEntry const* spellI
|
||||||
// TODO - need better check
|
// TODO - need better check
|
||||||
// Equal icon and spellfamily
|
// Equal icon and spellfamily
|
||||||
if( spellInfo1->GetSpellFamilyName() == spellInfo2->GetSpellFamilyName() &&
|
if( spellInfo1->GetSpellFamilyName() == spellInfo2->GetSpellFamilyName() &&
|
||||||
spellInfo1->SpellIconID == spellInfo2->SpellIconID )
|
spellInfo1->GetSpellIconID() == spellInfo2->GetSpellIconID() )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
SpellSpecific spec1 = GetSpellSpecific(spellInfo1->Id);
|
SpellSpecific spec1 = GetSpellSpecific(spellInfo1->Id);
|
||||||
|
|
@ -1249,7 +1250,7 @@ SpellCastResult GetErrorAtShapeshiftedCast(SpellEntry const* spellInfo, uint32 f
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// needs shapeshift
|
// needs shapeshift
|
||||||
if(!(spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT) && shapeShift && shapeShift->Stances != 0)
|
if (!spellInfo->HasAttribute(SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT) && shapeShift && shapeShift->Stances != 0)
|
||||||
{
|
{
|
||||||
return SPELL_FAILED_ONLY_SHAPESHIFT;
|
return SPELL_FAILED_ONLY_SHAPESHIFT;
|
||||||
}
|
}
|
||||||
|
|
@ -1532,8 +1533,52 @@ void SpellMgr::LoadSpellProcEvents()
|
||||||
{
|
{
|
||||||
mSpellProcEventMap.clear(); // need for reload case
|
mSpellProcEventMap.clear(); // need for reload case
|
||||||
|
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
// 0 1 2
|
||||||
QueryResult* result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMaskA0, SpellFamilyMaskA1, SpellFamilyMaskA2, SpellFamilyMaskB0, SpellFamilyMaskB1, SpellFamilyMaskB2, SpellFamilyMaskC0, SpellFamilyMaskC1, SpellFamilyMaskC2, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event");
|
QueryResult* result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, "
|
||||||
|
// 3 4 5
|
||||||
|
"SpellFamilyMaskA0, SpellFamilyMaskA1, SpellFamilyMaskA2, "
|
||||||
|
// 6 7 8
|
||||||
|
"SpellFamilyMaskB0, SpellFamilyMaskB1, SpellFamilyMaskB2, "
|
||||||
|
// 9 10 11
|
||||||
|
"SpellFamilyMaskC0, SpellFamilyMaskC1, SpellFamilyMaskC2, "
|
||||||
|
// 12 13 14
|
||||||
|
"SpellFamilyMaskD0, SpellFamilyMaskD1, SpellFamilyMaskD2, "
|
||||||
|
// 15 16 17
|
||||||
|
"SpellFamilyMaskE0, SpellFamilyMaskE1, SpellFamilyMaskE2, "
|
||||||
|
// 18 19 20
|
||||||
|
"SpellFamilyMaskF0, SpellFamilyMaskF1, SpellFamilyMaskF2, "
|
||||||
|
// 21 22 23
|
||||||
|
"SpellFamilyMaskG0, SpellFamilyMaskG1, SpellFamilyMaskG2, "
|
||||||
|
// 24 25 26
|
||||||
|
"SpellFamilyMaskH0, SpellFamilyMaskH1, SpellFamilyMaskH2, "
|
||||||
|
// 27 28 29
|
||||||
|
"SpellFamilyMaskI0, SpellFamilyMaskI1, SpellFamilyMaskI2, "
|
||||||
|
// 30 31 32
|
||||||
|
"SpellFamilyMaskJ0, SpellFamilyMaskJ1, SpellFamilyMaskJ2, "
|
||||||
|
// 33 34 35
|
||||||
|
"SpellFamilyMaskK0, SpellFamilyMaskK1, SpellFamilyMaskK2, "
|
||||||
|
// 36 37 38
|
||||||
|
"SpellFamilyMaskL0, SpellFamilyMaskL1, SpellFamilyMaskL2, "
|
||||||
|
// 39 40 41
|
||||||
|
"SpellFamilyMaskM0, SpellFamilyMaskM1, SpellFamilyMaskM2, "
|
||||||
|
// 42 43 44
|
||||||
|
"SpellFamilyMaskN0, SpellFamilyMaskN1, SpellFamilyMaskN2, "
|
||||||
|
// 45 46 47
|
||||||
|
"SpellFamilyMaskO0, SpellFamilyMaskO1, SpellFamilyMaskO2, "
|
||||||
|
// 48 49 50
|
||||||
|
"SpellFamilyMaskP0, SpellFamilyMaskP1, SpellFamilyMaskP2, "
|
||||||
|
// 51 52 53
|
||||||
|
"SpellFamilyMaskQ0, SpellFamilyMaskQ1, SpellFamilyMaskQ2, "
|
||||||
|
// 54 55 56
|
||||||
|
"SpellFamilyMaskR0, SpellFamilyMaskR1, SpellFamilyMaskR2, "
|
||||||
|
// 57 58 59
|
||||||
|
"SpellFamilyMaskS0, SpellFamilyMaskS1, SpellFamilyMaskS2, "
|
||||||
|
// 60 61 62
|
||||||
|
"SpellFamilyMaskT0, SpellFamilyMaskT1, SpellFamilyMaskT2, "
|
||||||
|
// 63 64 65
|
||||||
|
"SpellFamilyMaskU0, SpellFamilyMaskU1, SpellFamilyMaskU2, "
|
||||||
|
// 66 67 68 69 70
|
||||||
|
"procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event");
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
BarGoLink bar(1);
|
BarGoLink bar(1);
|
||||||
|
|
@ -1565,11 +1610,11 @@ void SpellMgr::LoadSpellProcEvents()
|
||||||
(uint64)fields[i + 3].GetUInt32() | ((uint64)fields[i + 6].GetUInt32() << 32),
|
(uint64)fields[i + 3].GetUInt32() | ((uint64)fields[i + 6].GetUInt32() << 32),
|
||||||
fields[i + 9].GetUInt32());
|
fields[i + 9].GetUInt32());
|
||||||
}
|
}
|
||||||
spe.procFlags = fields[12].GetUInt32();
|
spe.procFlags = fields[66].GetUInt32();
|
||||||
spe.procEx = fields[13].GetUInt32();
|
spe.procEx = fields[67].GetUInt32();
|
||||||
spe.ppmRate = fields[14].GetFloat();
|
spe.ppmRate = fields[68].GetFloat();
|
||||||
spe.customChance = fields[15].GetFloat();
|
spe.customChance = fields[69].GetFloat();
|
||||||
spe.cooldown = fields[16].GetUInt32();
|
spe.cooldown = fields[70].GetUInt32();
|
||||||
|
|
||||||
rankHelper.RecordRank(spe, entry);
|
rankHelper.RecordRank(spe, entry);
|
||||||
}
|
}
|
||||||
|
|
@ -1909,7 +1954,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
|
||||||
else // For spells need check school/spell family/family mask
|
else // For spells need check school/spell family/family mask
|
||||||
{
|
{
|
||||||
// Check (if set) for school
|
// Check (if set) for school
|
||||||
if (spellProcEvent->schoolMask && (spellProcEvent->schoolMask & procSpell->SchoolMask) == 0)
|
if (spellProcEvent->schoolMask && (spellProcEvent->schoolMask & procSpell->GetSchoolMask()) == 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2120,7 +2165,7 @@ bool SpellMgr::canStackSpellRanksInSpellBook(SpellEntry const* spellInfo) const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (spellInfo->powerType != POWER_MANA && spellInfo->powerType != POWER_HEALTH)
|
if (spellInfo->GetPowerType() != POWER_MANA && spellInfo->GetPowerType() != POWER_HEALTH)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2151,7 +2196,7 @@ bool SpellMgr::canStackSpellRanksInSpellBook(SpellEntry const* spellInfo) const
|
||||||
}
|
}
|
||||||
// Seal of Righteousness, 2 version of same rank
|
// Seal of Righteousness, 2 version of same rank
|
||||||
SpellClassOptionsEntry const* classOptions = spellInfo->GetSpellClassOptions();
|
SpellClassOptionsEntry const* classOptions = spellInfo->GetSpellClassOptions();
|
||||||
if (classOptions && (classOptions->SpellFamilyFlags & UI64LIT(0x0000000008000000)) && spellInfo->SpellIconID == 25)
|
if (classOptions && (classOptions->SpellFamilyFlags & UI64LIT(0x0000000008000000)) && spellInfo->GetSpellIconID() == 25)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2186,6 +2231,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
|
|
||||||
SpellClassOptionsEntry const* classOptions1 = spellInfo_1->GetSpellClassOptions();
|
SpellClassOptionsEntry const* classOptions1 = spellInfo_1->GetSpellClassOptions();
|
||||||
SpellClassOptionsEntry const* classOptions2 = spellInfo_2->GetSpellClassOptions();
|
SpellClassOptionsEntry const* classOptions2 = spellInfo_2->GetSpellClassOptions();
|
||||||
|
uint32 spellVisual_1 = spellInfo_1->GetSpellVisual();
|
||||||
|
uint32 spellVisual_2 = spellInfo_2->GetSpellVisual();
|
||||||
|
uint32 spellIconID_1 = spellInfo_1->GetSpellIconID();
|
||||||
|
uint32 spellIconID_2 = spellInfo_2->GetSpellIconID();
|
||||||
|
|
||||||
// Resurrection sickness
|
// Resurrection sickness
|
||||||
if ((spellInfo_1->Id == SPELL_ID_PASSIVE_RESURRECTION_SICKNESS) != (spellInfo_2->Id == SPELL_ID_PASSIVE_RESURRECTION_SICKNESS))
|
if ((spellInfo_1->Id == SPELL_ID_PASSIVE_RESURRECTION_SICKNESS) != (spellInfo_2->Id == SPELL_ID_PASSIVE_RESURRECTION_SICKNESS))
|
||||||
|
|
@ -2218,25 +2267,25 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Soulstone Resurrection and Twisting Nether (resurrector)
|
// Soulstone Resurrection and Twisting Nether (resurrector)
|
||||||
if (spellInfo_1->SpellIconID == 92 && spellInfo_2->SpellIconID == 92 && (
|
if (spellIconID_1 == 92 && spellIconID_2 == 92 && (
|
||||||
(spellInfo_1->SpellVisual[0] == 99 && spellInfo_2->SpellVisual[0] == 0) ||
|
(spellVisual_1 == 99 && spellVisual_2 == 0) ||
|
||||||
(spellInfo_2->SpellVisual[0] == 99 && spellInfo_1->SpellVisual[0] == 0)))
|
(spellVisual_2 == 99 && spellVisual_1 == 0)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Heart of the Wild, Agility and various Idol Triggers
|
// Heart of the Wild, Agility and various Idol Triggers
|
||||||
if (spellInfo_1->SpellIconID == 240 && spellInfo_2->SpellIconID == 240)
|
if (spellIconID_1 == 240 && spellIconID_2 == 240)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Personalized Weather (thunder effect should overwrite rainy aura)
|
// Personalized Weather (thunder effect should overwrite rainy aura)
|
||||||
if (spellInfo_1->SpellIconID == 2606 && spellInfo_2->SpellIconID == 2606)
|
if (spellIconID_1 == 2606 && spellIconID_2 == 2606)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mirrored Soul (FoS - Devourer) - and other Boss spells
|
// Mirrored Soul (FoS - Devourer) - and other Boss spells
|
||||||
if (spellInfo_1->SpellIconID == 3176 && spellInfo_2->SpellIconID == 3176)
|
if (spellIconID_1 == 3176 && spellIconID_2 == 3176)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2277,19 +2326,19 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Blood Fury and Rage of the Unraveller
|
// Blood Fury and Rage of the Unraveller
|
||||||
if (spellInfo_1->SpellIconID == 1662 && spellInfo_2->SpellIconID == 1662)
|
if (spellIconID_1 == 1662 && spellIconID_2 == 1662)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Kindred Spirits
|
// Kindred Spirits
|
||||||
if (spellInfo_1->SpellIconID == 3559 && spellInfo_2->SpellIconID == 3559)
|
if (spellIconID_1 == 3559 && spellIconID_2 == 3559)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vigilance and Damage Reduction (Vigilance triggered spell)
|
// Vigilance and Damage Reduction (Vigilance triggered spell)
|
||||||
if (spellInfo_1->SpellIconID == 2834 && spellInfo_2->SpellIconID == 2834)
|
if (spellIconID_1 == 2834 && spellIconID_2 == 2834)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2360,8 +2409,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Shard of Flame and Mote of Flame
|
// Shard of Flame and Mote of Flame
|
||||||
if ((spellInfo_1->SpellIconID == 2302 && spellInfo_1->SpellVisual[0] == 0) ||
|
if ((spellInfo_1->GetSpellIconID() == 2302 && spellInfo_1->GetSpellVisual() == 0) ||
|
||||||
(spellInfo_2->SpellIconID == 2302 && spellInfo_2->SpellVisual[0] == 0))
|
(spellInfo_2->GetSpellIconID() == 2302 && spellInfo_2->GetSpellVisual() == 0))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Felblaze Visual and Fog of Corruption
|
// Felblaze Visual and Fog of Corruption
|
||||||
|
|
@ -2415,7 +2464,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Halls of Reflection Clone
|
// Halls of Reflection Clone
|
||||||
if (spellInfo_1->SpellIconID == 692 && spellInfo_2->SpellIconID == 692)
|
if (spellInfo_1->Id == 692 && spellInfo_2->Id == 692)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2423,7 +2472,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_MAGE:
|
case SPELLFAMILY_MAGE:
|
||||||
// Arcane Intellect and Insight
|
// Arcane Intellect and Insight
|
||||||
if (spellInfo_2->SpellIconID == 125 && spellInfo_1->Id == 18820)
|
if (spellIconID_2 == 125 && spellInfo_1->Id == 18820)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2431,7 +2480,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
case SPELLFAMILY_WARRIOR:
|
case SPELLFAMILY_WARRIOR:
|
||||||
{
|
{
|
||||||
// Scroll of Protection and Defensive Stance (multi-family check)
|
// Scroll of Protection and Defensive Stance (multi-family check)
|
||||||
if (spellInfo_1->SpellIconID == 276 && spellInfo_1->SpellVisual[0] == 196 && spellInfo_2->Id == 71)
|
if (spellIconID_1 == 276 && spellVisual_1 == 196 && spellInfo_2->Id == 71)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2447,7 +2496,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
case SPELLFAMILY_DRUID:
|
case SPELLFAMILY_DRUID:
|
||||||
{
|
{
|
||||||
// Scroll of Stamina and Leader of the Pack (multi-family check)
|
// Scroll of Stamina and Leader of the Pack (multi-family check)
|
||||||
if (spellInfo_1->SpellIconID == 312 && spellInfo_1->SpellVisual[0] == 216 && spellInfo_2->Id == 24932)
|
if (spellIconID_1 == 312 && spellVisual_1 == 216 && spellInfo_2->Id == 24932)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2463,7 +2512,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
case SPELLFAMILY_ROGUE:
|
case SPELLFAMILY_ROGUE:
|
||||||
{
|
{
|
||||||
// Garrote-Silence -> Garrote (multi-family check)
|
// Garrote-Silence -> Garrote (multi-family check)
|
||||||
if (spellInfo_1->SpellIconID == 498 && spellInfo_1->SpellVisual[0] == 0 && spellInfo_2->SpellIconID == 498)
|
if (spellIconID_1 == 498 && spellVisual_1 == 0 && spellIconID_2 == 498)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2488,13 +2537,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
case SPELLFAMILY_PALADIN:
|
case SPELLFAMILY_PALADIN:
|
||||||
{
|
{
|
||||||
// Unstable Currents and other -> *Sanctity Aura (multi-family check)
|
// Unstable Currents and other -> *Sanctity Aura (multi-family check)
|
||||||
if (spellInfo_2->SpellIconID == 502 && spellInfo_1->SpellIconID == 502 && spellInfo_1->SpellVisual[0] == 969)
|
if (spellIconID_2 == 502 && spellIconID_1 == 502 && spellVisual_1 == 969)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// *Band of Eternal Champion and Seal of Command(multi-family check)
|
// *Band of Eternal Champion and Seal of Command(multi-family check)
|
||||||
if (spellId_1 == 35081 && spellInfo_2->SpellIconID == 561 && spellInfo_2->SpellVisual[0] == 7992)
|
if (spellId_1 == 35081 && spellIconID_2 == 561 && spellVisual_2 == 7992)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2509,7 +2558,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Dragonmaw Illusion, Blood Elf Illusion, Human Illusion, Illidari Agent Illusion, Scarlet Crusade Disguise
|
// Dragonmaw Illusion, Blood Elf Illusion, Human Illusion, Illidari Agent Illusion, Scarlet Crusade Disguise
|
||||||
if (spellInfo_1->SpellIconID == 1691 && spellInfo_2->SpellIconID == 1691)
|
if (spellIconID_1 == 1691 && spellIconID_2 == 1691)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2523,12 +2572,12 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Blink & Improved Blink
|
// Blink & Improved Blink
|
||||||
if (classOptions1 && (classOptions1->SpellFamilyFlags & UI64LIT(0x0000000000010000)) && (spellInfo_2->SpellVisual[0] == 72 && spellInfo_2->SpellIconID == 1499) ||
|
if (classOptions1 && (classOptions1->SpellFamilyFlags & UI64LIT(0x0000000000010000)) && (spellVisual_2 == 72 && spellIconID_2 == 1499) ||
|
||||||
(classOptions2->SpellFamilyFlags & UI64LIT(0x0000000000010000)) && (spellInfo_1->SpellVisual[0] == 72 && spellInfo_1->SpellIconID == 1499) )
|
(classOptions2->SpellFamilyFlags & UI64LIT(0x0000000000010000)) && (spellVisual_1 == 72 && spellIconID_1 == 1499) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Fingers of Frost effects
|
// Fingers of Frost effects
|
||||||
if (spellInfo_1->SpellIconID == 2947 && spellInfo_2->SpellIconID == 2947)
|
if (spellIconID_1 == 2947 && spellIconID_2 == 2947)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2544,19 +2593,19 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Detect Invisibility and Mana Shield (multi-family check)
|
// Detect Invisibility and Mana Shield (multi-family check)
|
||||||
if (spellInfo_2->Id == 132 && spellInfo_1->SpellIconID == 209 && spellInfo_1->SpellVisual[0] == 968)
|
if (spellInfo_2->Id == 132 && spellIconID_1 == 209 && spellVisual_1 == 968)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Combustion and Fire Protection Aura (multi-family check)
|
// Combustion and Fire Protection Aura (multi-family check)
|
||||||
if (spellInfo_1->Id == 11129 && spellInfo_2->SpellIconID == 33 && spellInfo_2->SpellVisual[0] == 321)
|
if (spellInfo_1->Id == 11129 && spellIconID_2 == 33 && spellVisual_2 == 321)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Arcane Intellect and Insight
|
// Arcane Intellect and Insight
|
||||||
if (spellInfo_1->SpellIconID == 125 && spellInfo_2->Id == 18820)
|
if (spellIconID_1 == 125 && spellInfo_2->Id == 18820)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2566,44 +2615,44 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
if( classOptions2 && classOptions2->SpellFamilyName == SPELLFAMILY_WARLOCK )
|
if( classOptions2 && classOptions2->SpellFamilyName == SPELLFAMILY_WARLOCK )
|
||||||
{
|
{
|
||||||
// Siphon Life and Drain Life
|
// Siphon Life and Drain Life
|
||||||
if ((spellInfo_1->SpellIconID == 152 && spellInfo_2->SpellIconID == 546) ||
|
if ((spellIconID_1 == 152 && spellIconID_2 == 546) ||
|
||||||
(spellInfo_2->SpellIconID == 152 && spellInfo_1->SpellIconID == 546))
|
(spellIconID_2 == 152 && spellIconID_1 == 546))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Corruption & Seed of corruption
|
// Corruption & Seed of corruption
|
||||||
if ((spellInfo_1->SpellIconID == 313 && spellInfo_2->SpellIconID == 1932) ||
|
if ((spellIconID_1 == 313 && spellIconID_2 == 1932) ||
|
||||||
(spellInfo_2->SpellIconID == 313 && spellInfo_1->SpellIconID == 1932))
|
(spellIconID_2 == 313 && spellIconID_1 == 1932))
|
||||||
if (spellInfo_1->SpellVisual[0] != 0 && spellInfo_2->SpellVisual[0] != 0)
|
if (spellVisual_1 != 0 && spellVisual_2 != 0)
|
||||||
return true; // can't be stacked
|
return true; // can't be stacked
|
||||||
|
|
||||||
// Corruption and Unstable Affliction
|
// Corruption and Unstable Affliction
|
||||||
if ((spellInfo_1->SpellIconID == 313 && spellInfo_2->SpellIconID == 2039) ||
|
if ((spellIconID_1 == 313 && spellIconID_2 == 2039) ||
|
||||||
(spellInfo_2->SpellIconID == 313 && spellInfo_1->SpellIconID == 2039))
|
(spellIconID_2 == 313 && spellIconID_1 == 2039))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// (Corruption or Unstable Affliction) and (Curse of Agony or Curse of Doom)
|
// (Corruption or Unstable Affliction) and (Curse of Agony or Curse of Doom)
|
||||||
if (((spellInfo_1->SpellIconID == 313 || spellInfo_1->SpellIconID == 2039) && (spellInfo_2->SpellIconID == 544 || spellInfo_2->SpellIconID == 91)) ||
|
if (((spellIconID_1 == 313 || spellIconID_1 == 2039) && (spellIconID_2 == 544 || spellIconID_2 == 91)) ||
|
||||||
((spellInfo_2->SpellIconID == 313 || spellInfo_2->SpellIconID == 2039) && (spellInfo_1->SpellIconID == 544 || spellInfo_1->SpellIconID == 91)))
|
((spellIconID_2 == 313 || spellIconID_2 == 2039) && (spellIconID_1 == 544 || spellIconID_1 == 91)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Shadowflame and Curse of Agony
|
// Shadowflame and Curse of Agony
|
||||||
if ((spellInfo_1->SpellIconID == 544 && spellInfo_2->SpellIconID == 3317) ||
|
if ((spellIconID_1 == 544 && spellIconID_2 == 3317) ||
|
||||||
(spellInfo_2->SpellIconID == 544 && spellInfo_1->SpellIconID == 3317))
|
(spellIconID_2 == 544 && spellIconID_1 == 3317))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Shadowflame and Curse of Doom
|
// Shadowflame and Curse of Doom
|
||||||
if ((spellInfo_1->SpellIconID == 91 && spellInfo_2->SpellIconID == 3317) ||
|
if ((spellIconID_1 == 91 && spellIconID_2 == 3317) ||
|
||||||
(spellInfo_2->SpellIconID == 91 && spellInfo_1->SpellIconID == 3317))
|
(spellIconID_2 == 91 && spellIconID_1 == 3317))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Metamorphosis, diff effects
|
// Metamorphosis, diff effects
|
||||||
if (spellInfo_1->SpellIconID == 3314 && spellInfo_2->SpellIconID == 3314)
|
if (spellIconID_1 == 3314 && spellIconID_2 == 3314)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Detect Invisibility and Mana Shield (multi-family check)
|
// Detect Invisibility and Mana Shield (multi-family check)
|
||||||
if (spellInfo_1->Id == 132 && spellInfo_2->SpellIconID == 209 && spellInfo_2->SpellVisual[0] == 968)
|
if (spellInfo_1->Id == 132 && spellIconID_2 == 209 && spellVisual_2 == 968)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2617,13 +2666,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Battle Shout and Rampage
|
// Battle Shout and Rampage
|
||||||
if ((spellInfo_1->SpellIconID == 456 && spellInfo_2->SpellIconID == 2006) ||
|
if ((spellIconID_1 == 456 && spellIconID_2 == 2006) ||
|
||||||
(spellInfo_2->SpellIconID == 456 && spellInfo_1->SpellIconID == 2006))
|
(spellIconID_2 == 456 && spellIconID_1 == 2006))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Glyph of Revenge (triggered), and Sword and Board (triggered)
|
// Glyph of Revenge (triggered), and Sword and Board (triggered)
|
||||||
if ((spellInfo_1->SpellIconID == 856 && spellInfo_2->SpellIconID == 2780) ||
|
if ((spellIconID_1 == 856 && spellIconID_2 == 2780) ||
|
||||||
(spellInfo_2->SpellIconID == 856 && spellInfo_1->SpellIconID == 2780))
|
(spellIconID_2 == 856 && spellIconID_1 == 2780))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Defensive/Berserker/Battle stance aura can not stack (needed for dummy auras)
|
// Defensive/Berserker/Battle stance aura can not stack (needed for dummy auras)
|
||||||
|
|
@ -2639,13 +2688,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defensive Stance and Scroll of Protection (multi-family check)
|
// Defensive Stance and Scroll of Protection (multi-family check)
|
||||||
if (spellInfo_1->Id == 71 && spellInfo_2->SpellIconID == 276 && spellInfo_2->SpellVisual[0] == 196)
|
if (spellInfo_1->Id == 71 && spellIconID_2 == 276 && spellVisual_2 == 196)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bloodlust and Bloodthirst (multi-family check)
|
// Bloodlust and Bloodthirst (multi-family check)
|
||||||
if (spellInfo_2->Id == 2825 && spellInfo_1->SpellIconID == 38 && spellInfo_1->SpellVisual[0] == 0)
|
if (spellInfo_2->Id == 2825 && spellIconID_1 == 38 && spellVisual_1 == 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2674,8 +2723,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
if (classOptions2 && classOptions2->SpellFamilyName == SPELLFAMILY_DRUID )
|
if (classOptions2 && classOptions2->SpellFamilyName == SPELLFAMILY_DRUID )
|
||||||
{
|
{
|
||||||
//Omen of Clarity and Blood Frenzy
|
//Omen of Clarity and Blood Frenzy
|
||||||
if ((classOptions1 && (classOptions1->SpellFamilyFlags == UI64LIT(0x0) && spellInfo_1->SpellIconID == 108) && (classOptions2->SpellFamilyFlags & UI64LIT(0x20000000000000))) ||
|
if ((classOptions1 && (classOptions1->SpellFamilyFlags == UI64LIT(0x0) && spellIconID_1 == 108) && (classOptions2->SpellFamilyFlags & UI64LIT(0x20000000000000))) ||
|
||||||
((classOptions2->SpellFamilyFlags == UI64LIT(0x0) && spellInfo_2->SpellIconID == 108) && (classOptions1->SpellFamilyFlags & UI64LIT(0x20000000000000))))
|
((classOptions2->SpellFamilyFlags == UI64LIT(0x0) && spellIconID_2 == 108) && (classOptions1->SpellFamilyFlags & UI64LIT(0x20000000000000))))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Tree of Life (Shapeshift) and 34123 Tree of Life (Passive)
|
// Tree of Life (Shapeshift) and 34123 Tree of Life (Passive)
|
||||||
|
|
@ -2684,12 +2733,12 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Lifebloom and Wild Growth
|
// Lifebloom and Wild Growth
|
||||||
if ((spellInfo_1->SpellIconID == 2101 && spellInfo_2->SpellIconID == 2864) ||
|
if ((spellIconID_1 == 2101 && spellIconID_2 == 2864) ||
|
||||||
(spellInfo_2->SpellIconID == 2101 && spellInfo_1->SpellIconID == 2864))
|
(spellIconID_2 == 2101 && spellIconID_1 == 2864))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Innervate and Glyph of Innervate and some other spells
|
// Innervate and Glyph of Innervate and some other spells
|
||||||
if (spellInfo_1->SpellIconID == 62 && spellInfo_2->SpellIconID == 62)
|
if (spellIconID_1 == 62 && spellIconID_2 == 62)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2715,7 +2764,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Savage Roar and Savage Roar (triggered)
|
// Savage Roar and Savage Roar (triggered)
|
||||||
if (spellInfo_1->SpellIconID == 2865 && spellInfo_2->SpellIconID == 2865)
|
if (spellIconID_1 == 2865 && spellIconID_2 == 2865)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2727,7 +2776,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
}
|
}
|
||||||
|
|
||||||
// Leader of the Pack and Scroll of Stamina (multi-family check)
|
// Leader of the Pack and Scroll of Stamina (multi-family check)
|
||||||
if (spellInfo_1->Id == 24932 && spellInfo_2->SpellIconID == 312 && spellInfo_2->SpellVisual[0] == 216)
|
if (spellInfo_1->Id == 24932 && spellIconID_2 == 312 && spellVisual_2 == 216)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2748,20 +2797,20 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Sprint & Sprint (waterwalk)
|
// Sprint & Sprint (waterwalk)
|
||||||
if (spellInfo_1->SpellIconID == 516 && spellInfo_2->SpellIconID == 516 &&
|
if (spellIconID_1 == 516 && spellIconID_2 == 516 &&
|
||||||
((spellInfo_1->GetCategory() == 44 && spellInfo_2->GetCategory() == 0) ||
|
((spellInfo_1->GetCategory() == 44 && spellInfo_2->GetCategory() == 0) ||
|
||||||
(spellInfo_2->GetCategory() == 44 && spellInfo_1->GetCategory() == 0)))
|
(spellInfo_2->GetCategory() == 44 && spellInfo_1->GetCategory() == 0)))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overkill
|
// Overkill
|
||||||
if (spellInfo_1->SpellIconID == 2285 && spellInfo_2->SpellIconID == 2285)
|
if (spellIconID_1 == 2285 && spellIconID_2 == 2285)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Garrote -> Garrote-Silence (multi-family check)
|
// Garrote -> Garrote-Silence (multi-family check)
|
||||||
if (spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual[0] == 0)
|
if (spellIconID_1 == 498 && spellIconID_2 == 498 && spellVisual_2 == 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2780,19 +2829,19 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Deterrence
|
// Deterrence
|
||||||
if (spellInfo_1->SpellIconID == 83 && spellInfo_2->SpellIconID == 83)
|
if (spellIconID_1 == 83 && spellIconID_2 == 83)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bestial Wrath
|
// Bestial Wrath
|
||||||
if (spellInfo_1->SpellIconID == 1680 && spellInfo_2->SpellIconID == 1680)
|
if (spellIconID_1 == 1680 && spellIconID_2 == 1680)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Aspect of the Viper & Vicious Viper
|
// Aspect of the Viper & Vicious Viper
|
||||||
if (spellInfo_1->SpellIconID == 2227 && spellInfo_2->SpellIconID == 2227)
|
if (spellIconID_1 == 2227 && spellIconID_2 == 2227)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2820,37 +2869,37 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
}
|
}
|
||||||
|
|
||||||
// Swift Retribution / Improved Devotion Aura (talents) and Paladin Auras
|
// Swift Retribution / Improved Devotion Aura (talents) and Paladin Auras
|
||||||
if ((spellInfo_1->IsFitToFamilyMask(UI64LIT(0x0), 0x00000020) && (spellInfo_2->SpellIconID == 291 || spellInfo_2->SpellIconID == 3028)) ||
|
if ((spellInfo_1->IsFitToFamilyMask(UI64LIT(0x0), 0x00000020) && (spellIconID_2 == 291 || spellIconID_2 == 3028)) ||
|
||||||
(spellInfo_2->IsFitToFamilyMask(UI64LIT(0x0), 0x00000020) && (spellInfo_1->SpellIconID == 291 || spellInfo_1->SpellIconID == 3028)))
|
(spellInfo_2->IsFitToFamilyMask(UI64LIT(0x0), 0x00000020) && (spellIconID_1 == 291 || spellIconID_1 == 3028)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Beacon of Light and Light's Beacon
|
// Beacon of Light and Light's Beacon
|
||||||
if ((spellInfo_1->SpellIconID == 3032) && (spellInfo_2->SpellIconID == 3032))
|
if ((spellIconID_1 == 3032) && (spellIconID_2 == 3032))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Concentration Aura and Improved Concentration Aura and Aura Mastery
|
// Concentration Aura and Improved Concentration Aura and Aura Mastery
|
||||||
if ((spellInfo_1->SpellIconID == 1487) && (spellInfo_2->SpellIconID == 1487))
|
if ((spellIconID_1 == 1487) && (spellIconID_2 == 1487))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seal of Corruption (caster/target parts stacking allow, other stacking checked by spell specs)
|
// Seal of Corruption (caster/target parts stacking allow, other stacking checked by spell specs)
|
||||||
if (spellInfo_1->SpellIconID == 2292 && spellInfo_2->SpellIconID == 2292)
|
if (spellIconID_1 == 2292 && spellIconID_2 == 2292)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Divine Sacrifice and Divine Guardian
|
// Divine Sacrifice and Divine Guardian
|
||||||
if (spellInfo_1->SpellIconID == 3837 && spellInfo_2->SpellIconID == 3837)
|
if (spellIconID_1 == 3837 && spellIconID_2 == 3837)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blood Corruption, Holy Vengeance, Righteous Vengeance
|
// Blood Corruption, Holy Vengeance, Righteous Vengeance
|
||||||
if ((spellInfo_1->SpellIconID == 2292 && spellInfo_2->SpellIconID == 3025) ||
|
if ((spellIconID_1 == 2292 && spellIconID_2 == 3025) ||
|
||||||
(spellInfo_2->SpellIconID == 2292 && spellInfo_1->SpellIconID == 3025))
|
(spellIconID_2 == 2292 && spellIconID_1 == 3025))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2861,19 +2910,19 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
}
|
}
|
||||||
|
|
||||||
// Combustion and Fire Protection Aura (multi-family check)
|
// Combustion and Fire Protection Aura (multi-family check)
|
||||||
if (spellInfo_2->Id == 11129 && spellInfo_1->SpellIconID == 33 && spellInfo_1->SpellVisual[0] == 321)
|
if (spellInfo_2->Id == 11129 && spellIconID_1 == 33 && spellVisual_1 == 321)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// *Sanctity Aura -> Unstable Currents and other (multi-family check)
|
// *Sanctity Aura -> Unstable Currents and other (multi-family check)
|
||||||
if (spellInfo_1->SpellIconID==502 && classOptions2->SpellFamilyName == SPELLFAMILY_GENERIC && spellInfo_2->SpellIconID==502 && spellInfo_2->SpellVisual[0]==969 )
|
if (spellIconID_1==502 && classOptions2->SpellFamilyName == SPELLFAMILY_GENERIC && spellIconID_2==502 && spellVisual_2==969 )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// *Seal of Command and Band of Eternal Champion (multi-family check)
|
// *Seal of Command and Band of Eternal Champion (multi-family check)
|
||||||
if (spellInfo_1->SpellIconID == 561 && spellInfo_1->SpellVisual[0] == 7992 && spellId_2 == 35081)
|
if (spellIconID_1 == 561 && spellVisual_1 == 7992 && spellId_2 == 35081)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2882,24 +2931,24 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
if (classOptions2 && classOptions2->SpellFamilyName == SPELLFAMILY_SHAMAN )
|
if (classOptions2 && classOptions2->SpellFamilyName == SPELLFAMILY_SHAMAN )
|
||||||
{
|
{
|
||||||
// Windfury weapon
|
// Windfury weapon
|
||||||
if (spellInfo_1->SpellIconID==220 && spellInfo_2->SpellIconID==220 &&
|
if (spellIconID_1==220 && spellIconID_2==220 &&
|
||||||
!classOptions1->IsFitToFamilyMask(classOptions2->SpellFamilyFlags))
|
!classOptions1->IsFitToFamilyMask(classOptions2->SpellFamilyFlags))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Ghost Wolf
|
// Ghost Wolf
|
||||||
if (spellInfo_1->SpellIconID == 67 && spellInfo_2->SpellIconID == 67)
|
if (spellIconID_1 == 67 && spellIconID_2 == 67)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Totem of Wrath (positive/negative), ranks checked early
|
// Totem of Wrath (positive/negative), ranks checked early
|
||||||
if (spellInfo_1->SpellIconID == 2019 && spellInfo_2->SpellIconID == 2019)
|
if (spellIconID_1 == 2019 && spellIconID_2 == 2019)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Bloodlust and Bloodthirst (multi-family check)
|
// Bloodlust and Bloodthirst (multi-family check)
|
||||||
if (spellInfo_1->Id == 2825 && spellInfo_2->SpellIconID == 38 && spellInfo_2->SpellVisual[0] == 0)
|
if (spellInfo_1->Id == 2825 && spellIconID_2 == 38 && spellVisual_2 == 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2908,25 +2957,25 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
if (classOptions2 && classOptions2->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
|
if (classOptions2 && classOptions2->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
|
||||||
{
|
{
|
||||||
// Lichborne and Lichborne (triggered)
|
// Lichborne and Lichborne (triggered)
|
||||||
if (spellInfo_1->SpellIconID == 61 && spellInfo_2->SpellIconID == 61)
|
if (spellIconID_1 == 61 && spellIconID_2 == 61)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Frost Presence and Frost Presence (triggered)
|
// Frost Presence and Frost Presence (triggered)
|
||||||
if (spellInfo_1->SpellIconID == 2632 && spellInfo_2->SpellIconID == 2632)
|
if (spellIconID_1 == 2632 && spellIconID_2 == 2632)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unholy Presence and Unholy Presence (triggered)
|
// Unholy Presence and Unholy Presence (triggered)
|
||||||
if (spellInfo_1->SpellIconID == 2633 && spellInfo_2->SpellIconID == 2633)
|
if (spellIconID_1 == 2633 && spellIconID_2 == 2633)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blood Presence and Blood Presence (triggered)
|
// Blood Presence and Blood Presence (triggered)
|
||||||
if (spellInfo_1->SpellIconID == 2636 && spellInfo_2->SpellIconID == 2636)
|
if (spellIconID_1 == 2636 && spellIconID_2 == 2636)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2937,8 +2986,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
}
|
}
|
||||||
|
|
||||||
// more generic checks
|
// more generic checks
|
||||||
if (spellInfo_1->SpellIconID == spellInfo_2->SpellIconID &&
|
if (spellIconID_1 == spellIconID_2 &&
|
||||||
spellInfo_1->SpellIconID != 0 && spellInfo_2->SpellIconID != 0)
|
spellIconID_1 != 0 && spellIconID_2 != 0)
|
||||||
{
|
{
|
||||||
bool isModifier = false;
|
bool isModifier = false;
|
||||||
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||||
|
|
@ -4840,15 +4889,15 @@ void SpellMgr::CheckUsedSpells(char const* table)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spellIcon >= 0 && spellEntry->SpellIconID != uint32(spellIcon))
|
if (spellIcon >= 0 && spellEntry->GetSpellIconID() != uint32(spellIcon))
|
||||||
{
|
{
|
||||||
sLog.outError("Spell %u '%s' icon(%u) <> %u but used in %s.", spell, name.c_str(), spellEntry->SpellIconID, spellIcon, code.c_str());
|
sLog.outError("Spell %u '%s' icon(%u) <> %u but used in %s.", spell, name.c_str(), spellEntry->GetSpellIconID(), spellIcon, code.c_str());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spellVisual >= 0 && spellEntry->SpellVisual[0] != uint32(spellVisual))
|
if (spellVisual >= 0 && spellEntry->GetSpellVisual() != uint32(spellVisual))
|
||||||
{
|
{
|
||||||
sLog.outError("Spell %u '%s' visual(%u) <> %u but used in %s.", spell, name.c_str(), spellEntry->SpellVisual[0], spellVisual, code.c_str());
|
sLog.outError("Spell %u '%s' visual(%u) <> %u but used in %s.", spell, name.c_str(), spellEntry->GetSpellVisual(), spellVisual, code.c_str());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4919,10 +4968,10 @@ void SpellMgr::CheckUsedSpells(char const* table)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spellIcon >= 0 && spellEntry->SpellIconID != uint32(spellIcon))
|
if (spellIcon >= 0 && spellEntry->GetSpellIconID() != uint32(spellIcon))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (spellVisual >= 0 && spellEntry->SpellVisual[0] != uint32(spellVisual))
|
if (spellVisual >= 0 && spellEntry->GetSpellVisual() != uint32(spellVisual))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(category >= 0 && spellEntry->GetCategory() != uint32(category))
|
if(category >= 0 && spellEntry->GetCategory() != uint32(category))
|
||||||
|
|
@ -4987,7 +5036,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_MAGE:
|
case SPELLFAMILY_MAGE:
|
||||||
// Dragon's Breath
|
// Dragon's Breath
|
||||||
if (spellproto->SpellIconID == 1548)
|
if (spellproto->GetSpellIconID() == 1548)
|
||||||
{
|
{
|
||||||
return DIMINISHING_DISORIENT;
|
return DIMINISHING_DISORIENT;
|
||||||
}
|
}
|
||||||
|
|
@ -5005,7 +5054,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||||
return DIMINISHING_CHEAPSHOT_POUNCE;
|
return DIMINISHING_CHEAPSHOT_POUNCE;
|
||||||
}
|
}
|
||||||
// Crippling poison - Limit to 10 seconds in PvP (No SpellFamilyFlags)
|
// Crippling poison - Limit to 10 seconds in PvP (No SpellFamilyFlags)
|
||||||
else if (spellproto->SpellIconID == 163)
|
else if (spellproto->GetSpellIconID() == 163)
|
||||||
{
|
{
|
||||||
return DIMINISHING_LIMITONLY;
|
return DIMINISHING_LIMITONLY;
|
||||||
}
|
}
|
||||||
|
|
@ -5014,7 +5063,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||||
case SPELLFAMILY_HUNTER:
|
case SPELLFAMILY_HUNTER:
|
||||||
{
|
{
|
||||||
// Freezing Trap & Freezing Arrow & Wyvern Sting
|
// Freezing Trap & Freezing Arrow & Wyvern Sting
|
||||||
if (spellproto->SpellIconID == 180 || spellproto->SpellIconID == 1721)
|
if (spellproto->GetSpellIconID() == 180 || spellproto->GetSpellIconID() == 1721)
|
||||||
{
|
{
|
||||||
return DIMINISHING_DISORIENT;
|
return DIMINISHING_DISORIENT;
|
||||||
}
|
}
|
||||||
|
|
@ -5070,7 +5119,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||||
case SPELLFAMILY_PRIEST:
|
case SPELLFAMILY_PRIEST:
|
||||||
{
|
{
|
||||||
// Shackle Undead
|
// Shackle Undead
|
||||||
if (spellproto->SpellIconID == 27)
|
if (spellproto->GetSpellIconID() == 27)
|
||||||
{
|
{
|
||||||
return DIMINISHING_DISORIENT;
|
return DIMINISHING_DISORIENT;
|
||||||
}
|
}
|
||||||
|
|
@ -5079,7 +5128,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||||
case SPELLFAMILY_DEATHKNIGHT:
|
case SPELLFAMILY_DEATHKNIGHT:
|
||||||
{
|
{
|
||||||
// Hungering Cold (no flags)
|
// Hungering Cold (no flags)
|
||||||
if (spellproto->SpellIconID == 2797)
|
if (spellproto->GetSpellIconID() == 2797)
|
||||||
{
|
{
|
||||||
return DIMINISHING_DISORIENT;
|
return DIMINISHING_DISORIENT;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -603,7 +603,7 @@ inline bool IsNeedCastSpellAtFormApply(SpellEntry const* spellInfo, ShapeshiftFo
|
||||||
}
|
}
|
||||||
|
|
||||||
// passive spells with SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT are already active without shapeshift, do no recast!
|
// passive spells with SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT are already active without shapeshift, do no recast!
|
||||||
return (shapeShift->Stances & (1<<(form-1)) && !(spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT));
|
return (shapeShift->Stances & (1<<(form-1)) && !spellInfo->HasAttribute(SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool IsNeedCastSpellAtOutdoor(SpellEntry const* spellInfo)
|
inline bool IsNeedCastSpellAtOutdoor(SpellEntry const* spellInfo)
|
||||||
|
|
@ -618,7 +618,7 @@ inline bool NeedsComboPoints(SpellEntry const* spellInfo)
|
||||||
|
|
||||||
inline SpellSchoolMask GetSpellSchoolMask(SpellEntry const* spellInfo)
|
inline SpellSchoolMask GetSpellSchoolMask(SpellEntry const* spellInfo)
|
||||||
{
|
{
|
||||||
return SpellSchoolMask(spellInfo->SchoolMask);
|
return SpellSchoolMask(spellInfo->GetSchoolMask());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32 GetSpellMechanicMask(SpellEntry const* spellInfo, uint32 effectMask)
|
inline uint32 GetSpellMechanicMask(SpellEntry const* spellInfo, uint32 effectMask)
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ void Totem::SetTypeBySummonSpell(SpellEntry const* spellProto)
|
||||||
if (GetSpellCastTime(totemSpell))
|
if (GetSpellCastTime(totemSpell))
|
||||||
m_type = TOTEM_ACTIVE;
|
m_type = TOTEM_ACTIVE;
|
||||||
}
|
}
|
||||||
if (spellProto->SpellIconID == 2056)
|
if (spellProto->Id == 2056)
|
||||||
m_type = TOTEM_STATUE; // Jewelery statue
|
m_type = TOTEM_STATUE; // Jewelery statue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ TotemAI::UpdateAI(const uint32 /*diff*/)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get spell rangy
|
// Get spell rangy
|
||||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
|
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->GetRangeIndex());
|
||||||
float max_range = GetSpellMaxRange(srange);
|
float max_range = GetSpellMaxRange(srange);
|
||||||
|
|
||||||
// SPELLMOD_RANGE not applied in this place just because nonexistent range mods for attacking totems
|
// SPELLMOD_RANGE not applied in this place just because nonexistent range mods for attacking totems
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ void MovementInfo::Read(ByteBuffer& data, uint16 opcode)
|
||||||
break;
|
break;
|
||||||
case MSEFlags2:
|
case MSEFlags2:
|
||||||
if (hasMovementFlags2)
|
if (hasMovementFlags2)
|
||||||
moveFlags2 = data.ReadBits(12);
|
moveFlags2 = data.ReadBits(13);
|
||||||
break;
|
break;
|
||||||
case MSEHasUnknownBit:
|
case MSEHasUnknownBit:
|
||||||
data.ReadBit();
|
data.ReadBit();
|
||||||
|
|
@ -342,7 +342,7 @@ void MovementInfo::Write(ByteBuffer& data, uint16 opcode) const
|
||||||
break;
|
break;
|
||||||
case MSEFlags2:
|
case MSEFlags2:
|
||||||
if (moveFlags2)
|
if (moveFlags2)
|
||||||
data.WriteBits(moveFlags2, 12);
|
data.WriteBits(moveFlags2, 13);
|
||||||
break;
|
break;
|
||||||
case MSETimestamp:
|
case MSETimestamp:
|
||||||
if (si.hasTimeStamp)
|
if (si.hasTimeStamp)
|
||||||
|
|
@ -1120,7 +1120,7 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||||
AuraList const& vDummyAuras = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
|
AuraList const& vDummyAuras = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (AuraList::const_iterator itr = vDummyAuras.begin(); itr != vDummyAuras.end(); ++itr)
|
for (AuraList::const_iterator itr = vDummyAuras.begin(); itr != vDummyAuras.end(); ++itr)
|
||||||
{
|
{
|
||||||
if ((*itr)->GetSpellProto()->SpellIconID == 1654)
|
if ((*itr)->GetSpellProto()->GetSpellIconID() == 1654)
|
||||||
{
|
{
|
||||||
spiritOfRedemtionTalentReady = *itr;
|
spiritOfRedemtionTalentReady = *itr;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1814,7 +1814,7 @@ void Unit::CastSpell(float x, float y, float z, SpellEntry const* spellInfo, boo
|
||||||
uint32 Unit::SpellNonMeleeDamageLog(Unit* pVictim, uint32 spellID, uint32 damage)
|
uint32 Unit::SpellNonMeleeDamageLog(Unit* pVictim, uint32 spellID, uint32 damage)
|
||||||
{
|
{
|
||||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellID);
|
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellID);
|
||||||
SpellNonMeleeDamage damageInfo(this, pVictim, spellInfo->Id, SpellSchoolMask(spellInfo->SchoolMask));
|
SpellNonMeleeDamage damageInfo(this, pVictim, spellInfo->Id, SpellSchoolMask(spellInfo->GetSchoolMask()));
|
||||||
CalculateSpellDamage(&damageInfo, damage, spellInfo);
|
CalculateSpellDamage(&damageInfo, damage, spellInfo);
|
||||||
damageInfo.target->CalculateAbsorbResistBlock(this, &damageInfo, spellInfo);
|
damageInfo.target->CalculateAbsorbResistBlock(this, &damageInfo, spellInfo);
|
||||||
DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
|
DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
|
||||||
|
|
@ -2385,7 +2385,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
||||||
data << uint32(i_spellProto->Id);
|
data << uint32(i_spellProto->Id);
|
||||||
data << uint32(damage); // Damage
|
data << uint32(damage); // Damage
|
||||||
data << uint32(overkill); // Overkill
|
data << uint32(overkill); // Overkill
|
||||||
data << uint32(i_spellProto->SchoolMask);
|
data << uint32(i_spellProto->GetSchoolMask());
|
||||||
data << uint32(0); // FIXME: Resist
|
data << uint32(0); // FIXME: Resist
|
||||||
pVictim->SendMessageToSet(&data, true);
|
pVictim->SendMessageToSet(&data, true);
|
||||||
|
|
||||||
|
|
@ -2605,7 +2605,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
{
|
{
|
||||||
SpellEntry const* itr_spellProto = (*itr)->GetSpellProto();
|
SpellEntry const* itr_spellProto = (*itr)->GetSpellProto();
|
||||||
// Frost Warding (chance full absorb)
|
// Frost Warding (chance full absorb)
|
||||||
if (itr_spellProto->GetSpellFamilyName() == SPELLFAMILY_MAGE && itr_spellProto->SpellIconID == 501)
|
if (itr_spellProto->GetSpellFamilyName() == SPELLFAMILY_MAGE && itr_spellProto->GetSpellIconID() == 501)
|
||||||
{
|
{
|
||||||
// chance stored in next dummy effect
|
// chance stored in next dummy effect
|
||||||
chance = itr_spellProto->CalculateSimpleValue(EFFECT_INDEX_1);
|
chance = itr_spellProto->CalculateSimpleValue(EFFECT_INDEX_1);
|
||||||
|
|
@ -2659,7 +2659,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
case SPELLFAMILY_GENERIC:
|
case SPELLFAMILY_GENERIC:
|
||||||
{
|
{
|
||||||
// Astral Shift
|
// Astral Shift
|
||||||
if (spellProto->SpellIconID == 3066)
|
if (spellProto->GetSpellIconID() == 3066)
|
||||||
{
|
{
|
||||||
// reduces all damage taken while stun, fear or silence
|
// reduces all damage taken while stun, fear or silence
|
||||||
if (unitflag & (UNIT_FLAG_STUNNED | UNIT_FLAG_FLEEING | UNIT_FLAG_SILENCED))
|
if (unitflag & (UNIT_FLAG_STUNNED | UNIT_FLAG_FLEEING | UNIT_FLAG_SILENCED))
|
||||||
|
|
@ -2667,7 +2667,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Nerves of Steel
|
// Nerves of Steel
|
||||||
if (spellProto->SpellIconID == 2115)
|
if (spellProto->GetSpellIconID() == 2115)
|
||||||
{
|
{
|
||||||
// while affected by Stun and Fear
|
// while affected by Stun and Fear
|
||||||
if (unitflag & (UNIT_FLAG_STUNNED | UNIT_FLAG_FLEEING))
|
if (unitflag & (UNIT_FLAG_STUNNED | UNIT_FLAG_FLEEING))
|
||||||
|
|
@ -2675,7 +2675,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Spell Deflection
|
// Spell Deflection
|
||||||
if (spellProto->SpellIconID == 3006)
|
if (spellProto->GetSpellIconID() == 3006)
|
||||||
{
|
{
|
||||||
// You have a chance equal to your Parry chance
|
// You have a chance equal to your Parry chance
|
||||||
if (damagetype == SPELL_DIRECT_DAMAGE &&// Only for direct spell damage
|
if (damagetype == SPELL_DIRECT_DAMAGE &&// Only for direct spell damage
|
||||||
|
|
@ -2709,7 +2709,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
case SPELLFAMILY_DRUID:
|
case SPELLFAMILY_DRUID:
|
||||||
{
|
{
|
||||||
// Primal Tenacity
|
// Primal Tenacity
|
||||||
if (spellProto->SpellIconID == 2253)
|
if (spellProto->GetSpellIconID() == 2253)
|
||||||
{
|
{
|
||||||
// reduces all damage taken while Stunned and in Cat Form
|
// reduces all damage taken while Stunned and in Cat Form
|
||||||
if (GetShapeshiftForm() == FORM_CAT && (unitflag & UNIT_FLAG_STUNNED))
|
if (GetShapeshiftForm() == FORM_CAT && (unitflag & UNIT_FLAG_STUNNED))
|
||||||
|
|
@ -2729,7 +2729,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
case SPELLFAMILY_ROGUE:
|
case SPELLFAMILY_ROGUE:
|
||||||
{
|
{
|
||||||
// Cheat Death (make less prio with Guardian Spirit case)
|
// Cheat Death (make less prio with Guardian Spirit case)
|
||||||
if (spellProto->SpellIconID == 2109)
|
if (spellProto->GetSpellIconID() == 2109)
|
||||||
{
|
{
|
||||||
if (!preventDeathSpell &&
|
if (!preventDeathSpell &&
|
||||||
GetTypeId() == TYPEID_PLAYER && // Only players
|
GetTypeId() == TYPEID_PLAYER && // Only players
|
||||||
|
|
@ -2748,7 +2748,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
case SPELLFAMILY_PRIEST:
|
case SPELLFAMILY_PRIEST:
|
||||||
{
|
{
|
||||||
// Guardian Spirit
|
// Guardian Spirit
|
||||||
if (spellProto->SpellIconID == 2873)
|
if (spellProto->GetSpellIconID() == 2873)
|
||||||
{
|
{
|
||||||
preventDeathSpell = (*i)->GetSpellProto();
|
preventDeathSpell = (*i)->GetSpellProto();
|
||||||
preventDeathAmount = (*i)->GetModifier()->m_amount;
|
preventDeathAmount = (*i)->GetModifier()->m_amount;
|
||||||
|
|
@ -2788,7 +2788,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
case SPELLFAMILY_SHAMAN:
|
case SPELLFAMILY_SHAMAN:
|
||||||
{
|
{
|
||||||
// Astral Shift
|
// Astral Shift
|
||||||
if (spellProto->SpellIconID == 3066)
|
if (spellProto->GetSpellIconID() == 3066)
|
||||||
{
|
{
|
||||||
// reduces all damage taken while stun, fear or silence
|
// reduces all damage taken while stun, fear or silence
|
||||||
if (unitflag & (UNIT_FLAG_STUNNED | UNIT_FLAG_FLEEING | UNIT_FLAG_SILENCED))
|
if (unitflag & (UNIT_FLAG_STUNNED | UNIT_FLAG_FLEEING | UNIT_FLAG_SILENCED))
|
||||||
|
|
@ -2800,7 +2800,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
case SPELLFAMILY_DEATHKNIGHT:
|
case SPELLFAMILY_DEATHKNIGHT:
|
||||||
{
|
{
|
||||||
// Shadow of Death
|
// Shadow of Death
|
||||||
if (spellProto->SpellIconID == 1958)
|
if (spellProto->GetSpellIconID() == 1958)
|
||||||
{
|
{
|
||||||
// TODO: absorb only while transform
|
// TODO: absorb only while transform
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -2964,7 +2964,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
|
|
||||||
// Incanter's Absorption
|
// Incanter's Absorption
|
||||||
if (itr_spellProto->GetSpellFamilyName() == SPELLFAMILY_GENERIC &&
|
if (itr_spellProto->GetSpellFamilyName() == SPELLFAMILY_GENERIC &&
|
||||||
itr_spellProto->SpellIconID == 2941)
|
itr_spellProto->GetSpellIconID() == 2941)
|
||||||
{
|
{
|
||||||
int32 amount = int32(incanterAbsorption * (*itr)->GetModifier()->m_amount / 100);
|
int32 amount = int32(incanterAbsorption * (*itr)->GetModifier()->m_amount / 100);
|
||||||
|
|
||||||
|
|
@ -3019,7 +3019,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
case SPELLFAMILY_ROGUE:
|
case SPELLFAMILY_ROGUE:
|
||||||
{
|
{
|
||||||
// Cheat Death
|
// Cheat Death
|
||||||
if (preventDeathSpell->SpellIconID == 2109)
|
if (preventDeathSpell->GetSpellIconID() == 2109)
|
||||||
{
|
{
|
||||||
CastSpell(this, 31231, true);
|
CastSpell(this, 31231, true);
|
||||||
((Player*)this)->AddSpellCooldown(31231, 0, time(NULL) + 60);
|
((Player*)this)->AddSpellCooldown(31231, 0, time(NULL) + 60);
|
||||||
|
|
@ -3033,7 +3033,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
|
||||||
case SPELLFAMILY_PRIEST:
|
case SPELLFAMILY_PRIEST:
|
||||||
{
|
{
|
||||||
// Guardian Spirit
|
// Guardian Spirit
|
||||||
if (preventDeathSpell->SpellIconID == 2873)
|
if (preventDeathSpell->GetSpellIconID() == 2873)
|
||||||
{
|
{
|
||||||
int32 healAmount = GetMaxHealth() * preventDeathAmount / 100;
|
int32 healAmount = GetMaxHealth() * preventDeathAmount / 100;
|
||||||
CastCustomSpell(this, 48153, &healAmount, NULL, NULL, true);
|
CastCustomSpell(this, 48153, &healAmount, NULL, NULL, true);
|
||||||
|
|
@ -5282,10 +5282,11 @@ void Unit::RemoveAuraHolderFromStack(uint32 spellId, uint32 stackAmount, ObjectG
|
||||||
|
|
||||||
void Unit::RemoveAurasDueToSpell(uint32 spellId, SpellAuraHolder* except, AuraRemoveMode mode)
|
void Unit::RemoveAurasDueToSpell(uint32 spellId, SpellAuraHolder* except, AuraRemoveMode mode)
|
||||||
{
|
{
|
||||||
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellId);
|
// FIXME
|
||||||
if (spellEntry && spellEntry->SpellDifficultyId && IsInWorld() && GetMap()->IsDungeon())
|
//SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellId);
|
||||||
if (SpellEntry const* spellDiffEntry = GetSpellEntryByDifficulty(spellEntry->SpellDifficultyId, GetMap()->GetDifficulty(), GetMap()->IsRaid()))
|
//if (spellEntry && spellEntry->SpellDifficultyId && IsInWorld() && GetMap()->IsDungeon())
|
||||||
spellId = spellDiffEntry->Id;
|
// if (SpellEntry const* spellDiffEntry = GetSpellEntryByDifficulty(spellEntry->SpellDifficultyId, GetMap()->GetDifficulty(), GetMap()->IsRaid()))
|
||||||
|
// spellId = spellDiffEntry->Id;
|
||||||
|
|
||||||
SpellAuraHolderBounds bounds = GetSpellAuraHolderBounds(spellId);
|
SpellAuraHolderBounds bounds = GetSpellAuraHolderBounds(spellId);
|
||||||
for (SpellAuraHolderMap::iterator iter = bounds.first; iter != bounds.second;)
|
for (SpellAuraHolderMap::iterator iter = bounds.first; iter != bounds.second;)
|
||||||
|
|
@ -5763,10 +5764,11 @@ bool Unit::HasAura(uint32 spellId, SpellEffectIndex effIndex) const
|
||||||
|
|
||||||
bool Unit::HasAuraOfDifficulty(uint32 spellId) const
|
bool Unit::HasAuraOfDifficulty(uint32 spellId) const
|
||||||
{
|
{
|
||||||
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellId);
|
// FIXME
|
||||||
if (spellEntry && spellEntry->SpellDifficultyId && IsInWorld() && GetMap()->IsDungeon())
|
//SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellId);
|
||||||
if (SpellEntry const* spellDiffEntry = GetSpellEntryByDifficulty(spellEntry->SpellDifficultyId, GetMap()->GetDifficulty(), GetMap()->IsRaid()))
|
//if (spellEntry && spellEntry->SpellDifficultyId && IsInWorld() && GetMap()->IsDungeon())
|
||||||
spellId = spellDiffEntry->Id;
|
// if (SpellEntry const* spellDiffEntry = GetSpellEntryByDifficulty(spellEntry->SpellDifficultyId, GetMap()->GetDifficulty(), GetMap()->IsRaid()))
|
||||||
|
// spellId = spellDiffEntry->Id;
|
||||||
|
|
||||||
return m_spellAuraHolders.find(spellId) != m_spellAuraHolders.end();
|
return m_spellAuraHolders.find(spellId) != m_spellAuraHolders.end();
|
||||||
}
|
}
|
||||||
|
|
@ -7439,7 +7441,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
||||||
case 7277:
|
case 7277:
|
||||||
{
|
{
|
||||||
// Merciless Combat
|
// Merciless Combat
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 2656)
|
if ((*i)->GetSpellProto()->GetSpellIconID() == 2656)
|
||||||
{
|
{
|
||||||
if (pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT))
|
if (pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT))
|
||||||
DoneTotalMod *= (100.0f + (*i)->GetModifier()->m_amount) / 100.0f;
|
DoneTotalMod *= (100.0f + (*i)->GetModifier()->m_amount) / 100.0f;
|
||||||
|
|
@ -7488,7 +7490,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
||||||
case SPELLFAMILY_MAGE:
|
case SPELLFAMILY_MAGE:
|
||||||
{
|
{
|
||||||
// Ice Lance
|
// Ice Lance
|
||||||
if (spellProto->SpellIconID == 186)
|
if (spellProto->GetSpellIconID() == 186)
|
||||||
{
|
{
|
||||||
if (pVictim->IsFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
if (pVictim->IsFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
||||||
{
|
{
|
||||||
|
|
@ -7511,7 +7513,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
||||||
Unit::AuraList const& ttw = GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& ttw = GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (Unit::AuraList::const_iterator i = ttw.begin(); i != ttw.end(); ++i)
|
for (Unit::AuraList::const_iterator i = ttw.begin(); i != ttw.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 3263)
|
if ((*i)->GetSpellProto()->GetSpellIconID() == 3263)
|
||||||
{
|
{
|
||||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
DoneTotalMod *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||||
break;
|
break;
|
||||||
|
|
@ -7566,7 +7568,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
||||||
Unit::AuraList const& improvedSwarm = GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& improvedSwarm = GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (Unit::AuraList::const_iterator iter = improvedSwarm.begin(); iter != improvedSwarm.end(); ++iter)
|
for (Unit::AuraList::const_iterator iter = improvedSwarm.begin(); iter != improvedSwarm.end(); ++iter)
|
||||||
{
|
{
|
||||||
if ((*iter)->GetSpellProto()->SpellIconID == 1771)
|
if ((*iter)->GetSpellProto()->GetSpellIconID() == 1771)
|
||||||
{
|
{
|
||||||
DoneTotalMod *= ((*iter)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
DoneTotalMod *= ((*iter)->GetModifier()->m_amount + 100.0f) / 100.0f;
|
||||||
break;
|
break;
|
||||||
|
|
@ -7648,7 +7650,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit* pCaster, SpellEntry const* spellProto,
|
||||||
return pdamage;
|
return pdamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 schoolMask = spellProto->SchoolMask;
|
uint32 schoolMask = spellProto->GetSchoolMask();
|
||||||
|
|
||||||
// Taken total percent damage auras
|
// Taken total percent damage auras
|
||||||
float TakenTotalMod = 1.0f;
|
float TakenTotalMod = 1.0f;
|
||||||
|
|
@ -7883,7 +7885,7 @@ bool Unit::IsSpellCrit(Unit* pVictim, SpellEntry const* spellProto, SpellSchoolM
|
||||||
case SPELLFAMILY_MAGE:
|
case SPELLFAMILY_MAGE:
|
||||||
{
|
{
|
||||||
// Fire Blast
|
// Fire Blast
|
||||||
if (spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000002)) && spellProto->SpellIconID == 12)
|
if (spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000002)) && spellProto->GetSpellIconID() == 12)
|
||||||
{
|
{
|
||||||
// Glyph of Fire Blast
|
// Glyph of Fire Blast
|
||||||
if (pVictim->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED) || pVictim->IsInRoots())
|
if (pVictim->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED) || pVictim->IsInRoots())
|
||||||
|
|
@ -7903,7 +7905,7 @@ bool Unit::IsSpellCrit(Unit* pVictim, SpellEntry const* spellProto, SpellSchoolM
|
||||||
{
|
{
|
||||||
// Improved Flash Heal
|
// Improved Flash Heal
|
||||||
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_PRIEST &&
|
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_PRIEST &&
|
||||||
(*i)->GetSpellProto()->SpellIconID == 2542)
|
(*i)->GetSpellProto()->GetSpellIconID() == 2542)
|
||||||
{
|
{
|
||||||
crit_chance += (*i)->GetModifier()->m_amount;
|
crit_chance += (*i)->GetModifier()->m_amount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -7921,7 +7923,7 @@ bool Unit::IsSpellCrit(Unit* pVictim, SpellEntry const* spellProto, SpellSchoolM
|
||||||
Unit::AuraList const& improvedSwarm = GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& improvedSwarm = GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (Unit::AuraList::const_iterator iter = improvedSwarm.begin(); iter != improvedSwarm.end(); ++iter)
|
for (Unit::AuraList::const_iterator iter = improvedSwarm.begin(); iter != improvedSwarm.end(); ++iter)
|
||||||
{
|
{
|
||||||
if ((*iter)->GetSpellProto()->SpellIconID == 1771)
|
if ((*iter)->GetSpellProto()->GetSpellIconID() == 1771)
|
||||||
{
|
{
|
||||||
crit_chance += (*iter)->GetModifier()->m_amount;
|
crit_chance += (*iter)->GetModifier()->m_amount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -8453,7 +8455,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
|
||||||
bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || IsSpellHaveEffect(spellProto, SPELL_EFFECT_SCHOOL_DAMAGE)));
|
bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || IsSpellHaveEffect(spellProto, SPELL_EFFECT_SCHOOL_DAMAGE)));
|
||||||
Item* pWeapon = GetTypeId() == TYPEID_PLAYER ? ((Player*)this)->GetWeaponForAttack(attType, true, false) : NULL;
|
Item* pWeapon = GetTypeId() == TYPEID_PLAYER ? ((Player*)this)->GetWeaponForAttack(attType, true, false) : NULL;
|
||||||
uint32 creatureTypeMask = pVictim->GetCreatureTypeMask();
|
uint32 creatureTypeMask = pVictim->GetCreatureTypeMask();
|
||||||
uint32 schoolMask = spellProto ? spellProto->SchoolMask : uint32(GetMeleeDamageSchoolMask());
|
uint32 schoolMask = spellProto ? spellProto->GetSchoolMask() : uint32(GetMeleeDamageSchoolMask());
|
||||||
|
|
||||||
// FLAT damage bonus auras
|
// FLAT damage bonus auras
|
||||||
// =======================
|
// =======================
|
||||||
|
|
@ -8557,7 +8559,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
|
||||||
case 7277:
|
case 7277:
|
||||||
{
|
{
|
||||||
// Merciless Combat
|
// Merciless Combat
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 2656)
|
if ((*i)->GetSpellProto()->GetSpellIconID() == 2656)
|
||||||
{
|
{
|
||||||
if (pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT))
|
if (pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT))
|
||||||
DonePercent *= (100.0f + (*i)->GetModifier()->m_amount) / 100.0f;
|
DonePercent *= (100.0f + (*i)->GetModifier()->m_amount) / 100.0f;
|
||||||
|
|
@ -8726,7 +8728,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* pCaster, uint32 pdamage, WeaponAttackTy
|
||||||
|
|
||||||
// differentiate for weapon damage based spells
|
// differentiate for weapon damage based spells
|
||||||
bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || IsSpellHaveEffect(spellProto, SPELL_EFFECT_SCHOOL_DAMAGE)));
|
bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || IsSpellHaveEffect(spellProto, SPELL_EFFECT_SCHOOL_DAMAGE)));
|
||||||
uint32 schoolMask = spellProto ? spellProto->SchoolMask : uint32(GetMeleeDamageSchoolMask());
|
uint32 schoolMask = spellProto ? spellProto->GetSchoolMask() : uint32(GetMeleeDamageSchoolMask());
|
||||||
uint32 mechanicMask = spellProto ? GetAllSpellMechanicMask(spellProto) : 0;
|
uint32 mechanicMask = spellProto ? GetAllSpellMechanicMask(spellProto) : 0;
|
||||||
|
|
||||||
// Shred also have bonus as MECHANIC_BLEED damages
|
// Shred also have bonus as MECHANIC_BLEED damages
|
||||||
|
|
@ -10525,7 +10527,7 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtScalingEntry && spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellLevel &&
|
if (!gtScalingEntry && spellProto->HasAttribute(SPELL_ATTR_LEVEL_DAMAGE_CALCULATION) && spellLevel &&
|
||||||
spellEffect->Effect != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE &&
|
spellEffect->Effect != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE &&
|
||||||
spellEffect->Effect != SPELL_EFFECT_KNOCK_BACK &&
|
spellEffect->Effect != SPELL_EFFECT_KNOCK_BACK &&
|
||||||
(spellEffect->Effect != SPELL_EFFECT_APPLY_AURA || spellEffect->EffectApplyAuraName != SPELL_AURA_MOD_DECREASE_SPEED))
|
(spellEffect->Effect != SPELL_EFFECT_APPLY_AURA || spellEffect->EffectApplyAuraName != SPELL_AURA_MOD_DECREASE_SPEED))
|
||||||
|
|
@ -10580,7 +10582,7 @@ int32 Unit::CalculateAuraDuration(SpellEntry const* spellProto, uint32 effectMas
|
||||||
{
|
{
|
||||||
case SPELLFAMILY_DRUID:
|
case SPELLFAMILY_DRUID:
|
||||||
// Thorns
|
// Thorns
|
||||||
if (spellProto->SpellIconID == 53 && spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000100)))
|
if (spellProto->GetSpellIconID() == 53 && spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000100)))
|
||||||
{
|
{
|
||||||
// Glyph of Thorns
|
// Glyph of Thorns
|
||||||
if (Aura* aur = GetAura(57862, EFFECT_INDEX_0))
|
if (Aura* aur = GetAura(57862, EFFECT_INDEX_0))
|
||||||
|
|
@ -10589,14 +10591,14 @@ int32 Unit::CalculateAuraDuration(SpellEntry const* spellProto, uint32 effectMas
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_PALADIN:
|
case SPELLFAMILY_PALADIN:
|
||||||
// Blessing of Might
|
// Blessing of Might
|
||||||
if (spellProto->SpellIconID == 298 && spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000002)))
|
if (spellProto->GetSpellIconID() == 298 && spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000002)))
|
||||||
{
|
{
|
||||||
// Glyph of Blessing of Might
|
// Glyph of Blessing of Might
|
||||||
if (Aura* aur = GetAura(57958, EFFECT_INDEX_0))
|
if (Aura* aur = GetAura(57958, EFFECT_INDEX_0))
|
||||||
duration += aur->GetModifier()->m_amount * MINUTE * IN_MILLISECONDS;
|
duration += aur->GetModifier()->m_amount * MINUTE * IN_MILLISECONDS;
|
||||||
}
|
}
|
||||||
// Blessing of Wisdom
|
// Blessing of Wisdom
|
||||||
else if (spellProto->SpellIconID == 306 && spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000010000)))
|
else if (spellProto->GetSpellIconID() == 306 && spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000010000)))
|
||||||
{
|
{
|
||||||
// Glyph of Blessing of Wisdom
|
// Glyph of Blessing of Wisdom
|
||||||
if (Aura* aur = GetAura(57979, EFFECT_INDEX_0))
|
if (Aura* aur = GetAura(57979, EFFECT_INDEX_0))
|
||||||
|
|
|
||||||
|
|
@ -165,12 +165,12 @@ void VehicleInfo::Initialize()
|
||||||
if (vehicleFlags & VEHICLE_FLAG_FIXED_POSITION)
|
if (vehicleFlags & VEHICLE_FLAG_FIXED_POSITION)
|
||||||
pVehicle->SetRoot(true);
|
pVehicle->SetRoot(true);
|
||||||
|
|
||||||
// Initialize power type based on DBC values (creatures only)
|
// // Initialize power type based on DBC values (creatures only)
|
||||||
if (pVehicle->GetTypeId() == TYPEID_UNIT)
|
// if (pVehicle->GetTypeId() == TYPEID_UNIT)
|
||||||
{
|
// {
|
||||||
if (PowerDisplayEntry const* powerEntry = sPowerDisplayStore.LookupEntry(GetVehicleEntry()->m_powerDisplayID))
|
// if (PowerDisplayEntry const* powerEntry = sPowerDisplayStore.LookupEntry(GetVehicleEntry()->m_powerDisplayID))
|
||||||
pVehicle->SetPowerType(Powers(powerEntry->power));
|
// pVehicle->SetPowerType(Powers(powerEntry->power));
|
||||||
}
|
// }
|
||||||
|
|
||||||
m_isInitialized = true;
|
m_isInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
DB2Storage <ItemEntry> sItemStore(Itemfmt);
|
DB2Storage <ItemEntry> sItemStore(Itemfmt);
|
||||||
DB2Storage <ItemCurrencyCostEntry> sItemCurrencyCostStore(ItemCurrencyCostfmt);
|
DB2Storage <ItemCurrencyCostEntry> sItemCurrencyCostStore(ItemCurrencyCostfmt);
|
||||||
DB2Storage <ItemExtendedCostEntry> sItemExtendedCostStore(ItemExtendedCostEntryfmt);
|
DB2Storage <ItemExtendedCostEntry> sItemExtendedCostStore(ItemExtendedCostEntryfmt);
|
||||||
|
DB2Storage <SpellReagentsEntry> sSpellReagentsStore(SpellReagentsEntryfmt);
|
||||||
|
|
||||||
typedef std::list<std::string> StoreProblemList1;
|
typedef std::list<std::string> StoreProblemList1;
|
||||||
uint32 DB2FileCount = 0;
|
uint32 DB2FileCount = 0;
|
||||||
|
|
@ -112,6 +113,7 @@ void LoadDB2Stores(const std::string& dataPath)
|
||||||
LoadDB2(availableDb2Locales,bad_db2_files,sItemStore, db2Path,"Item.db2");
|
LoadDB2(availableDb2Locales,bad_db2_files,sItemStore, db2Path,"Item.db2");
|
||||||
LoadDB2(availableDb2Locales,bad_db2_files,sItemCurrencyCostStore, db2Path,"ItemCurrencyCost.db2");
|
LoadDB2(availableDb2Locales,bad_db2_files,sItemCurrencyCostStore, db2Path,"ItemCurrencyCost.db2");
|
||||||
LoadDB2(availableDb2Locales,bad_db2_files,sItemExtendedCostStore, db2Path,"ItemExtendedCost.db2");
|
LoadDB2(availableDb2Locales,bad_db2_files,sItemExtendedCostStore, db2Path,"ItemExtendedCost.db2");
|
||||||
|
LoadDB2(availableDb2Locales,bad_db2_files,sSpellReagentsStore, db2Path,"SpellReagents.db2");
|
||||||
|
|
||||||
// error checks
|
// error checks
|
||||||
if (bad_db2_files.size() >= DB2FileCount)
|
if (bad_db2_files.size() >= DB2FileCount)
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
extern DB2Storage <ItemEntry> sItemStore;
|
extern DB2Storage <ItemEntry> sItemStore;
|
||||||
extern DB2Storage <ItemCurrencyCostEntry> sItemCurrencyCostStore;
|
extern DB2Storage <ItemCurrencyCostEntry> sItemCurrencyCostStore;
|
||||||
extern DB2Storage <ItemExtendedCostEntry> sItemExtendedCostStore;
|
extern DB2Storage <ItemExtendedCostEntry> sItemExtendedCostStore;
|
||||||
|
extern DB2Storage <SpellReagentsEntry> sSpellReagentsStore;
|
||||||
|
|
||||||
void LoadDB2Stores(const std::string& dataPath);
|
void LoadDB2Stores(const std::string& dataPath);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ struct ItemEntry
|
||||||
uint32 ID; // 0
|
uint32 ID; // 0
|
||||||
uint32 Class; // 1
|
uint32 Class; // 1
|
||||||
uint32 SubClass; // 2
|
uint32 SubClass; // 2
|
||||||
int32 Unk0; // 3
|
int32 SoundOverrideSubclass; // 3
|
||||||
int32 Material; // 4
|
int32 Material; // 4
|
||||||
uint32 DisplayId; // 5
|
uint32 DisplayId; // 5
|
||||||
uint32 InventoryType; // 6
|
uint32 InventoryType; // 6
|
||||||
|
|
@ -93,4 +93,16 @@ struct ItemExtendedCostEntry
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define MAX_SPELL_REAGENTS 8
|
||||||
|
|
||||||
|
// SpellReagents.dbc
|
||||||
|
struct SpellReagentsEntry
|
||||||
|
{
|
||||||
|
//uint32 Id; // 0 m_ID
|
||||||
|
int32 Reagent[MAX_SPELL_REAGENTS]; // 1-8 m_reagent
|
||||||
|
uint32 ReagentCount[MAX_SPELL_REAGENTS]; // 9-16 m_reagentCount
|
||||||
|
// 17 5.x
|
||||||
|
// 18 5.x
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -28,5 +28,6 @@
|
||||||
const char Itemfmt[]="niiiiiii";
|
const char Itemfmt[]="niiiiiii";
|
||||||
const char ItemCurrencyCostfmt[]="di";
|
const char ItemCurrencyCostfmt[]="di";
|
||||||
const char ItemExtendedCostEntryfmt[]="nxxiiiiiiiiiiiixiiiiiiiiiixxixx";
|
const char ItemExtendedCostEntryfmt[]="nxxiiiiiiiiiiiixiiiiiiiiiixxixx";
|
||||||
|
const char SpellReagentsEntryfmt[]="diiiiiiiiiiiiiiiixx";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,8 @@ enum AchievementFlags
|
||||||
ACHIEVEMENT_FLAG_REALM_FIRST_KILL = 0x00000200, //
|
ACHIEVEMENT_FLAG_REALM_FIRST_KILL = 0x00000200, //
|
||||||
ACHIEVEMENT_FLAG_UNK3 = 0x00000400, // ACHIEVEMENT_FLAG_HIDE_NAME_IN_TIE
|
ACHIEVEMENT_FLAG_UNK3 = 0x00000400, // ACHIEVEMENT_FLAG_HIDE_NAME_IN_TIE
|
||||||
ACHIEVEMENT_FLAG_REALM_FIRST_GUILD = 0x00000800, // first guild on realm done something
|
ACHIEVEMENT_FLAG_REALM_FIRST_GUILD = 0x00000800, // first guild on realm done something
|
||||||
ACHIEVEMENT_FLAG_UNK4 = 0x00001000, // as guild group?
|
ACHIEVEMENT_FLAG_SHOW_IN_GUILD_NEWS = 0x00001000, // Shows in guild news
|
||||||
ACHIEVEMENT_FLAG_UNK5 = 0x00002000, // as guild group?
|
ACHIEVEMENT_FLAG_SHOW_IN_GUILD_HEADER = 0x00002000, // Shows in guild news header
|
||||||
ACHIEVEMENT_FLAG_GUILD = 0x00004000, //
|
ACHIEVEMENT_FLAG_GUILD = 0x00004000, //
|
||||||
ACHIEVEMENT_FLAG_SHOW_GUILD_MEMBERS = 0x00008000, //
|
ACHIEVEMENT_FLAG_SHOW_GUILD_MEMBERS = 0x00008000, //
|
||||||
ACHIEVEMENT_FLAG_SHOW_CRITERIA_MEMBERS = 0x00010000, //
|
ACHIEVEMENT_FLAG_SHOW_CRITERIA_MEMBERS = 0x00010000, //
|
||||||
|
|
@ -109,12 +109,12 @@ enum AchievementCriteriaTypes
|
||||||
{
|
{
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0,
|
ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0,
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1,
|
ACHIEVEMENT_CRITERIA_TYPE_WIN_BG = 1,
|
||||||
|
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ARCHAEOLOGY_PROJECTS = 3, // struct { uint32 itemCount; }
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5,
|
ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL = 5,
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7,
|
ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL = 7,
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8,
|
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_ACHIEVEMENT = 8,
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT = 9,
|
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT = 9,
|
||||||
// you have to complete a daily quest x times in a row
|
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY = 10, // you have to complete a daily quest x times in a row
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY = 10,
|
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11,
|
ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE = 11,
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_CURRENCY_EARNED = 12,
|
ACHIEVEMENT_CRITERIA_TYPE_CURRENCY_EARNED = 12,
|
||||||
ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13,
|
ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE = 13,
|
||||||
|
|
@ -566,10 +566,36 @@ enum SpellEffectIndex
|
||||||
{
|
{
|
||||||
EFFECT_INDEX_0 = 0, ///< The first spell effect
|
EFFECT_INDEX_0 = 0, ///< The first spell effect
|
||||||
EFFECT_INDEX_1 = 1, ///< The second spell effect
|
EFFECT_INDEX_1 = 1, ///< The second spell effect
|
||||||
EFFECT_INDEX_2 = 2 ///< The third spell effect
|
EFFECT_INDEX_2 = 2,
|
||||||
|
EFFECT_INDEX_3 = 3,
|
||||||
|
EFFECT_INDEX_4 = 4,
|
||||||
|
EFFECT_INDEX_5 = 5,
|
||||||
|
EFFECT_INDEX_6 = 6,
|
||||||
|
EFFECT_INDEX_7 = 7,
|
||||||
|
EFFECT_INDEX_8 = 8,
|
||||||
|
EFFECT_INDEX_9 = 9,
|
||||||
|
EFFECT_INDEX_10 = 10,
|
||||||
|
EFFECT_INDEX_11 = 11,
|
||||||
|
EFFECT_INDEX_12 = 12,
|
||||||
|
EFFECT_INDEX_13 = 13,
|
||||||
|
EFFECT_INDEX_14 = 14,
|
||||||
|
EFFECT_INDEX_15 = 15,
|
||||||
|
EFFECT_INDEX_16 = 16,
|
||||||
|
EFFECT_INDEX_17 = 17,
|
||||||
|
EFFECT_INDEX_18 = 18,
|
||||||
|
EFFECT_INDEX_19 = 19,
|
||||||
|
EFFECT_INDEX_20 = 20,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_EFFECT_INDEX 3
|
#define EFFECT_MASK_ALL \
|
||||||
|
((1 << EFFECT_INDEX_0) | (1 << EFFECT_INDEX_1) | (1 << EFFECT_INDEX_2) | \
|
||||||
|
(1 << EFFECT_INDEX_3) | (1 << EFFECT_INDEX_4) | (1 << EFFECT_INDEX_5) | \
|
||||||
|
(1 << EFFECT_INDEX_6) | (1 << EFFECT_INDEX_7) | (1 << EFFECT_INDEX_8) | \
|
||||||
|
(1 << EFFECT_INDEX_9) | (1 << EFFECT_INDEX_10) | (1 << EFFECT_INDEX_11) | \
|
||||||
|
(1 << EFFECT_INDEX_12) | (1 << EFFECT_INDEX_13) | (1 << EFFECT_INDEX_14) | \
|
||||||
|
(1 << EFFECT_INDEX_15) | (1 << EFFECT_INDEX_16) | (1 << EFFECT_INDEX_17) | \
|
||||||
|
(1 << EFFECT_INDEX_18) | (1 << EFFECT_INDEX_19) | (1 << EFFECT_INDEX_20))
|
||||||
|
#define MAX_EFFECT_INDEX 21
|
||||||
|
|
||||||
enum SpellFamily
|
enum SpellFamily
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
#include "ObjectGuid.h"
|
#include "ObjectGuid.h"
|
||||||
|
|
||||||
#include "DBCfmt.h"
|
#include "DBCfmt.h"
|
||||||
|
#include "DB2fmt.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
|
@ -86,7 +87,7 @@ DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore(CinematicSequences
|
||||||
DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore(CreatureDisplayInfofmt);
|
DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore(CreatureDisplayInfofmt);
|
||||||
DBCStorage <CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore(CreatureDisplayInfoExtrafmt);
|
DBCStorage <CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore(CreatureDisplayInfoExtrafmt);
|
||||||
DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt);
|
DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt);
|
||||||
DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore(CreatureModelDatafmt);
|
//DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore(CreatureModelDatafmt);
|
||||||
DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore(CreatureSpellDatafmt); // sCreatureModelDataStore
|
DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore(CreatureSpellDatafmt); // sCreatureModelDataStore
|
||||||
DBCStorage <CreatureTypeEntry> sCreatureTypeStore(CreatureTypefmt);
|
DBCStorage <CreatureTypeEntry> sCreatureTypeStore(CreatureTypefmt);
|
||||||
DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore(CurrencyTypesfmt);
|
DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore(CurrencyTypesfmt);
|
||||||
|
|
@ -142,9 +143,9 @@ DBCStorage <ItemDamageEntry> sItemDamageWandStore(ItemDamagefmt);
|
||||||
DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore(ItemLimitCategoryEntryfmt);
|
DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore(ItemLimitCategoryEntryfmt);
|
||||||
DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomPropertiesfmt);
|
DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomPropertiesfmt);
|
||||||
DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt);
|
DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt);
|
||||||
DBCStorage <ItemReforgeEntry> sItemReforgeStore(ItemReforgefmt);
|
//DBCStorage <ItemReforgeEntry> sItemReforgeStore(ItemReforgefmt);
|
||||||
DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt);
|
DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt);
|
||||||
DBCStorage <LfgDungeonsEntry> sLfgDungeonsStore(LfgDungeonsEntryfmt);
|
//DBCStorage <LfgDungeonsEntry> sLfgDungeonsStore(LfgDungeonsEntryfmt);
|
||||||
DBCStorage <LiquidTypeEntry> sLiquidTypeStore(LiquidTypefmt);
|
DBCStorage <LiquidTypeEntry> sLiquidTypeStore(LiquidTypefmt);
|
||||||
DBCStorage <LockEntry> sLockStore(LockEntryfmt);
|
DBCStorage <LockEntry> sLockStore(LockEntryfmt);
|
||||||
|
|
||||||
|
|
@ -166,7 +167,7 @@ DBCStorage <QuestSortEntry> sQuestSortStore(QuestSortEntryfmt);
|
||||||
DBCStorage <QuestXPLevel> sQuestXPLevelStore(QuestXPLevelfmt);
|
DBCStorage <QuestXPLevel> sQuestXPLevelStore(QuestXPLevelfmt);
|
||||||
|
|
||||||
DBCStorage <PhaseEntry> sPhaseStore(Phasefmt);
|
DBCStorage <PhaseEntry> sPhaseStore(Phasefmt);
|
||||||
DBCStorage <PowerDisplayEntry> sPowerDisplayStore(PowerDisplayfmt);
|
//DBCStorage <PowerDisplayEntry> sPowerDisplayStore(PowerDisplayfmt);
|
||||||
DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore(PvPDifficultyfmt);
|
DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore(PvPDifficultyfmt);
|
||||||
|
|
||||||
DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore(RandomPropertiesPointsfmt);
|
DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore(RandomPropertiesPointsfmt);
|
||||||
|
|
@ -196,7 +197,6 @@ DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore(SpellEquippedItems
|
||||||
DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore(SpellInterruptsEntryfmt);
|
DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore(SpellInterruptsEntryfmt);
|
||||||
DBCStorage <SpellLevelsEntry> sSpellLevelsStore(SpellLevelsEntryfmt);
|
DBCStorage <SpellLevelsEntry> sSpellLevelsStore(SpellLevelsEntryfmt);
|
||||||
DBCStorage <SpellPowerEntry> sSpellPowerStore(SpellPowerEntryfmt);
|
DBCStorage <SpellPowerEntry> sSpellPowerStore(SpellPowerEntryfmt);
|
||||||
DBCStorage <SpellReagentsEntry> sSpellReagentsStore(SpellReagentsEntryfmt);
|
|
||||||
DBCStorage <SpellScalingEntry> sSpellScalingStore(SpellScalingEntryfmt);
|
DBCStorage <SpellScalingEntry> sSpellScalingStore(SpellScalingEntryfmt);
|
||||||
DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore(SpellShapeshiftEntryfmt);
|
DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore(SpellShapeshiftEntryfmt);
|
||||||
DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore(SpellTargetRestrictionsEntryfmt);
|
DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore(SpellTargetRestrictionsEntryfmt);
|
||||||
|
|
@ -208,6 +208,7 @@ DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore(SpellCastTimefmt);
|
||||||
DBCStorage <SpellDifficultyEntry> sSpellDifficultyStore(SpellDifficultyfmt);
|
DBCStorage <SpellDifficultyEntry> sSpellDifficultyStore(SpellDifficultyfmt);
|
||||||
DBCStorage <SpellDurationEntry> sSpellDurationStore(SpellDurationfmt);
|
DBCStorage <SpellDurationEntry> sSpellDurationStore(SpellDurationfmt);
|
||||||
DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore(SpellFocusObjectfmt);
|
DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore(SpellFocusObjectfmt);
|
||||||
|
DBCStorage <SpellMiscEntry> sSpellMiscStore(SpellMiscfmt);
|
||||||
DBCStorage <SpellRadiusEntry> sSpellRadiusStore(SpellRadiusfmt);
|
DBCStorage <SpellRadiusEntry> sSpellRadiusStore(SpellRadiusfmt);
|
||||||
DBCStorage <SpellRangeEntry> sSpellRangeStore(SpellRangefmt);
|
DBCStorage <SpellRangeEntry> sSpellRangeStore(SpellRangefmt);
|
||||||
DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore(SpellRuneCostfmt);
|
DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore(SpellRuneCostfmt);
|
||||||
|
|
@ -485,16 +486,16 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sAchievementCriteriaStore, dbcPath, "Achievement_Criteria.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sAchievementCriteriaStore, dbcPath, "Achievement_Criteria.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sAreaTriggerStore, dbcPath, "AreaTrigger.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sAreaTriggerStore, dbcPath, "AreaTrigger.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sAreaGroupStore, dbcPath, "AreaGroup.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sAreaGroupStore, dbcPath, "AreaGroup.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sArmorLocationStore, dbcPath,"ArmorLocation.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sArmorLocationStore, dbcPath,"ArmorLocation.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sAuctionHouseStore, dbcPath, "AuctionHouse.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sAuctionHouseStore, dbcPath, "AuctionHouse.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sBankBagSlotPricesStore, dbcPath, "BankBagSlotPrices.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sBankBagSlotPricesStore, dbcPath, "BankBagSlotPrices.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sBattlemasterListStore, dbcPath, "BattlemasterList.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sBattlemasterListStore, dbcPath,"BattleMasterList.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sBarberShopStyleStore, dbcPath, "BarberShopStyle.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sBarberShopStyleStore, dbcPath, "BarberShopStyle.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sCharStartOutfitStore, dbcPath, "CharStartOutfit.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sCharStartOutfitStore, dbcPath, "CharStartOutfit.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sCharTitlesStore, dbcPath, "CharTitles.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sCharTitlesStore, dbcPath, "CharTitles.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sChatChannelsStore, dbcPath, "ChatChannels.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sChatChannelsStore, dbcPath, "ChatChannels.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sChrClassesStore, dbcPath, "ChrClasses.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sChrClassesStore, dbcPath, "ChrClasses.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrPowerTypesStore, dbcPath,"ChrClassesXPowerTypes.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrPowerTypesStore, dbcPath,"ChrClassesXPowerTypes.dbc");
|
||||||
for (uint32 i = 0; i < MAX_CLASSES; ++i)
|
for (uint32 i = 0; i < MAX_CLASSES; ++i)
|
||||||
{
|
{
|
||||||
for (uint32 j = 0; j < MAX_POWERS; ++j)
|
for (uint32 j = 0; j < MAX_POWERS; ++j)
|
||||||
|
|
@ -533,7 +534,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureDisplayInfoStore, dbcPath,"CreatureDisplayInfo.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureDisplayInfoStore, dbcPath,"CreatureDisplayInfo.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureDisplayInfoExtraStore,dbcPath,"CreatureDisplayInfoExtra.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureDisplayInfoExtraStore,dbcPath,"CreatureDisplayInfoExtra.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureFamilyStore, dbcPath,"CreatureFamily.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureFamilyStore, dbcPath,"CreatureFamily.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureModelDataStore, dbcPath,"CreatureModelData.dbc");
|
// LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureModelDataStore, dbcPath,"CreatureModelData.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureSpellDataStore, dbcPath,"CreatureSpellData.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureSpellDataStore, dbcPath,"CreatureSpellData.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureTypeStore, dbcPath,"CreatureType.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureTypeStore, dbcPath,"CreatureType.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCurrencyTypesStore, dbcPath,"CurrencyTypes.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCurrencyTypesStore, dbcPath,"CurrencyTypes.dbc");
|
||||||
|
|
@ -554,93 +555,92 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sFactionTemplateStore, dbcPath, "FactionTemplate.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sFactionTemplateStore, dbcPath, "FactionTemplate.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGameObjectDisplayInfoStore, dbcPath, "GameObjectDisplayInfo.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGameObjectDisplayInfoStore, dbcPath, "GameObjectDisplayInfo.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGemPropertiesStore, dbcPath, "GemProperties.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGemPropertiesStore, dbcPath, "GemProperties.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGlyphPropertiesStore, dbcPath, "GlyphProperties.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGlyphPropertiesStore, dbcPath, "GlyphProperties.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGlyphSlotStore, dbcPath, "GlyphSlot.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGlyphSlotStore, dbcPath, "GlyphSlot.dbc");
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtBarberShopCostBaseStore, dbcPath, "gtBarberShopCostBase.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtBarberShopCostBaseStore, dbcPath, "gtBarberShopCostBase.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtCombatRatingsStore, dbcPath, "gtCombatRatings.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtCombatRatingsStore, dbcPath, "gtCombatRatings.dbc");
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtChanceToMeleeCritBaseStore, dbcPath, "gtChanceToMeleeCritBase.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtChanceToMeleeCritBaseStore, dbcPath, "gtChanceToMeleeCritBase.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtChanceToMeleeCritStore, dbcPath, "gtChanceToMeleeCrit.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtChanceToMeleeCritStore, dbcPath, "gtChanceToMeleeCrit.dbc");
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtChanceToSpellCritBaseStore, dbcPath, "gtChanceToSpellCritBase.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtChanceToSpellCritBaseStore, dbcPath, "gtChanceToSpellCritBase.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtChanceToSpellCritStore, dbcPath, "gtChanceToSpellCrit.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtChanceToSpellCritStore, dbcPath, "gtChanceToSpellCrit.dbc");
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtOCTClassCombatRatingScalarStore, dbcPath, "gtOCTClassCombatRatingScalar.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtOCTClassCombatRatingScalarStore, dbcPath, "gtOCTClassCombatRatingScalar.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTHpPerStaminaStore, dbcPath,"gtOCTHpPerStamina.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTHpPerStaminaStore, dbcPath,"gtOCTHpPerStamina.dbc");
|
||||||
// LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTRegenMPStore, dbcPath,"gtOCTRegenMP.dbc"); -- not used currently
|
// LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTRegenMPStore, dbcPath,"gtOCTRegenMP.dbc"); -- not used currently
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtRegenMPPerSptStore, dbcPath, "gtRegenMPPerSpt.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sGtRegenMPPerSptStore, dbcPath, "gtRegenMPPerSpt.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtSpellScalingStore, dbcPath,"gtSpellScaling.dbc"); // 15595
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtSpellScalingStore, dbcPath,"gtSpellScaling.dbc"); // 15595
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTBaseHPByClassStore, dbcPath,"gtOCTBaseHPByClass.dbc"); // 15595
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTBaseHPByClassStore, dbcPath,"gtOCTBaseHPByClass.dbc"); // 15595
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTBaseMPByClassStore, dbcPath,"gtOCTBaseMPByClass.dbc"); // 15595
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtOCTBaseMPByClassStore, dbcPath,"gtOCTBaseMPByClass.dbc"); // 15595
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sHolidaysStore, dbcPath, "Holidays.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sHolidaysStore, dbcPath, "Holidays.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemArmorQualityStore, dbcPath,"ItemArmorQuality.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemArmorQualityStore, dbcPath,"ItemArmorQuality.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemArmorShieldStore, dbcPath,"ItemArmorShield.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemArmorShieldStore, dbcPath,"ItemArmorShield.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemArmorTotalStore, dbcPath,"ItemArmorTotal.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemArmorTotalStore, dbcPath,"ItemArmorTotal.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemBagFamilyStore, dbcPath, "ItemBagFamily.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemBagFamilyStore, dbcPath, "ItemBagFamily.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemReforgeStore, dbcPath, "ItemReforge.dbc");
|
// LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemReforgeStore, dbcPath, "ItemReforge.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemClassStore, dbcPath, "ItemClass.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemClassStore, dbcPath, "ItemClass.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageAmmoStore, dbcPath,"ItemDamageAmmo.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageAmmoStore, dbcPath,"ItemDamageAmmo.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageOneHandStore, dbcPath,"ItemDamageOneHand.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageOneHandStore, dbcPath,"ItemDamageOneHand.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageOneHandCasterStore,dbcPath,"ItemDamageOneHandCaster.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageOneHandCasterStore, dbcPath,"ItemDamageOneHandCaster.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageRangedStore, dbcPath,"ItemDamageRanged.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageRangedStore, dbcPath,"ItemDamageRanged.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageThrownStore, dbcPath,"ItemDamageThrown.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageThrownStore, dbcPath,"ItemDamageThrown.dbc");
|
||||||
// LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDisplayInfoStore, dbcPath,"ItemDisplayInfo.dbc"); -- not used currently
|
// LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDisplayInfoStore, dbcPath,"ItemDisplayInfo.dbc"); -- not used currently
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageTwoHandStore, dbcPath,"ItemDamageTwoHand.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageTwoHandStore, dbcPath,"ItemDamageTwoHand.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageTwoHandCasterStore,dbcPath,"ItemDamageTwoHandCaster.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageTwoHandCasterStore, dbcPath,"ItemDamageTwoHandCaster.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageWandStore, dbcPath,"ItemDamageWand.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDamageWandStore, dbcPath,"ItemDamageWand.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemLimitCategoryStore, dbcPath, "ItemLimitCategory.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemLimitCategoryStore, dbcPath, "ItemLimitCategory.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemRandomPropertiesStore, dbcPath, "ItemRandomProperties.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemRandomPropertiesStore, dbcPath, "ItemRandomProperties.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemRandomSuffixStore, dbcPath, "ItemRandomSuffix.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemRandomSuffixStore, dbcPath, "ItemRandomSuffix.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemSetStore, dbcPath, "ItemSet.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sItemSetStore, dbcPath, "ItemSet.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sLfgDungeonsStore, dbcPath, "LFGDungeons.dbc");
|
// LoadDBC(availableDbcLocales, bar, bad_dbc_files, sLfgDungeonsStore, dbcPath, "LFGDungeons.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sLiquidTypeStore, dbcPath, "LiquidType.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sLiquidTypeStore, dbcPath, "LiquidType.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sLockStore, dbcPath, "Lock.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sLockStore, dbcPath, "Lock.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sMailTemplateStore, dbcPath, "MailTemplate.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sMailTemplateStore, dbcPath, "MailTemplate.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sMapStore, dbcPath, "Map.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sMapStore, dbcPath, "Map.dbc");
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sMapDifficultyStore, dbcPath, "MapDifficulty.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sMapDifficultyStore, dbcPath, "MapDifficulty.dbc");
|
||||||
// fill data
|
// fill data
|
||||||
for (uint32 i = 1; i < sMapDifficultyStore.GetNumRows(); ++i)
|
for (uint32 i = 1; i < sMapDifficultyStore.GetNumRows(); ++i)
|
||||||
if (MapDifficultyEntry const* entry = sMapDifficultyStore.LookupEntry(i))
|
if (MapDifficultyEntry const* entry = sMapDifficultyStore.LookupEntry(i))
|
||||||
sMapDifficultyMap[MAKE_PAIR32(entry->MapId, entry->Difficulty)] = entry;
|
sMapDifficultyMap[MAKE_PAIR32(entry->MapId, entry->Difficulty)] = entry;
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sMovieStore, dbcPath, "Movie.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sMovieStore, dbcPath, "Movie.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files, sMountCapabilityStore, dbcPath,"MountCapability.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files, sMountCapabilityStore, dbcPath,"MountCapability.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files, sMountTypeStore, dbcPath,"MountType.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files, sMountTypeStore, dbcPath,"MountType.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sNumTalentsAtLevelStore, dbcPath,"NumTalentsAtLevel.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sOverrideSpellDataStore, dbcPath, "OverrideSpellData.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sOverrideSpellDataStore, dbcPath, "OverrideSpellData.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sQuestFactionRewardStore, dbcPath, "QuestFactionReward.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sQuestFactionRewardStore, dbcPath, "QuestFactionReward.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sQuestSortStore, dbcPath, "QuestSort.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sQuestSortStore, dbcPath, "QuestSort.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sQuestXPLevelStore, dbcPath, "QuestXP.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sQuestXPLevelStore, dbcPath, "QuestXP.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sPhaseStore, dbcPath,"Phase.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sPhaseStore, dbcPath,"Phase.dbc");
|
// LoadDBC(availableDbcLocales,bar,bad_dbc_files,sPowerDisplayStore, dbcPath,"PowerDisplay.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sPowerDisplayStore, dbcPath,"PowerDisplay.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sPvPDifficultyStore, dbcPath, "PvpDifficulty.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sPvPDifficultyStore, dbcPath, "PvpDifficulty.dbc");
|
|
||||||
for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
|
for (uint32 i = 0; i < sPvPDifficultyStore.GetNumRows(); ++i)
|
||||||
if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
|
if (PvPDifficultyEntry const* entry = sPvPDifficultyStore.LookupEntry(i))
|
||||||
if (entry->bracketId > MAX_BATTLEGROUND_BRACKETS)
|
if (entry->bracketId > MAX_BATTLEGROUND_BRACKETS)
|
||||||
MANGOS_ASSERT(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
|
MANGOS_ASSERT(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sRandomPropertiesPointsStore, dbcPath, "RandPropPoints.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sRandomPropertiesPointsStore, dbcPath, "RandPropPoints.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sScalingStatDistributionStore, dbcPath, "ScalingStatDistribution.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sScalingStatDistributionStore, dbcPath, "ScalingStatDistribution.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sScalingStatValuesStore, dbcPath, "ScalingStatValues.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sScalingStatValuesStore, dbcPath, "ScalingStatValues.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSkillLineStore, dbcPath, "SkillLine.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSkillLineStore, dbcPath, "SkillLine.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSkillLineAbilityStore, dbcPath, "SkillLineAbility.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSkillLineAbilityStore, dbcPath, "SkillLineAbility.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSkillRaceClassInfoStore, dbcPath, "SkillRaceClassInfo.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSkillRaceClassInfoStore, dbcPath, "SkillRaceClassInfo.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSoundEntriesStore, dbcPath, "SoundEntries.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSoundEntriesStore, dbcPath, "SoundEntries.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellStore, dbcPath, "Spell.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellStore, dbcPath, "Spell.dbc");
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellAuraOptionsStore, dbcPath,"SpellAuraOptions.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellAuraOptionsStore, dbcPath,"SpellAuraOptions.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellAuraRestrictionsStore, dbcPath,"SpellAuraRestrictions.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellAuraRestrictionsStore, dbcPath,"SpellAuraRestrictions.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellCastingRequirementsStore, dbcPath,"SpellCastingRequirements.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellCastingRequirementsStore, dbcPath,"SpellCastingRequirements.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellCategoriesStore, dbcPath,"SpellCategories.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellCategoriesStore, dbcPath,"SpellCategories.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellClassOptionsStore, dbcPath,"SpellClassOptions.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellClassOptionsStore, dbcPath,"SpellClassOptions.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellCooldownsStore, dbcPath,"SpellCooldowns.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellCooldownsStore, dbcPath,"SpellCooldowns.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellEffectStore, dbcPath,"SpellEffect.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellEffectStore, dbcPath,"SpellEffect.dbc");
|
||||||
|
|
||||||
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
|
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -681,7 +681,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellInterruptsStore, dbcPath,"SpellInterrupts.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellInterruptsStore, dbcPath,"SpellInterrupts.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellLevelsStore, dbcPath,"SpellLevels.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellLevelsStore, dbcPath,"SpellLevels.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellPowerStore, dbcPath,"SpellPower.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellPowerStore, dbcPath,"SpellPower.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellReagentsStore, dbcPath,"SpellReagents.dbc");
|
//LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellReagentsStore, dbcPath,"SpellReagents.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellScalingStore, dbcPath,"SpellScaling.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellScalingStore, dbcPath,"SpellScaling.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellShapeshiftStore, dbcPath,"SpellShapeshift.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellShapeshiftStore, dbcPath,"SpellShapeshift.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellTargetRestrictionsStore, dbcPath,"SpellTargetRestrictions.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellTargetRestrictionsStore, dbcPath,"SpellTargetRestrictions.dbc");
|
||||||
|
|
@ -695,7 +695,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId);
|
SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId);
|
||||||
if (spellInfo && (spellInfo->Attributes & (SPELL_ATTR_UNK4 | SPELL_ATTR_PASSIVE | SPELL_ATTR_UNK7 | SPELL_ATTR_UNK8)) == (SPELL_ATTR_UNK4 | SPELL_ATTR_PASSIVE | SPELL_ATTR_UNK7 | SPELL_ATTR_UNK8))
|
if (spellInfo && (spellInfo->GetAttributes() & (SPELL_ATTR_UNK4 | SPELL_ATTR_PASSIVE | SPELL_ATTR_UNK7 | SPELL_ATTR_UNK8)) == (SPELL_ATTR_UNK4 | SPELL_ATTR_PASSIVE | SPELL_ATTR_UNK7 | SPELL_ATTR_UNK8))
|
||||||
{
|
{
|
||||||
for (unsigned int i = 1; i < sCreatureFamilyStore.GetNumRows(); ++i)
|
for (unsigned int i = 1; i < sCreatureFamilyStore.GetNumRows(); ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -711,19 +711,20 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellCastTimesStore, dbcPath, "SpellCastTimes.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellCastTimesStore, dbcPath, "SpellCastTimes.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellDurationStore, dbcPath, "SpellDuration.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellDurationStore, dbcPath, "SpellDuration.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellDifficultyStore, dbcPath, "SpellDifficulty.dbc");
|
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellDifficultyStore, dbcPath,"SpellDifficulty.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellFocusObjectStore, dbcPath, "SpellFocusObject.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellFocusObjectStore, dbcPath, "SpellFocusObject.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellItemEnchantmentStore, dbcPath, "SpellItemEnchantment.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellItemEnchantmentStore, dbcPath, "SpellItemEnchantment.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellItemEnchantmentConditionStore, dbcPath, "SpellItemEnchantmentCondition.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellItemEnchantmentConditionStore, dbcPath, "SpellItemEnchantmentCondition.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellRadiusStore, dbcPath, "SpellRadius.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellMiscStore, dbcPath, "SpellMisc.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellRangeStore, dbcPath, "SpellRange.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellRadiusStore, dbcPath, "SpellRadius.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellRuneCostStore, dbcPath, "SpellRuneCost.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellRangeStore, dbcPath, "SpellRange.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellShapeshiftFormStore, dbcPath, "SpellShapeshiftForm.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellRuneCostStore, dbcPath, "SpellRuneCost.dbc");
|
||||||
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sStableSlotPricesStore, dbcPath,"StableSlotPrices.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellShapeshiftFormStore, dbcPath, "SpellShapeshiftForm.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSummonPropertiesStore, dbcPath, "SummonProperties.dbc");
|
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sStableSlotPricesStore, dbcPath,"StableSlotPrices.dbc");
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sTalentStore, dbcPath, "Talent.dbc");
|
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSummonPropertiesStore, dbcPath, "SummonProperties.dbc");
|
||||||
|
//LoadDBC(availableDbcLocales, bar, bad_dbc_files, sTalentStore, dbcPath, "Talent.dbc");
|
||||||
|
|
||||||
// create talent spells set
|
// create talent spells set
|
||||||
for (unsigned int i = 0; i < sTalentStore.GetNumRows(); ++i)
|
for (unsigned int i = 0; i < sTalentStore.GetNumRows(); ++i)
|
||||||
|
|
@ -735,7 +736,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
sTalentSpellPosMap[talentInfo->RankID[j]] = TalentSpellPos(i, j);
|
sTalentSpellPosMap[talentInfo->RankID[j]] = TalentSpellPos(i, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales, bar, bad_dbc_files, sTalentTabStore, dbcPath, "TalentTab.dbc");
|
//LoadDBC(availableDbcLocales, bar, bad_dbc_files, sTalentTabStore, dbcPath, "TalentTab.dbc");
|
||||||
|
|
||||||
// prepare fast data access to bit pos of talent ranks for use at inspecting
|
// prepare fast data access to bit pos of talent ranks for use at inspecting
|
||||||
{
|
{
|
||||||
|
|
@ -764,7 +765,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files, sTalentTreePrimarySpellsStore, dbcPath, "TalentTreePrimarySpells.dbc");
|
//LoadDBC(availableDbcLocales,bar,bad_dbc_files, sTalentTreePrimarySpellsStore, dbcPath, "TalentTreePrimarySpells.dbc");
|
||||||
for (uint32 i = 0; i < sTalentTreePrimarySpellsStore.GetNumRows(); ++i)
|
for (uint32 i = 0; i < sTalentTreePrimarySpellsStore.GetNumRows(); ++i)
|
||||||
if (TalentTreePrimarySpellsEntry const* talentSpell = sTalentTreePrimarySpellsStore.LookupEntry(i))
|
if (TalentTreePrimarySpellsEntry const* talentSpell = sTalentTreePrimarySpellsStore.LookupEntry(i))
|
||||||
if (sSpellStore.LookupEntry(talentSpell->SpellId))
|
if (sSpellStore.LookupEntry(talentSpell->SpellId))
|
||||||
|
|
@ -905,7 +906,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check loaded DBC files proper version
|
// Check loaded DBC files proper version
|
||||||
if (!sAreaStore.LookupEntry(6539) || // last area (areaflag) added in 5.1.0
|
if (!sAreaStore.LookupEntry(5491) || // last area (areaflag) added in 5.4.1 17538
|
||||||
!sCharTitlesStore.LookupEntry(389) || // last char title added in 5.4.1 17538
|
!sCharTitlesStore.LookupEntry(389) || // last char title added in 5.4.1 17538
|
||||||
!sGemPropertiesStore.LookupEntry(2467) || // last gem property added in 5.4.1 17538
|
!sGemPropertiesStore.LookupEntry(2467) || // last gem property added in 5.4.1 17538
|
||||||
!sMapStore.LookupEntry(1173) || // last map added in 5.4.1 17538
|
!sMapStore.LookupEntry(1173) || // last map added in 5.4.1 17538
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ extern DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore;
|
||||||
extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
|
extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
|
||||||
extern DBCStorage <CreatureDisplayInfoExtraEntry>sCreatureDisplayInfoExtraStore;
|
extern DBCStorage <CreatureDisplayInfoExtraEntry>sCreatureDisplayInfoExtraStore;
|
||||||
extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
|
extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
|
||||||
extern DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore;
|
//extern DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore;
|
||||||
extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
|
extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
|
||||||
extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore;
|
extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore;
|
||||||
extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore;
|
extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore;
|
||||||
|
|
@ -189,9 +189,9 @@ extern DBCStorage <ItemDamageEntry> sItemDamageWandStore;
|
||||||
extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
|
extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
|
||||||
extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
|
extern DBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
|
||||||
extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore;
|
extern DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore;
|
||||||
extern DBCStorage <ItemReforgeEntry> sItemReforgeStore;
|
//extern DBCStorage <ItemReforgeEntry> sItemReforgeStore;
|
||||||
extern DBCStorage <ItemSetEntry> sItemSetStore;
|
extern DBCStorage <ItemSetEntry> sItemSetStore;
|
||||||
extern DBCStorage <LfgDungeonsEntry> sLfgDungeonsStore;
|
//extern DBCStorage <LfgDungeonsEntry> sLfgDungeonsStore;
|
||||||
extern DBCStorage <LiquidTypeEntry> sLiquidTypeStore;
|
extern DBCStorage <LiquidTypeEntry> sLiquidTypeStore;
|
||||||
extern DBCStorage <LockEntry> sLockStore;
|
extern DBCStorage <LockEntry> sLockStore;
|
||||||
extern DBCStorage <MailTemplateEntry> sMailTemplateStore;
|
extern DBCStorage <MailTemplateEntry> sMailTemplateStore;
|
||||||
|
|
@ -207,7 +207,7 @@ extern DBCStorage <QuestFactionRewardEntry> sQuestFactionRewardStore;
|
||||||
extern DBCStorage <QuestSortEntry> sQuestSortStore;
|
extern DBCStorage <QuestSortEntry> sQuestSortStore;
|
||||||
extern DBCStorage <QuestXPLevel> sQuestXPLevelStore;
|
extern DBCStorage <QuestXPLevel> sQuestXPLevelStore;
|
||||||
extern DBCStorage <PhaseEntry> sPhaseStore;
|
extern DBCStorage <PhaseEntry> sPhaseStore;
|
||||||
extern DBCStorage <PowerDisplayEntry> sPowerDisplayStore;
|
//extern DBCStorage <PowerDisplayEntry> sPowerDisplayStore;
|
||||||
// extern DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore; -- use GetBattlegroundSlotByLevel for access
|
// extern DBCStorage <PvPDifficultyEntry> sPvPDifficultyStore; -- use GetBattlegroundSlotByLevel for access
|
||||||
extern DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
|
extern DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
|
||||||
extern DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore;
|
extern DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore;
|
||||||
|
|
@ -224,6 +224,7 @@ extern DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore;
|
||||||
extern DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore;
|
extern DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore;
|
||||||
extern SpellCategoryStore sSpellCategoryStore;
|
extern SpellCategoryStore sSpellCategoryStore;
|
||||||
extern PetFamilySpellsStore sPetFamilySpellsStore;
|
extern PetFamilySpellsStore sPetFamilySpellsStore;
|
||||||
|
extern DBCStorage <SpellMiscEntry> sSpellMiscStore;
|
||||||
extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore;
|
extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore;
|
||||||
extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
|
extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
|
||||||
extern DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore;
|
extern DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore;
|
||||||
|
|
@ -240,7 +241,7 @@ extern DBCStorage <SpellEquippedItemsEntry> sSpellEquippedItemsStore;
|
||||||
extern DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore;
|
extern DBCStorage <SpellInterruptsEntry> sSpellInterruptsStore;
|
||||||
extern DBCStorage <SpellLevelsEntry> sSpellLevelsStore;
|
extern DBCStorage <SpellLevelsEntry> sSpellLevelsStore;
|
||||||
extern DBCStorage <SpellPowerEntry> sSpellPowerStore;
|
extern DBCStorage <SpellPowerEntry> sSpellPowerStore;
|
||||||
extern DBCStorage <SpellReagentsEntry> sSpellReagentsStore;
|
//extern DBCStorage <SpellReagentsEntry> sSpellReagentsStore;
|
||||||
extern DBCStorage <SpellScalingEntry> sSpellScalingStore;
|
extern DBCStorage <SpellScalingEntry> sSpellScalingStore;
|
||||||
extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
|
extern DBCStorage <SpellShapeshiftEntry> sSpellShapeshiftStore;
|
||||||
extern DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore;
|
extern DBCStorage <SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "DBCStructure.h"
|
#include "DBCStructure.h"
|
||||||
#include "DBCStores.h"
|
#include "DBCStores.h"
|
||||||
|
#include "DB2Stores.h"
|
||||||
#include "SharedDefines.h"
|
#include "SharedDefines.h"
|
||||||
|
|
||||||
int32 SpellEntry::CalculateSimpleValue(SpellEffectIndex eff) const
|
int32 SpellEntry::CalculateSimpleValue(SpellEffectIndex eff) const
|
||||||
|
|
@ -96,7 +97,7 @@ SpellLevelsEntry const* SpellEntry::GetSpellLevels() const
|
||||||
|
|
||||||
SpellPowerEntry const* SpellEntry::GetSpellPower() const
|
SpellPowerEntry const* SpellEntry::GetSpellPower() const
|
||||||
{
|
{
|
||||||
return SpellPowerId ? sSpellPowerStore.LookupEntry(SpellPowerId) : NULL;
|
return sSpellPowerStore.LookupEntry(Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellReagentsEntry const* SpellEntry::GetSpellReagents() const
|
SpellReagentsEntry const* SpellEntry::GetSpellReagents() const
|
||||||
|
|
@ -124,6 +125,11 @@ SpellTotemsEntry const* SpellEntry::GetSpellTotems() const
|
||||||
return SpellTotemsId ? sSpellTotemsStore.LookupEntry(SpellTotemsId) : NULL;
|
return SpellTotemsId ? sSpellTotemsStore.LookupEntry(SpellTotemsId) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpellMiscEntry const* SpellEntry::GetSpellMisc() const
|
||||||
|
{
|
||||||
|
return SpellMiscId ? sSpellMiscStore.LookupEntry(SpellMiscId) : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
uint32 SpellEntry::GetManaCost() const
|
uint32 SpellEntry::GetManaCost() const
|
||||||
{
|
{
|
||||||
SpellPowerEntry const* power = GetSpellPower();
|
SpellPowerEntry const* power = GetSpellPower();
|
||||||
|
|
@ -357,3 +363,135 @@ uint32 SpellEntry::GetEffectApplyAuraNameByIndex(SpellEffectIndex index) const
|
||||||
SpellEffectEntry const* effect = GetSpellEffect(index);
|
SpellEffectEntry const* effect = GetSpellEffect(index);
|
||||||
return effect ? effect->EffectApplyAuraName : 0;
|
return effect ? effect->EffectApplyAuraName : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributes() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->Attributes : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx2() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx2 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx3() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx3 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx4() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx4 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx5() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx5 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx6() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx6 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx7() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx7 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx8() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx8 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx9() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx9 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx10() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx10 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx11() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx11 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetAttributesEx12() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->AttributesEx12 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetCastingTimeIndex() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->CastingTimeIndex : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetDurationIndex() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->DurationIndex : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetRangeIndex() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->rangeIndex : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
float SpellEntry::GetSpeed() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->speed : 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetSpellVisual(int idx) const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->SpellVisual[idx] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetSpellIconID() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->SpellIconID : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetActiveIconID() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->activeIconID : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetSchoolMask() const
|
||||||
|
{
|
||||||
|
SpellMiscEntry const* misc = GetSpellMisc();
|
||||||
|
return misc ? misc->SchoolMask : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 SpellEntry::GetPowerType() const
|
||||||
|
{
|
||||||
|
SpellPowerEntry const* power = GetSpellPower();
|
||||||
|
return power ? power->powerType : 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -25,144 +25,135 @@
|
||||||
#ifndef MANGOS_DBCSFRM_H
|
#ifndef MANGOS_DBCSFRM_H
|
||||||
#define MANGOS_DBCSFRM_H
|
#define MANGOS_DBCSFRM_H
|
||||||
|
|
||||||
const char Achievementfmt[]= "niiissiiiiisiix"; // 5.3.0 Checked
|
const char Achievementfmt[]= "niiissiiiiisiix"; // 5.3.0 Checked
|
||||||
const char AchievementCriteriafmt[]= "niiiiiiiixsiiiiixxxxxxxx"; // 5.3.0 Checked
|
const char AchievementCriteriafmt[]="niiiiiiiixsiiiiixxxxxxx";
|
||||||
const char AreaTableEntryfmt[]= "iiinixxxxxisiiiiixxxxxxxxx";
|
const char AreaTableEntryfmt[]="iiinixxxxxxxisiiiiixxxxxxxxxxx"; // 16357
|
||||||
const char AreaGroupEntryfmt[] = "niiiiiii"; // 5.3.0 Checked
|
const char AreaGroupEntryfmt[] = "niiiiiii"; // 5.3.0 Checked
|
||||||
const char AreaTriggerEntryfmt[]= "nifffxxxfffff"; // TODO: 5.3.0 DIFFERENT
|
const char AreaTriggerEntryfmt[]="nifffxxxfffffxxx"; // 16357
|
||||||
const char ArmorLocationfmt[]="nfffff"; // 5.3.0 Checked
|
const char ArmorLocationfmt[]="nfffff"; // 5.3.0 Checked
|
||||||
const char AuctionHouseEntryfmt[]= "niiix"; // 5.3.0 Checked
|
const char AuctionHouseEntryfmt[]= "niiix"; // 5.3.0 Checked
|
||||||
const char BankBagSlotPricesEntryfmt[] = "ni"; // 5.3.0 Checked
|
const char BankBagSlotPricesEntryfmt[] = "ni"; //5.3.0 Checked
|
||||||
const char BarberShopStyleEntryfmt[]= "nixxxiii"; // TODO: 5.3.0 DIFFERENT
|
const char BarberShopStyleEntryfmt[]= "nixxxiii"; // TODO: 5.3.0 DIFFERENT
|
||||||
const char BattlemasterListEntryfmt[]="niiiiiiiiixsiiiiiiii"; // TODO: 5.3.0 DIFFERENT
|
const char BattlemasterListEntryfmt[]="niiiiiiiiiiiiiiiiixsiiiiiiiixx"; // 16357
|
||||||
const char CharStartOutfitEntryfmt[]= "diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // TODO: 5.3.0 DIFFERENT
|
const char CharStartOutfitEntryfmt[]= "diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // TODO: 5.3.0 DIFFERENT
|
||||||
const char CharTitlesEntryfmt[]="nxsxix"; // 5.3.0 Checked
|
const char CharTitlesEntryfmt[]="nxsxix"; // 5.3.0 Checked
|
||||||
const char ChatChannelsEntryfmt[]="iixsx"; // 5.3.0 Checked
|
const char ChatChannelsEntryfmt[]="iixsx"; // 5.3.0 Checked
|
||||||
// ChatChannelsEntryfmt, index not used (more compact store)
|
// ChatChannelsEntryfmt, index not used (more compact store)
|
||||||
const char ChrClassesEntryfmt[]= "nixsxxxixiiiii"; // TODO: 5.3.0 DIFFERENT
|
const char ChrClassesEntryfmt[]="nixsxxxixiiiixxxxx"; // 16357
|
||||||
const char ChrRacesEntryfmt[]="nxixiixixxxxixsxxxxxixxx"; // TODO: 5.3.0 DIFFERENT
|
const char ChrRacesEntryfmt[]="nxixiixixxxxixsxxxxxixxxxxxxxxxxxxxx"; // 16357
|
||||||
const char ChrClassesXPowerTypesfmt[]="nii"; // 5.3.0 Checked
|
const char ChrClassesXPowerTypesfmt[]="nii"; // 5.3.0 Checked
|
||||||
const char CinematicSequencesEntryfmt[] = "nxxxxxxxxx"; // 5.3.0 Checked
|
const char CinematicSequencesEntryfmt[] = "nxxxxxxxxx"; // 5.3.0 Checked
|
||||||
const char CreatureDisplayInfofmt[]="nxxifxxxxxxxxxxxx"; // TODO: 5.3.0 DIFFERENT
|
const char CreatureDisplayInfofmt[]="nxxifxxxxxxxxxxxxxxx"; // 16357
|
||||||
const char CreatureDisplayInfoExtrafmt[] = "nixxxxxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
const char CreatureDisplayInfoExtrafmt[] = "nixxxxxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
||||||
const char CreatureFamilyfmt[]="nfifiiiiixsx"; // 5.3.0 Checked
|
const char CreatureFamilyfmt[]="nfifiiiiixsx"; // 5.3.0 Checked
|
||||||
const char CreatureModelDatafmt[] = "nxxxxxxxxxxxxxxffxxxxxxxxxxxxxx";
|
const char CreatureSpellDatafmt[] = "niiiixxxx"; // 5.3.0 Checked
|
||||||
const char CreatureSpellDatafmt[] = "niiiixxxx"; // 5.3.0 Checked
|
const char DestructibleModelDataFmt[] = "nixxxixxxxixxxxixxxxxxxx";
|
||||||
const char CreatureTypefmt[]="nxx"; // 5.3.0 Checked
|
const char DungeonEncounterfmt[]="niiiisxxx";
|
||||||
const char CurrencyTypesfmt[]="nisxxxxiiix"; // TODO: 5.3.0 DIFFERENT
|
const char CreatureTypefmt[]="nxx"; // 5.3.0 Checked
|
||||||
const char DestructibleModelDataFmt[] = "nixxxixxxxixxxxixxxxxxxx"; // 5.3.0 Checked
|
const char CurrencyTypesfmt[]="nisxxxxiiixx";
|
||||||
const char DungeonEncounterfmt[]="niiiisxx"; // 5.3.0 Checked
|
const char DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; // TODO: 5.3.0 DIFFERENT
|
||||||
const char DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; // TODO: 5.3.0 DIFFERENT
|
const char DurabilityQualityfmt[] = "nf"; // TODO: 5.3.0 DIFFERENT
|
||||||
const char DurabilityQualityfmt[] = "nf"; // TODO: 5.3.0 DIFFERENT
|
const char EmotesEntryfmt[]="nxxiiixx"; // 5.3.0 Checked
|
||||||
const char EmotesEntryfmt[]="nxxiiixx"; // 5.3.0 Checked
|
const char EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
||||||
const char EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
const char FactionEntryfmt[]="niiiiiiiiiiiiiiiiiiffixsxxxx";
|
||||||
const char FactionEntryfmt[]="niiiiiiiiiiiiiiiiiiffixsxx"; // TODO: 5.3.0 DIFFERENT
|
const char FactionTemplateEntryfmt[] = "niiiiiiiiiiiii"; // 5.3.0 Checked
|
||||||
const char FactionTemplateEntryfmt[] = "niiiiiiiiiiiii"; // 5.3.0 Checked
|
const char GameObjectDisplayInfofmt[]="nsxxxxxxxxxxffffffxxx"; // 5.3.0 Checked
|
||||||
const char GameObjectDisplayInfofmt[]="nsxxxxxxxxxxffffffxxx"; // 5.3.0 Checked
|
const char GemPropertiesEntryfmt[]="nixxix"; // 5.3.0 Checked
|
||||||
const char GemPropertiesEntryfmt[]="nixxix"; // 5.3.0 Checked
|
const char GlyphPropertiesfmt[] = "niii"; // 5.3.0 Checked
|
||||||
const char GlyphPropertiesfmt[] = "niii"; // 5.3.0 Checked
|
const char GlyphSlotfmt[] = "nii"; // 5.3.0 Checked
|
||||||
const char GlyphSlotfmt[] = "nii"; // 5.3.0 Checked
|
const char GtBarberShopCostBasefmt[]="xf"; // 5.3.0 Checked
|
||||||
const char GtBarberShopCostBasefmt[]="xf"; // 5.3.0 Checked
|
const char GtCombatRatingsfmt[]="xf";
|
||||||
const char GtCombatRatingsfmt[]="xf"; // 5.3.0 Checked
|
const char GtChanceToMeleeCritBasefmt[]="xf"; // 5.3.0 Checked
|
||||||
const char GtChanceToMeleeCritBasefmt[]="xf"; // 5.3.0 Checked
|
const char GtChanceToMeleeCritfmt[]="xf"; // 5.3.0 Checked
|
||||||
const char GtChanceToMeleeCritfmt[]="xf"; // 5.3.0 Checked
|
const char GtChanceToSpellCritBasefmt[]="xf"; // 5.3.0 Checked
|
||||||
const char GtChanceToSpellCritBasefmt[]="xf"; // 5.3.0 Checked
|
const char GtOCTClassCombatRatingScalarfmt[]="df";
|
||||||
const char GtChanceToSpellCritfmt[]="xf"; // 5.3.0 Checked
|
const char GtChanceToSpellCritfmt[]="xf"; // 5.3.0 Checked
|
||||||
|
const char GtOCTHpPerStaminafmt[]="df"; // 16357
|
||||||
const char GtOCTRegenHPfmt[]="xf";
|
const char GtOCTRegenHPfmt[]="xf";
|
||||||
const char GtOCTBaseHPByClassfmt[]="df"; // 5.3.0 Checked
|
|
||||||
const char GtOCTBaseMPByClassfmt[]="df"; // 5.3.0 Checked
|
|
||||||
const char GtOCTClassCombatRatingScalarfmt[] = "df"; // 5.3.0 Checked
|
|
||||||
|
|
||||||
const char GtOCTHpPerStaminafmt[]="df"; // 5.3.0 Checked
|
|
||||||
//const char GtOCTRegenHPfmt[]="xf";
|
|
||||||
const char GtRegenHPPerSptfmt[]="xf";
|
const char GtRegenHPPerSptfmt[]="xf";
|
||||||
const char GtRegenMPPerSptfmt[]="xf"; // 5.3.0 Checked
|
const char GtRegenMPPerSptfmt[]="xf"; // 5.3.0 Checked
|
||||||
const char GtSpellScalingfmt[]="df"; // 5.3.0 Checked
|
const char GtSpellScalingfmt[]="df"; // 5.3.0 Checked
|
||||||
//const char GtOCTBaseHPByClassfmt[]="df";
|
const char GtOCTBaseHPByClassfmt[]="df";
|
||||||
//const char GtOCTBaseMPByClassfmt[]="df";
|
const char GtOCTBaseMPByClassfmt[]="df";
|
||||||
const char Holidaysfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
const char Holidaysfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
||||||
const char ItemArmorQualityfmt[]="nfffffffi"; // 5.3.0 Checked
|
const char ItemClassfmt[]="nxfs"; // 16357
|
||||||
const char ItemArmorShieldfmt[]="nifffffff"; // 5.3.0 Checked
|
const char ItemArmorQualityfmt[]="nfffffffi"; // 5.3.0 Checked
|
||||||
const char ItemArmorTotalfmt[]="niffff"; // 5.3.0 Checked
|
const char ItemArmorShieldfmt[]="nifffffff"; // 5.3.0 Checked
|
||||||
const char ItemBagFamilyfmt[]="nx"; // 5.3.0 Checked
|
const char ItemArmorTotalfmt[]="niffff"; // 5.3.0 Checked
|
||||||
const char ItemClassfmt[]="nixxfs"; // TODO: 5.3.0 DIFFERENT
|
const char ItemBagFamilyfmt[]="nx"; // 5.3.0 Checked
|
||||||
// const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
|
// const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
|
||||||
// const char ItemCondExtCostsEntryfmt[]="xiii";
|
// const char ItemCondExtCostsEntryfmt[]="xiii";
|
||||||
const char ItemDamagefmt[]="nfffffffi";
|
const char ItemDamagefmt[]="nfffffffi";
|
||||||
const char ItemLimitCategoryEntryfmt[]="nxii"; // 5.3.0 Checked
|
const char ItemLimitCategoryEntryfmt[]="nxii"; // 5.3.0 Checked
|
||||||
const char ItemRandomPropertiesfmt[]="nxiiiiis"; // 5.3.0 Checked
|
const char ItemRandomPropertiesfmt[]="nxiiiiis"; // 5.3.0 Checked
|
||||||
const char ItemRandomSuffixfmt[]="nsxiiiiiiiiii"; // 5.3.0 Checked
|
const char ItemRandomSuffixfmt[]="nsxiiiiiiiiii"; // 5.3.0 Checked
|
||||||
const char ItemReforgefmt[]="nifif";
|
const char ItemSetEntryfmt[]="dsxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii"; // 5.3.0 Checked
|
||||||
const char ItemSetEntryfmt[]="dsxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii"; // 5.3.0 Checked
|
const char LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
||||||
const char LfgDungeonsEntryfmt[] = "isiiiiifiiifsisisiiii";
|
const char LockEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; // 5.3.0 Checked
|
||||||
const char LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
const char MailTemplateEntryfmt[]="nxs"; // 5.3.0 Checked
|
||||||
const char LockEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; // 5.3.0 Checked
|
const char MapEntryfmt[]="nsiiisissififfiiiii"; // 16357
|
||||||
const char MailTemplateEntryfmt[]="nxs"; // 5.3.0 Checked
|
const char MapDifficultyEntryfmt[]="niisiis"; // 5.3.0 Checked
|
||||||
const char MapEntryfmt[]="nsiiiisissififfiiiii"; // TODO: 5.3.0 DIFFERENT
|
|
||||||
const char MapDifficultyEntryfmt[]="niisiis"; // 5.3.0 Checked
|
|
||||||
const char MovieEntryfmt[]="nxxx";
|
|
||||||
const char MountCapabilityfmt[]="niiiiiii";
|
const char MountCapabilityfmt[]="niiiiiii";
|
||||||
const char MountTypefmt[]="niiiiiiiiiiiiiiiiiiiiiiii";
|
const char MountTypefmt[]="niiiiiiiiiiiiiiiiiiiiiiii";
|
||||||
|
const char MovieEntryfmt[]="nxxxx"; // 16357
|
||||||
const char NumTalentsAtLevelfmt[]="df";
|
const char NumTalentsAtLevelfmt[]="df";
|
||||||
const char OverrideSpellDatafmt[]="niiiiiiiiiixx";
|
const char OverrideSpellDatafmt[]="niiiiiiiiiixx";
|
||||||
const char QuestFactionRewardfmt[] = "niiiiiiiiii";
|
const char QuestFactionRewardfmt[] = "niiiiiiiiii";
|
||||||
const char QuestSortEntryfmt[]="nx"; // 5.3.0 Checked
|
const char QuestSortEntryfmt[]="nx"; // 5.3.0 Checked
|
||||||
const char QuestXPLevelfmt[] = "niiiiiiiiii"; // 5.3.0 Checked
|
const char QuestXPLevelfmt[] = "niiiiiiiiii"; // 5.3.0 Checked
|
||||||
const char Phasefmt[]="nii"; // 5.3.0 Checked
|
const char Phasefmt[]="nii"; // 5.3.0 Checked
|
||||||
const char PowerDisplayfmt[] = "nixxxx";
|
|
||||||
const char PvPDifficultyfmt[] = "diiiii";
|
const char PvPDifficultyfmt[] = "diiiii";
|
||||||
const char RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii"; // 5.3.0 Checked
|
const char RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii"; // 5.3.0 Checked
|
||||||
const char ScalingStatDistributionfmt[]="niiiiiiiiiiiiiiiiiiiixi"; // 5.3.0 Checked
|
const char ScalingStatDistributionfmt[]="niiiiiiiiiiiiiiiiiiiixi"; // 5.3.0 Checked
|
||||||
const char ScalingStatValuesfmt[]="iniiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxx";
|
const char ScalingStatValuesfmt[]="iniiiiiixiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxx"; // 16357
|
||||||
const char SkillLinefmt[]="nisxixi";
|
const char SkillLinefmt[]="nisxixixx"; // 16357
|
||||||
const char SkillLineAbilityfmt[] = "niiiixxiiiiiix";
|
const char SkillLineAbilityfmt[]="niiiiiiiiixxx"; // 16357
|
||||||
const char SkillRaceClassInfofmt[]="diiiiixxx";
|
const char SkillRaceClassInfofmt[]="diiiiixx"; // 16357
|
||||||
const char SoundEntriesfmt[]="nissssssssssssssssssssssxxxxxxxxxxx";
|
const char SoundEntriesfmt[]="nisxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // 17538
|
||||||
const char SpellCastTimefmt[]="niii"; // 5.3.0 Checked
|
const char SpellCastTimefmt[]="niii"; // 5.3.0 Checked
|
||||||
const char SpellDurationfmt[] = "niii"; // 5.3.0 Checked
|
const char SpellDurationfmt[] = "niii"; // 5.3.0 Checked
|
||||||
const char SpellDifficultyfmt[] = "niiii";
|
const char SpellDifficultyfmt[] = "niiii";
|
||||||
// 1 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160
|
const char SpellEntryfmt[]="nssxxixxxiiiiiiiiiiiiiixi"; // 16357
|
||||||
const char SpellEntryfmt[]="niiiiiiiiiiiiiiifiiiissxxiixxixiiiiiiixiiiiiiiix";
|
const char SpellAuraOptionsEntryfmt[]="dxxiiiixx"; // 16357
|
||||||
const char SpellAuraOptionsEntryfmt[]="diiii";
|
const char SpellAuraRestrictionsEntryfmt[]="dxxiiiiiiii"; // 16357
|
||||||
const char SpellAuraRestrictionsEntryfmt[]="diiiiiiii";
|
const char SpellCastingRequirementsEntryfmt[]="dixxixi"; // 5.3.0 Checked
|
||||||
const char SpellCastingRequirementsEntryfmt[]="dixxixi"; // 5.3.0 Checked
|
const char SpellCategoriesEntryfmt[]="dxxiiiiiix"; // 16357
|
||||||
const char SpellCategoriesEntryfmt[]="diiiiii";
|
|
||||||
const char SpellClassOptionsEntryfmt[]="dxiiiix";
|
const char SpellClassOptionsEntryfmt[]="dxiiiix";
|
||||||
const char SpellCooldownsEntryfmt[]="diii";
|
const char SpellCooldownsEntryfmt[]="dxxiii"; // 16357
|
||||||
// 1 10 20 30
|
const char SpellEffectEntryfmt[]="diifiiixfiiiiiifiifiiiiixiiiix"; // 16357
|
||||||
const char SpellEffectEntryfmt[]="difiiiffiiiiiifiifiiiiiiiix";
|
const char SpellEquippedItemsEntryfmt[]="dxxiii"; // 16357
|
||||||
const char SpellEquippedItemsEntryfmt[]="diii";
|
const char SpellInterruptsEntryfmt[]="dxxixixi"; // 16357
|
||||||
const char SpellInterruptsEntryfmt[]="dixixi";
|
const char SpellLevelsEntryfmt[]="dxxiii"; // 16357
|
||||||
const char SpellLevelsEntryfmt[]="diii";
|
const char SpellPowerEntryfmt[]="xnxiiiiixxxxx"; // 16357
|
||||||
const char SpellPowerEntryfmt[]="diiiiixf";
|
|
||||||
const char SpellReagentsEntryfmt[]="diiiiiiiiiiiiiiii";
|
|
||||||
const char SpellScalingEntryfmt[]="diiiiffffffffffi";
|
const char SpellScalingEntryfmt[]="diiiiffffffffffi";
|
||||||
const char SpellShapeshiftEntryfmt[]="dixixx"; // 5.3.0 Checked
|
const char SpellShapeshiftEntryfmt[]="dixixx"; // 5.3.0 Checked
|
||||||
const char SpellTargetRestrictionsEntryfmt[]="dfiiii";
|
const char SpellTargetRestrictionsEntryfmt[]="dxxfxiiii"; // 16357
|
||||||
const char SpellTotemsEntryfmt[]="diiii"; // 5.3.0 Checked
|
const char SpellTotemsEntryfmt[]="diiii"; // 5.3.0 Checked
|
||||||
const char SpellFocusObjectfmt[]="nx";
|
const char SpellFocusObjectfmt[]="nx";
|
||||||
const char SpellItemEnchantmentfmt[]="nxiiiiiixxxiiisiiiiiiix";
|
const char SpellItemEnchantmentfmt[]="nxiiiiiiiiisiiiixxixxxxxxx"; // 17538
|
||||||
const char SpellItemEnchantmentConditionfmt[] = "nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX"; // 5.3.0 Checked
|
const char SpellItemEnchantmentConditionfmt[] = "nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX"; // 5.3.0 Checked
|
||||||
const char SpellRadiusfmt[]="nfff";
|
const char SpellMiscfmt[]="dxxiiiiiiiiiiiiiiiifiiiii"; // 17538
|
||||||
const char SpellRangefmt[]="nffffixx"; // 5.3.0 Checked
|
const char SpellRadiusfmt[]="nfxxx"; // 16357
|
||||||
const char SpellRuneCostfmt[] = "niiii";
|
const char SpellRangefmt[]="nffffxxx"; // 5.3.0 Checked
|
||||||
const char SpellShapeshiftFormfmt[]="nxxiixiiixxiiiiiiiixx"; // 5.3.0 Checked
|
const char SpellRuneCostfmt[]="niiixi"; // 16357
|
||||||
|
const char SpellShapeshiftFormfmt[]="nxxiixiiixxiiiiiiiixx"; // 5.3.0 Checked
|
||||||
//const char StableSlotPricesfmt[] = "ni"; // removed
|
//const char StableSlotPricesfmt[] = "ni"; // removed
|
||||||
const char SummonPropertiesfmt[] = "niiiii"; // 5.3.0 Checked
|
const char SummonPropertiesfmt[] = "niiiii"; // 5.3.0 Checked
|
||||||
const char TalentEntryfmt[]="niiiiiiiiixxixxxxxx";
|
const char TalentEntryfmt[]="niiiiiiiiixxixxxxxx";
|
||||||
const char TalentTabEntryfmt[]="nxxiiixxiii";
|
const char TalentTabEntryfmt[]="nxxiiixxiii";
|
||||||
const char TalentTreePrimarySpellsfmt[]="diix";
|
const char TalentTreePrimarySpellsfmt[]="diix";
|
||||||
const char TaxiNodesEntryfmt[]="nifffsiixxx"; // 5.3.0 Checked
|
const char TaxiNodesEntryfmt[]="nifffsiixxxx";
|
||||||
const char TaxiPathEntryfmt[] = "niii"; // 5.3.0 Checked
|
const char TaxiPathEntryfmt[] = "niii"; // 5.3.0 Checked
|
||||||
const char TaxiPathNodeEntryfmt[] = "diiifffiiii"; // 5.3.0 Checked
|
const char TaxiPathNodeEntryfmt[] = "diiifffiiii"; // 5.3.0 Checked
|
||||||
const char TotemCategoryEntryfmt[]="nxii"; // 5.3.0 Checked
|
const char TotemCategoryEntryfmt[]="nxii"; // 5.3.0 Checked
|
||||||
const char TransportAnimationEntryfmt[]="diixxxx"; // 5.3.0 Checked
|
const char TransportAnimationEntryfmt[]="diixxxx"; // 5.3.0 Checked
|
||||||
const char VehicleEntryfmt[]="niffffiiiiiiiifffffffffffffffssssfifiixx";
|
const char VehicleEntryfmt[]="nixffffiiiiiiiifffffffffffffffssssfifiixx"; // 16357
|
||||||
const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxxxxxxxxxx"; // 5.3.0 Checked
|
||||||
const char WMOAreaTableEntryfmt[]="niiixxxxxiixxxx"; // 5.3.0 Checked
|
const char WMOAreaTableEntryfmt[]="niiixxxxxiixxxx"; // 5.3.0 Checked
|
||||||
const char WorldMapAreaEntryfmt[]="xinxffffixxxxx"; // 5.3.0 Checked
|
const char WorldMapAreaEntryfmt[]="xinxffffixxxxx"; // 5.3.0 Checked
|
||||||
const char WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxx";
|
const char WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxxx"; // 16357
|
||||||
const char WorldSafeLocsEntryfmt[]="nifffx";
|
const char WorldSafeLocsEntryfmt[]="nifffxx"; // 16357
|
||||||
const char WorldPvPAreaEnrtyfmt[]="niiiiii";
|
const char WorldPvPAreaEnrtyfmt[]="niiiiii";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -684,6 +684,76 @@ enum SpellAttributesEx10
|
||||||
SPELL_ATTR_EX10_UNK31 = 0x80000000,// 31 not used
|
SPELL_ATTR_EX10_UNK31 = 0x80000000,// 31 not used
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum SpellAttributesEx11
|
||||||
|
{
|
||||||
|
SPELL_ATTR_EX11_UNK0 = 0x00000001,// 0
|
||||||
|
SPELL_ATTR_EX11_UNK1 = 0x00000002,// 1
|
||||||
|
SPELL_ATTR_EX11_UNK2 = 0x00000004,// 2
|
||||||
|
SPELL_ATTR_EX11_UNK3 = 0x00000008,// 3
|
||||||
|
SPELL_ATTR_EX11_UNK4 = 0x00000010,// 4
|
||||||
|
SPELL_ATTR_EX11_UNK5 = 0x00000020,// 5
|
||||||
|
SPELL_ATTR_EX11_UNK6 = 0x00000040,// 6
|
||||||
|
SPELL_ATTR_EX11_UNK7 = 0x00000080,// 7
|
||||||
|
SPELL_ATTR_EX11_UNK8 = 0x00000100,// 8
|
||||||
|
SPELL_ATTR_EX11_UNK9 = 0x00000200,// 9
|
||||||
|
SPELL_ATTR_EX11_UNK10 = 0x00000400,// 10
|
||||||
|
SPELL_ATTR_EX11_UNK11 = 0x00000800,// 11
|
||||||
|
SPELL_ATTR_EX11_UNK12 = 0x00001000,// 12
|
||||||
|
SPELL_ATTR_EX11_UNK13 = 0x00002000,// 13
|
||||||
|
SPELL_ATTR_EX11_UNK14 = 0x00004000,// 14
|
||||||
|
SPELL_ATTR_EX11_UNK15 = 0x00008000,// 15
|
||||||
|
SPELL_ATTR_EX11_UNK16 = 0x00010000,// 16
|
||||||
|
SPELL_ATTR_EX11_UNK17 = 0x00020000,// 17
|
||||||
|
SPELL_ATTR_EX11_UNK18 = 0x00040000,// 18
|
||||||
|
SPELL_ATTR_EX11_UNK19 = 0x00080000,// 19
|
||||||
|
SPELL_ATTR_EX11_UNK20 = 0x00100000,// 20
|
||||||
|
SPELL_ATTR_EX11_UNK21 = 0x00200000,// 21
|
||||||
|
SPELL_ATTR_EX11_UNK22 = 0x00400000,// 22
|
||||||
|
SPELL_ATTR_EX11_UNK23 = 0x00800000,// 23
|
||||||
|
SPELL_ATTR_EX11_UNK24 = 0x01000000,// 24
|
||||||
|
SPELL_ATTR_EX11_UNK25 = 0x02000000,// 25
|
||||||
|
SPELL_ATTR_EX11_UNK26 = 0x04000000,// 26
|
||||||
|
SPELL_ATTR_EX11_UNK27 = 0x08000000,// 27
|
||||||
|
SPELL_ATTR_EX11_UNK28 = 0x10000000,// 28
|
||||||
|
SPELL_ATTR_EX11_UNK29 = 0x20000000,// 29
|
||||||
|
SPELL_ATTR_EX11_UNK30 = 0x40000000,// 30
|
||||||
|
SPELL_ATTR_EX11_UNK31 = 0x80000000,// 31
|
||||||
|
};
|
||||||
|
enum SpellAttributesEx12
|
||||||
|
{
|
||||||
|
SPELL_ATTR_EX12_UNK0 = 0x00000001,// 0
|
||||||
|
SPELL_ATTR_EX12_UNK1 = 0x00000002,// 1
|
||||||
|
SPELL_ATTR_EX12_UNK2 = 0x00000004,// 2
|
||||||
|
SPELL_ATTR_EX12_UNK3 = 0x00000008,// 3
|
||||||
|
SPELL_ATTR_EX12_UNK4 = 0x00000010,// 4
|
||||||
|
SPELL_ATTR_EX12_UNK5 = 0x00000020,// 5
|
||||||
|
SPELL_ATTR_EX12_UNK6 = 0x00000040,// 6
|
||||||
|
SPELL_ATTR_EX12_UNK7 = 0x00000080,// 7
|
||||||
|
SPELL_ATTR_EX12_UNK8 = 0x00000100,// 8
|
||||||
|
SPELL_ATTR_EX12_UNK9 = 0x00000200,// 9
|
||||||
|
SPELL_ATTR_EX12_UNK10 = 0x00000400,// 10
|
||||||
|
SPELL_ATTR_EX12_UNK11 = 0x00000800,// 11
|
||||||
|
SPELL_ATTR_EX12_UNK12 = 0x00001000,// 12
|
||||||
|
SPELL_ATTR_EX12_UNK13 = 0x00002000,// 13
|
||||||
|
SPELL_ATTR_EX12_UNK14 = 0x00004000,// 14
|
||||||
|
SPELL_ATTR_EX12_UNK15 = 0x00008000,// 15
|
||||||
|
SPELL_ATTR_EX12_UNK16 = 0x00010000,// 16
|
||||||
|
SPELL_ATTR_EX12_UNK17 = 0x00020000,// 17
|
||||||
|
SPELL_ATTR_EX12_UNK18 = 0x00040000,// 18
|
||||||
|
SPELL_ATTR_EX12_UNK19 = 0x00080000,// 19
|
||||||
|
SPELL_ATTR_EX12_UNK20 = 0x00100000,// 20
|
||||||
|
SPELL_ATTR_EX12_UNK21 = 0x00200000,// 21
|
||||||
|
SPELL_ATTR_EX12_UNK22 = 0x00400000,// 22
|
||||||
|
SPELL_ATTR_EX12_UNK23 = 0x00800000,// 23
|
||||||
|
SPELL_ATTR_EX12_UNK24 = 0x01000000,// 24
|
||||||
|
SPELL_ATTR_EX12_UNK25 = 0x02000000,// 25
|
||||||
|
SPELL_ATTR_EX12_UNK26 = 0x04000000,// 26
|
||||||
|
SPELL_ATTR_EX12_UNK27 = 0x08000000,// 27
|
||||||
|
SPELL_ATTR_EX12_UNK28 = 0x10000000,// 28
|
||||||
|
SPELL_ATTR_EX12_UNK29 = 0x20000000,// 29
|
||||||
|
SPELL_ATTR_EX12_UNK30 = 0x40000000,// 30
|
||||||
|
SPELL_ATTR_EX12_UNK31 = 0x80000000,// 31
|
||||||
|
};
|
||||||
#define MAX_TALENT_SPEC_COUNT 2
|
#define MAX_TALENT_SPEC_COUNT 2
|
||||||
#define MAX_GLYPH_SLOT_INDEX 6
|
#define MAX_GLYPH_SLOT_INDEX 6
|
||||||
#define REQ_PRIMARY_TREE_TALENTS 31
|
#define REQ_PRIMARY_TREE_TALENTS 31
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,10 @@ bool LoginQueryHolder::Initialize()
|
||||||
"health, power1, power2, power3, power4, power5, specCount, activeSpec, exploredZones, equipmentCache, knownTitles, actionBars, slot FROM characters WHERE guid = '%u'", m_guid.GetCounter());
|
"health, power1, power2, power3, power4, power5, specCount, activeSpec, exploredZones, equipmentCache, knownTitles, actionBars, slot FROM characters WHERE guid = '%u'", m_guid.GetCounter());
|
||||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGROUP, "SELECT groupId FROM group_member WHERE memberGuid ='%u'", m_guid.GetCounter());
|
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGROUP, "SELECT groupId FROM group_member WHERE memberGuid ='%u'", m_guid.GetCounter());
|
||||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES, "SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = '%u'", m_guid.GetCounter());
|
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES, "SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = '%u'", m_guid.GetCounter());
|
||||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADAURAS, "SELECT caster_guid,item_guid,spell,stackcount,remaincharges,basepoints0,basepoints1,basepoints2,periodictime0,periodictime1,periodictime2,maxduration,remaintime,effIndexMask FROM character_aura WHERE guid = '%u'", m_guid.GetCounter());
|
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADAURAS, "SELECT caster_guid,item_guid,spell,stackcount,remaincharges,"
|
||||||
|
"basepoints0,basepoints1,basepoints2,basepoints3,basepoints4,basepoints5,basepoints6,basepoints7,basepoints8,basepoints9,basepoints10,basepoints11,basepoints12,basepoints13,basepoints14,basepoints15,basepoints16,basepoints17,basepoints18,basepoints19,basepoints20,"
|
||||||
|
"periodictime0,periodictime1,periodictime2,periodictime3,periodictime4,periodictime5,periodictime6,periodictime7,periodictime8,periodictime9,periodictime10,periodictime11,periodictime12,periodictime13,periodictime14,periodictime15,periodictime16,periodictime17,periodictime18,periodictime19,periodictime20,"
|
||||||
|
"maxduration,remaintime,effIndexMask FROM character_aura WHERE guid = '%u'", m_guid.GetCounter());
|
||||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADSPELLS, "SELECT spell,active,disabled FROM character_spell WHERE guid = '%u'", m_guid.GetCounter());
|
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADSPELLS, "SELECT spell,active,disabled FROM character_spell WHERE guid = '%u'", m_guid.GetCounter());
|
||||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADQUESTSTATUS, "SELECT quest,status,rewarded,explored,timer,mobcount1,mobcount2,mobcount3,mobcount4,itemcount1,itemcount2,itemcount3,itemcount4,itemcount5,itemcount6 FROM character_queststatus WHERE guid = '%u'", m_guid.GetCounter());
|
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADQUESTSTATUS, "SELECT quest,status,rewarded,explored,timer,mobcount1,mobcount2,mobcount3,mobcount4,itemcount1,itemcount2,itemcount3,itemcount4,itemcount5,itemcount6 FROM character_queststatus WHERE guid = '%u'", m_guid.GetCounter());
|
||||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS, "SELECT quest FROM character_queststatus_daily WHERE guid = '%u'", m_guid.GetCounter());
|
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS, "SELECT quest FROM character_queststatus_daily WHERE guid = '%u'", m_guid.GetCounter());
|
||||||
|
|
@ -151,9 +154,7 @@ void WorldSession::HandleCharEnum(QueryResult* result)
|
||||||
|
|
||||||
ByteBuffer buffer;
|
ByteBuffer buffer;
|
||||||
|
|
||||||
data.WriteBits(0, 23);
|
data.WriteBits(result ? result->GetRowCount() : 0, 16);
|
||||||
data.WriteBit(1);
|
|
||||||
data.WriteBits(result ? result->GetRowCount() : 0, 17);
|
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
|
|
@ -168,7 +169,13 @@ void WorldSession::HandleCharEnum(QueryResult* result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (result->NextRow());
|
while (result->NextRow());
|
||||||
|
}
|
||||||
|
|
||||||
|
data.WriteBit(1);
|
||||||
|
data.WriteBits(0, 21);
|
||||||
|
|
||||||
|
if (!buffer.empty())
|
||||||
|
{
|
||||||
data.FlushBits();
|
data.FlushBits();
|
||||||
data.append(buffer);
|
data.append(buffer);
|
||||||
}
|
}
|
||||||
|
|
@ -208,14 +215,14 @@ void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recv_data*/)
|
||||||
|
|
||||||
void WorldSession::HandleCharCreateOpcode(WorldPacket& recv_data)
|
void WorldSession::HandleCharCreateOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
|
// extract other data required for player creating
|
||||||
|
uint8 gender, skin, face, hairStyle, hairColor, facialHair, outfitId;
|
||||||
std::string name;
|
std::string name;
|
||||||
uint8 race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId;
|
uint8 race_, class_;
|
||||||
|
|
||||||
recv_data >> gender >> hairColor >> outfitId;
|
recv_data >> class_ >> hairStyle >> facialHair >> race_;
|
||||||
recv_data >> race_ >> class_ >> face>> facialHair >> skin >> hairStyle;
|
recv_data >> face >> skin >> gender >> hairColor >> outfitId;
|
||||||
|
name = recv_data.ReadString(recv_data.ReadBits(8));
|
||||||
uint8 nameLength = recv_data.ReadBits(7);
|
|
||||||
name = recv_data.ReadString(nameLength);
|
|
||||||
|
|
||||||
WorldPacket data(SMSG_CHAR_CREATE, 1); // returned with diff.values in all cases
|
WorldPacket data(SMSG_CHAR_CREATE, 1); // returned with diff.values in all cases
|
||||||
|
|
||||||
|
|
@ -253,23 +260,25 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recv_data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME
|
||||||
// prevent character creating Expansion race without Expansion account
|
// prevent character creating Expansion race without Expansion account
|
||||||
if (raceEntry->expansion > Expansion())
|
//if (raceEntry->expansion > Expansion())
|
||||||
{
|
//{
|
||||||
data << (uint8)CHAR_CREATE_EXPANSION;
|
// data << (uint8)CHAR_CREATE_EXPANSION;
|
||||||
sLog.outError("Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_);
|
// sLog.outError("Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_);
|
||||||
SendPacket(&data);
|
// SendPacket(&data);
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
// FIXME
|
||||||
// prevent character creating Expansion class without Expansion account
|
// prevent character creating Expansion class without Expansion account
|
||||||
if (classEntry->expansion > Expansion())
|
//if (classEntry->expansion > Expansion())
|
||||||
{
|
//{
|
||||||
data << (uint8)CHAR_CREATE_EXPANSION_CLASS;
|
// data << (uint8)CHAR_CREATE_EXPANSION_CLASS;
|
||||||
sLog.outError("Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_);
|
// sLog.outError("Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_);
|
||||||
SendPacket(&data);
|
// SendPacket(&data);
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
// prevent character creating with invalid name
|
// prevent character creating with invalid name
|
||||||
if (!normalizePlayerName(name))
|
if (!normalizePlayerName(name))
|
||||||
|
|
@ -631,6 +640,13 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket& recv_data)
|
||||||
|
|
||||||
void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recv_data)
|
void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
|
ObjectGuid playerGuid;
|
||||||
|
|
||||||
|
recv_data.ReadGuidMask<1, 5, 0, 2, 7, 6, 3, 4>(playerGuid);
|
||||||
|
recv_data.ReadGuidBytes<6, 4, 3, 5, 0, 2, 7, 1>(playerGuid);
|
||||||
|
float unk = recv_data.ReadSingle();
|
||||||
|
|
||||||
|
DEBUG_LOG("WORLD: Received opcode Player Logon Message from %s, unk float: %f", playerGuid.GetString().c_str(), unk);
|
||||||
if (PlayerLoading() || GetPlayer() != NULL)
|
if (PlayerLoading() || GetPlayer() != NULL)
|
||||||
{
|
{
|
||||||
sLog.outError("Player tryes to login again, AccountId = %d", GetAccountId());
|
sLog.outError("Player tryes to login again, AccountId = %d", GetAccountId());
|
||||||
|
|
@ -639,13 +655,6 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recv_data)
|
||||||
|
|
||||||
m_playerLoading = true;
|
m_playerLoading = true;
|
||||||
|
|
||||||
ObjectGuid playerGuid;
|
|
||||||
|
|
||||||
recv_data.ReadGuidMask<2, 0, 4, 3, 5, 6, 1, 7>(playerGuid);
|
|
||||||
recv_data.ReadGuidBytes<0, 3, 7, 6, 1, 2, 4, 5>(playerGuid);
|
|
||||||
|
|
||||||
DEBUG_LOG("WORLD: Received opcode Player Logon Message from %s", playerGuid.GetString().c_str());
|
|
||||||
|
|
||||||
LoginQueryHolder* holder = new LoginQueryHolder(GetAccountId(), playerGuid);
|
LoginQueryHolder* holder = new LoginQueryHolder(GetAccountId(), playerGuid);
|
||||||
if (!holder->Initialize())
|
if (!holder->Initialize())
|
||||||
{
|
{
|
||||||
|
|
@ -691,21 +700,20 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
|
||||||
SendAccountDataTimes(PER_CHARACTER_CACHE_MASK);
|
SendAccountDataTimes(PER_CHARACTER_CACHE_MASK);
|
||||||
|
|
||||||
data.Initialize(SMSG_FEATURE_SYSTEM_STATUS, 34); // added in 2.2.0
|
data.Initialize(SMSG_FEATURE_SYSTEM_STATUS, 34); // added in 2.2.0
|
||||||
data << uint8(2); // status
|
|
||||||
data << uint32(1); // Scrolls of Ressurection?
|
data << uint32(1); // Scrolls of Ressurection?
|
||||||
data << uint32(1);
|
data << uint32(1);
|
||||||
data << uint32(2);
|
data << uint32(2);
|
||||||
data << uint32(0);
|
data << uint32(0);
|
||||||
data.WriteBit(true);
|
data << uint8(2); // complain system status
|
||||||
data.WriteBit(true);
|
|
||||||
data.WriteBit(false);
|
data.WriteBit(false);
|
||||||
|
data.WriteBit(false); // session time alert
|
||||||
data.WriteBit(true);
|
data.WriteBit(true);
|
||||||
data.WriteBit(false);
|
data.WriteBit(false); // enable(1)/disable(0) voice chat interface in client ?
|
||||||
data.WriteBit(false); // enable(1)/disable(0) voice chat interface in client
|
data.WriteBit(true); // quick ticket?
|
||||||
|
data << uint32(60);
|
||||||
|
data << uint32(10);
|
||||||
data << uint32(1);
|
data << uint32(1);
|
||||||
data << uint32(0);
|
data << uint32(0);
|
||||||
data << uint32(10);
|
|
||||||
data << uint32(60);
|
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
|
|
||||||
// Send MOTD
|
// Send MOTD
|
||||||
|
|
@ -1076,7 +1084,7 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(QueryResult* result, uin
|
||||||
WorldSession* session = sWorld.FindSession(accountId);
|
WorldSession* session = sWorld.FindSession(accountId);
|
||||||
if (!session)
|
if (!session)
|
||||||
{
|
{
|
||||||
delete result;
|
if (result) delete result;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -246,12 +246,10 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recv_data)
|
||||||
|
|
||||||
case CHAT_MSG_WHISPER:
|
case CHAT_MSG_WHISPER:
|
||||||
{
|
{
|
||||||
std::string to, msg;
|
|
||||||
uint32 toLength = recv_data.ReadBits(10);
|
|
||||||
uint32 msgLength = recv_data.ReadBits(9);
|
uint32 msgLength = recv_data.ReadBits(9);
|
||||||
to = recv_data.ReadString(toLength);
|
uint32 toLength = recv_data.ReadBits(10);
|
||||||
msg = recv_data.ReadString(msgLength);
|
std::string msg = recv_data.ReadString(msgLength);
|
||||||
|
std::string to = recv_data.ReadString(toLength);
|
||||||
if (msg.empty())
|
if (msg.empty())
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
@ -266,6 +264,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (msg.empty())
|
||||||
|
break;
|
||||||
|
|
||||||
if (!normalizePlayerName(to))
|
if (!normalizePlayerName(to))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1609,19 +1609,19 @@ void WorldSession::HandleReforgeItemOpcode(WorldPacket& recvData)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemReforgeEntry const* stats = sItemReforgeStore.LookupEntry(reforgeEntry);
|
// ItemReforgeEntry const* stats = sItemReforgeStore.LookupEntry(reforgeEntry);
|
||||||
if (!stats)
|
//if (!stats)
|
||||||
{
|
//{
|
||||||
sLog.outDebug("WORLD: HandleReforgeItemOpcode - Player (Guid: %s) tried to reforge an item with invalid reforge entry (%u).", player->GetGuidStr().c_str(), reforgeEntry);
|
// sLog.outDebug("WORLD: HandleReforgeItemOpcode - Player (Guid: %s) tried to reforge an item with invalid reforge entry (%u).", player->GetGuidStr().c_str(), reforgeEntry);
|
||||||
SendReforgeResult(false);
|
// SendReforgeResult(false);
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (!item->GetReforgableStat(ItemModType(stats->SourceStat)) || item->GetReforgableStat(ItemModType(stats->FinalStat))) // Cheating, you cant reforge to a stat that the item already has, nor reforge from a stat that the item does not have
|
//if (!item->GetReforgableStat(ItemModType(stats->SourceStat)) || item->GetReforgableStat(ItemModType(stats->FinalStat))) // Cheating, you cant reforge to a stat that the item already has, nor reforge from a stat that the item does not have
|
||||||
{
|
//{
|
||||||
SendReforgeResult(false);
|
// SendReforgeResult(false);
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (player->GetMoney() < uint64(item->GetSpecialPrice())) // cheating
|
if (player->GetMoney() < uint64(item->GetSpecialPrice())) // cheating
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -198,32 +198,32 @@ void LFGMgr::JoinLFG(uint32 roles, std::set<uint32> dungeons, std::string commen
|
||||||
if (result == ERR_LFG_OK)
|
if (result == ERR_LFG_OK)
|
||||||
{
|
{
|
||||||
// additional checks on dungeon selection
|
// additional checks on dungeon selection
|
||||||
for (std::set<uint32>::iterator it = dungeons.begin(); it != dungeons.end(); ++it)
|
//for (std::set<uint32>::iterator it = dungeons.begin(); it != dungeons.end(); ++it)
|
||||||
{
|
//{
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(*it);
|
// LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(*it);
|
||||||
switch (dungeon->typeID)
|
// switch (dungeon->typeID)
|
||||||
{
|
// {
|
||||||
case LFG_TYPE_RANDOM_DUNGEON:
|
// case LFG_TYPE_RANDOM_DUNGEON:
|
||||||
if (dungeons.size() > 1)
|
// if (dungeons.size() > 1)
|
||||||
result = ERR_LFG_INVALID_SLOT;
|
// result = ERR_LFG_INVALID_SLOT;
|
||||||
else
|
// else
|
||||||
isRandom = true;
|
// isRandom = true;
|
||||||
case LFG_TYPE_DUNGEON:
|
// case LFG_TYPE_DUNGEON:
|
||||||
case LFG_TYPE_HEROIC_DUNGEON:
|
// case LFG_TYPE_HEROIC_DUNGEON:
|
||||||
if (isRaid)
|
// if (isRaid)
|
||||||
result = ERR_LFG_MISMATCHED_SLOTS;
|
// result = ERR_LFG_MISMATCHED_SLOTS;
|
||||||
isDungeon = true;
|
// isDungeon = true;
|
||||||
break;
|
// break;
|
||||||
case LFG_TYPE_RAID:
|
// case LFG_TYPE_RAID:
|
||||||
if (isDungeon)
|
// if (isDungeon)
|
||||||
result = ERR_LFG_MISMATCHED_SLOTS;
|
// result = ERR_LFG_MISMATCHED_SLOTS;
|
||||||
isRaid = true;
|
// isRaid = true;
|
||||||
break;
|
// break;
|
||||||
default: // one of the other types
|
// default: // one of the other types
|
||||||
result = ERR_LFG_INVALID_SLOT;
|
// result = ERR_LFG_INVALID_SLOT;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// since our join result may have just changed, check it again
|
// since our join result may have just changed, check it again
|
||||||
|
|
@ -234,23 +234,23 @@ void LFGMgr::JoinLFG(uint32 roles, std::set<uint32> dungeons, std::string commen
|
||||||
// store the current dungeon id (replaced into the dungeon set later)
|
// store the current dungeon id (replaced into the dungeon set later)
|
||||||
randomDungeonID = *dungeons.begin();
|
randomDungeonID = *dungeons.begin();
|
||||||
// fetch all dungeons with our groupID and add to set
|
// fetch all dungeons with our groupID and add to set
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(*dungeons.begin());
|
//LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(*dungeons.begin());
|
||||||
|
|
||||||
if (dungeon)
|
//if (dungeon)
|
||||||
{
|
//{
|
||||||
uint32 group = dungeon->group_id;
|
// uint32 group = dungeon->group_id;
|
||||||
|
|
||||||
for (uint32 id = 0; id < sLfgDungeonsStore.GetNumRows(); ++id)
|
// for (uint32 id = 0; id < sLfgDungeonsStore.GetNumRows(); ++id)
|
||||||
{
|
// {
|
||||||
LfgDungeonsEntry const* dungeonList = sLfgDungeonsStore.LookupEntry(id);
|
// LfgDungeonsEntry const* dungeonList = sLfgDungeonsStore.LookupEntry(id);
|
||||||
if (dungeonList)
|
// if (dungeonList)
|
||||||
{
|
// {
|
||||||
if (dungeonList->group_id == group)
|
// if (dungeonList->group_id == group)
|
||||||
dungeons.insert(dungeonList->ID); // adding to set
|
// dungeons.insert(dungeonList->ID); // adding to set
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
result = ERR_LFG_NO_LFG_OBJECT;
|
result = ERR_LFG_NO_LFG_OBJECT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -567,67 +567,67 @@ void LFGMgr::SetPlayerUpdateType(ObjectGuid guid, LfgUpdateType updateType)
|
||||||
ItemRewards LFGMgr::GetDungeonItemRewards(uint32 dungeonId, DungeonTypes type)
|
ItemRewards LFGMgr::GetDungeonItemRewards(uint32 dungeonId, DungeonTypes type)
|
||||||
{
|
{
|
||||||
ItemRewards rewards;
|
ItemRewards rewards;
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(dungeonId);
|
//LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(dungeonId);
|
||||||
if (dungeon)
|
//if (dungeon)
|
||||||
{
|
//{
|
||||||
uint32 minLevel = dungeon->minLevel;
|
// uint32 minLevel = dungeon->minLevel;
|
||||||
uint32 maxLevel = dungeon->maxLevel;
|
// uint32 maxLevel = dungeon->maxLevel;
|
||||||
uint32 avgLevel = (minLevel+maxLevel)/2; // otherwise there are issues
|
// uint32 avgLevel = (minLevel+maxLevel)/2; // otherwise there are issues
|
||||||
|
|
||||||
DungeonFinderItemsMap const& itemBuffer = sObjectMgr.GetDungeonFinderItemsMap();
|
// DungeonFinderItemsMap const& itemBuffer = sObjectMgr.GetDungeonFinderItemsMap();
|
||||||
for (DungeonFinderItemsMap::const_iterator it = itemBuffer.begin(); it != itemBuffer.end(); ++it)
|
// for (DungeonFinderItemsMap::const_iterator it = itemBuffer.begin(); it != itemBuffer.end(); ++it)
|
||||||
{
|
// {
|
||||||
DungeonFinderItems itemCache = it->second;
|
// DungeonFinderItems itemCache = it->second;
|
||||||
if (itemCache.dungeonType == type)
|
// if (itemCache.dungeonType == type)
|
||||||
{
|
// {
|
||||||
// should only be one of this inequality in the map
|
// // should only be one of this inequality in the map
|
||||||
if ((avgLevel >= itemCache.minLevel) && (avgLevel <= itemCache.maxLevel))
|
// if ((avgLevel >= itemCache.minLevel) && (avgLevel <= itemCache.maxLevel))
|
||||||
{
|
// {
|
||||||
rewards.itemId = itemCache.itemReward;
|
// rewards.itemId = itemCache.itemReward;
|
||||||
rewards.itemAmount = itemCache.itemAmount;
|
// rewards.itemAmount = itemCache.itemAmount;
|
||||||
return rewards;
|
// return rewards;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
return rewards;
|
return rewards;
|
||||||
}
|
}
|
||||||
|
|
||||||
DungeonTypes LFGMgr::GetDungeonType(uint32 dungeonId)
|
DungeonTypes LFGMgr::GetDungeonType(uint32 dungeonId)
|
||||||
{
|
{
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(dungeonId);
|
//LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(dungeonId);
|
||||||
if (dungeon)
|
//if (dungeon)
|
||||||
{
|
//{
|
||||||
switch (dungeon->expansionLevel)
|
// switch (dungeon->expansionLevel)
|
||||||
{
|
// {
|
||||||
case 0:
|
// case 0:
|
||||||
return DUNGEON_CLASSIC;
|
// return DUNGEON_CLASSIC;
|
||||||
case 1:
|
// case 1:
|
||||||
{
|
// {
|
||||||
if (dungeon->difficulty == DUNGEON_DIFFICULTY_NORMAL)
|
// if (dungeon->difficulty == DUNGEON_DIFFICULTY_NORMAL)
|
||||||
{
|
// {
|
||||||
return DUNGEON_TBC;
|
// return DUNGEON_TBC;
|
||||||
}
|
// }
|
||||||
else if (dungeon->difficulty == DUNGEON_DIFFICULTY_HEROIC)
|
// else if (dungeon->difficulty == DUNGEON_DIFFICULTY_HEROIC)
|
||||||
{
|
// {
|
||||||
return DUNGEON_TBC_HEROIC;
|
// return DUNGEON_TBC_HEROIC;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
case 2:
|
// case 2:
|
||||||
{
|
// {
|
||||||
if (dungeon->difficulty == DUNGEON_DIFFICULTY_NORMAL)
|
// if (dungeon->difficulty == DUNGEON_DIFFICULTY_NORMAL)
|
||||||
{
|
// {
|
||||||
return DUNGEON_WOTLK;
|
// return DUNGEON_WOTLK;
|
||||||
}
|
// }
|
||||||
else if (dungeon->difficulty == DUNGEON_DIFFICULTY_HEROIC)
|
// else if (dungeon->difficulty == DUNGEON_DIFFICULTY_HEROIC)
|
||||||
{
|
// {
|
||||||
return DUNGEON_WOTLK_HEROIC;
|
// return DUNGEON_WOTLK_HEROIC;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
default:
|
// default:
|
||||||
return DUNGEON_UNKNOWN;
|
// return DUNGEON_UNKNOWN;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
return DUNGEON_UNKNOWN;
|
return DUNGEON_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -703,18 +703,18 @@ dungeonEntries LFGMgr::FindRandomDungeonsForPlayer(uint32 level, uint8 expansion
|
||||||
dungeonEntries randomDungeons;
|
dungeonEntries randomDungeons;
|
||||||
|
|
||||||
// go through the dungeon dbc and select the applicable dungeons
|
// go through the dungeon dbc and select the applicable dungeons
|
||||||
for (uint32 id = 0; id < sLfgDungeonsStore.GetNumRows(); ++id)
|
//for (uint32 id = 0; id < sLfgDungeonsStore.GetNumRows(); ++id)
|
||||||
{
|
//{
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(id);
|
// LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(id);
|
||||||
if (dungeon)
|
// if (dungeon)
|
||||||
{
|
// {
|
||||||
if ( (dungeon->typeID == LFG_TYPE_RANDOM_DUNGEON)
|
// if ( (dungeon->typeID == LFG_TYPE_RANDOM_DUNGEON)
|
||||||
|| (IsSeasonal(dungeon->flags) && IsSeasonActive(dungeon->ID)) )
|
// || (IsSeasonal(dungeon->flags) && IsSeasonActive(dungeon->ID)) )
|
||||||
if ((uint8)dungeon->expansionLevel <= expansion && dungeon->minLevel <= level
|
// if ((uint8)dungeon->expansionLevel <= expansion && dungeon->minLevel <= level
|
||||||
&& dungeon->maxLevel >= level)
|
// && dungeon->maxLevel >= level)
|
||||||
randomDungeons[dungeon->ID] = dungeon->Entry();
|
// randomDungeons[dungeon->ID] = dungeon->Entry();
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
return randomDungeons;
|
return randomDungeons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -725,47 +725,47 @@ dungeonForbidden LFGMgr::FindRandomDungeonsNotForPlayer(Player* plr)
|
||||||
|
|
||||||
dungeonForbidden randomDungeons;
|
dungeonForbidden randomDungeons;
|
||||||
|
|
||||||
for (uint32 id = 0; id < sLfgDungeonsStore.GetNumRows(); ++id)
|
//for (uint32 id = 0; id < sLfgDungeonsStore.GetNumRows(); ++id)
|
||||||
{
|
//{
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(id);
|
// LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(id);
|
||||||
if (dungeon)
|
// if (dungeon)
|
||||||
{
|
// {
|
||||||
uint32 forbiddenReason = 0;
|
// uint32 forbiddenReason = 0;
|
||||||
|
|
||||||
if ((uint8)dungeon->expansionLevel > expansion)
|
// if ((uint8)dungeon->expansionLevel > expansion)
|
||||||
forbiddenReason = (uint32)LFG_FORBIDDEN_EXPANSION;
|
// forbiddenReason = (uint32)LFG_FORBIDDEN_EXPANSION;
|
||||||
else if (dungeon->typeID == LFG_TYPE_RAID)
|
// else if (dungeon->typeID == LFG_TYPE_RAID)
|
||||||
forbiddenReason = (uint32)LFG_FORBIDDEN_RAID;
|
// forbiddenReason = (uint32)LFG_FORBIDDEN_RAID;
|
||||||
else if (dungeon->minLevel > level)
|
// else if (dungeon->minLevel > level)
|
||||||
forbiddenReason = (uint32)LFG_FORBIDDEN_LOW_LEVEL;
|
// forbiddenReason = (uint32)LFG_FORBIDDEN_LOW_LEVEL;
|
||||||
else if (dungeon->maxLevel < level)
|
// else if (dungeon->maxLevel < level)
|
||||||
forbiddenReason = (uint32)LFG_FORBIDDEN_HIGH_LEVEL;
|
// forbiddenReason = (uint32)LFG_FORBIDDEN_HIGH_LEVEL;
|
||||||
else if (IsSeasonal(dungeon->flags) && !IsSeasonActive(dungeon->ID)) // check pointers/function args
|
// else if (IsSeasonal(dungeon->flags) && !IsSeasonActive(dungeon->ID)) // check pointers/function args
|
||||||
forbiddenReason = (uint32)LFG_FORBIDDEN_NOT_IN_SEASON;
|
// forbiddenReason = (uint32)LFG_FORBIDDEN_NOT_IN_SEASON;
|
||||||
else if (DungeonFinderRequirements const* req = sObjectMgr.GetDungeonFinderRequirements((uint32)dungeon->mapID, dungeon->difficulty))
|
// else if (DungeonFinderRequirements const* req = sObjectMgr.GetDungeonFinderRequirements((uint32)dungeon->mapID, dungeon->difficulty))
|
||||||
{
|
// {
|
||||||
if (req->minItemLevel && (plr->GetEquipGearScore(false,false) < req->minItemLevel))
|
// if (req->minItemLevel && (plr->GetEquipGearScore(false,false) < req->minItemLevel))
|
||||||
forbiddenReason = (uint32)LFG_FORBIDDEN_LOW_GEAR_SCORE;
|
// forbiddenReason = (uint32)LFG_FORBIDDEN_LOW_GEAR_SCORE;
|
||||||
else if (req->achievement && !plr->GetAchievementMgr().HasAchievement(req->achievement))
|
// else if (req->achievement && !plr->GetAchievementMgr().HasAchievement(req->achievement))
|
||||||
forbiddenReason = (uint32)LFG_FORBIDDEN_MISSING_ACHIEVEMENT;
|
// forbiddenReason = (uint32)LFG_FORBIDDEN_MISSING_ACHIEVEMENT;
|
||||||
else if (plr->GetTeam() == ALLIANCE && req->allianceQuestId && !plr->GetQuestRewardStatus(req->allianceQuestId))
|
// else if (plr->GetTeam() == ALLIANCE && req->allianceQuestId && !plr->GetQuestRewardStatus(req->allianceQuestId))
|
||||||
forbiddenReason = (uint32)LFG_FORBIDDEN_QUEST_INCOMPLETE;
|
// forbiddenReason = (uint32)LFG_FORBIDDEN_QUEST_INCOMPLETE;
|
||||||
else if (plr->GetTeam() == HORDE && req->hordeQuestId && !plr->GetQuestRewardStatus(req->hordeQuestId))
|
// else if (plr->GetTeam() == HORDE && req->hordeQuestId && !plr->GetQuestRewardStatus(req->hordeQuestId))
|
||||||
forbiddenReason = (uint32)LFG_FORBIDDEN_QUEST_INCOMPLETE;
|
// forbiddenReason = (uint32)LFG_FORBIDDEN_QUEST_INCOMPLETE;
|
||||||
else
|
// else
|
||||||
if (req->item)
|
// if (req->item)
|
||||||
{
|
// {
|
||||||
if (!plr->HasItemCount(req->item, 1) && (!req->item2 || !plr->HasItemCount(req->item2, 1)))
|
// if (!plr->HasItemCount(req->item, 1) && (!req->item2 || !plr->HasItemCount(req->item2, 1)))
|
||||||
forbiddenReason = LFG_FORBIDDEN_MISSING_ITEM;
|
// forbiddenReason = LFG_FORBIDDEN_MISSING_ITEM;
|
||||||
}
|
// }
|
||||||
else if (req->item2 && !plr->HasItemCount(req->item2, 1))
|
// else if (req->item2 && !plr->HasItemCount(req->item2, 1))
|
||||||
forbiddenReason = LFG_FORBIDDEN_MISSING_ITEM;
|
// forbiddenReason = LFG_FORBIDDEN_MISSING_ITEM;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (forbiddenReason)
|
// if (forbiddenReason)
|
||||||
randomDungeons[dungeon->Entry()] = forbiddenReason;
|
// randomDungeons[dungeon->Entry()] = forbiddenReason;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
return randomDungeons;
|
return randomDungeons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -793,18 +793,18 @@ void LFGMgr::UpdateNeededRoles(ObjectGuid guid, LFGPlayers* information)
|
||||||
|
|
||||||
std::set<uint32>::iterator itr = information->dungeonList.begin();
|
std::set<uint32>::iterator itr = information->dungeonList.begin();
|
||||||
|
|
||||||
// check dungeon type for max of each role [normal heroic etc.]
|
//// check dungeon type for max of each role [normal heroic etc.]
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(*itr);
|
//LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(*itr);
|
||||||
if (dungeon)
|
//if (dungeon)
|
||||||
{
|
//{
|
||||||
// atm we're just handling DUNGEON_DIFFICULTY_NORMAL
|
// // atm we're just handling DUNGEON_DIFFICULTY_NORMAL
|
||||||
if (dungeon->difficulty == DUNGEON_DIFFICULTY_NORMAL)
|
// if (dungeon->difficulty == DUNGEON_DIFFICULTY_NORMAL)
|
||||||
{
|
// {
|
||||||
information->neededTanks = NORMAL_TANK_OR_HEALER_COUNT - tankCount;
|
// information->neededTanks = NORMAL_TANK_OR_HEALER_COUNT - tankCount;
|
||||||
information->neededHealers = NORMAL_TANK_OR_HEALER_COUNT - healCount;
|
// information->neededHealers = NORMAL_TANK_OR_HEALER_COUNT - healCount;
|
||||||
information->neededDps = NORMAL_DAMAGE_COUNT - dpsCount;
|
// information->neededDps = NORMAL_DAMAGE_COUNT - dpsCount;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
m_playerData[guid] = *information;
|
m_playerData[guid] = *information;
|
||||||
}
|
}
|
||||||
|
|
@ -1112,12 +1112,12 @@ void LFGMgr::SendQueueStatus()
|
||||||
|
|
||||||
uint32 LFGMgr::GetDungeonEntry(uint32 ID)
|
uint32 LFGMgr::GetDungeonEntry(uint32 ID)
|
||||||
{
|
{
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(ID);
|
//LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(ID);
|
||||||
if (dungeon)
|
//if (dungeon)
|
||||||
{
|
//{
|
||||||
return dungeon->Entry();
|
// return dungeon->Entry();
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1524,21 +1524,21 @@ void LFGMgr::CreateDungeonGroup(LFGProposal* proposal)
|
||||||
}
|
}
|
||||||
|
|
||||||
// set dungeon difficulty for group
|
// set dungeon difficulty for group
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(proposal->dungeonID);
|
//LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(proposal->dungeonID);
|
||||||
if (!dungeon)
|
//if (!dungeon)
|
||||||
{
|
//{
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
pGroup->SetDungeonDifficulty(Difficulty(dungeon->difficulty)); //todo: check for raids and if so call setraiddifficulty
|
//pGroup->SetDungeonDifficulty(Difficulty(dungeon->difficulty)); //todo: check for raids and if so call setraiddifficulty
|
||||||
|
|
||||||
// Add group to our group set and group map, then teleport to the dungeon
|
//// Add group to our group set and group map, then teleport to the dungeon
|
||||||
ObjectGuid groupGuid = pGroup->GetObjectGuid();
|
//ObjectGuid groupGuid = pGroup->GetObjectGuid();
|
||||||
LFGGroupStatus groupStatus(LFG_STATE_IN_DUNGEON, dungeon->ID, proposal->currentRoles, pGroup->GetLeaderGuid());
|
//LFGGroupStatus groupStatus(LFG_STATE_IN_DUNGEON, dungeon->ID, proposal->currentRoles, pGroup->GetLeaderGuid());
|
||||||
|
|
||||||
m_groupSet.insert(groupGuid);
|
//m_groupSet.insert(groupGuid);
|
||||||
m_groupStatusMap[groupGuid] = groupStatus;
|
//m_groupStatusMap[groupGuid] = groupStatus;
|
||||||
TeleportToDungeon(dungeon->ID, pGroup);
|
//TeleportToDungeon(dungeon->ID, pGroup);
|
||||||
|
|
||||||
pGroup->SendUpdate();
|
pGroup->SendUpdate();
|
||||||
}
|
}
|
||||||
|
|
@ -1547,38 +1547,38 @@ void LFGMgr::TeleportToDungeon(uint32 dungeonID, Group* pGroup)
|
||||||
{
|
{
|
||||||
// if the group's leader is already in the dungeon, teleport anyone not in dungeon to them
|
// if the group's leader is already in the dungeon, teleport anyone not in dungeon to them
|
||||||
// if nobody is in the dungeon, teleport all to beginning of dungeon (sObjectMgr.GetMapEntranceTrigger(mapid [not dungeonid]))
|
// if nobody is in the dungeon, teleport all to beginning of dungeon (sObjectMgr.GetMapEntranceTrigger(mapid [not dungeonid]))
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(dungeonID);
|
//LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(dungeonID);
|
||||||
if (!dungeon || !pGroup)
|
//if (!dungeon || !pGroup)
|
||||||
{
|
//{
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
|
||||||
uint32 mapID = (uint32)dungeon->mapID;
|
//uint32 mapID = (uint32)dungeon->mapID;
|
||||||
float x, y, z, o;
|
//float x, y, z, o;
|
||||||
LFGTeleportError err = LFG_TELEPORTERROR_OK;
|
//LFGTeleportError err = LFG_TELEPORTERROR_OK;
|
||||||
|
|
||||||
Player* pGroupLeader = ObjectAccessor::FindPlayer(pGroup->GetLeaderGuid());
|
//Player* pGroupLeader = ObjectAccessor::FindPlayer(pGroup->GetLeaderGuid());
|
||||||
|
|
||||||
if (pGroupLeader && pGroupLeader->GetMapId() == mapID) // Already in the dungeon
|
//if (pGroupLeader && pGroupLeader->GetMapId() == mapID) // Already in the dungeon
|
||||||
{
|
//{
|
||||||
// set teleport location to that of the group leader
|
// // set teleport location to that of the group leader
|
||||||
x = pGroupLeader->GetPositionX();
|
// x = pGroupLeader->GetPositionX();
|
||||||
y = pGroupLeader->GetPositionY();
|
// y = pGroupLeader->GetPositionY();
|
||||||
z = pGroupLeader->GetPositionZ();
|
// z = pGroupLeader->GetPositionZ();
|
||||||
o = pGroupLeader->GetOrientation();
|
// o = pGroupLeader->GetOrientation();
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
if (AreaTrigger const* at = sObjectMgr.GetMapEntranceTrigger(mapID))
|
// if (AreaTrigger const* at = sObjectMgr.GetMapEntranceTrigger(mapID))
|
||||||
{
|
// {
|
||||||
x = at->target_X;
|
// x = at->target_X;
|
||||||
y = at->target_Y;
|
// y = at->target_Y;
|
||||||
z = at->target_Z;
|
// z = at->target_Z;
|
||||||
o = at->target_Orientation;
|
// o = at->target_Orientation;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
err = LFG_TELEPORTERROR_INVALID_LOCATION;
|
// err = LFG_TELEPORTERROR_INVALID_LOCATION;
|
||||||
}
|
//}
|
||||||
|
|
||||||
dungeonForbidden lockedDungeons;
|
dungeonForbidden lockedDungeons;
|
||||||
for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
|
for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||||
|
|
@ -1596,23 +1596,23 @@ void LFGMgr::TeleportToDungeon(uint32 dungeonID, Group* pGroup)
|
||||||
plrErr = LFG_TELEPORTERROR_IN_VEHICLE;
|
plrErr = LFG_TELEPORTERROR_IN_VEHICLE;
|
||||||
|
|
||||||
lockedDungeons = FindRandomDungeonsNotForPlayer(pGroupPlr);
|
lockedDungeons = FindRandomDungeonsNotForPlayer(pGroupPlr);
|
||||||
if (lockedDungeons.find(dungeon->Entry()) != lockedDungeons.end())
|
//if (lockedDungeons.find(dungeon->Entry()) != lockedDungeons.end())
|
||||||
plrErr = LFG_TELEPORTERROR_INVALID_LOCATION;
|
// plrErr = LFG_TELEPORTERROR_INVALID_LOCATION;
|
||||||
|
|
||||||
if (err == LFG_TELEPORTERROR_OK && plrErr == LFG_TELEPORTERROR_OK && pGroupPlr->GetMapId() != mapID)
|
//if (err == LFG_TELEPORTERROR_OK && plrErr == LFG_TELEPORTERROR_OK && pGroupPlr->GetMapId() != mapID)
|
||||||
{
|
//{
|
||||||
if (pGroupPlr->GetMap() && !pGroupPlr->GetMap()->IsDungeon() && !pGroupPlr->GetMap()->IsRaid() && !pGroupPlr->InBattleGround())
|
// if (pGroupPlr->GetMap() && !pGroupPlr->GetMap()->IsDungeon() && !pGroupPlr->GetMap()->IsRaid() && !pGroupPlr->InBattleGround())
|
||||||
pGroupPlr->SetBattleGroundEntryPoint(); // store current position and such
|
// pGroupPlr->SetBattleGroundEntryPoint(); // store current position and such
|
||||||
|
|
||||||
if (!pGroupPlr->TeleportTo(mapID, x, y, z, o))
|
// if (!pGroupPlr->TeleportTo(mapID, x, y, z, o))
|
||||||
plrErr = LFG_TELEPORTERROR_INVALID_LOCATION;
|
// plrErr = LFG_TELEPORTERROR_INVALID_LOCATION;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (err != LFG_TELEPORTERROR_OK)
|
//if (err != LFG_TELEPORTERROR_OK)
|
||||||
pGroupPlr->GetSession()->SendLfgTeleportError(err);
|
// pGroupPlr->GetSession()->SendLfgTeleportError(err);
|
||||||
else if (plrErr != LFG_TELEPORTERROR_OK)
|
//else if (plrErr != LFG_TELEPORTERROR_OK)
|
||||||
pGroupPlr->GetSession()->SendLfgTeleportError(plrErr);
|
// pGroupPlr->GetSession()->SendLfgTeleportError(plrErr);
|
||||||
else
|
//else
|
||||||
SetPlayerState(pGroupPlr->GetObjectGuid(), LFG_STATE_IN_DUNGEON);
|
SetPlayerState(pGroupPlr->GetObjectGuid(), LFG_STATE_IN_DUNGEON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1633,9 +1633,9 @@ void LFGMgr::TeleportPlayer(Player* pPlayer, bool out)
|
||||||
// Get dungeon info and then teleport the player out if applicable
|
// Get dungeon info and then teleport the player out if applicable
|
||||||
if (out)
|
if (out)
|
||||||
{
|
{
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(status->dungeonID);
|
//LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(status->dungeonID);
|
||||||
if (dungeon && pPlayer->GetMapId() == dungeon->mapID)
|
//if (dungeon && pPlayer->GetMapId() == dungeon->mapID)
|
||||||
pPlayer->TeleportToBGEntryPoint();
|
// pPlayer->TeleportToBGEntryPoint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1806,9 +1806,9 @@ void LFGMgr::HandleBossKilled(Player* pPlayer)
|
||||||
|
|
||||||
// check if player did a random dungeon
|
// check if player did a random dungeon
|
||||||
uint32 randomDungeonId = 0;
|
uint32 randomDungeonId = 0;
|
||||||
LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(status->dungeonID);
|
//LfgDungeonsEntry const* dungeon = sLfgDungeonsStore.LookupEntry(status->dungeonID);
|
||||||
if (dungeon->typeID == LFG_TYPE_RANDOM_DUNGEON || IsSeasonal(dungeon->flags))
|
//if (dungeon->typeID == LFG_TYPE_RANDOM_DUNGEON || IsSeasonal(dungeon->flags))
|
||||||
randomDungeonId = dungeon->ID;
|
// randomDungeonId = dungeon->ID;
|
||||||
|
|
||||||
// get rewards
|
// get rewards
|
||||||
uint32 groupPlrLevel = pGroupPlr->getLevel();
|
uint32 groupPlrLevel = pGroupPlr->getLevel();
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ void WorldSession::HandlePetAction(WorldPacket& recv_data)
|
||||||
|
|
||||||
SpellCastResult result = spell->CheckPetCast(unit_target);
|
SpellCastResult result = spell->CheckPetCast(unit_target);
|
||||||
|
|
||||||
const SpellRangeEntry* sRange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
|
const SpellRangeEntry* sRange = sSpellRangeStore.LookupEntry(spellInfo->GetRangeIndex());
|
||||||
|
|
||||||
if (unit_target && !(pet->IsWithinDistInMap(unit_target, sRange->maxRange) && pet->IsWithinLOSInMap(unit_target))
|
if (unit_target && !(pet->IsWithinDistInMap(unit_target, sRange->maxRange) && pet->IsWithinLOSInMap(unit_target))
|
||||||
&& !(GetPlayer()->IsFriendlyTo(unit_target) || pet->HasAuraType(SPELL_AURA_MOD_POSSESS)))
|
&& !(GetPlayer()->IsFriendlyTo(unit_target) || pet->HasAuraType(SPELL_AURA_MOD_POSSESS)))
|
||||||
|
|
|
||||||
|
|
@ -379,14 +379,14 @@ Spell::Spell(Unit* caster, SpellEntry const* info, bool triggered, ObjectGuid or
|
||||||
MANGOS_ASSERT(caster != NULL && info != NULL);
|
MANGOS_ASSERT(caster != NULL && info != NULL);
|
||||||
MANGOS_ASSERT(info == sSpellStore.LookupEntry(info->Id) && "`info` must be pointer to sSpellStore element");
|
MANGOS_ASSERT(info == sSpellStore.LookupEntry(info->Id) && "`info` must be pointer to sSpellStore element");
|
||||||
|
|
||||||
if (info->SpellDifficultyId && caster->IsInWorld() && caster->GetMap()->IsDungeon())
|
//if (info->SpellDifficultyId && caster->IsInWorld() && caster->GetMap()->IsDungeon())
|
||||||
{
|
//{
|
||||||
if (SpellEntry const* spellEntry = GetSpellEntryByDifficulty(info->SpellDifficultyId, caster->GetMap()->GetDifficulty(), caster->GetMap()->IsRaid()))
|
// if (SpellEntry const* spellEntry = GetSpellEntryByDifficulty(info->SpellDifficultyId, caster->GetMap()->GetDifficulty(), caster->GetMap()->IsRaid()))
|
||||||
m_spellInfo = spellEntry;
|
// m_spellInfo = spellEntry;
|
||||||
else
|
// else
|
||||||
m_spellInfo = info;
|
// m_spellInfo = info;
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
m_spellInfo = info;
|
m_spellInfo = info;
|
||||||
|
|
||||||
m_triggeredBySpellInfo = triggeredBy;
|
m_triggeredBySpellInfo = triggeredBy;
|
||||||
|
|
@ -496,7 +496,7 @@ template<typename T>
|
||||||
WorldObject* Spell::FindCorpseUsing()
|
WorldObject* Spell::FindCorpseUsing()
|
||||||
{
|
{
|
||||||
// non-standard target selection
|
// non-standard target selection
|
||||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex);
|
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex());
|
||||||
float max_range = GetSpellMaxRange(srange);
|
float max_range = GetSpellMaxRange(srange);
|
||||||
|
|
||||||
WorldObject* result = NULL;
|
WorldObject* result = NULL;
|
||||||
|
|
@ -960,7 +960,7 @@ void Spell::AddUnitTarget(Unit* pVictim, SpellEffectIndex effIndex)
|
||||||
WorldObject* affectiveObject = GetAffectiveCasterObject();
|
WorldObject* affectiveObject = GetAffectiveCasterObject();
|
||||||
|
|
||||||
// Spell have speed (possible inherited from triggering spell) - need calculate incoming time
|
// Spell have speed (possible inherited from triggering spell) - need calculate incoming time
|
||||||
float speed = m_spellInfo->speed == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->speed : m_spellInfo->speed;
|
float speed = m_spellInfo->GetSpeed() == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->GetSpeed() : m_spellInfo->GetSpeed();
|
||||||
if (speed > 0.0f && affectiveObject && (pVictim != affectiveObject || (m_targets.m_targetMask & (TARGET_FLAG_SOURCE_LOCATION | TARGET_FLAG_DEST_LOCATION))))
|
if (speed > 0.0f && affectiveObject && (pVictim != affectiveObject || (m_targets.m_targetMask & (TARGET_FLAG_SOURCE_LOCATION | TARGET_FLAG_DEST_LOCATION))))
|
||||||
{
|
{
|
||||||
// calculate spell incoming interval
|
// calculate spell incoming interval
|
||||||
|
|
@ -984,13 +984,13 @@ void Spell::AddUnitTarget(Unit* pVictim, SpellEffectIndex effIndex)
|
||||||
m_delayMoment = target.timeDelay;
|
m_delayMoment = target.timeDelay;
|
||||||
}
|
}
|
||||||
// Spell casted on self - mostly TRIGGER_MISSILE code
|
// Spell casted on self - mostly TRIGGER_MISSILE code
|
||||||
else if (m_spellInfo->speed > 0.0f && affectiveObject && pVictim == affectiveObject)
|
else if (m_spellInfo->GetSpeed() > 0.0f && affectiveObject && pVictim == affectiveObject)
|
||||||
{
|
{
|
||||||
float dist = 0.0f;
|
float dist = 0.0f;
|
||||||
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||||
dist = affectiveObject->GetDistance(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ);
|
dist = affectiveObject->GetDistance(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ);
|
||||||
|
|
||||||
target.timeDelay = (uint64) floor(dist / m_spellInfo->speed * 1000.0f);
|
target.timeDelay = (uint64) floor(dist / m_spellInfo->GetSpeed() * 1000.0f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
target.timeDelay = UI64LIT(0);
|
target.timeDelay = UI64LIT(0);
|
||||||
|
|
@ -1053,7 +1053,7 @@ void Spell::AddGOTarget(GameObject* pVictim, SpellEffectIndex effIndex)
|
||||||
WorldObject* affectiveObject = GetAffectiveCasterObject();
|
WorldObject* affectiveObject = GetAffectiveCasterObject();
|
||||||
|
|
||||||
// Spell can have speed - need calculate incoming time
|
// Spell can have speed - need calculate incoming time
|
||||||
float speed = m_spellInfo->speed == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->speed : m_spellInfo->speed;
|
float speed = m_spellInfo->GetSpeed() == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->GetSpeed() : m_spellInfo->GetSpeed();
|
||||||
if (speed > 0.0f && affectiveObject && pVictim != affectiveObject)
|
if (speed > 0.0f && affectiveObject && pVictim != affectiveObject)
|
||||||
{
|
{
|
||||||
// calculate spell incoming interval
|
// calculate spell incoming interval
|
||||||
|
|
@ -1148,7 +1148,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||||
procVictim = PROC_FLAG_NONE;
|
procVictim = PROC_FLAG_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
float speed = m_spellInfo->speed == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->speed : m_spellInfo->speed;
|
float speed = m_spellInfo->GetSpeed() == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->GetSpeed() : m_spellInfo->GetSpeed();
|
||||||
if (speed > 0.0f)
|
if (speed > 0.0f)
|
||||||
{
|
{
|
||||||
// mark effects that were already handled in Spell::HandleDelayedSpellLaunch on spell launch as processed
|
// mark effects that were already handled in Spell::HandleDelayedSpellLaunch on spell launch as processed
|
||||||
|
|
@ -1254,7 +1254,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||||
// Haunt (NOTE: for avoid use additional field damage stored in dummy value (replace unused 100%)
|
// Haunt (NOTE: for avoid use additional field damage stored in dummy value (replace unused 100%)
|
||||||
// apply before deal damage because aura can be removed at target kill
|
// apply before deal damage because aura can be removed at target kill
|
||||||
SpellClassOptionsEntry const *classOpt = m_spellInfo->GetSpellClassOptions();
|
SpellClassOptionsEntry const *classOpt = m_spellInfo->GetSpellClassOptions();
|
||||||
if (classOpt && classOpt->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->SpellIconID == 3172 &&
|
if (classOpt && classOpt->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->GetSpellIconID() == 3172 &&
|
||||||
(classOpt->SpellFamilyFlags & UI64LIT(0x0004000000000000)))
|
(classOpt->SpellFamilyFlags & UI64LIT(0x0004000000000000)))
|
||||||
if(Aura* dummy = unitTarget->GetDummyAura(m_spellInfo->Id))
|
if(Aura* dummy = unitTarget->GetDummyAura(m_spellInfo->Id))
|
||||||
dummy->GetModifier()->m_amount = damageInfo.damage;
|
dummy->GetModifier()->m_amount = damageInfo.damage;
|
||||||
|
|
@ -1325,7 +1325,7 @@ void Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask)
|
||||||
Unit* realCaster = GetAffectiveCaster();
|
Unit* realCaster = GetAffectiveCaster();
|
||||||
|
|
||||||
// Recheck immune (only for delayed spells)
|
// Recheck immune (only for delayed spells)
|
||||||
float speed = m_spellInfo->speed == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->speed : m_spellInfo->speed;
|
float speed = m_spellInfo->GetSpeed() == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->GetSpeed() : m_spellInfo->GetSpeed();
|
||||||
if (speed && (
|
if (speed && (
|
||||||
unit->IsImmunedToDamage(GetSpellSchoolMask(m_spellInfo)) ||
|
unit->IsImmunedToDamage(GetSpellSchoolMask(m_spellInfo)) ||
|
||||||
unit->IsImmuneToSpell(m_spellInfo, unit == realCaster)))
|
unit->IsImmuneToSpell(m_spellInfo, unit == realCaster)))
|
||||||
|
|
@ -1448,7 +1448,7 @@ void Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask)
|
||||||
if (m_applyMultiplierMask & (1 << effectNumber))
|
if (m_applyMultiplierMask & (1 << effectNumber))
|
||||||
{
|
{
|
||||||
// Get multiplier
|
// Get multiplier
|
||||||
float multiplier = spellEffect ? spellEffect->EffectDamageMultiplier : 1.0f;
|
float multiplier = spellEffect ? spellEffect->DmgMultiplier : 1.0f;
|
||||||
// Apply multiplier mods
|
// Apply multiplier mods
|
||||||
if (realCaster)
|
if (realCaster)
|
||||||
if (Player* modOwner = realCaster->GetSpellModOwner())
|
if (Player* modOwner = realCaster->GetSpellModOwner())
|
||||||
|
|
@ -1581,7 +1581,7 @@ void Spell::HandleDelayedSpellLaunch(TargetInfo* target)
|
||||||
if (m_applyMultiplierMask & (1 << effectNumber))
|
if (m_applyMultiplierMask & (1 << effectNumber))
|
||||||
{
|
{
|
||||||
// Get multiplier
|
// Get multiplier
|
||||||
float multiplier = spellEffect ? spellEffect->EffectDamageMultiplier : 1.0f;
|
float multiplier = spellEffect ? spellEffect->DmgMultiplier : 1.0f;
|
||||||
// Apply multiplier mods
|
// Apply multiplier mods
|
||||||
if (real_caster)
|
if (real_caster)
|
||||||
if (Player* modOwner = real_caster->GetSpellModOwner())
|
if (Player* modOwner = real_caster->GetSpellModOwner())
|
||||||
|
|
@ -2178,7 +2178,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
// search all GO's with entry, within range of m_destN
|
// search all GO's with entry, within range of m_destN
|
||||||
MaNGOS::GameObjectEntryInPosRangeCheck go_check(*m_caster, i_spellST->targetEntry, x, y, z, radius);
|
MaNGOS::GameObjectEntryInPosRangeCheck go_check(*m_caster, i_spellST->targetEntry, x, y, z, radius);
|
||||||
MaNGOS::GameObjectListSearcher<MaNGOS::GameObjectEntryInPosRangeCheck> checker(tempTargetGOList, go_check);
|
MaNGOS::GameObjectListSearcher<MaNGOS::GameObjectEntryInPosRangeCheck> checker(tempTargetGOList, go_check);
|
||||||
Cell::VisitGridObjects(m_caster, checker, radius + GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)));
|
Cell::VisitGridObjects(m_caster, checker, radius + GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2189,7 +2189,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
{
|
{
|
||||||
MaNGOS::GameObjectTypeInPosRangeCheck go_check(*m_caster, GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING, x, y, z, radius, spellEffect->Effect == SPELL_EFFECT_WMO_DAMAGE, spellEffect->Effect == SPELL_EFFECT_WMO_REPAIR);
|
MaNGOS::GameObjectTypeInPosRangeCheck go_check(*m_caster, GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING, x, y, z, radius, spellEffect->Effect == SPELL_EFFECT_WMO_DAMAGE, spellEffect->Effect == SPELL_EFFECT_WMO_REPAIR);
|
||||||
MaNGOS::GameObjectListSearcher<MaNGOS::GameObjectTypeInPosRangeCheck> checker(tempTargetGOList, go_check);
|
MaNGOS::GameObjectListSearcher<MaNGOS::GameObjectTypeInPosRangeCheck> checker(tempTargetGOList, go_check);
|
||||||
Cell::VisitGridObjects(m_caster, checker, radius + GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex)));
|
Cell::VisitGridObjects(m_caster, checker, radius + GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2365,7 +2365,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
targetUnitMap.push_back(target);
|
targetUnitMap.push_back(target);
|
||||||
}
|
}
|
||||||
// Circle of Healing
|
// Circle of Healing
|
||||||
else if (m_spellInfo->GetSpellFamilyName() == SPELLFAMILY_PRIEST && m_spellInfo->SpellVisual[0] == 8253)
|
else if (m_spellInfo->GetSpellFamilyName() == SPELLFAMILY_PRIEST && m_spellInfo->GetSpellVisual() == 8253)
|
||||||
{
|
{
|
||||||
Unit* target = m_targets.getUnitTarget();
|
Unit* target = m_targets.getUnitTarget();
|
||||||
if (!target)
|
if (!target)
|
||||||
|
|
@ -2379,7 +2379,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
FillRaidOrPartyHealthPriorityTargets(targetUnitMap, m_caster, target, radius, count, true, false, true);
|
FillRaidOrPartyHealthPriorityTargets(targetUnitMap, m_caster, target, radius, count, true, false, true);
|
||||||
}
|
}
|
||||||
// Wild Growth
|
// Wild Growth
|
||||||
else if (m_spellInfo->GetSpellFamilyName() == SPELLFAMILY_DRUID && m_spellInfo->SpellIconID == 2864)
|
else if (m_spellInfo->GetSpellFamilyName() == SPELLFAMILY_DRUID && m_spellInfo->GetSpellIconID() == 2864)
|
||||||
{
|
{
|
||||||
Unit* target = m_targets.getUnitTarget();
|
Unit* target = m_targets.getUnitTarget();
|
||||||
if (!target)
|
if (!target)
|
||||||
|
|
@ -2454,7 +2454,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
case TARGET_IN_FRONT_OF_CASTER:
|
case TARGET_IN_FRONT_OF_CASTER:
|
||||||
{
|
{
|
||||||
SpellNotifyPushType pushType = PUSH_IN_FRONT;
|
SpellNotifyPushType pushType = PUSH_IN_FRONT;
|
||||||
switch (m_spellInfo->SpellVisual[0]) // Some spell require a different target fill
|
switch (m_spellInfo->GetSpellVisual()) // Some spell require a different target fill
|
||||||
{
|
{
|
||||||
case 3879: pushType = PUSH_IN_BACK; break;
|
case 3879: pushType = PUSH_IN_BACK; break;
|
||||||
case 7441: pushType = PUSH_IN_FRONT_15; break;
|
case 7441: pushType = PUSH_IN_FRONT_15; break;
|
||||||
|
|
@ -2881,7 +2881,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
{
|
{
|
||||||
if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION))
|
if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION))
|
||||||
{
|
{
|
||||||
SpellRangeEntry const* rEntry = sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex);
|
SpellRangeEntry const* rEntry = sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex());
|
||||||
float minRange = GetSpellMinRange(rEntry);
|
float minRange = GetSpellMinRange(rEntry);
|
||||||
float maxRange = GetSpellMaxRange(rEntry);
|
float maxRange = GetSpellMaxRange(rEntry);
|
||||||
float dist = minRange + rand_norm_f() * (maxRange - minRange);
|
float dist = minRange + rand_norm_f() * (maxRange - minRange);
|
||||||
|
|
@ -3028,7 +3028,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
break;
|
break;
|
||||||
case SPELL_EFFECT_APPLY_AREA_AURA_PARTY:
|
case SPELL_EFFECT_APPLY_AREA_AURA_PARTY:
|
||||||
// AreaAura
|
// AreaAura
|
||||||
if ((m_spellInfo->Attributes == (SPELL_ATTR_NOT_SHAPESHIFT | SPELL_ATTR_UNK18 | SPELL_ATTR_CASTABLE_WHILE_MOUNTED | SPELL_ATTR_CASTABLE_WHILE_SITTING)) || (m_spellInfo->Attributes == SPELL_ATTR_NOT_SHAPESHIFT))
|
if ((m_spellInfo->GetAttributes() == (SPELL_ATTR_NOT_SHAPESHIFT | SPELL_ATTR_UNK18 | SPELL_ATTR_CASTABLE_WHILE_MOUNTED | SPELL_ATTR_CASTABLE_WHILE_SITTING)) || (m_spellInfo->GetAttributes() == SPELL_ATTR_NOT_SHAPESHIFT))
|
||||||
SetTargetMap(effIndex, TARGET_AREAEFFECT_PARTY, targetUnitMap);
|
SetTargetMap(effIndex, TARGET_AREAEFFECT_PARTY, targetUnitMap);
|
||||||
break;
|
break;
|
||||||
case SPELL_EFFECT_SKIN_PLAYER_CORPSE:
|
case SPELL_EFFECT_SKIN_PLAYER_CORPSE:
|
||||||
|
|
@ -3393,7 +3393,7 @@ void Spell::cast(bool skipCheck)
|
||||||
else if (m_spellInfo->Id == 71904)
|
else if (m_spellInfo->Id == 71904)
|
||||||
AddTriggeredSpell(73422);
|
AddTriggeredSpell(73422);
|
||||||
// Weak Alcohol
|
// Weak Alcohol
|
||||||
else if (m_spellInfo->SpellIconID == 1306 && m_spellInfo->SpellVisual[0] == 11359)
|
else if (m_spellInfo->Id == 1306 && m_spellInfo->GetSpellVisual(0) == 11359)
|
||||||
AddTriggeredSpell(51655); // BOTM - Create Empty Brew Bottle
|
AddTriggeredSpell(51655); // BOTM - Create Empty Brew Bottle
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -3608,7 +3608,7 @@ void Spell::cast(bool skipCheck)
|
||||||
procTarget = m_caster;
|
procTarget = m_caster;
|
||||||
|
|
||||||
// Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells
|
// Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells
|
||||||
float speed = m_spellInfo->speed == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->speed : m_spellInfo->speed;
|
float speed = m_spellInfo->GetSpeed() == 0.0f && m_triggeredBySpellInfo ? m_triggeredBySpellInfo->GetSpeed() : m_spellInfo->GetSpeed();
|
||||||
if (speed > 0.0f)
|
if (speed > 0.0f)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -4215,7 +4215,7 @@ void Spell::SendSpellStart()
|
||||||
|
|
||||||
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
|
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
|
||||||
m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->IsPet()) &&
|
m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->IsPet()) &&
|
||||||
m_spellInfo->powerType != POWER_HEALTH)
|
m_spellInfo->GetPowerType() != POWER_HEALTH)
|
||||||
castFlags |= CAST_FLAG_PREDICTED_POWER;
|
castFlags |= CAST_FLAG_PREDICTED_POWER;
|
||||||
|
|
||||||
if (m_casttime && (IsSpellHaveEffect(m_spellInfo, SPELL_EFFECT_HEAL) || IsSpellHaveEffect(m_spellInfo, SPELL_EFFECT_HEAL_PCT)) ||
|
if (m_casttime && (IsSpellHaveEffect(m_spellInfo, SPELL_EFFECT_HEAL) || IsSpellHaveEffect(m_spellInfo, SPELL_EFFECT_HEAL_PCT)) ||
|
||||||
|
|
@ -4240,7 +4240,7 @@ void Spell::SendSpellStart()
|
||||||
data << m_targets;
|
data << m_targets;
|
||||||
|
|
||||||
if (castFlags & CAST_FLAG_PREDICTED_POWER) // predicted power
|
if (castFlags & CAST_FLAG_PREDICTED_POWER) // predicted power
|
||||||
data << uint32(m_caster->GetPower(Powers(m_spellInfo->powerType)));
|
data << uint32(m_caster->GetPower(Powers(m_spellInfo->GetPowerType())));
|
||||||
|
|
||||||
if (castFlags & CAST_FLAG_PREDICTED_RUNES) // predicted runes
|
if (castFlags & CAST_FLAG_PREDICTED_RUNES) // predicted runes
|
||||||
{
|
{
|
||||||
|
|
@ -4314,7 +4314,7 @@ void Spell::SendSpellGo()
|
||||||
|
|
||||||
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
|
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
|
||||||
m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->IsPet()) &&
|
m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->IsPet()) &&
|
||||||
m_spellInfo->powerType != POWER_HEALTH)
|
m_spellInfo->GetPowerType() != POWER_HEALTH)
|
||||||
castFlags |= CAST_FLAG_PREDICTED_POWER;
|
castFlags |= CAST_FLAG_PREDICTED_POWER;
|
||||||
|
|
||||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->getClass() == CLASS_DEATH_KNIGHT && m_spellInfo->runeCostID)
|
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->getClass() == CLASS_DEATH_KNIGHT && m_spellInfo->runeCostID)
|
||||||
|
|
@ -4342,7 +4342,7 @@ void Spell::SendSpellGo()
|
||||||
data << m_targets;
|
data << m_targets;
|
||||||
|
|
||||||
if (castFlags & CAST_FLAG_PREDICTED_POWER) // predicted power
|
if (castFlags & CAST_FLAG_PREDICTED_POWER) // predicted power
|
||||||
data << uint32(m_caster->GetPower(Powers(m_spellInfo->powerType)));
|
data << uint32(m_caster->GetPower(Powers(m_spellInfo->GetPowerType())));
|
||||||
|
|
||||||
if (castFlags & CAST_FLAG_PREDICTED_RUNES) // predicted runes
|
if (castFlags & CAST_FLAG_PREDICTED_RUNES) // predicted runes
|
||||||
{
|
{
|
||||||
|
|
@ -4864,10 +4864,11 @@ void Spell::TakePower()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Powers powerType = Powers(m_spellInfo->GetPowerType());
|
||||||
bool hit = true;
|
bool hit = true;
|
||||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
if (m_spellInfo->powerType == POWER_RAGE || m_spellInfo->powerType == POWER_ENERGY || m_spellInfo->powerType == POWER_HOLY_POWER)
|
if (powerType == POWER_RAGE || powerType == POWER_ENERGY || powerType == POWER_HOLY_POWER)
|
||||||
{
|
{
|
||||||
ObjectGuid targetGuid = m_targets.getUnitTargetGuid();
|
ObjectGuid targetGuid = m_targets.getUnitTargetGuid();
|
||||||
if (!targetGuid.IsEmpty())
|
if (!targetGuid.IsEmpty())
|
||||||
|
|
@ -4888,20 +4889,19 @@ void Spell::TakePower()
|
||||||
}
|
}
|
||||||
|
|
||||||
// health as power used
|
// health as power used
|
||||||
if (m_spellInfo->powerType == POWER_HEALTH)
|
if (powerType == POWER_HEALTH)
|
||||||
{
|
{
|
||||||
m_caster->ModifyHealth(-(int32)m_powerCost);
|
m_caster->ModifyHealth(-(int32)m_powerCost);
|
||||||
m_caster->SendSpellNonMeleeDamageLog(m_caster, m_spellInfo->Id, m_powerCost, GetSpellSchoolMask(m_spellInfo), 0, 0, false, 0, false);
|
m_caster->SendSpellNonMeleeDamageLog(m_caster, m_spellInfo->Id, m_powerCost, GetSpellSchoolMask(m_spellInfo), 0, 0, false, 0, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_spellInfo->powerType >= MAX_POWERS)
|
if (powerType >= MAX_POWERS)
|
||||||
{
|
{
|
||||||
sLog.outError("Spell::TakePower: Unknown power type '%d'", m_spellInfo->powerType);
|
sLog.outError("Spell::TakePower: Unknown power type '%d'", powerType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Powers powerType = Powers(m_spellInfo->powerType);
|
|
||||||
|
|
||||||
if (powerType == POWER_HOLY_POWER)
|
if (powerType == POWER_HOLY_POWER)
|
||||||
{
|
{
|
||||||
|
|
@ -5543,7 +5543,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
|
|
||||||
// Fire Shield
|
// Fire Shield
|
||||||
if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_WARLOCK &&
|
if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_WARLOCK &&
|
||||||
m_spellInfo->SpellIconID == 16)
|
m_spellInfo->GetSpellIconID() == 16)
|
||||||
return SPELL_FAILED_BAD_TARGETS;
|
return SPELL_FAILED_BAD_TARGETS;
|
||||||
|
|
||||||
// Focus Magic (main spell)
|
// Focus Magic (main spell)
|
||||||
|
|
@ -5695,7 +5695,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Must be behind the target.
|
// Must be behind the target.
|
||||||
if (m_spellInfo->AttributesEx2 == SPELL_ATTR_EX2_UNK20 && m_spellInfo->HasAttribute(SPELL_ATTR_EX_UNK9) && target->HasInArc(M_PI_F, m_caster))
|
if (m_spellInfo->GetAttributesEx2() == SPELL_ATTR_EX2_UNK20 && m_spellInfo->HasAttribute(SPELL_ATTR_EX_UNK9) && target->HasInArc(M_PI_F, m_caster))
|
||||||
{
|
{
|
||||||
// Exclusion for Pounce: Facing Limitation was removed in 2.0.1, but it still uses the same, old Ex-Flags
|
// Exclusion for Pounce: Facing Limitation was removed in 2.0.1, but it still uses the same, old Ex-Flags
|
||||||
// Exclusion for Mutilate:Facing Limitation was removed in 2.0.1 and 3.0.3, but they still use the same, old Ex-Flags
|
// Exclusion for Mutilate:Facing Limitation was removed in 2.0.1 and 3.0.3, but they still use the same, old Ex-Flags
|
||||||
|
|
@ -5710,7 +5710,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Target must be facing you.
|
// Target must be facing you.
|
||||||
if ((m_spellInfo->Attributes == (SPELL_ATTR_UNK4 | SPELL_ATTR_NOT_SHAPESHIFT | SPELL_ATTR_UNK18 | SPELL_ATTR_STOP_ATTACK_TARGET)) && !target->HasInArc(M_PI_F, m_caster))
|
if ((m_spellInfo->GetAttributes() == (SPELL_ATTR_UNK4 | SPELL_ATTR_NOT_SHAPESHIFT | SPELL_ATTR_UNK18 | SPELL_ATTR_STOP_ATTACK_TARGET)) && !target->HasInArc(M_PI_F, m_caster))
|
||||||
{
|
{
|
||||||
SendInterrupted(2);
|
SendInterrupted(2);
|
||||||
return SPELL_FAILED_NOT_INFRONT;
|
return SPELL_FAILED_NOT_INFRONT;
|
||||||
|
|
@ -5803,7 +5803,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
sLog.outErrorDb("Spell entry %u, effect %i has EffectImplicitTargetA/EffectImplicitTargetB = TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT, but gameobject are not defined in `spell_script_target`", m_spellInfo->Id, j);
|
sLog.outErrorDb("Spell entry %u, effect %i has EffectImplicitTargetA/EffectImplicitTargetB = TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT, but gameobject are not defined in `spell_script_target`", m_spellInfo->Id, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex);
|
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex());
|
||||||
float range = GetSpellMaxRange(srange);
|
float range = GetSpellMaxRange(srange);
|
||||||
|
|
||||||
// override range with default when it's not provided
|
// override range with default when it's not provided
|
||||||
|
|
@ -6051,7 +6051,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
{
|
{
|
||||||
UnitList targets;
|
UnitList targets;
|
||||||
|
|
||||||
float radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
float radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex()));
|
||||||
|
|
||||||
MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck unitCheck(m_caster, m_caster, radius);
|
MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck unitCheck(m_caster, m_caster, radius);
|
||||||
MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(targets, unitCheck);
|
MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(targets, unitCheck);
|
||||||
|
|
@ -6069,7 +6069,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
return SPELL_FAILED_AFFECTING_COMBAT;
|
return SPELL_FAILED_AFFECTING_COMBAT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (m_spellInfo->SpellIconID == 156) // Holy Shock
|
else if (m_spellInfo->GetSpellIconID() == 156) // Holy Shock
|
||||||
{
|
{
|
||||||
// spell different for friends and enemies
|
// spell different for friends and enemies
|
||||||
// hart version required facing
|
// hart version required facing
|
||||||
|
|
@ -6079,7 +6079,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Fire Nova
|
// Fire Nova
|
||||||
if (m_spellInfo->GetSpellFamilyName() == SPELLFAMILY_SHAMAN && m_spellInfo->SpellIconID == 33)
|
if (m_spellInfo->GetSpellFamilyName() == SPELLFAMILY_SHAMAN && m_spellInfo->GetSpellIconID() == 33)
|
||||||
{
|
{
|
||||||
// fire totems slot
|
// fire totems slot
|
||||||
if (!m_caster->GetTotemGuid(TOTEM_SLOT_FIRE))
|
if (!m_caster->GetTotemGuid(TOTEM_SLOT_FIRE))
|
||||||
|
|
@ -6112,7 +6112,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
case SPELL_EFFECT_SCHOOL_DAMAGE:
|
case SPELL_EFFECT_SCHOOL_DAMAGE:
|
||||||
{
|
{
|
||||||
// Hammer of Wrath
|
// Hammer of Wrath
|
||||||
if (m_spellInfo->SpellVisual[0] == 7250)
|
if (m_spellInfo->GetSpellVisual() == 7250)
|
||||||
{
|
{
|
||||||
if (!m_targets.getUnitTarget())
|
if (!m_targets.getUnitTarget())
|
||||||
{
|
{
|
||||||
|
|
@ -7107,7 +7107,7 @@ SpellCastResult Spell::CheckCasterAuras() const
|
||||||
if (unitflag & UNIT_FLAG_STUNNED)
|
if (unitflag & UNIT_FLAG_STUNNED)
|
||||||
{
|
{
|
||||||
// Pain Suppression (have SPELL_ATTR_EX5_USABLE_WHILE_STUNNED that must be used only with glyph)
|
// Pain Suppression (have SPELL_ATTR_EX5_USABLE_WHILE_STUNNED that must be used only with glyph)
|
||||||
if (m_spellInfo->GetSpellFamilyName() == SPELLFAMILY_PRIEST && m_spellInfo->SpellIconID == 2178)
|
if (m_spellInfo->GetSpellFamilyName() == SPELLFAMILY_PRIEST && m_spellInfo->GetSpellIconID() == 2178)
|
||||||
{
|
{
|
||||||
if (!m_caster->HasAura(63248)) // Glyph of Pain Suppression
|
if (!m_caster->HasAura(63248)) // Glyph of Pain Suppression
|
||||||
spellUsableWhileStunned = false;
|
spellUsableWhileStunned = false;
|
||||||
|
|
@ -7279,8 +7279,9 @@ SpellCastResult Spell::CheckRange(bool strict)
|
||||||
{
|
{
|
||||||
Unit* target = m_targets.getUnitTarget();
|
Unit* target = m_targets.getUnitTarget();
|
||||||
|
|
||||||
|
uint32 rangeIndex = m_spellInfo->GetRangeIndex();
|
||||||
// special range cases
|
// special range cases
|
||||||
switch (m_spellInfo->rangeIndex)
|
switch (rangeIndex)
|
||||||
{
|
{
|
||||||
// self cast doesn't need range checking -- also for Starshards fix
|
// self cast doesn't need range checking -- also for Starshards fix
|
||||||
// spells that can be cast anywhere also need no check
|
// spells that can be cast anywhere also need no check
|
||||||
|
|
@ -7314,7 +7315,7 @@ SpellCastResult Spell::CheckRange(bool strict)
|
||||||
// add radius of caster and ~5 yds "give" for non stricred (landing) check
|
// add radius of caster and ~5 yds "give" for non stricred (landing) check
|
||||||
float range_mod = strict ? 1.25f : 6.25;
|
float range_mod = strict ? 1.25f : 6.25;
|
||||||
|
|
||||||
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex);
|
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(rangeIndex);
|
||||||
bool friendly = target ? target->IsFriendlyTo(m_caster) : false;
|
bool friendly = target ? target->IsFriendlyTo(m_caster) : false;
|
||||||
float max_range = GetSpellMaxRange(srange, friendly) + range_mod;
|
float max_range = GetSpellMaxRange(srange, friendly) + range_mod;
|
||||||
float min_range = GetSpellMinRange(srange, friendly);
|
float min_range = GetSpellMinRange(srange, friendly);
|
||||||
|
|
@ -7325,7 +7326,7 @@ SpellCastResult Spell::CheckRange(bool strict)
|
||||||
if (target && target != m_caster)
|
if (target && target != m_caster)
|
||||||
{
|
{
|
||||||
// distance from target in checks
|
// distance from target in checks
|
||||||
float dist = m_caster->GetCombatDistance(target, m_spellInfo->rangeIndex == SPELL_RANGE_IDX_COMBAT);
|
float dist = m_caster->GetCombatDistance(target, rangeIndex == SPELL_RANGE_IDX_COMBAT);
|
||||||
|
|
||||||
if (dist > max_range)
|
if (dist > max_range)
|
||||||
{
|
{
|
||||||
|
|
@ -7364,20 +7365,21 @@ uint32 Spell::CalculatePowerCost(SpellEntry const* spellInfo, Unit* caster, Spel
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Powers powerType = Powers(spellInfo->GetPowerType());
|
||||||
// Spell drain all exist power on cast (Only paladin lay of Hands)
|
// Spell drain all exist power on cast (Only paladin lay of Hands)
|
||||||
if (spellInfo->HasAttribute(SPELL_ATTR_EX_DRAIN_ALL_POWER))
|
if (spellInfo->HasAttribute(SPELL_ATTR_EX_DRAIN_ALL_POWER))
|
||||||
{
|
{
|
||||||
// If power type - health drain all
|
// If power type - health drain all
|
||||||
if (spellInfo->powerType == POWER_HEALTH)
|
if (powerType == POWER_HEALTH)
|
||||||
{
|
{
|
||||||
return caster->GetHealth();
|
return caster->GetHealth();
|
||||||
}
|
}
|
||||||
// Else drain all power
|
// Else drain all power
|
||||||
if (spellInfo->powerType < MAX_POWERS)
|
if (powerType < MAX_POWERS)
|
||||||
{
|
{
|
||||||
return caster->GetPower(Powers(spellInfo->powerType));
|
return caster->GetPower(Powers(powerType));
|
||||||
}
|
}
|
||||||
sLog.outError("Spell::CalculateManaCost: Unknown power type '%d' in spell %d", spellInfo->powerType, spellInfo->Id);
|
sLog.outError("Spell::CalculateManaCost: Unknown power type '%d' in spell %d", powerType, spellInfo->Id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7386,7 +7388,7 @@ uint32 Spell::CalculatePowerCost(SpellEntry const* spellInfo, Unit* caster, Spel
|
||||||
// PCT cost from total amount
|
// PCT cost from total amount
|
||||||
if (uint32 manaCostPct = spellInfo->GetManaCostPercentage())
|
if (uint32 manaCostPct = spellInfo->GetManaCostPercentage())
|
||||||
{
|
{
|
||||||
switch (spellInfo->powerType)
|
switch (powerType)
|
||||||
{
|
{
|
||||||
// health as power used
|
// health as power used
|
||||||
case POWER_HEALTH:
|
case POWER_HEALTH:
|
||||||
|
|
@ -7398,14 +7400,14 @@ uint32 Spell::CalculatePowerCost(SpellEntry const* spellInfo, Unit* caster, Spel
|
||||||
case POWER_RAGE:
|
case POWER_RAGE:
|
||||||
case POWER_FOCUS:
|
case POWER_FOCUS:
|
||||||
case POWER_ENERGY:
|
case POWER_ENERGY:
|
||||||
powerCost += manaCostPct * caster->GetMaxPower(Powers(spellInfo->powerType)) / 100;
|
powerCost += manaCostPct * caster->GetMaxPower(Powers(powerType)) / 100;
|
||||||
break;
|
break;
|
||||||
case POWER_RUNE:
|
case POWER_RUNE:
|
||||||
case POWER_RUNIC_POWER:
|
case POWER_RUNIC_POWER:
|
||||||
DEBUG_LOG("Spell::CalculateManaCost: Not implemented yet!");
|
DEBUG_LOG("Spell::CalculateManaCost: Not implemented yet!");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sLog.outError("Spell::CalculateManaCost: Unknown power type '%d' in spell %d", spellInfo->powerType, spellInfo->Id);
|
sLog.outError("Spell::CalculateManaCost: Unknown power type '%d' in spell %d", powerType, spellInfo->Id);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7416,7 +7418,7 @@ uint32 Spell::CalculatePowerCost(SpellEntry const* spellInfo, Unit* caster, Spel
|
||||||
for (Unit::AuraList::const_iterator itr = pwrCostAuras.begin(); itr != pwrCostAuras.end(); ++itr)
|
for (Unit::AuraList::const_iterator itr = pwrCostAuras.begin(); itr != pwrCostAuras.end(); ++itr)
|
||||||
{
|
{
|
||||||
if (((*itr)->GetModifier()->m_miscvalue & schoolMask) &&
|
if (((*itr)->GetModifier()->m_miscvalue & schoolMask) &&
|
||||||
(!(*itr)->GetSpellEffect()->EffectMiscValueB || (*itr)->GetSpellEffect()->EffectMiscValueB & (1 << spellInfo->powerType)))
|
(!(*itr)->GetSpellEffect()->EffectMiscValueB || (*itr)->GetSpellEffect()->EffectMiscValueB & (1 << powerType)))
|
||||||
powerCost += (*itr)->GetModifier()->m_amount;
|
powerCost += (*itr)->GetModifier()->m_amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7438,7 +7440,7 @@ uint32 Spell::CalculatePowerCost(SpellEntry const* spellInfo, Unit* caster, Spel
|
||||||
for (Unit::AuraList::const_iterator itr = pwrCostPctAuras.begin(); itr != pwrCostPctAuras.end(); ++itr)
|
for (Unit::AuraList::const_iterator itr = pwrCostPctAuras.begin(); itr != pwrCostPctAuras.end(); ++itr)
|
||||||
{
|
{
|
||||||
if (((*itr)->GetModifier()->m_miscvalue & schoolMask) &&
|
if (((*itr)->GetModifier()->m_miscvalue & schoolMask) &&
|
||||||
(!(*itr)->GetSpellEffect()->EffectMiscValueB || (*itr)->GetSpellEffect()->EffectMiscValueB & (1 << spellInfo->powerType)))
|
(!(*itr)->GetSpellEffect()->EffectMiscValueB || (*itr)->GetSpellEffect()->EffectMiscValueB & (1 << powerType)))
|
||||||
pctCostMultiplier += (*itr)->GetModifier()->m_amount / 100.0f;
|
pctCostMultiplier += (*itr)->GetModifier()->m_amount / 100.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7457,6 +7459,7 @@ SpellCastResult Spell::CheckPower()
|
||||||
return SPELL_CAST_OK;
|
return SPELL_CAST_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Powers powerType = Powers(m_spellInfo->GetPowerType());
|
||||||
// Do precise power regen on spell cast
|
// Do precise power regen on spell cast
|
||||||
if (m_powerCost > 0 && m_caster->GetTypeId() == TYPEID_PLAYER)
|
if (m_powerCost > 0 && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
|
|
@ -7467,7 +7470,7 @@ SpellCastResult Spell::CheckPower()
|
||||||
}
|
}
|
||||||
|
|
||||||
// health as power used - need check health amount
|
// health as power used - need check health amount
|
||||||
if (m_spellInfo->powerType == POWER_HEALTH)
|
if (powerType == POWER_HEALTH)
|
||||||
{
|
{
|
||||||
if (m_caster->GetHealth() <= m_powerCost)
|
if (m_caster->GetHealth() <= m_powerCost)
|
||||||
{
|
{
|
||||||
|
|
@ -7477,14 +7480,14 @@ SpellCastResult Spell::CheckPower()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check valid power type
|
// Check valid power type
|
||||||
if (m_spellInfo->powerType >= MAX_POWERS)
|
if (powerType >= MAX_POWERS)
|
||||||
{
|
{
|
||||||
sLog.outError("Spell::CheckMana: Unknown power type '%d'", m_spellInfo->powerType);
|
sLog.outError("Spell::CheckMana: Unknown power type '%d'", powerType);
|
||||||
return SPELL_FAILED_UNKNOWN;
|
return SPELL_FAILED_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check rune cost only if a spell has PowerType == POWER_RUNE
|
// check rune cost only if a spell has PowerType == POWER_RUNE
|
||||||
if (m_spellInfo->powerType == POWER_RUNE)
|
if (powerType == POWER_RUNE)
|
||||||
{
|
{
|
||||||
SpellCastResult failReason = CheckRunePower();
|
SpellCastResult failReason = CheckRunePower();
|
||||||
if (failReason != SPELL_CAST_OK)
|
if (failReason != SPELL_CAST_OK)
|
||||||
|
|
@ -7494,7 +7497,6 @@ SpellCastResult Spell::CheckPower()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check power amount
|
// Check power amount
|
||||||
Powers powerType = Powers(m_spellInfo->powerType);
|
|
||||||
if (m_caster->GetPower(powerType) < m_powerCost)
|
if (m_caster->GetPower(powerType) < m_powerCost)
|
||||||
{
|
{
|
||||||
return SPELL_FAILED_NO_POWER;
|
return SPELL_FAILED_NO_POWER;
|
||||||
|
|
@ -8331,8 +8333,8 @@ bool Spell::CheckTarget(Unit* target, SpellEffectIndex eff)
|
||||||
|
|
||||||
bool Spell::IsNeedSendToClient() const
|
bool Spell::IsNeedSendToClient() const
|
||||||
{
|
{
|
||||||
return m_spellInfo->SpellVisual[0] || m_spellInfo->SpellVisual[1] || IsChanneledSpell(m_spellInfo) ||
|
return m_spellInfo->GetSpellVisual() || m_spellInfo->GetSpellVisual(1) || IsChanneledSpell(m_spellInfo) ||
|
||||||
m_spellInfo->speed > 0.0f || (!m_triggeredByAuraSpell && !m_IsTriggeredSpell);
|
m_spellInfo->GetSpeed() > 0.0f || (!m_triggeredByAuraSpell && !m_IsTriggeredSpell);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Spell::IsTriggeredSpellWithRedundentCastTime() const
|
bool Spell::IsTriggeredSpellWithRedundentCastTime() const
|
||||||
|
|
@ -8840,7 +8842,7 @@ void Spell::GetSpellRangeAndRadius(SpellEffectEntry const* spellEffect, float& r
|
||||||
if (uint32 radiusIndex = spellEffect->GetRadiusIndex())
|
if (uint32 radiusIndex = spellEffect->GetRadiusIndex())
|
||||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
||||||
else
|
else
|
||||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex()));
|
||||||
if (Unit* realCaster = GetAffectiveCaster())
|
if (Unit* realCaster = GetAffectiveCaster())
|
||||||
{
|
{
|
||||||
if (Player* modOwner = realCaster->GetSpellModOwner())
|
if (Player* modOwner = realCaster->GetSpellModOwner())
|
||||||
|
|
@ -8907,6 +8909,7 @@ void Spell::GetSpellRangeAndRadius(SpellEffectEntry const* spellEffect, float& r
|
||||||
case 62978: // Summon Guardian (Ulduar, Yogg Saron)
|
case 62978: // Summon Guardian (Ulduar, Yogg Saron)
|
||||||
case 63018: // Searing Light (Ulduar, XT-002)
|
case 63018: // Searing Light (Ulduar, XT-002)
|
||||||
case 63024: // Gravity Bomb (Ulduar, XT-002)
|
case 63024: // Gravity Bomb (Ulduar, XT-002)
|
||||||
|
case 63387: // Rapid Burst
|
||||||
case 63545: // Icicle (Ulduar, Hodir)
|
case 63545: // Icicle (Ulduar, Hodir)
|
||||||
case 63744: // Sara's Anger (Ulduar, Yogg-Saron)
|
case 63744: // Sara's Anger (Ulduar, Yogg-Saron)
|
||||||
case 63745: // Sara's Blessing (Ulduar, Yogg-Saron)
|
case 63745: // Sara's Blessing (Ulduar, Yogg-Saron)
|
||||||
|
|
@ -8919,6 +8922,7 @@ void Spell::GetSpellRangeAndRadius(SpellEffectEntry const* spellEffect, float& r
|
||||||
case 64402: // Rocket Strike (Ulduar, Mimiron)
|
case 64402: // Rocket Strike (Ulduar, Mimiron)
|
||||||
case 64425: // Summon Scrap Bot Trigger (Ulduar, Mimiron) use for Assault Bots, hits npc 33856
|
case 64425: // Summon Scrap Bot Trigger (Ulduar, Mimiron) use for Assault Bots, hits npc 33856
|
||||||
case 64465: // Shadow Beacon (Ulduar, Yogg-Saron)
|
case 64465: // Shadow Beacon (Ulduar, Yogg-Saron)
|
||||||
|
case 64531: // Rapid Burst (h)
|
||||||
case 64543: // Melt Ice (Ulduar, Hodir)
|
case 64543: // Melt Ice (Ulduar, Hodir)
|
||||||
case 64623: // Frost Bomb (Ulduar, Mimiron)
|
case 64623: // Frost Bomb (Ulduar, Mimiron)
|
||||||
case 65121: // Searing Light (h) (Ulduar, XT-002)
|
case 65121: // Searing Light (h) (Ulduar, XT-002)
|
||||||
|
|
@ -9078,7 +9082,7 @@ void Spell::GetSpellRangeAndRadius(SpellEffectEntry const* spellEffect, float& r
|
||||||
case SPELLFAMILY_WARRIOR:
|
case SPELLFAMILY_WARRIOR:
|
||||||
{
|
{
|
||||||
// Sunder Armor (main spell)
|
// Sunder Armor (main spell)
|
||||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000004000), 0x00000000) && m_spellInfo->SpellVisual[0] == 406)
|
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000004000), 0x00000000) && m_spellInfo->GetSpellVisual() == 406)
|
||||||
if (m_caster->HasAura(58387)) // Glyph of Sunder Armor
|
if (m_caster->HasAura(58387)) // Glyph of Sunder Armor
|
||||||
EffectChainTarget = 2;
|
EffectChainTarget = 2;
|
||||||
break;
|
break;
|
||||||
|
|
@ -9092,7 +9096,7 @@ void Spell::GetSpellRangeAndRadius(SpellEffectEntry const* spellEffect, float& r
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_DEATHKNIGHT:
|
case SPELLFAMILY_DEATHKNIGHT:
|
||||||
{
|
{
|
||||||
if (m_spellInfo->SpellIconID == 1737) // Corpse Explosion // TODO - spell 50445?
|
if (m_spellInfo->GetSpellIconID() == 1737) // Corpse Explosion // TODO - spell 50445?
|
||||||
unMaxTargets = 1;
|
unMaxTargets = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1221,7 +1221,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
||||||
|
|
||||||
SpellClassOptionsEntry const * opt = spellProto->GetSpellClassOptions();
|
SpellClassOptionsEntry const * opt = spellProto->GetSpellClassOptions();
|
||||||
// Everlasting Affliction, overwrite wrong data, if will need more better restore support of spell_affect table
|
// Everlasting Affliction, overwrite wrong data, if will need more better restore support of spell_affect table
|
||||||
if (opt && spellProto->GetSpellFamilyName() == SPELLFAMILY_WARLOCK && spellProto->SpellIconID == 3169)
|
if (opt && spellProto->GetSpellFamilyName() == SPELLFAMILY_WARLOCK && spellProto->Id == 3169)
|
||||||
{
|
{
|
||||||
// Corruption and Unstable Affliction
|
// Corruption and Unstable Affliction
|
||||||
const_cast<SpellClassOptionsEntry*>(opt)->SpellFamilyFlags = ClassFamilyMask(UI64LIT(0x0000010000000002));
|
const_cast<SpellClassOptionsEntry*>(opt)->SpellFamilyFlags = ClassFamilyMask(UI64LIT(0x0000010000000002));
|
||||||
|
|
@ -2795,7 +2795,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
||||||
for (Unit::AuraList::const_iterator itr = modifierAuras.begin(); itr != modifierAuras.end(); ++itr)
|
for (Unit::AuraList::const_iterator itr = modifierAuras.begin(); itr != modifierAuras.end(); ++itr)
|
||||||
{
|
{
|
||||||
// Unrelenting Assault
|
// Unrelenting Assault
|
||||||
if ((*itr)->GetSpellProto()->GetSpellFamilyName()==SPELLFAMILY_WARRIOR && (*itr)->GetSpellProto()->SpellIconID == 2775)
|
if ((*itr)->GetSpellProto()->GetSpellFamilyName()==SPELLFAMILY_WARRIOR && (*itr)->GetSpellProto()->Id == 2775)
|
||||||
{
|
{
|
||||||
switch ((*itr)->GetSpellProto()->Id)
|
switch ((*itr)->GetSpellProto()->Id)
|
||||||
{
|
{
|
||||||
|
|
@ -3439,7 +3439,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
||||||
case SPELLFAMILY_WARLOCK:
|
case SPELLFAMILY_WARLOCK:
|
||||||
{
|
{
|
||||||
// Haunt
|
// Haunt
|
||||||
if (classOptions && GetSpellProto()->SpellIconID == 3172 && (classOptions->SpellFamilyFlags & UI64LIT(0x0004000000000000)))
|
if (classOptions && GetSpellProto()->Id == 3172 && (classOptions->SpellFamilyFlags & UI64LIT(0x0004000000000000)))
|
||||||
{
|
{
|
||||||
// NOTE: for avoid use additional field damage stored in dummy value (replace unused 100%
|
// NOTE: for avoid use additional field damage stored in dummy value (replace unused 100%
|
||||||
if (apply)
|
if (apply)
|
||||||
|
|
@ -3531,14 +3531,14 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Predatory Strikes
|
// Predatory Strikes
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER && GetSpellProto()->SpellIconID == 1563)
|
if (target->GetTypeId() == TYPEID_PLAYER && GetSpellProto()->Id == 1563)
|
||||||
{
|
{
|
||||||
((Player*)target)->UpdateAttackPowerAndDamage();
|
((Player*)target)->UpdateAttackPowerAndDamage();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Improved Moonkin Form
|
// Improved Moonkin Form
|
||||||
if (GetSpellProto()->SpellIconID == 2855)
|
if (GetSpellProto()->Id == 2855)
|
||||||
{
|
{
|
||||||
uint32 spell_id;
|
uint32 spell_id;
|
||||||
switch (GetId())
|
switch (GetId())
|
||||||
|
|
@ -3844,7 +3844,7 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
||||||
// If spell that caused this aura has Croud Control or Daze effect
|
// If spell that caused this aura has Croud Control or Daze effect
|
||||||
if ((aurMechMask & MECHANIC_NOT_REMOVED_BY_SHAPESHIFT) ||
|
if ((aurMechMask & MECHANIC_NOT_REMOVED_BY_SHAPESHIFT) ||
|
||||||
// some Daze spells have these parameters instead of MECHANIC_DAZE (skip snare spells)
|
// some Daze spells have these parameters instead of MECHANIC_DAZE (skip snare spells)
|
||||||
(aurSpellInfo->SpellIconID == 15 && aurSpellInfo->GetDispel() == 0 &&
|
(aurSpellInfo->Id == 15 && aurSpellInfo->GetDispel() == 0 &&
|
||||||
(aurMechMask & (1 << (MECHANIC_SNARE-1))) == 0))
|
(aurMechMask & (1 << (MECHANIC_SNARE-1))) == 0))
|
||||||
{
|
{
|
||||||
++iter;
|
++iter;
|
||||||
|
|
@ -3908,7 +3908,7 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
||||||
Unit::AuraList const& mDummy = target->GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& mDummy = target->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (Unit::AuraList::const_iterator i = mDummy.begin(); i != mDummy.end(); ++i)
|
for (Unit::AuraList::const_iterator i = mDummy.begin(); i != mDummy.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 238)
|
if ((*i)->GetSpellProto()->Id == 238)
|
||||||
{
|
{
|
||||||
furorChance = (*i)->GetModifier()->m_amount;
|
furorChance = (*i)->GetModifier()->m_amount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -3946,7 +3946,7 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
||||||
{
|
{
|
||||||
if(itr->second.state == PLAYERSPELL_REMOVED) continue;
|
if(itr->second.state == PLAYERSPELL_REMOVED) continue;
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||||
if (spellInfo && spellInfo->GetSpellFamilyName() == SPELLFAMILY_WARRIOR && spellInfo->SpellIconID == 139)
|
if (spellInfo && spellInfo->GetSpellFamilyName() == SPELLFAMILY_WARRIOR && spellInfo->Id == 139)
|
||||||
Rage_val += target->CalculateSpellDamage(target, spellInfo, EFFECT_INDEX_0) * 10;
|
Rage_val += target->CalculateSpellDamage(target, spellInfo, EFFECT_INDEX_0) * 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4250,7 +4250,7 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
|
||||||
{ model_id = Creature::ChooseDisplayId(ci); } // Will use the default model here
|
{ model_id = Creature::ChooseDisplayId(ci); } // Will use the default model here
|
||||||
|
|
||||||
// Polymorph (sheep/penguin case)
|
// Polymorph (sheep/penguin case)
|
||||||
if (GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_MAGE && GetSpellProto()->SpellIconID == 82)
|
if (GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_MAGE && GetSpellProto()->Id == 82)
|
||||||
{
|
{
|
||||||
if (Unit* caster = GetCaster())
|
if (Unit* caster = GetCaster())
|
||||||
{
|
{
|
||||||
|
|
@ -5055,7 +5055,7 @@ void Aura::HandleModStealth(bool apply, bool Real)
|
||||||
for (Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
for (Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
||||||
{
|
{
|
||||||
// Master of Subtlety
|
// Master of Subtlety
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 2114)
|
if ((*i)->GetSpellProto()->Id == 2114)
|
||||||
{
|
{
|
||||||
target->RemoveAurasDueToSpell(31666);
|
target->RemoveAurasDueToSpell(31666);
|
||||||
int32 bp = (*i)->GetModifier()->m_amount;
|
int32 bp = (*i)->GetModifier()->m_amount;
|
||||||
|
|
@ -5100,7 +5100,7 @@ void Aura::HandleModStealth(bool apply, bool Real)
|
||||||
for (Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
for (Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
||||||
{
|
{
|
||||||
// Master of Subtlety
|
// Master of Subtlety
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 2114)
|
if ((*i)->GetSpellProto()->Id == 2114)
|
||||||
target->CastSpell(target, 31666, true);
|
target->CastSpell(target, 31666, true);
|
||||||
// Overkill
|
// Overkill
|
||||||
else if ((*i)->GetId() == 58426 && classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x0000000000400000))
|
else if ((*i)->GetId() == 58426 && classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x0000000000400000))
|
||||||
|
|
@ -5463,7 +5463,7 @@ void Aura::HandleAuraModIncreaseMountedSpeed(bool apply, bool Real)
|
||||||
target->UpdateSpeed(MOVE_RUN, true);
|
target->UpdateSpeed(MOVE_RUN, true);
|
||||||
|
|
||||||
// Festive Holiday Mount
|
// Festive Holiday Mount
|
||||||
if (apply && GetSpellProto()->SpellIconID != 1794 && target->HasAura(62061))
|
if (apply && GetSpellProto()->Id != 1794 && target->HasAura(62061))
|
||||||
// Reindeer Transformation
|
// Reindeer Transformation
|
||||||
target->CastSpell(target, 25860, true, NULL, this);
|
target->CastSpell(target, 25860, true, NULL, this);
|
||||||
}
|
}
|
||||||
|
|
@ -5492,7 +5492,7 @@ void Aura::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real)
|
||||||
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 16314);
|
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 16314);
|
||||||
|
|
||||||
// Festive Holiday Mount
|
// Festive Holiday Mount
|
||||||
if (apply && GetSpellProto()->SpellIconID != 1794 && target->HasAura(62061))
|
if (apply && GetSpellProto()->Id != 1794 && target->HasAura(62061))
|
||||||
// Reindeer Transformation
|
// Reindeer Transformation
|
||||||
target->CastSpell(target, 25860, true, NULL, this);
|
target->CastSpell(target, 25860, true, NULL, this);
|
||||||
}
|
}
|
||||||
|
|
@ -5608,7 +5608,7 @@ void Aura::HandleModMechanicImmunity(bool apply, bool /*Real*/)
|
||||||
target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, misc, apply);
|
target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, misc, apply);
|
||||||
|
|
||||||
// Bestial Wrath
|
// Bestial Wrath
|
||||||
if (GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_HUNTER && GetSpellProto()->SpellIconID == 1680)
|
if (GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_HUNTER && GetSpellProto()->Id == 1680)
|
||||||
{
|
{
|
||||||
// The Beast Within cast on owner if talent present
|
// The Beast Within cast on owner if talent present
|
||||||
if (Unit* owner = target->GetOwner())
|
if (Unit* owner = target->GetOwner())
|
||||||
|
|
@ -5617,7 +5617,7 @@ void Aura::HandleModMechanicImmunity(bool apply, bool /*Real*/)
|
||||||
Unit::AuraList const& dummyAuras = owner->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
Unit::AuraList const& dummyAuras = owner->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||||
for (Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
for (Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 2229)
|
if ((*i)->GetSpellProto()->Id == 2229)
|
||||||
{
|
{
|
||||||
if (apply)
|
if (apply)
|
||||||
owner->CastSpell(owner, 34471, true, NULL, this);
|
owner->CastSpell(owner, 34471, true, NULL, this);
|
||||||
|
|
@ -5984,7 +5984,7 @@ void Aura::HandlePeriodicHeal(bool apply, bool /*Real*/)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gift of the Naaru (have diff spellfamilies)
|
// Gift of the Naaru (have diff spellfamilies)
|
||||||
if (GetSpellProto()->SpellIconID == 329 && GetSpellProto()->SpellVisual[0] == 7625)
|
if (GetSpellProto()->Id == 329 && GetSpellProto()->GetSpellVisual(0) == 7625)
|
||||||
{
|
{
|
||||||
int32 ap = int32(0.22f * caster->GetTotalAttackPowerValue(BASE_ATTACK));
|
int32 ap = int32(0.22f * caster->GetTotalAttackPowerValue(BASE_ATTACK));
|
||||||
int32 holy = caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(GetSpellProto()));
|
int32 holy = caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(GetSpellProto()));
|
||||||
|
|
@ -5994,7 +5994,7 @@ void Aura::HandlePeriodicHeal(bool apply, bool /*Real*/)
|
||||||
m_modifier.m_amount += ap > holy ? ap : holy;
|
m_modifier.m_amount += ap > holy ? ap : holy;
|
||||||
}
|
}
|
||||||
// Lifeblood
|
// Lifeblood
|
||||||
else if (GetSpellProto()->SpellIconID == 3088 && GetSpellProto()->SpellVisual[0] == 8145)
|
else if (GetSpellProto()->Id == 3088 && GetSpellProto()->GetSpellVisual(0) == 8145)
|
||||||
{
|
{
|
||||||
int32 healthBonus = int32(0.0032f * caster->GetMaxHealth());
|
int32 healthBonus = int32(0.0032f * caster->GetMaxHealth());
|
||||||
m_modifier.m_amount += healthBonus;
|
m_modifier.m_amount += healthBonus;
|
||||||
|
|
@ -6144,7 +6144,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
|
||||||
case SPELLFAMILY_PALADIN:
|
case SPELLFAMILY_PALADIN:
|
||||||
{
|
{
|
||||||
// Holy Vengeance / Blood Corruption
|
// Holy Vengeance / Blood Corruption
|
||||||
if (classOptions->SpellFamilyFlags & UI64LIT(0x0000080000000000) && spellProto->SpellVisual[0] == 7902)
|
if (classOptions->SpellFamilyFlags & UI64LIT(0x0000080000000000) && spellProto->GetSpellVisual(0) == 7902)
|
||||||
{
|
{
|
||||||
// AP * 0.025 + SPH * 0.013 bonus per tick
|
// AP * 0.025 + SPH * 0.013 bonus per tick
|
||||||
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||||
|
|
@ -7398,7 +7398,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
||||||
for (Unit::SpellAuraHolderMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
|
for (Unit::SpellAuraHolderMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
|
||||||
{
|
{
|
||||||
SpellEntry const *spellInfo = itr->second->GetSpellProto();
|
SpellEntry const *spellInfo = itr->second->GetSpellProto();
|
||||||
if (itr->second->IsPassive() && (spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT)
|
if (itr->second->IsPassive() && (spellInfo->GetAttributesEx2() & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT)
|
||||||
&& (spellInfo->GetStancesNot() & (1<<(form-1))))
|
&& (spellInfo->GetStancesNot() & (1<<(form-1))))
|
||||||
{
|
{
|
||||||
target->RemoveAurasDueToSpell(itr->second->GetId());
|
target->RemoveAurasDueToSpell(itr->second->GetId());
|
||||||
|
|
@ -7414,7 +7414,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
||||||
Unit::AuraList const& ShapeShifterAuras = target->GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& ShapeShifterAuras = target->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (Unit::AuraList::const_iterator i = ShapeShifterAuras.begin(); i != ShapeShifterAuras.end(); ++i)
|
for (Unit::AuraList::const_iterator i = ShapeShifterAuras.begin(); i != ShapeShifterAuras.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 2851)
|
if ((*i)->GetSpellProto()->Id == 2851)
|
||||||
{
|
{
|
||||||
int32 ShiftMod = (*i)->GetModifier()->m_amount;
|
int32 ShiftMod = (*i)->GetModifier()->m_amount;
|
||||||
target->CastCustomSpell(target, MasterShaperSpellId, &ShiftMod, NULL, NULL, true);
|
target->CastCustomSpell(target, MasterShaperSpellId, &ShiftMod, NULL, NULL, true);
|
||||||
|
|
@ -7444,7 +7444,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
||||||
for (Unit::AuraList::const_iterator i = modAuras.begin(); i != modAuras.end(); ++i)
|
for (Unit::AuraList::const_iterator i = modAuras.begin(); i != modAuras.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DRUID &&
|
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DRUID &&
|
||||||
(*i)->GetSpellProto()->SpellIconID == 961)
|
(*i)->GetSpellProto()->Id == 961)
|
||||||
{
|
{
|
||||||
int32 bp = (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2);
|
int32 bp = (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2);
|
||||||
if (bp)
|
if (bp)
|
||||||
|
|
@ -7461,7 +7461,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
||||||
for (Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
for (Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->GetSpellFamilyName()==SPELLFAMILY_DRUID &&
|
if ((*i)->GetSpellProto()->GetSpellFamilyName()==SPELLFAMILY_DRUID &&
|
||||||
(*i)->GetSpellProto()->SpellIconID == 2855)
|
(*i)->GetSpellProto()->Id == 2855)
|
||||||
{
|
{
|
||||||
uint32 spell_id = 0;
|
uint32 spell_id = 0;
|
||||||
switch ((*i)->GetId())
|
switch ((*i)->GetId())
|
||||||
|
|
@ -7487,7 +7487,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
||||||
Unit::AuraList const& mModTotalStatPct = target->GetAurasByType(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE);
|
Unit::AuraList const& mModTotalStatPct = target->GetAurasByType(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE);
|
||||||
for (Unit::AuraList::const_iterator i = mModTotalStatPct.begin(); i != mModTotalStatPct.end(); ++i)
|
for (Unit::AuraList::const_iterator i = mModTotalStatPct.begin(); i != mModTotalStatPct.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 240 && (*i)->GetModifier()->m_miscvalue == 3)
|
if ((*i)->GetSpellProto()->Id == 240 && (*i)->GetModifier()->m_miscvalue == 3)
|
||||||
{
|
{
|
||||||
int32 HotWMod = (*i)->GetModifier()->m_amount;
|
int32 HotWMod = (*i)->GetModifier()->m_amount;
|
||||||
if (GetModifier()->m_miscvalue == FORM_CAT)
|
if (GetModifier()->m_miscvalue == FORM_CAT)
|
||||||
|
|
@ -7808,7 +7808,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
||||||
for (Unit::AuraList::const_iterator itr = borrowedTime.begin(); itr != borrowedTime.end(); ++itr)
|
for (Unit::AuraList::const_iterator itr = borrowedTime.begin(); itr != borrowedTime.end(); ++itr)
|
||||||
{
|
{
|
||||||
SpellEntry const* i_spell = (*itr)->GetSpellProto();
|
SpellEntry const* i_spell = (*itr)->GetSpellProto();
|
||||||
if(i_spell->GetSpellFamilyName()==SPELLFAMILY_PRIEST && i_spell->SpellIconID == 2899 && i_spell->GetEffectMiscValue((*itr)->GetEffIndex()) == 24)
|
if(i_spell->GetSpellFamilyName()==SPELLFAMILY_PRIEST && i_spell->Id == 2899 && i_spell->GetEffectMiscValue((*itr)->GetEffIndex()) == 24)
|
||||||
{
|
{
|
||||||
DoneActualBenefit += DoneActualBenefit * (*itr)->GetModifier()->m_amount / 100;
|
DoneActualBenefit += DoneActualBenefit * (*itr)->GetModifier()->m_amount / 100;
|
||||||
break;
|
break;
|
||||||
|
|
@ -7866,7 +7866,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
||||||
SpellEntry const* vSpell = (*itr)->GetSpellProto();
|
SpellEntry const* vSpell = (*itr)->GetSpellProto();
|
||||||
|
|
||||||
// Rapture (main spell)
|
// Rapture (main spell)
|
||||||
if(vSpell->GetSpellFamilyName() == SPELLFAMILY_PRIEST && vSpell->SpellIconID == 2894 && vSpell->GetSpellEffectIdByIndex(EFFECT_INDEX_1))
|
if(vSpell->GetSpellFamilyName() == SPELLFAMILY_PRIEST && vSpell->Id == 2894 && vSpell->GetSpellEffectIdByIndex(EFFECT_INDEX_1))
|
||||||
{
|
{
|
||||||
switch ((*itr)->GetEffIndex())
|
switch ((*itr)->GetEffIndex())
|
||||||
{
|
{
|
||||||
|
|
@ -8028,7 +8028,7 @@ void Aura::PeriodicTick()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Curse of Agony damage-per-tick calculation
|
// Curse of Agony damage-per-tick calculation
|
||||||
if (classOptions && classOptions->SpellFamilyName==SPELLFAMILY_WARLOCK && (classOptions->SpellFamilyFlags & UI64LIT(0x0000000000000400)) && spellProto->SpellIconID==544)
|
if (classOptions && classOptions->SpellFamilyName==SPELLFAMILY_WARLOCK && (classOptions->SpellFamilyFlags & UI64LIT(0x0000000000000400)) && spellProto->Id==544)
|
||||||
{
|
{
|
||||||
// 1..4 ticks, 1/2 from normal tick damage
|
// 1..4 ticks, 1/2 from normal tick damage
|
||||||
if (GetAuraTicks() <= 4)
|
if (GetAuraTicks() <= 4)
|
||||||
|
|
@ -8226,7 +8226,7 @@ void Aura::PeriodicTick()
|
||||||
canApplyHealthPart = false;
|
canApplyHealthPart = false;
|
||||||
|
|
||||||
// heal for caster damage (must be alive)
|
// heal for caster damage (must be alive)
|
||||||
if (target != pCaster && spellProto->SpellVisual[0] == 163 && !pCaster->IsAlive())
|
if (target != pCaster && spellProto->GetSpellVisual(0) == 163 && !pCaster->IsAlive())
|
||||||
canApplyHealthPart = false;
|
canApplyHealthPart = false;
|
||||||
|
|
||||||
if (canApplyHealthPart)
|
if (canApplyHealthPart)
|
||||||
|
|
@ -8243,7 +8243,7 @@ void Aura::PeriodicTick()
|
||||||
pdamage = amount;
|
pdamage = amount;
|
||||||
|
|
||||||
// Wild Growth (1/7 - 6 + 2*ramainTicks) %
|
// Wild Growth (1/7 - 6 + 2*ramainTicks) %
|
||||||
if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellIconID == 2864)
|
if (classOptions && classOptions->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->Id == 2864)
|
||||||
{
|
{
|
||||||
int32 ticks = GetAuraMaxTicks();
|
int32 ticks = GetAuraMaxTicks();
|
||||||
int32 remainingTicks = ticks - GetAuraTicks();
|
int32 remainingTicks = ticks - GetAuraTicks();
|
||||||
|
|
@ -8288,7 +8288,7 @@ void Aura::PeriodicTick()
|
||||||
target->GetHostileRefManager().threatAssist(pCaster, float(gain) * 0.5f * sSpellMgr.GetSpellThreatMultiplier(spellProto), spellProto);
|
target->GetHostileRefManager().threatAssist(pCaster, float(gain) * 0.5f * sSpellMgr.GetSpellThreatMultiplier(spellProto), spellProto);
|
||||||
|
|
||||||
// apply damage part to caster if needed (ex. health funnel)
|
// apply damage part to caster if needed (ex. health funnel)
|
||||||
if (target != pCaster && spellProto->SpellVisual[0] == 163)
|
if (target != pCaster && spellProto->GetSpellVisual(0) == 163)
|
||||||
{
|
{
|
||||||
uint32 damage = spellProto->GetManaPerSecond();
|
uint32 damage = spellProto->GetManaPerSecond();
|
||||||
uint32 absorb = 0;
|
uint32 absorb = 0;
|
||||||
|
|
@ -8547,7 +8547,7 @@ void Aura::PeriodicTick()
|
||||||
gain = uint32(gain * m_spellEffect->EffectMultipleValue);
|
gain = uint32(gain * m_spellEffect->EffectMultipleValue);
|
||||||
|
|
||||||
// maybe has to be sent different to client, but not by SMSG_PERIODICAURALOG
|
// maybe has to be sent different to client, but not by SMSG_PERIODICAURALOG
|
||||||
SpellNonMeleeDamage damageInfo(pCaster, target, spellProto->Id, SpellSchoolMask(spellProto->SchoolMask));
|
SpellNonMeleeDamage damageInfo(pCaster, target, spellProto->Id, SpellSchoolMask(spellProto->GetSchoolMask()));
|
||||||
pCaster->CalculateSpellDamage(&damageInfo, gain, spellProto);
|
pCaster->CalculateSpellDamage(&damageInfo, gain, spellProto);
|
||||||
|
|
||||||
damageInfo.target->CalculateAbsorbResistBlock(pCaster, &damageInfo, spellProto);
|
damageInfo.target->CalculateAbsorbResistBlock(pCaster, &damageInfo, spellProto);
|
||||||
|
|
@ -9140,7 +9140,7 @@ void Aura::PeriodicDummyTick()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prey on the Weak
|
// Prey on the Weak
|
||||||
if (spell->SpellIconID == 2983)
|
if (spell->Id == 2983)
|
||||||
{
|
{
|
||||||
Unit* victim = target->getVictim();
|
Unit* victim = target->getVictim();
|
||||||
if (victim && (target->GetHealth() * 100 / target->GetMaxHealth() > victim->GetHealth() * 100 / victim->GetMaxHealth()))
|
if (victim && (target->GetHealth() * 100 / target->GetMaxHealth() > victim->GetHealth() * 100 / victim->GetMaxHealth()))
|
||||||
|
|
@ -9224,7 +9224,7 @@ void Aura::PeriodicDummyTick()
|
||||||
Spell::UnitList targets;
|
Spell::UnitList targets;
|
||||||
{
|
{
|
||||||
// eff_radius ==0
|
// eff_radius ==0
|
||||||
float radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(spell->rangeIndex));
|
float radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(spell->GetRangeIndex()));
|
||||||
|
|
||||||
MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck u_check(target, target, radius);
|
MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck u_check(target, target, radius);
|
||||||
MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(targets, u_check);
|
MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(targets, u_check);
|
||||||
|
|
@ -9322,7 +9322,7 @@ void Aura::PeriodicDummyTick()
|
||||||
// if (spell->SpellFamilyFlags & UI64LIT(0x0000000000004000))
|
// if (spell->SpellFamilyFlags & UI64LIT(0x0000000000004000))
|
||||||
// return;
|
// return;
|
||||||
// Bladed Armor
|
// Bladed Armor
|
||||||
if (spell->SpellIconID == 2653)
|
if (spell->Id == 2653)
|
||||||
{
|
{
|
||||||
// Increases your attack power by $s1 for every $s2 armor value you have.
|
// Increases your attack power by $s1 for every $s2 armor value you have.
|
||||||
// Calculate AP bonus (from 1 effect of this spell)
|
// Calculate AP bonus (from 1 effect of this spell)
|
||||||
|
|
@ -9331,10 +9331,10 @@ void Aura::PeriodicDummyTick()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Reaping
|
// Reaping
|
||||||
// if (spell->SpellIconID == 22)
|
// if (spell->Id == 22)
|
||||||
// return;
|
// return;
|
||||||
// Blood of the North
|
// Blood of the North
|
||||||
// if (spell->SpellIconID == 30412)
|
// if (spell->Id == 30412)
|
||||||
// return;
|
// return;
|
||||||
// Hysteria
|
// Hysteria
|
||||||
if (spell->IsFitToFamilyMask(UI64LIT(0x0000000020000000)))
|
if (spell->IsFitToFamilyMask(UI64LIT(0x0000000020000000)))
|
||||||
|
|
@ -9886,7 +9886,7 @@ SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit* target, Wor
|
||||||
|
|
||||||
m_duration = m_maxDuration = CalculateSpellDuration(spellproto, unitCaster);
|
m_duration = m_maxDuration = CalculateSpellDuration(spellproto, unitCaster);
|
||||||
|
|
||||||
if (m_maxDuration == -1 || (m_isPassive && spellproto->DurationIndex == 0))
|
if (m_maxDuration == -1 || (m_isPassive && spellproto->GetDurationIndex() == 0))
|
||||||
{
|
{
|
||||||
m_permanent = true;
|
m_permanent = true;
|
||||||
}
|
}
|
||||||
|
|
@ -10592,7 +10592,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
case SPELLFAMILY_MAGE:
|
case SPELLFAMILY_MAGE:
|
||||||
{
|
{
|
||||||
// Ice Barrier (non stacking from one caster)
|
// Ice Barrier (non stacking from one caster)
|
||||||
if (m_spellProto->SpellIconID == 32)
|
if (m_spellProto->Id == 32)
|
||||||
{
|
{
|
||||||
if ((!apply && m_removeMode == AURA_REMOVE_BY_DISPEL) || m_removeMode == AURA_REMOVE_BY_SHIELD_BREAK)
|
if ((!apply && m_removeMode == AURA_REMOVE_BY_DISPEL) || m_removeMode == AURA_REMOVE_BY_SHIELD_BREAK)
|
||||||
{
|
{
|
||||||
|
|
@ -10600,7 +10600,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
for (Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
for (Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
||||||
{
|
{
|
||||||
// Shattered Barrier
|
// Shattered Barrier
|
||||||
if ((*itr)->GetSpellProto()->SpellIconID == 2945)
|
if ((*itr)->GetSpellProto()->Id == 2945)
|
||||||
{
|
{
|
||||||
cast_at_remove = true;
|
cast_at_remove = true;
|
||||||
// first rank have 50% chance
|
// first rank have 50% chance
|
||||||
|
|
@ -10718,7 +10718,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
{
|
{
|
||||||
SpellEntry const* dummyEntry = (*itr)->GetSpellProto();
|
SpellEntry const* dummyEntry = (*itr)->GetSpellProto();
|
||||||
// Improved Fear
|
// Improved Fear
|
||||||
if (dummyEntry->GetSpellFamilyName() == SPELLFAMILY_WARLOCK && dummyEntry->SpellIconID == 98)
|
if (dummyEntry->GetSpellFamilyName() == SPELLFAMILY_WARLOCK && dummyEntry->Id == 98)
|
||||||
{
|
{
|
||||||
cast_at_remove = true;
|
cast_at_remove = true;
|
||||||
switch ((*itr)->GetModifier()->m_amount)
|
switch ((*itr)->GetModifier()->m_amount)
|
||||||
|
|
@ -10760,7 +10760,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
case SPELLFAMILY_PRIEST:
|
case SPELLFAMILY_PRIEST:
|
||||||
{
|
{
|
||||||
// Shadow Word: Pain (need visual check fro skip improvement talent) or Vampiric Touch
|
// Shadow Word: Pain (need visual check fro skip improvement talent) or Vampiric Touch
|
||||||
if ((m_spellProto->SpellIconID == 234 && m_spellProto->SpellVisual[0]) || m_spellProto->SpellIconID == 2213)
|
if ((m_spellProto->Id == 234 && m_spellProto->GetSpellVisual(0)) || m_spellProto->Id == 2213)
|
||||||
{
|
{
|
||||||
if (!apply && m_removeMode == AURA_REMOVE_BY_DISPEL)
|
if (!apply && m_removeMode == AURA_REMOVE_BY_DISPEL)
|
||||||
{
|
{
|
||||||
|
|
@ -10775,7 +10775,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
{
|
{
|
||||||
// Shadow Affinity
|
// Shadow Affinity
|
||||||
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_PRIEST
|
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_PRIEST
|
||||||
&& (*itr)->GetSpellProto()->SpellIconID == 178)
|
&& (*itr)->GetSpellProto()->Id == 178)
|
||||||
{
|
{
|
||||||
// custom cast code
|
// custom cast code
|
||||||
int32 basepoints0 = (*itr)->GetModifier()->m_amount * caster->GetCreateMana() / 100;
|
int32 basepoints0 = (*itr)->GetModifier()->m_amount * caster->GetCreateMana() / 100;
|
||||||
|
|
@ -10824,8 +10824,8 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
{
|
{
|
||||||
SpellEntry const* dummyEntry = (*itr)->GetSpellProto();
|
SpellEntry const* dummyEntry = (*itr)->GetSpellProto();
|
||||||
// Body and Soul (talent ranks)
|
// Body and Soul (talent ranks)
|
||||||
if (dummyEntry->GetSpellFamilyName() == SPELLFAMILY_PRIEST && dummyEntry->SpellIconID == 2218 &&
|
if (dummyEntry->GetSpellFamilyName() == SPELLFAMILY_PRIEST && dummyEntry->Id == 2218 &&
|
||||||
dummyEntry->SpellVisual[0]==0)
|
dummyEntry->GetSpellVisual(0)==0)
|
||||||
{
|
{
|
||||||
chance = (*itr)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1);
|
chance = (*itr)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1);
|
||||||
break;
|
break;
|
||||||
|
|
@ -10996,7 +10996,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
Unit::AuraList const& dummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& dummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
for (Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
|
||||||
{
|
{
|
||||||
if ((*itr)->GetSpellProto()->SpellIconID == 3029)
|
if ((*itr)->GetSpellProto()->Id == 3029)
|
||||||
{
|
{
|
||||||
percent = (*itr)->GetModifier()->m_amount;
|
percent = (*itr)->GetModifier()->m_amount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -11061,7 +11061,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
{
|
{
|
||||||
// skip same icon
|
// skip same icon
|
||||||
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT &&
|
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT &&
|
||||||
(*itr)->GetSpellProto()->SpellIconID == 2636)
|
(*itr)->GetSpellProto()->Id == 2636)
|
||||||
{
|
{
|
||||||
heal_pct = (*itr)->GetModifier()->m_amount;
|
heal_pct = (*itr)->GetModifier()->m_amount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -11088,7 +11088,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
{
|
{
|
||||||
// skip same icon
|
// skip same icon
|
||||||
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT &&
|
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT &&
|
||||||
(*itr)->GetSpellProto()->SpellIconID == 2633)
|
(*itr)->GetSpellProto()->Id == 2633)
|
||||||
{
|
{
|
||||||
power_pct = (*itr)->GetModifier()->m_amount;
|
power_pct = (*itr)->GetModifier()->m_amount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -11112,7 +11112,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
{
|
{
|
||||||
// skip same icon
|
// skip same icon
|
||||||
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT &&
|
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT &&
|
||||||
(*itr)->GetSpellProto()->SpellIconID == 2632)
|
(*itr)->GetSpellProto()->Id == 2632)
|
||||||
{
|
{
|
||||||
stamina_pct = (*itr)->GetModifier()->m_amount;
|
stamina_pct = (*itr)->GetModifier()->m_amount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -11139,7 +11139,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
{
|
{
|
||||||
// skip same icon
|
// skip same icon
|
||||||
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT &&
|
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT &&
|
||||||
(*itr)->GetSpellProto()->SpellIconID == 2633)
|
(*itr)->GetSpellProto()->Id == 2633)
|
||||||
{
|
{
|
||||||
power_pct = (*itr)->GetModifier()->m_amount;
|
power_pct = (*itr)->GetModifier()->m_amount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -11164,7 +11164,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Improved Blood Presence
|
// Improved Blood Presence
|
||||||
if (GetSpellProto()->SpellIconID == 2636 && m_isPassive)
|
if (GetSpellProto()->Id == 2636 && m_isPassive)
|
||||||
{
|
{
|
||||||
// if presence active: Frost Presence or Unholy Presence
|
// if presence active: Frost Presence or Unholy Presence
|
||||||
if (apply && (m_target->HasAura(48263) || m_target->HasAura(48265)))
|
if (apply && (m_target->HasAura(48263) || m_target->HasAura(48265)))
|
||||||
|
|
@ -11184,7 +11184,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Improved Frost Presence
|
// Improved Frost Presence
|
||||||
if (GetSpellProto()->SpellIconID == 2632 && m_isPassive)
|
if (GetSpellProto()->Id == 2632 && m_isPassive)
|
||||||
{
|
{
|
||||||
// if presence active: Unholy Presence or Blood Presence
|
// if presence active: Unholy Presence or Blood Presence
|
||||||
if (apply && (m_target->HasAura(48265) || m_target->HasAura(48266)))
|
if (apply && (m_target->HasAura(48265) || m_target->HasAura(48266)))
|
||||||
|
|
@ -11205,7 +11205,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Improved Unholy Presence
|
// Improved Unholy Presence
|
||||||
if (GetSpellProto()->SpellIconID == 2633 && m_isPassive)
|
if (GetSpellProto()->Id == 2633 && m_isPassive)
|
||||||
{
|
{
|
||||||
// if presence active: Unholy Presence
|
// if presence active: Unholy Presence
|
||||||
if (apply && m_target->HasAura(48265))
|
if (apply && m_target->HasAura(48265))
|
||||||
|
|
@ -11308,7 +11308,7 @@ void SpellAuraHolder::Update(uint32 diff)
|
||||||
{
|
{
|
||||||
if (Unit* caster = GetCaster())
|
if (Unit* caster = GetCaster())
|
||||||
{
|
{
|
||||||
Powers powertype = Powers(GetSpellProto()->powerType);
|
Powers powertype = Powers(GetSpellProto()->GetPowerType());
|
||||||
m_timeCla = 1*IN_MILLISECONDS;
|
m_timeCla = 1*IN_MILLISECONDS;
|
||||||
|
|
||||||
if (SpellPowerEntry const* spellPower = GetSpellProto()->GetSpellPower())
|
if (SpellPowerEntry const* spellPower = GetSpellProto()->GetSpellPower())
|
||||||
|
|
@ -11337,7 +11337,7 @@ void SpellAuraHolder::Update(uint32 diff)
|
||||||
if (caster->GetChannelObjectGuid() == m_target->GetObjectGuid())
|
if (caster->GetChannelObjectGuid() == m_target->GetObjectGuid())
|
||||||
{
|
{
|
||||||
// Get spell range
|
// Get spell range
|
||||||
float max_range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellProto->rangeIndex));
|
float max_range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellProto->GetRangeIndex()));
|
||||||
|
|
||||||
if (Player* modOwner = caster->GetSpellModOwner())
|
if (Player* modOwner = caster->GetSpellModOwner())
|
||||||
modOwner->ApplySpellMod(GetId(), SPELLMOD_RANGE, max_range);
|
modOwner->ApplySpellMod(GetId(), SPELLMOD_RANGE, max_range);
|
||||||
|
|
@ -11366,7 +11366,7 @@ void SpellAuraHolder::SetAuraMaxDuration(int32 duration)
|
||||||
// possible overwrite persistent state
|
// possible overwrite persistent state
|
||||||
if (duration > 0)
|
if (duration > 0)
|
||||||
{
|
{
|
||||||
if (!(IsPassive() && GetSpellProto()->DurationIndex == 0))
|
if (!(IsPassive() && GetSpellProto()->GetDurationIndex() == 0))
|
||||||
{
|
{
|
||||||
SetPermanent(false);
|
SetPermanent(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@ void Spell::EffectSchoolDMG(SpellEffectEntry const* effect)
|
||||||
case SPELLFAMILY_MAGE:
|
case SPELLFAMILY_MAGE:
|
||||||
// remove Arcane Blast buffs at any non-Arcane Blast arcane damage spell.
|
// remove Arcane Blast buffs at any non-Arcane Blast arcane damage spell.
|
||||||
// NOTE: it removed at hit instead cast because currently spell done-damage calculated at hit instead cast
|
// NOTE: it removed at hit instead cast because currently spell done-damage calculated at hit instead cast
|
||||||
if ((m_spellInfo->SchoolMask & SPELL_SCHOOL_MASK_ARCANE) && !(classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x20000000)))
|
if ((m_spellInfo->GetSchoolMask() & SPELL_SCHOOL_MASK_ARCANE) && !(classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x20000000)))
|
||||||
m_caster->RemoveAurasDueToSpell(36032); // Arcane Blast buff
|
m_caster->RemoveAurasDueToSpell(36032); // Arcane Blast buff
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_WARRIOR:
|
case SPELLFAMILY_WARRIOR:
|
||||||
|
|
@ -502,7 +502,7 @@ void Spell::EffectSchoolDMG(SpellEffectEntry const* effect)
|
||||||
case SPELLFAMILY_WARLOCK:
|
case SPELLFAMILY_WARLOCK:
|
||||||
{
|
{
|
||||||
// Incinerate Rank 1 & 2
|
// Incinerate Rank 1 & 2
|
||||||
if ((classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x00004000000000)) && m_spellInfo->SpellIconID==2128)
|
if ((classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x00004000000000)) && m_spellInfo->GetSpellIconID()==2128)
|
||||||
{
|
{
|
||||||
// Incinerate does more dmg (dmg*0.25) if the target have Immolate debuff.
|
// Incinerate does more dmg (dmg*0.25) if the target have Immolate debuff.
|
||||||
// Check aura state for speed but aura state set not only for Immolate spell
|
// Check aura state for speed but aura state set not only for Immolate spell
|
||||||
|
|
@ -604,7 +604,7 @@ void Spell::EffectSchoolDMG(SpellEffectEntry const* effect)
|
||||||
for (Unit::AuraList::const_iterator i = ImprMindBlast.begin(); i != ImprMindBlast.end(); ++i)
|
for (Unit::AuraList::const_iterator i = ImprMindBlast.begin(); i != ImprMindBlast.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_PRIEST &&
|
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_PRIEST &&
|
||||||
((*i)->GetSpellProto()->SpellIconID == 95))
|
((*i)->GetSpellProto()->GetSpellIconID() == 95))
|
||||||
{
|
{
|
||||||
int chance = (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1);
|
int chance = (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1);
|
||||||
if (roll_chance_i(chance))
|
if (roll_chance_i(chance))
|
||||||
|
|
@ -620,11 +620,11 @@ void Spell::EffectSchoolDMG(SpellEffectEntry const* effect)
|
||||||
{
|
{
|
||||||
SpellEffectEntry const* rakeSpellEffect = m_spellInfo->GetSpellEffect(EFFECT_INDEX_2);
|
SpellEffectEntry const* rakeSpellEffect = m_spellInfo->GetSpellEffect(EFFECT_INDEX_2);
|
||||||
// Ferocious Bite
|
// Ferocious Bite
|
||||||
if (m_caster->GetTypeId()==TYPEID_PLAYER && (classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x000800000)) && m_spellInfo->SpellVisual[0]==6587)
|
if (m_caster->GetTypeId()==TYPEID_PLAYER && (classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x000800000)) && m_spellInfo->GetSpellVisual()==6587)
|
||||||
{
|
{
|
||||||
// converts up to 30 points of energy into ($f1+$AP/410) additional damage
|
// converts up to 30 points of energy into ($f1+$AP/410) additional damage
|
||||||
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||||
float multiple = ap / 410 + effect->EffectDamageMultiplier;
|
float multiple = ap / 410 + effect->DmgMultiplier;
|
||||||
damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100);
|
damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100);
|
||||||
uint32 energy = m_caster->GetPower(POWER_ENERGY);
|
uint32 energy = m_caster->GetPower(POWER_ENERGY);
|
||||||
uint32 used_energy = energy > 30 ? 30 : energy;
|
uint32 used_energy = energy > 30 ? 30 : energy;
|
||||||
|
|
@ -681,7 +681,7 @@ void Spell::EffectSchoolDMG(SpellEffectEntry const* effect)
|
||||||
Unit::AuraList const& auraList = ((Player*)m_caster)->GetAurasByType(SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL);
|
Unit::AuraList const& auraList = ((Player*)m_caster)->GetAurasByType(SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL);
|
||||||
for (Unit::AuraList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
|
for (Unit::AuraList::const_iterator iter = auraList.begin(); iter != auraList.end(); ++iter)
|
||||||
{
|
{
|
||||||
if ((*iter)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_ROGUE && (*iter)->GetSpellProto()->SpellIconID == 1960)
|
if ((*iter)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_ROGUE && (*iter)->GetSpellProto()->GetSpellIconID() == 1960)
|
||||||
{
|
{
|
||||||
if (int32 chance = (*iter)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2))
|
if (int32 chance = (*iter)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2))
|
||||||
if (roll_chance_i(chance))
|
if (roll_chance_i(chance))
|
||||||
|
|
@ -720,7 +720,7 @@ void Spell::EffectSchoolDMG(SpellEffectEntry const* effect)
|
||||||
case SPELLFAMILY_HUNTER:
|
case SPELLFAMILY_HUNTER:
|
||||||
{
|
{
|
||||||
// Gore
|
// Gore
|
||||||
if (m_spellInfo->SpellIconID == 1578)
|
if (m_spellInfo->GetSpellIconID() == 1578)
|
||||||
{
|
{
|
||||||
if (m_caster->HasAura(57627)) // Charge 6 sec post-affect
|
if (m_caster->HasAura(57627)) // Charge 6 sec post-affect
|
||||||
damage *= 2;
|
damage *= 2;
|
||||||
|
|
@ -745,7 +745,7 @@ void Spell::EffectSchoolDMG(SpellEffectEntry const* effect)
|
||||||
damage += int32(ap * 0.2f) + int32(holy * 32 / 100);
|
damage += int32(ap * 0.2f) + int32(holy * 32 / 100);
|
||||||
}
|
}
|
||||||
// Judgement of Vengeance/Corruption ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance/Blood Corruption on the target
|
// Judgement of Vengeance/Corruption ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance/Blood Corruption on the target
|
||||||
else if ((classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x800000000)) && m_spellInfo->SpellIconID==2292)
|
else if ((classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x800000000)) && m_spellInfo->GetSpellIconID()==2292)
|
||||||
{
|
{
|
||||||
uint32 debuf_id;
|
uint32 debuf_id;
|
||||||
switch (m_spellInfo->Id)
|
switch (m_spellInfo->Id)
|
||||||
|
|
@ -2037,7 +2037,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
// big fire
|
// big fire
|
||||||
GameObject* pGo = NULL;
|
GameObject* pGo = NULL;
|
||||||
|
|
||||||
float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex()));
|
||||||
|
|
||||||
MaNGOS::NearestGameObjectEntryInPosRangeCheck go_check_big(*unitTarget, 187675, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist);
|
MaNGOS::NearestGameObjectEntryInPosRangeCheck go_check_big(*unitTarget, 187675, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist);
|
||||||
MaNGOS::GameObjectSearcher<MaNGOS::NearestGameObjectEntryInPosRangeCheck> checker1(pGo, go_check_big);
|
MaNGOS::GameObjectSearcher<MaNGOS::NearestGameObjectEntryInPosRangeCheck> checker1(pGo, go_check_big);
|
||||||
|
|
@ -2179,7 +2179,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
|
|
||||||
Creature* creatureTarget = (Creature*)unitTarget;
|
Creature* creatureTarget = (Creature*)unitTarget;
|
||||||
|
|
||||||
if (const SpellCastTimesEntry* pCastTime = sSpellCastTimesStore.LookupEntry(pSpell->CastingTimeIndex))
|
if (const SpellCastTimesEntry* pCastTime = sSpellCastTimesStore.LookupEntry(pSpell->GetCastingTimeIndex()))
|
||||||
creatureTarget->ForcedDespawn(pCastTime->CastTime + 1);
|
creatureTarget->ForcedDespawn(pCastTime->CastTime + 1);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
@ -2196,7 +2196,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
// look for gameobject within max spell range of unitTarget, and respawn if found
|
// look for gameobject within max spell range of unitTarget, and respawn if found
|
||||||
GameObject* pGo = NULL;
|
GameObject* pGo = NULL;
|
||||||
|
|
||||||
float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex()));
|
||||||
|
|
||||||
MaNGOS::NearestGameObjectEntryInPosRangeCheck go_check(*unitTarget, 187675, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist);
|
MaNGOS::NearestGameObjectEntryInPosRangeCheck go_check(*unitTarget, 187675, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist);
|
||||||
MaNGOS::GameObjectSearcher<MaNGOS::NearestGameObjectEntryInPosRangeCheck> checker(pGo, go_check);
|
MaNGOS::GameObjectSearcher<MaNGOS::NearestGameObjectEntryInPosRangeCheck> checker(pGo, go_check);
|
||||||
|
|
@ -2729,7 +2729,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
// Expecting pTargetDummy to be summoned by AI at death of target creatures.
|
// Expecting pTargetDummy to be summoned by AI at death of target creatures.
|
||||||
|
|
||||||
Creature* pTargetDummy = NULL;
|
Creature* pTargetDummy = NULL;
|
||||||
float fRange = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
float fRange = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex()));
|
||||||
|
|
||||||
MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster, 28523, true, false, fRange * 2);
|
MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster, 28523, true, false, fRange * 2);
|
||||||
MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(pTargetDummy, u_check);
|
MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(pTargetDummy, u_check);
|
||||||
|
|
@ -2828,7 +2828,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
// look for gameobjects within max spell range of unitTarget, and respawn if found
|
// look for gameobjects within max spell range of unitTarget, and respawn if found
|
||||||
std::list<GameObject*> lList;
|
std::list<GameObject*> lList;
|
||||||
|
|
||||||
float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
float fMaxDist = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex()));
|
||||||
|
|
||||||
MaNGOS::GameObjectEntryInPosRangeCheck go_check(*unitTarget, 182071, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist);
|
MaNGOS::GameObjectEntryInPosRangeCheck go_check(*unitTarget, 182071, unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(), fMaxDist);
|
||||||
MaNGOS::GameObjectListSearcher<MaNGOS::GameObjectEntryInPosRangeCheck> checker(lList, go_check);
|
MaNGOS::GameObjectListSearcher<MaNGOS::GameObjectEntryInPosRangeCheck> checker(lList, go_check);
|
||||||
|
|
@ -3618,7 +3618,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
{
|
{
|
||||||
SpellClassOptionsEntry const* warClassOptions = m_spellInfo->GetSpellClassOptions();
|
SpellClassOptionsEntry const* warClassOptions = m_spellInfo->GetSpellClassOptions();
|
||||||
// Charge
|
// Charge
|
||||||
if (warClassOptions && (warClassOptions->SpellFamilyFlags & UI64LIT(0x1)) && m_spellInfo->SpellVisual[0] == 867)
|
if (warClassOptions && (warClassOptions->SpellFamilyFlags & UI64LIT(0x1)) && m_spellInfo->GetSpellVisual() == 867)
|
||||||
{
|
{
|
||||||
int32 chargeBasePoints0 = damage;
|
int32 chargeBasePoints0 = damage;
|
||||||
m_caster->CastCustomSpell(m_caster, 34846, &chargeBasePoints0, NULL, NULL, true);
|
m_caster->CastCustomSpell(m_caster, 34846, &chargeBasePoints0, NULL, NULL, true);
|
||||||
|
|
@ -3644,7 +3644,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
if (Aura* aura = m_caster->GetDummyAura(58367))
|
if (Aura* aura = m_caster->GetDummyAura(58367))
|
||||||
rage_modified += aura->GetModifier()->m_amount * 10;
|
rage_modified += aura->GetModifier()->m_amount * 10;
|
||||||
|
|
||||||
int32 basePoints0 = damage+int32(rage_modified * effect->EffectDamageMultiplier +
|
int32 basePoints0 = damage+int32(rage_modified * effect->DmgMultiplier +
|
||||||
m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
|
m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
|
||||||
|
|
||||||
m_caster->CastCustomSpell(unitTarget, 20647, &basePoints0, NULL, NULL, true, 0);
|
m_caster->CastCustomSpell(unitTarget, 20647, &basePoints0, NULL, NULL, true, 0);
|
||||||
|
|
@ -3656,7 +3656,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
for (Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
for (Unit::AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||||
{
|
{
|
||||||
// Only Sudden Death have this SpellIconID with SPELL_AURA_PROC_TRIGGER_SPELL
|
// Only Sudden Death have this SpellIconID with SPELL_AURA_PROC_TRIGGER_SPELL
|
||||||
if ((*itr)->GetSpellProto()->SpellIconID == 1989)
|
if ((*itr)->GetSpellProto()->GetSpellIconID() == 1989)
|
||||||
{
|
{
|
||||||
// saved rage top stored in next affect
|
// saved rage top stored in next affect
|
||||||
uint32 lastrage = (*itr)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1) * 10;
|
uint32 lastrage = (*itr)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1) * 10;
|
||||||
|
|
@ -3769,7 +3769,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
// Improved Life Tap mod
|
// Improved Life Tap mod
|
||||||
Unit::AuraList const& auraDummy = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& auraDummy = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr)
|
for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr)
|
||||||
if((*itr)->GetSpellProto()->GetSpellFamilyName()==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->SpellIconID == 208)
|
if((*itr)->GetSpellProto()->GetSpellFamilyName()==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->GetSpellIconID() == 208)
|
||||||
mana = ((*itr)->GetModifier()->m_amount + 100)* mana / 100;
|
mana = ((*itr)->GetModifier()->m_amount + 100)* mana / 100;
|
||||||
|
|
||||||
m_caster->CastCustomSpell(unitTarget, 31818, &mana, NULL, NULL, true);
|
m_caster->CastCustomSpell(unitTarget, 31818, &mana, NULL, NULL, true);
|
||||||
|
|
@ -3779,7 +3779,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
Unit::AuraList const& mod = m_caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
|
Unit::AuraList const& mod = m_caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
|
||||||
for (Unit::AuraList::const_iterator itr = mod.begin(); itr != mod.end(); ++itr)
|
for (Unit::AuraList::const_iterator itr = mod.begin(); itr != mod.end(); ++itr)
|
||||||
{
|
{
|
||||||
if((*itr)->GetSpellProto()->GetSpellFamilyName()==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->SpellIconID == 1982)
|
if((*itr)->GetSpellProto()->GetSpellFamilyName()==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->GetSpellIconID() == 1982)
|
||||||
manaFeedVal+= (*itr)->GetModifier()->m_amount;
|
manaFeedVal+= (*itr)->GetModifier()->m_amount;
|
||||||
}
|
}
|
||||||
if (manaFeedVal > 0)
|
if (manaFeedVal > 0)
|
||||||
|
|
@ -3962,7 +3962,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
Unit::AuraList const& decSpeedList = unitTarget->GetAurasByType(SPELL_AURA_MOD_DECREASE_SPEED);
|
Unit::AuraList const& decSpeedList = unitTarget->GetAurasByType(SPELL_AURA_MOD_DECREASE_SPEED);
|
||||||
for (Unit::AuraList::const_iterator iter = decSpeedList.begin(); iter != decSpeedList.end(); ++iter)
|
for (Unit::AuraList::const_iterator iter = decSpeedList.begin(); iter != decSpeedList.end(); ++iter)
|
||||||
{
|
{
|
||||||
if ((*iter)->GetSpellProto()->SpellIconID==15 && (*iter)->GetSpellProto()->GetDispel()==0)
|
if ((*iter)->GetSpellProto()->GetSpellIconID()==15 && (*iter)->GetSpellProto()->GetDispel()==0)
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
|
|
@ -4057,7 +4057,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_PALADIN:
|
case SPELLFAMILY_PALADIN:
|
||||||
{
|
{
|
||||||
switch (m_spellInfo->SpellIconID)
|
switch (m_spellInfo->GetSpellIconID())
|
||||||
{
|
{
|
||||||
case 156: // Holy Shock
|
case 156: // Holy Shock
|
||||||
{
|
{
|
||||||
|
|
@ -4185,7 +4185,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
{
|
{
|
||||||
SpellClassOptionsEntry const* shamClassOptions = m_spellInfo->GetSpellClassOptions();
|
SpellClassOptionsEntry const* shamClassOptions = m_spellInfo->GetSpellClassOptions();
|
||||||
// Cleansing Totem
|
// Cleansing Totem
|
||||||
if (shamClassOptions && (shamClassOptions->SpellFamilyFlags & UI64LIT(0x0000000004000000)) && m_spellInfo->SpellIconID==1673)
|
if (shamClassOptions && (shamClassOptions->SpellFamilyFlags & UI64LIT(0x0000000004000000)) && m_spellInfo->GetSpellIconID()==1673)
|
||||||
{
|
{
|
||||||
if (unitTarget)
|
if (unitTarget)
|
||||||
m_caster->CastSpell(unitTarget, 52025, true);
|
m_caster->CastSpell(unitTarget, 52025, true);
|
||||||
|
|
@ -4209,7 +4209,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
Unit::AuraList const& mDummyAuras = owner->GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& mDummyAuras = owner->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
for (Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
|
||||||
// only its have dummy with specific icon
|
// only its have dummy with specific icon
|
||||||
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_SHAMAN && (*i)->GetSpellProto()->SpellIconID == 338)
|
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_SHAMAN && (*i)->GetSpellProto()->GetSpellIconID() == 338)
|
||||||
damage += (*i)->GetModifier()->m_amount * damage / 100;
|
damage += (*i)->GetModifier()->m_amount * damage / 100;
|
||||||
|
|
||||||
// Glyph of Healing Stream Totem
|
// Glyph of Healing Stream Totem
|
||||||
|
|
@ -4288,7 +4288,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Fire Nova
|
// Fire Nova
|
||||||
if (m_spellInfo->SpellIconID == 33)
|
if (m_spellInfo->GetSpellIconID() == 33)
|
||||||
{
|
{
|
||||||
// fire totems slot
|
// fire totems slot
|
||||||
Totem* totem = m_caster->GetTotem(TOTEM_SLOT_FIRE);
|
Totem* totem = m_caster->GetTotem(TOTEM_SLOT_FIRE);
|
||||||
|
|
@ -4367,14 +4367,14 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellEffectEntry const* dsSpellEffect = m_spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
SpellEffectEntry const* dsSpellEffect = m_spellInfo->GetSpellEffect(EFFECT_INDEX_0);
|
||||||
int32 bp = int32(count * m_caster->GetMaxHealth() * (dsSpellEffect ? dsSpellEffect->EffectDamageMultiplier : 0.0f) / 100);
|
int32 bp = int32(count * m_caster->GetMaxHealth() * (dsSpellEffect ? dsSpellEffect->DmgMultiplier : 0.0f) / 100);
|
||||||
|
|
||||||
// Improved Death Strike (percent stored in nonexistent EFFECT_INDEX_2 effect base points)
|
// Improved Death Strike (percent stored in nonexistent EFFECT_INDEX_2 effect base points)
|
||||||
Unit::AuraList const& auraMod = m_caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
|
Unit::AuraList const& auraMod = m_caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
|
||||||
for (Unit::AuraList::const_iterator iter = auraMod.begin(); iter != auraMod.end(); ++iter)
|
for (Unit::AuraList::const_iterator iter = auraMod.begin(); iter != auraMod.end(); ++iter)
|
||||||
{
|
{
|
||||||
// only required spell have spellicon for SPELL_AURA_ADD_FLAT_MODIFIER
|
// only required spell have spellicon for SPELL_AURA_ADD_FLAT_MODIFIER
|
||||||
if ((*iter)->GetSpellProto()->SpellIconID == 2751 && (*iter)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT)
|
if ((*iter)->GetSpellProto()->GetSpellIconID() == 2751 && (*iter)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT)
|
||||||
{
|
{
|
||||||
bp += (*iter)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2) * bp / 100;
|
bp += (*iter)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2) * bp / 100;
|
||||||
break;
|
break;
|
||||||
|
|
@ -4416,7 +4416,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
|
||||||
Unit::AuraList const& dummyList = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& dummyList = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (Unit::AuraList::const_iterator itr = dummyList.begin(); itr != dummyList.end(); ++itr)
|
for (Unit::AuraList::const_iterator itr = dummyList.begin(); itr != dummyList.end(); ++itr)
|
||||||
{
|
{
|
||||||
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT && (*itr)->GetSpellProto()->SpellIconID == 2710)
|
if ((*itr)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_DEATHKNIGHT && (*itr)->GetSpellProto()->GetSpellIconID() == 2710)
|
||||||
{
|
{
|
||||||
if (roll_chance_i((*itr)->GetModifier()->m_amount)) // don't consume if found
|
if (roll_chance_i((*itr)->GetModifier()->m_amount)) // don't consume if found
|
||||||
{
|
{
|
||||||
|
|
@ -4768,7 +4768,7 @@ void Spell::EffectJump(SpellEffectEntry const* effect)
|
||||||
// Try to normalize Z coord because GetContactPoint do nothing with Z axis
|
// Try to normalize Z coord because GetContactPoint do nothing with Z axis
|
||||||
m_caster->UpdateAllowedPositionZ(x, y, z);
|
m_caster->UpdateAllowedPositionZ(x, y, z);
|
||||||
|
|
||||||
float speed = m_spellInfo->speed ? m_spellInfo->speed : 27.0f;
|
float speed = m_spellInfo->GetSpeed() ? m_spellInfo->GetSpeed() : 27.0f;
|
||||||
m_caster->GetMotionMaster()->MoveDestination(x, y, z, o, speed, 2.5f);
|
m_caster->GetMotionMaster()->MoveDestination(x, y, z, o, speed, 2.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6009,7 +6009,7 @@ void Spell::EffectSummonType(SpellEffectEntry const* effect)
|
||||||
if (prop_id == 61) // mixed guardians, totems, statues
|
if (prop_id == 61) // mixed guardians, totems, statues
|
||||||
{
|
{
|
||||||
// * Stone Statue, etc -- fits much better totem AI
|
// * Stone Statue, etc -- fits much better totem AI
|
||||||
if (m_spellInfo->SpellIconID == 2056)
|
if (m_spellInfo->GetSpellIconID() == 2056)
|
||||||
summonResult = DoSummonTotem(effect);
|
summonResult = DoSummonTotem(effect);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -7098,13 +7098,13 @@ void Spell::EffectEnchantItemTmp(SpellEffectEntry const* effect)
|
||||||
else if(classOptions && classOptions->SpellFamilyName == SPELLFAMILY_SHAMAN)
|
else if(classOptions && classOptions->SpellFamilyName == SPELLFAMILY_SHAMAN)
|
||||||
duration = 1800; // 30 mins
|
duration = 1800; // 30 mins
|
||||||
// other cases with this SpellVisual already selected
|
// other cases with this SpellVisual already selected
|
||||||
else if (m_spellInfo->SpellVisual[0] == 215)
|
else if (m_spellInfo->GetSpellVisual(0) == 215)
|
||||||
duration = 1800; // 30 mins
|
duration = 1800; // 30 mins
|
||||||
// some fishing pole bonuses
|
// some fishing pole bonuses
|
||||||
else if (m_spellInfo->SpellVisual[0] == 563)
|
else if (m_spellInfo->GetSpellVisual(0) == 563)
|
||||||
duration = 600; // 10 mins
|
duration = 600; // 10 mins
|
||||||
// shaman rockbiter enchantments
|
// shaman rockbiter enchantments
|
||||||
else if (m_spellInfo->SpellVisual[0] == 0)
|
else if (m_spellInfo->GetSpellVisual(0) == 0)
|
||||||
duration = 1800; // 30 mins
|
duration = 1800; // 30 mins
|
||||||
else if (m_spellInfo->Id == 29702)
|
else if (m_spellInfo->Id == 29702)
|
||||||
duration = 300; // 5 mins
|
duration = 300; // 5 mins
|
||||||
|
|
@ -7455,7 +7455,7 @@ void Spell::EffectWeaponDmg(SpellEffectEntry const* effect)
|
||||||
case SPELLFAMILY_WARRIOR:
|
case SPELLFAMILY_WARRIOR:
|
||||||
{
|
{
|
||||||
// Devastate
|
// Devastate
|
||||||
if (m_spellInfo->SpellVisual[0] == 12295 && m_spellInfo->SpellIconID == 1508)
|
if (m_spellInfo->GetSpellVisual() == 12295 && m_spellInfo->GetSpellIconID() == 1508)
|
||||||
{
|
{
|
||||||
// Sunder Armor
|
// Sunder Armor
|
||||||
Aura* sunder = unitTarget->GetAura(SPELL_AURA_MOD_RESISTANCE_PCT, SPELLFAMILY_WARRIOR, UI64LIT(0x0000000000004000), 0x00000000, m_caster->GetObjectGuid());
|
Aura* sunder = unitTarget->GetAura(SPELL_AURA_MOD_RESISTANCE_PCT, SPELLFAMILY_WARRIOR, UI64LIT(0x0000000000004000), 0x00000000, m_caster->GetObjectGuid());
|
||||||
|
|
@ -7570,7 +7570,7 @@ void Spell::EffectWeaponDmg(SpellEffectEntry const* effect)
|
||||||
{
|
{
|
||||||
// Blood Strike, Heart Strike, Obliterate
|
// Blood Strike, Heart Strike, Obliterate
|
||||||
// Blood-Caked Strike
|
// Blood-Caked Strike
|
||||||
if (m_spellInfo->SpellIconID == 1736)
|
if (m_spellInfo->GetSpellIconID() == 1736)
|
||||||
{
|
{
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
Unit::SpellAuraHolderMap const& auras = unitTarget->GetSpellAuraHolderMap();
|
Unit::SpellAuraHolderMap const& auras = unitTarget->GetSpellAuraHolderMap();
|
||||||
|
|
@ -7584,17 +7584,17 @@ void Spell::EffectWeaponDmg(SpellEffectEntry const* effect)
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
// Effect 1(for Blood-Caked Strike)/3(other) damage is bonus
|
// Effect 1(for Blood-Caked Strike)/3(other) damage is bonus
|
||||||
float bonus = count * CalculateDamage(m_spellInfo->SpellIconID == 1736 ? EFFECT_INDEX_0 : EFFECT_INDEX_2, unitTarget) / 100.0f;
|
float bonus = count * CalculateDamage(m_spellInfo->GetSpellIconID() == 1736 ? EFFECT_INDEX_0 : EFFECT_INDEX_2, unitTarget) / 100.0f;
|
||||||
// Blood Strike, Blood-Caked Strike and Obliterate store bonus*2
|
// Blood Strike, Blood-Caked Strike and Obliterate store bonus*2
|
||||||
if ((classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x0002000000400000)) ||
|
if ((classOptions && classOptions->SpellFamilyFlags & UI64LIT(0x0002000000400000)) ||
|
||||||
m_spellInfo->SpellIconID == 1736)
|
m_spellInfo->GetSpellIconID() == 1736)
|
||||||
bonus /= 2.0f;
|
bonus /= 2.0f;
|
||||||
|
|
||||||
totalDamagePercentMod *= 1.0f + bonus;
|
totalDamagePercentMod *= 1.0f + bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Heart Strike secondary target
|
// Heart Strike secondary target
|
||||||
if (m_spellInfo->SpellIconID == 3145)
|
if (m_spellInfo->GetSpellIconID() == 3145)
|
||||||
if (m_targets.getUnitTarget() != unitTarget)
|
if (m_targets.getUnitTarget() != unitTarget)
|
||||||
weaponDamagePercentMod /= 2.0f;
|
weaponDamagePercentMod /= 2.0f;
|
||||||
}
|
}
|
||||||
|
|
@ -10977,7 +10977,7 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect)
|
||||||
for (Unit::AuraList::const_iterator i = auras.begin(); i != auras.end(); ++i)
|
for (Unit::AuraList::const_iterator i = auras.begin(); i != auras.end(); ++i)
|
||||||
{
|
{
|
||||||
// Invigoration (master talent)
|
// Invigoration (master talent)
|
||||||
if ((*i)->GetModifier()->m_miscvalue == 8 && (*i)->GetSpellProto()->SpellIconID == 3487)
|
if ((*i)->GetModifier()->m_miscvalue == 8 && (*i)->GetSpellProto()->GetSpellIconID() == 3487)
|
||||||
{
|
{
|
||||||
if (roll_chance_i((*i)->GetModifier()->m_amount))
|
if (roll_chance_i((*i)->GetModifier()->m_amount))
|
||||||
{
|
{
|
||||||
|
|
@ -11872,7 +11872,7 @@ void Spell::EffectBlock(SpellEffectEntry const* /*effect*/)
|
||||||
|
|
||||||
void Spell::EffectLeapForward(SpellEffectEntry const* effect)
|
void Spell::EffectLeapForward(SpellEffectEntry const* effect)
|
||||||
{
|
{
|
||||||
float dist = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->rangeIndex));
|
float dist = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->GetRangeIndex()));
|
||||||
const float IN_OR_UNDER_LIQUID_RANGE = 0.8f; // range to make player under liquid or on liquid surface from liquid level
|
const float IN_OR_UNDER_LIQUID_RANGE = 0.8f; // range to make player under liquid or on liquid surface from liquid level
|
||||||
|
|
||||||
G3D::Vector3 prevPos, nextPos;
|
G3D::Vector3 prevPos, nextPos;
|
||||||
|
|
@ -12238,18 +12238,11 @@ void Spell::EffectPlayerPull(SpellEffectEntry const* effect)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
float x, y, z;
|
float dist = unitTarget->GetDistance2d(m_caster);
|
||||||
m_caster->GetPosition(x, y, z);
|
if (damage && dist > damage)
|
||||||
|
dist = float(damage);
|
||||||
|
|
||||||
// move back a bit
|
unitTarget->KnockBackFrom(m_caster, -dist, float(effect->EffectMiscValue) / 10);
|
||||||
x = x - (0.6 * cos(m_caster->GetOrientation() + M_PI_F));
|
|
||||||
y = y - (0.6 * sin(m_caster->GetOrientation() + M_PI_F));
|
|
||||||
|
|
||||||
// Try to normalize Z coord because GetContactPoint do nothing with Z axis
|
|
||||||
unitTarget->UpdateAllowedPositionZ(x, y, z);
|
|
||||||
|
|
||||||
float speed = m_spellInfo->speed ? m_spellInfo->speed : 27.0f;
|
|
||||||
unitTarget->GetMotionMaster()->MoveJump(x, y, z, speed, 2.5f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::EffectDispelMechanic(SpellEffectEntry const* effect)
|
void Spell::EffectDispelMechanic(SpellEffectEntry const* effect)
|
||||||
|
|
@ -12465,15 +12458,15 @@ void Spell::EffectTransmitted(SpellEffectEntry const* effect)
|
||||||
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||||
m_targets.getDestination(fx, fy, fz);
|
m_targets.getDestination(fx, fy, fz);
|
||||||
// FIXME: this can be better check for most objects but still hack
|
// FIXME: this can be better check for most objects but still hack
|
||||||
else if (effect->GetRadiusIndex() && m_spellInfo->speed == 0)
|
else if (effect->GetRadiusIndex() && m_spellInfo->GetSpeed() == 0)
|
||||||
{
|
{
|
||||||
float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(effect->GetRadiusIndex()));
|
float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(effect->GetRadiusIndex()));
|
||||||
m_caster->GetClosePoint(fx, fy, fz, DEFAULT_WORLD_OBJECT_SIZE, dis);
|
m_caster->GetClosePoint(fx, fy, fz, DEFAULT_WORLD_OBJECT_SIZE, dis);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float min_dis = GetSpellMinRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
float min_dis = GetSpellMinRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex()));
|
||||||
float max_dis = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
float max_dis = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->GetRangeIndex()));
|
||||||
float dis = rand_norm_f() * (max_dis - min_dis) + min_dis;
|
float dis = rand_norm_f() * (max_dis - min_dis) + min_dis;
|
||||||
|
|
||||||
// special code for fishing bobber (TARGET_SELF_FISHING), should not try to avoid objects
|
// special code for fishing bobber (TARGET_SELF_FISHING), should not try to avoid objects
|
||||||
|
|
|
||||||
|
|
@ -1217,7 +1217,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
case SPELLFAMILY_MAGE:
|
case SPELLFAMILY_MAGE:
|
||||||
{
|
{
|
||||||
// Magic Absorption
|
// Magic Absorption
|
||||||
if (dummySpell->SpellIconID == 459) // only this spell have SpellIconID == 459 and dummy aura
|
if (dummySpell->Id == 459) // only this spell have Id == 459 and dummy aura
|
||||||
{
|
{
|
||||||
if (GetPowerType() != POWER_MANA)
|
if (GetPowerType() != POWER_MANA)
|
||||||
{
|
{
|
||||||
|
|
@ -1231,7 +1231,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Master of Elements
|
// Master of Elements
|
||||||
if (dummySpell->SpellIconID == 1920)
|
if (dummySpell->Id == 1920)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -1252,7 +1252,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
}
|
}
|
||||||
|
|
||||||
// Arcane Potency
|
// Arcane Potency
|
||||||
if (dummySpell->SpellIconID == 2120)
|
if (dummySpell->Id == 2120)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -1272,7 +1272,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hot Streak
|
// Hot Streak
|
||||||
if (dummySpell->SpellIconID == 2999)
|
if (dummySpell->Id == 2999)
|
||||||
{
|
{
|
||||||
if (effIndex != EFFECT_INDEX_0)
|
if (effIndex != EFFECT_INDEX_0)
|
||||||
{
|
{
|
||||||
|
|
@ -1301,7 +1301,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_OK;
|
return SPELL_AURA_PROC_OK;
|
||||||
}
|
}
|
||||||
// Burnout
|
// Burnout
|
||||||
if (dummySpell->SpellIconID == 2998)
|
if (dummySpell->Id == 2998)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -1404,7 +1404,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Second Wind
|
// Second Wind
|
||||||
if (dummySpell->SpellIconID == 1697)
|
if (dummySpell->Id == 1697)
|
||||||
{
|
{
|
||||||
// only for spells and hit/crit (trigger start always) and not start from self casted spells (5530 Mace Stun Effect for example)
|
// only for spells and hit/crit (trigger start always) and not start from self casted spells (5530 Mace Stun Effect for example)
|
||||||
if (procSpell == 0 || !(procEx & (PROC_EX_NORMAL_HIT | PROC_EX_CRITICAL_HIT)) || this == pVictim)
|
if (procSpell == 0 || !(procEx & (PROC_EX_NORMAL_HIT | PROC_EX_CRITICAL_HIT)) || this == pVictim)
|
||||||
|
|
@ -1476,7 +1476,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_OK;
|
return SPELL_AURA_PROC_OK;
|
||||||
}
|
}
|
||||||
// Seed of Corruption (Mobs cast) - no die req
|
// Seed of Corruption (Mobs cast) - no die req
|
||||||
if (dummyClassOptions && dummyClassOptions->SpellFamilyFlags == UI64LIT(0x0) && dummySpell->SpellIconID == 1932)
|
if (dummyClassOptions && dummyClassOptions->SpellFamilyFlags == UI64LIT(0x0) && dummySpell->Id == 1932)
|
||||||
{
|
{
|
||||||
Modifier* mod = triggeredByAura->GetModifier();
|
Modifier* mod = triggeredByAura->GetModifier();
|
||||||
// if damage is more than need deal finish spell
|
// if damage is more than need deal finish spell
|
||||||
|
|
@ -1497,7 +1497,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_OK;
|
return SPELL_AURA_PROC_OK;
|
||||||
}
|
}
|
||||||
// Fel Synergy
|
// Fel Synergy
|
||||||
if (dummySpell->SpellIconID == 3222)
|
if (dummySpell->Id == 3222)
|
||||||
{
|
{
|
||||||
target = GetPet();
|
target = GetPet();
|
||||||
if (!target)
|
if (!target)
|
||||||
|
|
@ -1591,7 +1591,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_OK; // no hidden cooldown
|
return SPELL_AURA_PROC_OK; // no hidden cooldown
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (dummySpell->SpellIconID)
|
switch (dummySpell->Id)
|
||||||
{
|
{
|
||||||
// Improved Shadowform
|
// Improved Shadowform
|
||||||
case 217:
|
case 217:
|
||||||
|
|
@ -1880,7 +1880,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
if (spellEffect && spellEffect->GetRadiusIndex())
|
if (spellEffect && spellEffect->GetRadiusIndex())
|
||||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
||||||
else
|
else
|
||||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(procSpell->rangeIndex));
|
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(procSpell->GetRangeIndex()));
|
||||||
|
|
||||||
((Player*)this)->ApplySpellMod(procSpell->Id, SPELLMOD_RADIUS, radius);
|
((Player*)this)->ApplySpellMod(procSpell->Id, SPELLMOD_RADIUS, radius);
|
||||||
|
|
||||||
|
|
@ -1903,7 +1903,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// King of the Jungle
|
// King of the Jungle
|
||||||
if (dummySpell->SpellIconID == 2850)
|
if (dummySpell->Id == 2850)
|
||||||
{
|
{
|
||||||
switch (effIndex)
|
switch (effIndex)
|
||||||
{
|
{
|
||||||
|
|
@ -1925,7 +1925,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Eclipse
|
// Eclipse
|
||||||
if (dummySpell->SpellIconID == 2856)
|
if (dummySpell->Id == 2856)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -1961,7 +1961,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
// Living Seed
|
// Living Seed
|
||||||
else if (dummySpell->SpellIconID == 2860)
|
else if (dummySpell->Id == 2860)
|
||||||
{
|
{
|
||||||
triggered_spell_id = 48504;
|
triggered_spell_id = 48504;
|
||||||
basepoints[0] = triggerAmount * damage / 100;
|
basepoints[0] = triggerAmount * damage / 100;
|
||||||
|
|
@ -2009,7 +2009,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Cut to the Chase
|
// Cut to the Chase
|
||||||
if (dummySpell->SpellIconID == 2909)
|
if (dummySpell->Id == 2909)
|
||||||
{
|
{
|
||||||
// "refresh your Slice and Dice duration to its 5 combo point maximum"
|
// "refresh your Slice and Dice duration to its 5 combo point maximum"
|
||||||
// lookup Slice and Dice
|
// lookup Slice and Dice
|
||||||
|
|
@ -2028,13 +2028,13 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
// Deadly Brew
|
// Deadly Brew
|
||||||
if (dummySpell->SpellIconID == 2963)
|
if (dummySpell->Id == 2963)
|
||||||
{
|
{
|
||||||
triggered_spell_id = 44289;
|
triggered_spell_id = 44289;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Quick Recovery
|
// Quick Recovery
|
||||||
if (dummySpell->SpellIconID == 2116)
|
if (dummySpell->Id == 2116)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -2057,7 +2057,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
case SPELLFAMILY_HUNTER:
|
case SPELLFAMILY_HUNTER:
|
||||||
{
|
{
|
||||||
// Thrill of the Hunt
|
// Thrill of the Hunt
|
||||||
if (dummySpell->SpellIconID == 2236)
|
if (dummySpell->Id == 2236)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -2077,14 +2077,14 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Hunting Party
|
// Hunting Party
|
||||||
if (dummySpell->SpellIconID == 3406)
|
if (dummySpell->Id == 3406)
|
||||||
{
|
{
|
||||||
triggered_spell_id = 57669;
|
triggered_spell_id = 57669;
|
||||||
target = this;
|
target = this;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Lock and Load
|
// Lock and Load
|
||||||
if (dummySpell->SpellIconID == 3579)
|
if (dummySpell->Id == 3579)
|
||||||
{
|
{
|
||||||
// Proc only from periodic (from trap activation proc another aura of this spell)
|
// Proc only from periodic (from trap activation proc another aura of this spell)
|
||||||
if (!(procFlag & PROC_FLAG_ON_DO_PERIODIC) || !roll_chance_i(triggerAmount))
|
if (!(procFlag & PROC_FLAG_ON_DO_PERIODIC) || !roll_chance_i(triggerAmount))
|
||||||
|
|
@ -2096,7 +2096,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Rapid Recuperation
|
// Rapid Recuperation
|
||||||
if (dummySpell->SpellIconID == 3560)
|
if (dummySpell->Id == 3560)
|
||||||
{
|
{
|
||||||
// This effect only from Rapid Killing (mana regen)
|
// This effect only from Rapid Killing (mana regen)
|
||||||
if (!(procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0100000000000000)))
|
if (!(procClassOptions && procClassOptions->SpellFamilyFlags & UI64LIT(0x0100000000000000)))
|
||||||
|
|
@ -2146,14 +2146,14 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Righteous Vengeance
|
// Righteous Vengeance
|
||||||
if (dummySpell->SpellIconID == 3025)
|
if (dummySpell->Id == 3025)
|
||||||
{
|
{
|
||||||
triggered_spell_id = 61840;
|
triggered_spell_id = 61840;
|
||||||
basepoints[0] = triggerAmount * damage / 100 / GetSpellAuraMaxTicks(triggered_spell_id);
|
basepoints[0] = triggerAmount * damage / 100 / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Sheath of Light
|
// Sheath of Light
|
||||||
if (dummySpell->SpellIconID == 3030)
|
if (dummySpell->Id == 3030)
|
||||||
{
|
{
|
||||||
triggered_spell_id = 54203;
|
triggered_spell_id = 54203;
|
||||||
basepoints[0] = triggerAmount * damage / 100 / GetSpellAuraMaxTicks(triggered_spell_id);
|
basepoints[0] = triggerAmount * damage / 100 / GetSpellAuraMaxTicks(triggered_spell_id);
|
||||||
|
|
@ -2772,7 +2772,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Storm, Earth and Fire
|
// Storm, Earth and Fire
|
||||||
if (dummySpell->SpellIconID == 3063)
|
if (dummySpell->Id == 3063)
|
||||||
{
|
{
|
||||||
// Earthbind Totem summon only
|
// Earthbind Totem summon only
|
||||||
if (procSpell->Id != 2484)
|
if (procSpell->Id != 2484)
|
||||||
|
|
@ -2789,7 +2789,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Ancestral Awakening
|
// Ancestral Awakening
|
||||||
if (dummySpell->SpellIconID == 3065)
|
if (dummySpell->Id == 3065)
|
||||||
{
|
{
|
||||||
triggered_spell_id = 52759;
|
triggered_spell_id = 52759;
|
||||||
basepoints[0] = triggerAmount * damage / 100;
|
basepoints[0] = triggerAmount * damage / 100;
|
||||||
|
|
@ -2848,7 +2848,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Improved Water Shield
|
// Improved Water Shield
|
||||||
if (dummySpell->SpellIconID == 2287)
|
if (dummySpell->Id == 2287)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -2882,7 +2882,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
// Lightning Overload
|
// Lightning Overload
|
||||||
if (dummySpell->SpellIconID == 2018) // only this spell have SpellFamily Shaman SpellIconID == 2018 and dummy aura
|
if (dummySpell->Id == 2018) // only this spell have SpellFamily Shaman Id == 2018 and dummy aura
|
||||||
{
|
{
|
||||||
if (!procSpell || GetTypeId() != TYPEID_PLAYER || !pVictim)
|
if (!procSpell || GetTypeId() != TYPEID_PLAYER || !pVictim)
|
||||||
{
|
{
|
||||||
|
|
@ -2940,7 +2940,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_OK;
|
return SPELL_AURA_PROC_OK;
|
||||||
}
|
}
|
||||||
// Static Shock
|
// Static Shock
|
||||||
if (dummySpell->SpellIconID == 3059)
|
if (dummySpell->Id == 3059)
|
||||||
{
|
{
|
||||||
// lookup Lightning Shield
|
// lookup Lightning Shield
|
||||||
AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
|
AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||||
|
|
@ -2976,7 +2976,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
// Frozen Power
|
// Frozen Power
|
||||||
if (dummySpell->SpellIconID == 3780)
|
if (dummySpell->Id == 3780)
|
||||||
{
|
{
|
||||||
Unit* caster = triggeredByAura->GetCaster();
|
Unit* caster = triggeredByAura->GetCaster();
|
||||||
|
|
||||||
|
|
@ -3003,7 +3003,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
case SPELLFAMILY_DEATHKNIGHT:
|
case SPELLFAMILY_DEATHKNIGHT:
|
||||||
{
|
{
|
||||||
// Butchery
|
// Butchery
|
||||||
if (dummySpell->SpellIconID == 2664)
|
if (dummySpell->Id == 2664)
|
||||||
{
|
{
|
||||||
basepoints[0] = triggerAmount;
|
basepoints[0] = triggerAmount;
|
||||||
triggered_spell_id = 50163;
|
triggered_spell_id = 50163;
|
||||||
|
|
@ -3038,7 +3038,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Necrosis
|
// Necrosis
|
||||||
if (dummySpell->SpellIconID == 2709)
|
if (dummySpell->Id == 2709)
|
||||||
{
|
{
|
||||||
// only melee auto attack affected and Rune Strike
|
// only melee auto attack affected and Rune Strike
|
||||||
if (procSpell && procSpell->Id != 56815)
|
if (procSpell && procSpell->Id != 56815)
|
||||||
|
|
@ -3051,7 +3051,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Threat of Thassarian
|
// Threat of Thassarian
|
||||||
if (dummySpell->SpellIconID == 2023)
|
if (dummySpell->Id == 2023)
|
||||||
{
|
{
|
||||||
// Must Dual Wield
|
// Must Dual Wield
|
||||||
if (!procSpell || !haveOffhandWeapon())
|
if (!procSpell || !haveOffhandWeapon())
|
||||||
|
|
@ -3151,7 +3151,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Wandering Plague
|
// Wandering Plague
|
||||||
if (dummySpell->SpellIconID == 1614)
|
if (dummySpell->Id == 1614)
|
||||||
{
|
{
|
||||||
if (!roll_chance_f(GetUnitCriticalChance(BASE_ATTACK, pVictim)))
|
if (!roll_chance_f(GetUnitCriticalChance(BASE_ATTACK, pVictim)))
|
||||||
{
|
{
|
||||||
|
|
@ -3162,7 +3162,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Blood-Caked Blade
|
// Blood-Caked Blade
|
||||||
if (dummySpell->SpellIconID == 138)
|
if (dummySpell->Id == 138)
|
||||||
{
|
{
|
||||||
// only main hand melee auto attack affected and Rune Strike
|
// only main hand melee auto attack affected and Rune Strike
|
||||||
if ((procFlag & PROC_FLAG_SUCCESSFUL_OFFHAND_HIT) || (procSpell && procSpell->Id != 56815))
|
if ((procFlag & PROC_FLAG_SUCCESSFUL_OFFHAND_HIT) || (procSpell && procSpell->Id != 56815))
|
||||||
|
|
@ -3473,7 +3473,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_MAGE:
|
case SPELLFAMILY_MAGE:
|
||||||
{
|
{
|
||||||
if (auraSpellInfo->SpellIconID == 2127) // Blazing Speed
|
if (auraSpellInfo->Id == 2127) // Blazing Speed
|
||||||
{
|
{
|
||||||
switch (auraSpellInfo->Id)
|
switch (auraSpellInfo->Id)
|
||||||
{
|
{
|
||||||
|
|
@ -3500,7 +3500,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
(((Creature*)pVictim)->GetCreatureInfo()->MechanicImmuneMask & (1 << (MECHANIC_STUN - 1))) == 0)
|
(((Creature*)pVictim)->GetCreatureInfo()->MechanicImmuneMask & (1 << (MECHANIC_STUN - 1))) == 0)
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
else if (auraSpellInfo->SpellIconID == 2947) // Fingers of Frost
|
else if (auraSpellInfo->Id == 2947) // Fingers of Frost
|
||||||
{
|
{
|
||||||
// proc chance for spells in basepoints
|
// proc chance for spells in basepoints
|
||||||
if (!roll_chance_i(triggerAmount))
|
if (!roll_chance_i(triggerAmount))
|
||||||
|
|
@ -3513,7 +3513,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
case SPELLFAMILY_WARRIOR:
|
case SPELLFAMILY_WARRIOR:
|
||||||
{
|
{
|
||||||
// Deep Wounds (replace triggered spells to directly apply DoT), dot spell have familyflags
|
// Deep Wounds (replace triggered spells to directly apply DoT), dot spell have familyflags
|
||||||
if (auraClassOptions && auraClassOptions->SpellFamilyFlags == UI64LIT(0x0) && auraSpellInfo->SpellIconID == 243)
|
if (auraClassOptions && auraClassOptions->SpellFamilyFlags == UI64LIT(0x0) && auraSpellInfo->Id == 243)
|
||||||
{
|
{
|
||||||
float weaponDamage;
|
float weaponDamage;
|
||||||
// DW should benefit of attack power, damage percent mods etc.
|
// DW should benefit of attack power, damage percent mods etc.
|
||||||
|
|
@ -3539,7 +3539,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
trigger_spell_id = 12721;
|
trigger_spell_id = 12721;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (auraSpellInfo->SpellIconID == 2961) // Taste for Blood
|
else if (auraSpellInfo->Id == 2961) // Taste for Blood
|
||||||
{
|
{
|
||||||
// only at real damage
|
// only at real damage
|
||||||
if (!damage)
|
if (!damage)
|
||||||
|
|
@ -3565,7 +3565,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
Unit::AuraList const& mDummyAura = GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& mDummyAura = GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (Unit::AuraList::const_iterator i = mDummyAura.begin(); i != mDummyAura.end(); ++i)
|
for (Unit::AuraList::const_iterator i = mDummyAura.begin(); i != mDummyAura.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_WARLOCK && (*i)->GetSpellProto()->SpellIconID == 113)
|
if ((*i)->GetSpellProto()->GetSpellFamilyName() == SPELLFAMILY_WARLOCK && (*i)->GetSpellProto()->Id == 113)
|
||||||
{
|
{
|
||||||
// basepoints of trigger spell stored in dummyeffect of spellProto
|
// basepoints of trigger spell stored in dummyeffect of spellProto
|
||||||
int32 basepoints2 = GetMaxPower(POWER_MANA) * (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2) / 100;
|
int32 basepoints2 = GetMaxPower(POWER_MANA) * (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2) / 100;
|
||||||
|
|
@ -3587,7 +3587,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Nether Protection
|
// Nether Protection
|
||||||
else if (auraSpellInfo->SpellIconID == 1985)
|
else if (auraSpellInfo->Id == 1985)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -3653,7 +3653,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
trigger_spell_id = 37595;
|
trigger_spell_id = 37595;
|
||||||
}
|
}
|
||||||
// Blessed Recovery
|
// Blessed Recovery
|
||||||
else if (auraSpellInfo->SpellIconID == 1875)
|
else if (auraSpellInfo->Id == 1875)
|
||||||
{
|
{
|
||||||
switch (auraSpellInfo->Id)
|
switch (auraSpellInfo->Id)
|
||||||
{
|
{
|
||||||
|
|
@ -3706,7 +3706,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_ROGUE:
|
case SPELLFAMILY_ROGUE:
|
||||||
{
|
{
|
||||||
if (auraSpellInfo->SpellIconID == 2260) // Combat Potency
|
if (auraSpellInfo->Id == 2260) // Combat Potency
|
||||||
{
|
{
|
||||||
if (!(procFlags & PROC_FLAG_SUCCESSFUL_OFFHAND_HIT))
|
if (!(procFlags & PROC_FLAG_SUCCESSFUL_OFFHAND_HIT))
|
||||||
{
|
{
|
||||||
|
|
@ -3719,7 +3719,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
case SPELLFAMILY_HUNTER:
|
case SPELLFAMILY_HUNTER:
|
||||||
{
|
{
|
||||||
// Piercing Shots
|
// Piercing Shots
|
||||||
if (auraSpellInfo->SpellIconID == 3247 && auraSpellInfo->SpellVisual[0] == 0)
|
if (auraSpellInfo->Id == 3247 && auraSpellInfo->GetSpellVisual(0) == 0)
|
||||||
{
|
{
|
||||||
basepoints[0] = damage * triggerAmount / 100 / 8;
|
basepoints[0] = damage * triggerAmount / 100 / 8;
|
||||||
trigger_spell_id = 63468;
|
trigger_spell_id = 63468;
|
||||||
|
|
@ -3735,7 +3735,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Lock and Load
|
// Lock and Load
|
||||||
else if (auraSpellInfo->SpellIconID == 3579)
|
else if (auraSpellInfo->Id == 3579)
|
||||||
{
|
{
|
||||||
// Check for Lock and Load Marker
|
// Check for Lock and Load Marker
|
||||||
if (HasAura(67544))
|
if (HasAura(67544))
|
||||||
|
|
@ -3755,7 +3755,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
// Blessed Life
|
// Blessed Life
|
||||||
if (auraSpellInfo->SpellIconID == 2137)
|
if (auraSpellInfo->Id == 2137)
|
||||||
{
|
{
|
||||||
switch (auraSpellInfo->Id)
|
switch (auraSpellInfo->Id)
|
||||||
{
|
{
|
||||||
|
|
@ -3782,7 +3782,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
target = this;
|
target = this;
|
||||||
}
|
}
|
||||||
// Illumination
|
// Illumination
|
||||||
else if (auraSpellInfo->SpellIconID == 241)
|
else if (auraSpellInfo->Id == 241)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -3955,7 +3955,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
target = this;
|
target = this;
|
||||||
}
|
}
|
||||||
// Nature's Guardian
|
// Nature's Guardian
|
||||||
else if (auraSpellInfo->SpellIconID == 2013)
|
else if (auraSpellInfo->Id == 2013)
|
||||||
{
|
{
|
||||||
// Check health condition - should drop to less 30% (trigger at any attack with result health less 30%, independent original health state)
|
// Check health condition - should drop to less 30% (trigger at any attack with result health less 30%, independent original health state)
|
||||||
int32 health30 = int32(GetMaxHealth()) * 3 / 10;
|
int32 health30 = int32(GetMaxHealth()) * 3 / 10;
|
||||||
|
|
@ -3976,7 +3976,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
case SPELLFAMILY_DEATHKNIGHT:
|
case SPELLFAMILY_DEATHKNIGHT:
|
||||||
{
|
{
|
||||||
// Acclimation
|
// Acclimation
|
||||||
if (auraSpellInfo->SpellIconID == 1930)
|
if (auraSpellInfo->Id == 1930)
|
||||||
{
|
{
|
||||||
if (!procSpell)
|
if (!procSpell)
|
||||||
{
|
{
|
||||||
|
|
@ -3997,7 +3997,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Blade Barrier
|
// Blade Barrier
|
||||||
else if (auraSpellInfo->SpellIconID == 85)
|
else if (auraSpellInfo->Id == 85)
|
||||||
{
|
{
|
||||||
if (GetTypeId() != TYPEID_PLAYER || getClass() != CLASS_DEATH_KNIGHT ||
|
if (GetTypeId() != TYPEID_PLAYER || getClass() != CLASS_DEATH_KNIGHT ||
|
||||||
!((Player*)this)->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
|
!((Player*)this)->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
|
||||||
|
|
@ -4085,7 +4085,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
case 35095:
|
case 35095:
|
||||||
{
|
{
|
||||||
SpellPowerEntry const* spellPower = procSpell->GetSpellPower();
|
SpellPowerEntry const* spellPower = procSpell->GetSpellPower();
|
||||||
if(!spellPower || !procSpell || procSpell->powerType!=POWER_MANA || spellPower->manaCost==0 && spellPower->ManaCostPercentage==0 && spellPower->manaCostPerlevel==0)
|
if(!spellPower || !procSpell || procSpell->GetPowerType()!=POWER_MANA || spellPower->manaCost==0 && spellPower->ManaCostPercentage==0 && spellPower->manaCostPerlevel==0)
|
||||||
{
|
{
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
|
|
@ -4115,7 +4115,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
||||||
AuraList const& dummyAuras = owner->GetAurasByType(SPELL_AURA_DUMMY);
|
AuraList const& dummyAuras = owner->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for (AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
for (AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
||||||
{
|
{
|
||||||
if ((*i)->GetSpellProto()->SpellIconID == 3220)
|
if ((*i)->GetSpellProto()->Id == 3220)
|
||||||
{
|
{
|
||||||
basepoints[0] = basepoints[1] = int32(spellDamage * (*i)->GetModifier()->m_amount / 100);
|
basepoints[0] = basepoints[1] = int32(spellDamage * (*i)->GetModifier()->m_amount / 100);
|
||||||
break;
|
break;
|
||||||
|
|
@ -4262,7 +4262,7 @@ SpellAuraProcResult Unit::HandleProcTriggerDamageAuraProc(Unit* pVictim, uint32
|
||||||
SpellEntry const* spellInfo = triggeredByAura->GetSpellProto();
|
SpellEntry const* spellInfo = triggeredByAura->GetSpellProto();
|
||||||
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by auratype %u of spell %u)",
|
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by auratype %u of spell %u)",
|
||||||
triggeredByAura->GetModifier()->m_amount, spellInfo->Id, triggeredByAura->GetModifier()->m_auraname, triggeredByAura->GetId());
|
triggeredByAura->GetModifier()->m_amount, spellInfo->Id, triggeredByAura->GetModifier()->m_auraname, triggeredByAura->GetId());
|
||||||
SpellNonMeleeDamage damageInfo(this, pVictim, spellInfo->Id, SpellSchoolMask(spellInfo->SchoolMask));
|
SpellNonMeleeDamage damageInfo(this, pVictim, spellInfo->Id, SpellSchoolMask(spellInfo->GetSchoolMask()));
|
||||||
CalculateSpellDamage(&damageInfo, triggeredByAura->GetModifier()->m_amount, spellInfo);
|
CalculateSpellDamage(&damageInfo, triggeredByAura->GetModifier()->m_amount, spellInfo);
|
||||||
damageInfo.target->CalculateAbsorbResistBlock(this, &damageInfo, spellInfo);
|
damageInfo.target->CalculateAbsorbResistBlock(this, &damageInfo, spellInfo);
|
||||||
DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
|
DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
|
||||||
|
|
@ -4292,7 +4292,7 @@ SpellAuraProcResult Unit::HandleOverrideClassScriptAuraProc(Unit* pVictim, uint3
|
||||||
{
|
{
|
||||||
case 836: // Improved Blizzard (Rank 1)
|
case 836: // Improved Blizzard (Rank 1)
|
||||||
{
|
{
|
||||||
if (!procSpell || procSpell->SpellVisual[0] != 9487)
|
if (!procSpell || procSpell->GetSpellVisual(0) != 9487)
|
||||||
{
|
{
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
|
|
@ -4301,7 +4301,7 @@ SpellAuraProcResult Unit::HandleOverrideClassScriptAuraProc(Unit* pVictim, uint3
|
||||||
}
|
}
|
||||||
case 988: // Improved Blizzard (Rank 2)
|
case 988: // Improved Blizzard (Rank 2)
|
||||||
{
|
{
|
||||||
if (!procSpell || procSpell->SpellVisual[0] != 9487)
|
if (!procSpell || procSpell->GetSpellVisual(0) != 9487)
|
||||||
{
|
{
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
|
|
@ -4310,7 +4310,7 @@ SpellAuraProcResult Unit::HandleOverrideClassScriptAuraProc(Unit* pVictim, uint3
|
||||||
}
|
}
|
||||||
case 989: // Improved Blizzard (Rank 3)
|
case 989: // Improved Blizzard (Rank 3)
|
||||||
{
|
{
|
||||||
if (!procSpell || procSpell->SpellVisual[0] != 9487)
|
if (!procSpell || procSpell->GetSpellVisual(0) != 9487)
|
||||||
{
|
{
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
|
|
@ -4423,7 +4423,7 @@ SpellAuraProcResult Unit::HandleMendingAuraProc(Unit* /*pVictim*/, uint32 /*dama
|
||||||
if (spellEffect && spellEffect->GetRadiusIndex())
|
if (spellEffect && spellEffect->GetRadiusIndex())
|
||||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
||||||
else
|
else
|
||||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(spellProto->GetRangeIndex()));
|
||||||
|
|
||||||
if (Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
if (Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
||||||
{
|
{
|
||||||
|
|
@ -4469,7 +4469,7 @@ SpellAuraProcResult Unit::HandleModCastingSpeedNotStackAuraProc(Unit* /*pVictim*
|
||||||
SpellAuraProcResult Unit::HandleReflectSpellsSchoolAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
|
SpellAuraProcResult Unit::HandleReflectSpellsSchoolAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
|
||||||
{
|
{
|
||||||
// Skip Melee hits and spells ws wrong school
|
// Skip Melee hits and spells ws wrong school
|
||||||
return !(procSpell == NULL || (triggeredByAura->GetModifier()->m_miscvalue & procSpell->SchoolMask) == 0) ? SPELL_AURA_PROC_OK : SPELL_AURA_PROC_FAILED;
|
return !(procSpell == NULL || (triggeredByAura->GetModifier()->m_miscvalue & procSpell->GetSchoolMask()) == 0) ? SPELL_AURA_PROC_OK : SPELL_AURA_PROC_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellAuraProcResult Unit::HandleModPowerCostSchoolAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
|
SpellAuraProcResult Unit::HandleModPowerCostSchoolAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
|
||||||
|
|
@ -4477,7 +4477,7 @@ SpellAuraProcResult Unit::HandleModPowerCostSchoolAuraProc(Unit* /*pVictim*/, ui
|
||||||
// Skip melee hits and spells ws wrong school or zero cost
|
// Skip melee hits and spells ws wrong school or zero cost
|
||||||
return !(procSpell == NULL ||
|
return !(procSpell == NULL ||
|
||||||
(procSpell->GetManaCost() == 0 && procSpell->GetManaCostPercentage() == 0) || // Cost check
|
(procSpell->GetManaCost() == 0 && procSpell->GetManaCostPercentage() == 0) || // Cost check
|
||||||
(triggeredByAura->GetModifier()->m_miscvalue & procSpell->SchoolMask) == 0) ? SPELL_AURA_PROC_OK : SPELL_AURA_PROC_FAILED; // School check
|
(triggeredByAura->GetModifier()->m_miscvalue & procSpell->GetSchoolMask()) == 0) ? SPELL_AURA_PROC_OK : SPELL_AURA_PROC_FAILED; // School check
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellAuraProcResult Unit::HandleMechanicImmuneResistanceAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
|
SpellAuraProcResult Unit::HandleMechanicImmuneResistanceAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
|
||||||
|
|
@ -4593,7 +4593,7 @@ SpellAuraProcResult Unit::HandleModDamagePercentDoneAuraProc(Unit* /*pVictim*/,
|
||||||
CastCustomSpell(this, 34075, &bp, NULL, NULL, true, castItem, triggeredByAura);
|
CastCustomSpell(this, 34075, &bp, NULL, NULL, true, castItem, triggeredByAura);
|
||||||
}
|
}
|
||||||
// Arcane Blast
|
// Arcane Blast
|
||||||
else if (spellInfo->Id == 36032 && procSpell->GetSpellFamilyName() == SPELLFAMILY_MAGE && procSpell->SpellIconID == 2294)
|
else if (spellInfo->Id == 36032 && procSpell->GetSpellFamilyName() == SPELLFAMILY_MAGE && procSpell->Id == 2294)
|
||||||
// prevent proc from self(spell that triggered this aura)
|
// prevent proc from self(spell that triggered this aura)
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue