mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
@@ -140,8 +140,8 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA:
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA:
|
||||
{
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(aura.spell_id);
|
||||
if (!spellEntry)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(aura.spell_id);
|
||||
if (!spellInfo)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: {} Type: {}) for data type {} ({}) has wrong spell id in value1 ({}), ignored.",
|
||||
criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA ? "ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA" : "ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id);
|
||||
@@ -153,7 +153,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA ? "ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA" : "ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.effect_idx);
|
||||
return false;
|
||||
}
|
||||
if (!spellEntry->Effects[aura.effect_idx].ApplyAuraName)
|
||||
if (!spellInfo->Effects[aura.effect_idx].ApplyAuraName)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: {} Type: {}) for data type {} ({}) has non-aura spell effect (ID: {} Effect: {}), ignores.",
|
||||
criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA ? "ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA" : "ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id, aura.effect_idx);
|
||||
|
||||
@@ -429,8 +429,8 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
|
||||
for (SkillLineAbilityEntry const* skillLine : sSkillLineAbilityStore)
|
||||
{
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->Spell);
|
||||
if (spellInfo && spellInfo->Attributes & SPELL_ATTR0_PASSIVE)
|
||||
SpellEntry const* spellEntry = sSpellStore.LookupEntry(skillLine->Spell);
|
||||
if (spellEntry && spellEntry->Attributes & SPELL_ATTR0_PASSIVE)
|
||||
{
|
||||
for (CreatureFamilyEntry const* cFamily : sCreatureFamilyStore)
|
||||
{
|
||||
@@ -439,7 +439,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (spellInfo->SpellLevel)
|
||||
if (spellEntry->SpellLevel)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -449,7 +449,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
continue;
|
||||
}
|
||||
|
||||
sPetFamilySpellsStore[cFamily->ID].insert(spellInfo->Id);
|
||||
sPetFamilySpellsStore[cFamily->ID].insert(spellEntry->Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1941,16 +1941,16 @@ void Pet::InitLevelupSpellsForLevel()
|
||||
{
|
||||
for (uint32 spellId : defSpells->spellid)
|
||||
{
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellEntry)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
// will called first if level down
|
||||
if (spellEntry->SpellLevel > level && sScriptMgr->CanUnlearnSpellDefault(this, spellEntry))
|
||||
unlearnSpell(spellEntry->Id, true);
|
||||
if (spellInfo->SpellLevel > level && sScriptMgr->CanUnlearnSpellDefault(this, spellInfo))
|
||||
unlearnSpell(spellInfo->Id, true);
|
||||
// will called if level up
|
||||
else
|
||||
learnSpell(spellEntry->Id);
|
||||
learnSpell(spellInfo->Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -795,8 +795,8 @@ bool Player::UpdateCraftSkill(uint32 spellid)
|
||||
GetPureSkillValue(_spell_idx->second->SkillLine);
|
||||
|
||||
// Alchemy Discoveries here
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(spellid);
|
||||
if (spellEntry && spellEntry->Mechanic == MECHANIC_DISCOVERY)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid);
|
||||
if (spellInfo && spellInfo->Mechanic == MECHANIC_DISCOVERY)
|
||||
{
|
||||
if (uint32 discoveredSpell = GetSkillDiscoverySpell(
|
||||
_spell_idx->second->SkillLine, spellid, this))
|
||||
|
||||
@@ -19835,10 +19835,10 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
||||
Unit* target = (itr->second.castFlags & NPC_CLICK_CAST_TARGET_CLICKER) ? clicker : this;
|
||||
ObjectGuid origCasterGUID = (itr->second.castFlags & NPC_CLICK_CAST_ORIG_CASTER_OWNER) ? GetOwnerGUID() : clicker->GetGUID();
|
||||
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(itr->second.spellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->second.spellId);
|
||||
|
||||
// xinef: dont allow players to enter vehicles on arena
|
||||
if (spellEntry->HasAura(SPELL_AURA_CONTROL_VEHICLE) && caster->GetTypeId() == TYPEID_PLAYER && caster->FindMap() && caster->FindMap()->IsBattleArena())
|
||||
if (spellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE) && caster->GetTypeId() == TYPEID_PLAYER && caster->FindMap() && caster->FindMap()->IsBattleArena())
|
||||
continue;
|
||||
|
||||
if (seatId > -1)
|
||||
@@ -19847,7 +19847,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
||||
bool valid = false;
|
||||
while (i < MAX_SPELL_EFFECTS)
|
||||
{
|
||||
if (spellEntry->Effects[i].ApplyAuraName == SPELL_AURA_CONTROL_VEHICLE)
|
||||
if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_CONTROL_VEHICLE)
|
||||
{
|
||||
valid = true;
|
||||
break;
|
||||
@@ -19867,18 +19867,18 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
||||
{
|
||||
int32 bp0[MAX_SPELL_EFFECTS];
|
||||
for (uint32 j = 0; j < MAX_SPELL_EFFECTS; ++j)
|
||||
bp0[j] = spellEntry->Effects[j].BasePoints;
|
||||
bp0[j] = spellInfo->Effects[j].BasePoints;
|
||||
|
||||
bp0[i] = seatId;
|
||||
Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, bp0, nullptr, origCasterGUID);
|
||||
Aura::TryRefreshStackOrCreate(spellInfo, MAX_EFFECT_MASK, this, clicker, bp0, nullptr, origCasterGUID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsInMap(caster))
|
||||
caster->CastSpell(target, spellEntry, GetVehicleKit() ? TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE : TRIGGERED_NONE, nullptr, nullptr, origCasterGUID);
|
||||
caster->CastSpell(target, spellInfo, GetVehicleKit() ? TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE : TRIGGERED_NONE, nullptr, nullptr, origCasterGUID);
|
||||
else
|
||||
Aura::TryRefreshStackOrCreate(spellEntry, MAX_EFFECT_MASK, this, clicker, nullptr, nullptr, origCasterGUID);
|
||||
Aura::TryRefreshStackOrCreate(spellInfo, MAX_EFFECT_MASK, this, clicker, nullptr, nullptr, origCasterGUID);
|
||||
}
|
||||
|
||||
result = true;
|
||||
|
||||
@@ -5671,7 +5671,7 @@ void ObjectMgr::ValidateSpellScripts()
|
||||
|
||||
for (SpellScriptsContainer::iterator itr = _spellScriptsStore.begin(); itr != _spellScriptsStore.end();)
|
||||
{
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(itr->first);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
std::vector<std::pair<SpellScriptLoader*, SpellScriptsContainer::iterator> > SpellScriptLoaders;
|
||||
sScriptMgr->CreateSpellScriptLoaders(itr->first, SpellScriptLoaders);
|
||||
itr = _spellScriptsStore.upper_bound(itr->first);
|
||||
@@ -5688,17 +5688,17 @@ void ObjectMgr::ValidateSpellScripts()
|
||||
}
|
||||
if (spellScript)
|
||||
{
|
||||
spellScript->_Init(&sitr->first->GetName(), spellEntry->Id);
|
||||
spellScript->_Init(&sitr->first->GetName(), spellInfo->Id);
|
||||
spellScript->_Register();
|
||||
if (!spellScript->_Validate(spellEntry))
|
||||
if (!spellScript->_Validate(spellInfo))
|
||||
valid = false;
|
||||
delete spellScript;
|
||||
}
|
||||
if (auraScript)
|
||||
{
|
||||
auraScript->_Init(&sitr->first->GetName(), spellEntry->Id);
|
||||
auraScript->_Init(&sitr->first->GetName(), spellInfo->Id);
|
||||
auraScript->_Register();
|
||||
if (!auraScript->_Validate(spellEntry))
|
||||
if (!auraScript->_Validate(spellInfo))
|
||||
valid = false;
|
||||
delete auraScript;
|
||||
}
|
||||
|
||||
@@ -339,10 +339,10 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
// not accept if spell can't be casted now (cheating)
|
||||
if (uint32 my_spell_id = my_trade->GetSpell())
|
||||
{
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(my_spell_id);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(my_spell_id);
|
||||
Item* castItem = my_trade->GetSpellCastItem();
|
||||
|
||||
if (!spellEntry || !his_trade->GetItem(TRADE_SLOT_NONTRADED) ||
|
||||
if (!spellInfo || !his_trade->GetItem(TRADE_SLOT_NONTRADED) ||
|
||||
(my_trade->HasSpellCastItem() && !castItem))
|
||||
{
|
||||
clearAcceptTradeMode(my_trade, his_trade);
|
||||
@@ -352,7 +352,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
return;
|
||||
}
|
||||
|
||||
my_spell = new Spell(_player, spellEntry, TRIGGERED_FULL_MASK);
|
||||
my_spell = new Spell(_player, spellInfo, TRIGGERED_FULL_MASK);
|
||||
my_spell->m_CastItem = castItem;
|
||||
my_targets.SetTradeItemTarget(_player);
|
||||
my_spell->m_targets = my_targets;
|
||||
@@ -374,10 +374,10 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
// not accept if spell can't be casted now (cheating)
|
||||
if (uint32 his_spell_id = his_trade->GetSpell())
|
||||
{
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(his_spell_id);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(his_spell_id);
|
||||
Item* castItem = his_trade->GetSpellCastItem();
|
||||
|
||||
if (!spellEntry || !my_trade->GetItem(TRADE_SLOT_NONTRADED) || (his_trade->HasSpellCastItem() && !castItem))
|
||||
if (!spellInfo || !my_trade->GetItem(TRADE_SLOT_NONTRADED) || (his_trade->HasSpellCastItem() && !castItem))
|
||||
{
|
||||
delete my_spell;
|
||||
his_trade->SetSpell(0);
|
||||
@@ -387,7 +387,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
|
||||
return;
|
||||
}
|
||||
|
||||
his_spell = new Spell(trader, spellEntry, TRIGGERED_FULL_MASK);
|
||||
his_spell = new Spell(trader, spellInfo, TRIGGERED_FULL_MASK);
|
||||
his_spell->m_CastItem = castItem;
|
||||
his_targets.SetTradeItemTarget(trader);
|
||||
his_spell->m_targets = his_targets;
|
||||
|
||||
@@ -49,11 +49,11 @@ bool ScriptMgr::CanUnlearnSpellSet(Pet* pet, uint32 level, uint32 spell)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ScriptMgr::CanUnlearnSpellDefault(Pet* pet, SpellInfo const* spellEntry)
|
||||
bool ScriptMgr::CanUnlearnSpellDefault(Pet* pet, SpellInfo const* spellInfo)
|
||||
{
|
||||
auto ret = IsValidBoolScript<PetScript>([&](PetScript* script)
|
||||
{
|
||||
return !script->CanUnlearnSpellDefault(pet, spellEntry);
|
||||
return !script->CanUnlearnSpellDefault(pet, spellInfo);
|
||||
});
|
||||
|
||||
if (ret && *ret)
|
||||
|
||||
@@ -1914,7 +1914,7 @@ public:
|
||||
|
||||
[[nodiscard]] virtual bool CanUnlearnSpellSet(Pet* /*pet*/, uint32 /*level*/, uint32 /*spell*/) { return true; }
|
||||
|
||||
[[nodiscard]] virtual bool CanUnlearnSpellDefault(Pet* /*pet*/, SpellInfo const* /*spellEntry*/) { return true; }
|
||||
[[nodiscard]] virtual bool CanUnlearnSpellDefault(Pet* /*pet*/, SpellInfo const* /*spellInfo*/) { return true; }
|
||||
|
||||
[[nodiscard]] virtual bool CanResetTalents(Pet* /*pet*/) { return true; }
|
||||
|
||||
@@ -2650,7 +2650,7 @@ public: /* PetScript */
|
||||
void OnInitStatsForLevel(Guardian* guardian, uint8 petlevel);
|
||||
void OnCalculateMaxTalentPointsForLevel(Pet* pet, uint8 level, uint8& points);
|
||||
bool CanUnlearnSpellSet(Pet* pet, uint32 level, uint32 spell);
|
||||
bool CanUnlearnSpellDefault(Pet* pet, SpellInfo const* spellEntry);
|
||||
bool CanUnlearnSpellDefault(Pet* pet, SpellInfo const* spellInfo);
|
||||
bool CanResetTalents(Pet* pet);
|
||||
|
||||
public: /* ArenaScript */
|
||||
|
||||
@@ -139,12 +139,12 @@ void LoadSkillDiscoveryTable()
|
||||
// report about empty data for explicit discovery spells
|
||||
for (uint32 spell_id = 1; spell_id < sSpellMgr->GetSpellInfoStoreSize(); ++spell_id)
|
||||
{
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(spell_id);
|
||||
if (!spellEntry)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
// skip not explicit discovery spells
|
||||
if (!spellEntry->IsExplicitDiscovery())
|
||||
if (!spellInfo->IsExplicitDiscovery())
|
||||
continue;
|
||||
|
||||
if (SkillDiscoveryStore.find(int32(spell_id)) == SkillDiscoveryStore.end())
|
||||
|
||||
@@ -2449,15 +2449,15 @@ void SpellMgr::LoadPetDefaultSpells()
|
||||
// different summon spells
|
||||
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
||||
{
|
||||
SpellInfo const* spellEntry = GetSpellInfo(i);
|
||||
if (!spellEntry)
|
||||
SpellInfo const* spellInfo = GetSpellInfo(i);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
for (uint8 k = 0; k < MAX_SPELL_EFFECTS; ++k)
|
||||
{
|
||||
if (spellEntry->Effects[k].Effect == SPELL_EFFECT_SUMMON || spellEntry->Effects[k].Effect == SPELL_EFFECT_SUMMON_PET)
|
||||
if (spellInfo->Effects[k].Effect == SPELL_EFFECT_SUMMON || spellInfo->Effects[k].Effect == SPELL_EFFECT_SUMMON_PET)
|
||||
{
|
||||
uint32 creature_id = spellEntry->Effects[k].MiscValue;
|
||||
uint32 creature_id = spellInfo->Effects[k].MiscValue;
|
||||
CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creature_id);
|
||||
if (!cInfo)
|
||||
continue;
|
||||
|
||||
@@ -75,7 +75,7 @@ _SpellScript::EffectHook::EffectHook(uint8 _effIndex)
|
||||
effIndex = _effIndex;
|
||||
}
|
||||
|
||||
uint8 _SpellScript::EffectHook::GetAffectedEffectsMask(SpellInfo const* spellEntry)
|
||||
uint8 _SpellScript::EffectHook::GetAffectedEffectsMask(SpellInfo const* spellInfo)
|
||||
{
|
||||
uint8 mask = 0;
|
||||
if ((effIndex == EFFECT_ALL) || (effIndex == EFFECT_FIRST_FOUND))
|
||||
@@ -84,21 +84,21 @@ uint8 _SpellScript::EffectHook::GetAffectedEffectsMask(SpellInfo const* spellEnt
|
||||
{
|
||||
if ((effIndex == EFFECT_FIRST_FOUND) && mask)
|
||||
return mask;
|
||||
if (CheckEffect(spellEntry, i))
|
||||
if (CheckEffect(spellInfo, i))
|
||||
mask |= (uint8)1 << i;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CheckEffect(spellEntry, effIndex))
|
||||
if (CheckEffect(spellInfo, effIndex))
|
||||
mask |= (uint8)1 << effIndex;
|
||||
}
|
||||
return mask;
|
||||
}
|
||||
|
||||
bool _SpellScript::EffectHook::IsEffectAffected(SpellInfo const* spellEntry, uint8 effIndex)
|
||||
bool _SpellScript::EffectHook::IsEffectAffected(SpellInfo const* spellInfo, uint8 effIndex)
|
||||
{
|
||||
return GetAffectedEffectsMask(spellEntry) & 1 << effIndex;
|
||||
return GetAffectedEffectsMask(spellInfo) & 1 << effIndex;
|
||||
}
|
||||
|
||||
std::string _SpellScript::EffectHook::EffIndexToString()
|
||||
@@ -119,13 +119,13 @@ std::string _SpellScript::EffectHook::EffIndexToString()
|
||||
return "Invalid Value";
|
||||
}
|
||||
|
||||
bool _SpellScript::EffectNameCheck::Check(SpellInfo const* spellEntry, uint8 effIndex)
|
||||
bool _SpellScript::EffectNameCheck::Check(SpellInfo const* spellInfo, uint8 effIndex)
|
||||
{
|
||||
if (!spellEntry->Effects[effIndex].Effect && !effName)
|
||||
if (!spellInfo->Effects[effIndex].Effect && !effName)
|
||||
return true;
|
||||
if (!spellEntry->Effects[effIndex].Effect)
|
||||
if (!spellInfo->Effects[effIndex].Effect)
|
||||
return false;
|
||||
return (effName == SPELL_EFFECT_ANY) || (spellEntry->Effects[effIndex].Effect == effName);
|
||||
return (effName == SPELL_EFFECT_ANY) || (spellInfo->Effects[effIndex].Effect == effName);
|
||||
}
|
||||
|
||||
std::string _SpellScript::EffectNameCheck::ToString()
|
||||
@@ -141,13 +141,13 @@ std::string _SpellScript::EffectNameCheck::ToString()
|
||||
}
|
||||
}
|
||||
|
||||
bool _SpellScript::EffectAuraNameCheck::Check(SpellInfo const* spellEntry, uint8 effIndex)
|
||||
bool _SpellScript::EffectAuraNameCheck::Check(SpellInfo const* spellInfo, uint8 effIndex)
|
||||
{
|
||||
if (!spellEntry->Effects[effIndex].ApplyAuraName && !effAurName)
|
||||
if (!spellInfo->Effects[effIndex].ApplyAuraName && !effAurName)
|
||||
return true;
|
||||
if (!spellEntry->Effects[effIndex].ApplyAuraName)
|
||||
if (!spellInfo->Effects[effIndex].ApplyAuraName)
|
||||
return false;
|
||||
return (effAurName == SPELL_AURA_ANY) || (spellEntry->Effects[effIndex].ApplyAuraName == effAurName);
|
||||
return (effAurName == SPELL_AURA_ANY) || (spellInfo->Effects[effIndex].ApplyAuraName == effAurName);
|
||||
}
|
||||
|
||||
std::string _SpellScript::EffectAuraNameCheck::ToString()
|
||||
@@ -194,9 +194,9 @@ std::string SpellScript::EffectHandler::ToString()
|
||||
return "Index: " + EffIndexToString() + " Name: " + _SpellScript::EffectNameCheck::ToString();
|
||||
}
|
||||
|
||||
bool SpellScript::EffectHandler::CheckEffect(SpellInfo const* spellEntry, uint8 effIndex)
|
||||
bool SpellScript::EffectHandler::CheckEffect(SpellInfo const* spellInfo, uint8 effIndex)
|
||||
{
|
||||
return _SpellScript::EffectNameCheck::Check(spellEntry, effIndex);
|
||||
return _SpellScript::EffectNameCheck::Check(spellInfo, effIndex);
|
||||
}
|
||||
|
||||
void SpellScript::EffectHandler::Call(SpellScript* spellScript, SpellEffIndex effIndex)
|
||||
@@ -234,13 +234,13 @@ std::string SpellScript::TargetHook::ToString()
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
bool SpellScript::TargetHook::CheckEffect(SpellInfo const* spellEntry, uint8 effIndex)
|
||||
bool SpellScript::TargetHook::CheckEffect(SpellInfo const* spellInfo, uint8 effIndex)
|
||||
{
|
||||
if (!targetType)
|
||||
return false;
|
||||
|
||||
if (spellEntry->Effects[effIndex].TargetA.GetTarget() != targetType &&
|
||||
spellEntry->Effects[effIndex].TargetB.GetTarget() != targetType)
|
||||
if (spellInfo->Effects[effIndex].TargetA.GetTarget() != targetType &&
|
||||
spellInfo->Effects[effIndex].TargetB.GetTarget() != targetType)
|
||||
return false;
|
||||
|
||||
SpellImplicitTargetInfo targetInfo(targetType);
|
||||
@@ -785,9 +785,9 @@ AuraScript::EffectBase::EffectBase(uint8 _effIndex, uint16 _effName)
|
||||
{
|
||||
}
|
||||
|
||||
bool AuraScript::EffectBase::CheckEffect(SpellInfo const* spellEntry, uint8 effIndex)
|
||||
bool AuraScript::EffectBase::CheckEffect(SpellInfo const* spellInfo, uint8 effIndex)
|
||||
{
|
||||
return _SpellScript::EffectAuraNameCheck::Check(spellEntry, effIndex);
|
||||
return _SpellScript::EffectAuraNameCheck::Check(spellInfo, effIndex);
|
||||
}
|
||||
|
||||
std::string AuraScript::EffectBase::ToString()
|
||||
|
||||
@@ -74,9 +74,9 @@ protected:
|
||||
EffectHook(uint8 _effIndex);
|
||||
virtual ~EffectHook() { }
|
||||
|
||||
uint8 GetAffectedEffectsMask(SpellInfo const* spellEntry);
|
||||
bool IsEffectAffected(SpellInfo const* spellEntry, uint8 effIndex);
|
||||
virtual bool CheckEffect(SpellInfo const* spellEntry, uint8 effIndex) = 0;
|
||||
uint8 GetAffectedEffectsMask(SpellInfo const* spellInfo);
|
||||
bool IsEffectAffected(SpellInfo const* spellInfo, uint8 effIndex);
|
||||
virtual bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) = 0;
|
||||
std::string EffIndexToString();
|
||||
protected:
|
||||
uint8 effIndex;
|
||||
@@ -86,7 +86,7 @@ protected:
|
||||
{
|
||||
public:
|
||||
EffectNameCheck(uint16 _effName) { effName = _effName; }
|
||||
bool Check(SpellInfo const* spellEntry, uint8 effIndex);
|
||||
bool Check(SpellInfo const* spellInfo, uint8 effIndex);
|
||||
std::string ToString();
|
||||
private:
|
||||
uint16 effName;
|
||||
@@ -96,7 +96,7 @@ protected:
|
||||
{
|
||||
public:
|
||||
EffectAuraNameCheck(uint16 _effAurName) { effAurName = _effAurName; }
|
||||
bool Check(SpellInfo const* spellEntry, uint8 effIndex);
|
||||
bool Check(SpellInfo const* spellInfo, uint8 effIndex);
|
||||
std::string ToString();
|
||||
private:
|
||||
uint16 effAurName;
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
virtual void Register() = 0;
|
||||
// Function called on server startup, if returns false script won't be used in core
|
||||
// use for: dbc/template data presence/correctness checks
|
||||
virtual bool Validate(SpellInfo const* /*spellEntry*/) { return true; }
|
||||
virtual bool Validate(SpellInfo const* /*spellInfo*/) { return true; }
|
||||
// Function called when script is created, if returns false script will be unloaded afterwards
|
||||
// use for: initializing local script variables (DO NOT USE CONSTRUCTOR FOR THIS PURPOSE!)
|
||||
virtual bool Load() { return true; }
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
public:
|
||||
EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
|
||||
std::string ToString();
|
||||
bool CheckEffect(SpellInfo const* spellEntry, uint8 effIndex) override;
|
||||
bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) override;
|
||||
void Call(SpellScript* spellScript, SpellEffIndex effIndex);
|
||||
private:
|
||||
SpellEffectFnType pEffectHandlerScript;
|
||||
@@ -557,7 +557,7 @@ public:
|
||||
public:
|
||||
EffectBase(uint8 _effIndex, uint16 _effName);
|
||||
std::string ToString();
|
||||
bool CheckEffect(SpellInfo const* spellEntry, uint8 effIndex) override;
|
||||
bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) override;
|
||||
};
|
||||
class EffectPeriodicHandler : public EffectBase
|
||||
{
|
||||
|
||||
@@ -880,7 +880,7 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_gen_leeching_swarm_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_LEECHING_SWARM_DMG, SPELL_LEECHING_SWARM_HEAL });
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_ticking_time_bomb_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_TICKING_TIME_BOMB_EXPLODE });
|
||||
}
|
||||
|
||||
@@ -1952,7 +1952,7 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScript
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({
|
||||
SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER,
|
||||
|
||||
@@ -908,7 +908,7 @@ const uint32 spell_mage_polymorph_cast_visual::spell_mage_polymorph_cast_visual:
|
||||
class spell_mage_summon_water_elemental : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mage_summon_water_elemental)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
@@ -936,9 +936,9 @@ class spell_mage_summon_water_elemental : public SpellScript
|
||||
if (pet->GetCharmInfo() && caster->ToPlayer())
|
||||
{
|
||||
pet->m_CreatureSpellCooldowns.clear();
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(31707);
|
||||
pet->GetCharmInfo()->ToggleCreatureAutocast(spellEntry, true);
|
||||
pet->GetCharmInfo()->SetSpellAutocast(spellEntry, true);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(31707);
|
||||
pet->GetCharmInfo()->ToggleCreatureAutocast(spellInfo, true);
|
||||
pet->GetCharmInfo()->SetSpellAutocast(spellInfo, true);
|
||||
caster->ToPlayer()->CharmSpellInitialize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ class spell_q12274_a_fall_from_grace_costume : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q12274_a_fall_from_grace_costume)
|
||||
|
||||
bool Validate(SpellInfo const* /*SpellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_SCARLET_RAVEN_PRIEST_IMAGE_MALE, SPELL_SCARLET_RAVEN_PRIEST_IMAGE_FEMALE });
|
||||
}
|
||||
@@ -912,7 +912,7 @@ class spell_q5206_test_fetid_skull : public SpellScript
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_CREATE_RESONATING_SKULL, SPELL_CREATE_BONE_DUST });
|
||||
}
|
||||
@@ -1026,7 +1026,7 @@ class spell_q11396_11399_scourging_crystal_controller : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3, SPELL_SCOURGING_CRYSTAL_CONTROLLER });
|
||||
}
|
||||
@@ -1051,7 +1051,7 @@ class spell_q11396_11399_scourging_crystal_controller_dummy : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q11396_11399_scourging_crystal_controller_dummy);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3 });
|
||||
}
|
||||
@@ -1101,7 +1101,7 @@ class spell_q11587_arcane_prisoner_rescue : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q11587_arcane_prisoner_rescue);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
@@ -1156,7 +1156,7 @@ class spell_q11730_ultrasonic_screwdriver : public SpellScript
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCastItem();
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
@@ -1268,7 +1268,7 @@ class spell_q12634_despawn_fruit_tosser : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q12634_despawn_fruit_tosser);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
@@ -1394,7 +1394,7 @@ class spell_q12937_relief_for_the_fallen : public SpellScript
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_TRIGGER_AID_OF_THE_EARTHEN });
|
||||
}
|
||||
@@ -1427,7 +1427,7 @@ class spell_q10041_q10040_who_are_they : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q10041_q10040_who_are_they);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
@@ -1621,7 +1621,7 @@ class spell_q14112_14145_chum_the_water : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q14112_14145_chum_the_water);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/) override
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user