Core/Misc: Minor cleanup and code style fixes

This commit is contained in:
tobmaps
2011-06-28 23:48:59 +07:00
parent 275d2cac64
commit c42db7af8c
5 changed files with 50 additions and 50 deletions
@@ -1,4 +1,4 @@
DELETE FROM `disables` WHERE `sourceType`=4 AND `entry` IN (7709,7710,7711,7712,7713,7714,7715,7716,7718,7719); DELETE FROM `disables` WHERE `sourceType`=4 AND `entry` IN (7709,7710,7711,7712,7713,7714,7715,7716,7718,7719);
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (7709,7710,7711,7712,7713,7714,7715,7716,7718,7719); DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (7709,7710,7711,7712,7713,7714,7715,7716,7718,7719);
INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`, `ScriptName`) VALUES
+6 -6
View File
@@ -3781,7 +3781,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
} }
bool stealCharge = aura->GetSpellProto()->AttributesEx7 & SPELL_ATTR7_DISPEL_CHARGES; bool stealCharge = aura->GetSpellProto()->AttributesEx7 & SPELL_ATTR7_DISPEL_CHARGES;
int32 dur = std::min(2*MINUTE*IN_MILLISECONDS, aura->GetDuration()); int32 dur = std::min(2 * MINUTE * IN_MILLISECONDS, aura->GetDuration());
if (Aura* newAura = stealer->GetAura(aura->GetId(), aura->GetCasterGUID())) if (Aura* newAura = stealer->GetAura(aura->GetId(), aura->GetCasterGUID()))
{ {
@@ -6293,16 +6293,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
uint32 CountMax = GetSpellMaxDuration(AurEff->GetSpellProto()); uint32 CountMax = GetSpellMaxDuration(AurEff->GetSpellProto());
// add possible auras' and Glyph of Shred's max duration // add possible auras' and Glyph of Shred's max duration
CountMax += 3 * triggerAmount * 1000; // Glyph of Shred -> +6 seconds CountMax += 3 * triggerAmount * IN_MILLISECONDS; // Glyph of Shred -> +6 seconds
CountMax += HasAura(54818) ? 4 * 1000 : 0; // Glyph of Rip -> +4 seconds CountMax += HasAura(54818) ? 4 * IN_MILLISECONDS : 0; // Glyph of Rip -> +4 seconds
CountMax += HasAura(60141) ? 4 * 1000 : 0; // Rip Duration/Lacerate Damage -> +4 seconds CountMax += HasAura(60141) ? 4 * IN_MILLISECONDS : 0; // Rip Duration/Lacerate Damage -> +4 seconds
// if min < max -> that means caster didn't cast 3 shred yet // if min < max -> that means caster didn't cast 3 shred yet
// so set Rip's duration and max duration // so set Rip's duration and max duration
if (CountMin < CountMax) if (CountMin < CountMax)
{ {
AurEff->GetBase()->SetDuration(AurEff->GetBase()->GetDuration() + triggerAmount * 1000); AurEff->GetBase()->SetDuration(AurEff->GetBase()->GetDuration() + triggerAmount * IN_MILLISECONDS);
AurEff->GetBase()->SetMaxDuration(CountMin + triggerAmount * 1000); AurEff->GetBase()->SetMaxDuration(CountMin + triggerAmount * IN_MILLISECONDS);
return true; return true;
} }
} }
+40 -40
View File
@@ -271,7 +271,7 @@ int32 GetSpellDuration(SpellEntry const *spellInfo)
{ {
if (!spellInfo) if (!spellInfo)
return 0; return 0;
SpellDurationEntry const *du = sSpellDurationStore.LookupEntry(spellInfo->DurationIndex); SpellDurationEntry const* du = sSpellDurationStore.LookupEntry(spellInfo->DurationIndex);
if (!du) if (!du)
return 0; return 0;
return (du->Duration[0] == -1) ? -1 : abs(du->Duration[0]); return (du->Duration[0] == -1) ? -1 : abs(du->Duration[0]);
@@ -281,7 +281,7 @@ int32 GetSpellMaxDuration(SpellEntry const *spellInfo)
{ {
if (!spellInfo) if (!spellInfo)
return 0; return 0;
SpellDurationEntry const *du = sSpellDurationStore.LookupEntry(spellInfo->DurationIndex); SpellDurationEntry const* du = sSpellDurationStore.LookupEntry(spellInfo->DurationIndex);
if (!du) if (!du)
return 0; return 0;
return (du->Duration[2] == -1) ? -1 : abs(du->Duration[2]); return (du->Duration[2] == -1) ? -1 : abs(du->Duration[2]);
@@ -314,7 +314,7 @@ uint32 GetDispelChance(Unit* auraCaster, Unit* target, uint32 spellId, bool offe
uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell* spell) uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell* spell)
{ {
SpellCastTimesEntry const *spellCastTimeEntry = sSpellCastTimesStore.LookupEntry(spellInfo->CastingTimeIndex); SpellCastTimesEntry const* spellCastTimeEntry = sSpellCastTimesStore.LookupEntry(spellInfo->CastingTimeIndex);
// not all spells have cast time index and this is all is pasiive abilities // not all spells have cast time index and this is all is pasiive abilities
if (!spellCastTimeEntry) if (!spellCastTimeEntry)
@@ -333,7 +333,7 @@ uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell* spell)
bool IsPassiveSpell(uint32 spellId) bool IsPassiveSpell(uint32 spellId)
{ {
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo) if (!spellInfo)
return false; return false;
return IsPassiveSpell(spellInfo); return IsPassiveSpell(spellInfo);
@@ -348,7 +348,7 @@ bool IsPassiveSpell(SpellEntry const* spellInfo)
bool IsAutocastableSpell(uint32 spellId) bool IsAutocastableSpell(uint32 spellId)
{ {
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo) if (!spellInfo)
return false; return false;
if (spellInfo->Attributes & SPELL_ATTR0_PASSIVE) if (spellInfo->Attributes & SPELL_ATTR0_PASSIVE)
@@ -412,16 +412,16 @@ uint32 CalculatePowerCost(SpellEntry const* spellInfo, Unit const* caster, Spell
powerCost += caster->GetInt32Value(UNIT_FIELD_POWER_COST_MODIFIER + school); powerCost += caster->GetInt32Value(UNIT_FIELD_POWER_COST_MODIFIER + school);
// Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost) // Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost)
if (spellInfo->AttributesEx4 & SPELL_ATTR4_SPELL_VS_EXTEND_COST) if (spellInfo->AttributesEx4 & SPELL_ATTR4_SPELL_VS_EXTEND_COST)
powerCost += caster->GetAttackTime(OFF_ATTACK)/100; powerCost += caster->GetAttackTime(OFF_ATTACK) / 100;
// Apply cost mod by spell // Apply cost mod by spell
if (Player* modOwner = caster->GetSpellModOwner()) if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_COST, powerCost); modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_COST, powerCost);
if (spellInfo->Attributes & SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION) if (spellInfo->Attributes & SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION)
powerCost = int32(powerCost/ (1.117f* spellInfo->spellLevel / caster->getLevel() -0.1327f)); powerCost = int32(powerCost / (1.117f * spellInfo->spellLevel / caster->getLevel() -0.1327f));
// PCT mod from user auras by school // PCT mod from user auras by school
powerCost = int32(powerCost * (1.0f+caster->GetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER+school))); powerCost = int32(powerCost * (1.0f + caster->GetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER + school)));
if (powerCost < 0) if (powerCost < 0)
powerCost = 0; powerCost = 0;
return powerCost; return powerCost;
@@ -1261,7 +1261,7 @@ bool SpellMgr::IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod)
if (!spellInfo || !mod) if (!spellInfo || !mod)
return false; return false;
SpellEntry const *affect_spell = sSpellStore.LookupEntry(mod->spellId); SpellEntry const* affect_spell = sSpellStore.LookupEntry(mod->spellId);
// False if affect_spell == NULL or spellFamily not equal // False if affect_spell == NULL or spellFamily not equal
if (!affect_spell || affect_spell->SpellFamilyName != spellInfo->SpellFamilyName) if (!affect_spell || affect_spell->SpellFamilyName != spellInfo->SpellFamilyName)
return false; return false;
@@ -1297,7 +1297,7 @@ void SpellMgr::LoadSpellProcEvents()
uint32 entry = fields[0].GetUInt32(); uint32 entry = fields[0].GetUInt32();
const SpellEntry *spell = sSpellStore.LookupEntry(entry); SpellEntry const* spell = sSpellStore.LookupEntry(entry);
if (!spell) if (!spell)
{ {
sLog->outErrorDb("Spell %u listed in `spell_proc_event` does not exist", entry); sLog->outErrorDb("Spell %u listed in `spell_proc_event` does not exist", entry);
@@ -1628,7 +1628,7 @@ void SpellMgr::LoadSpellBonusess()
Field *fields = result->Fetch(); Field *fields = result->Fetch();
uint32 entry = fields[0].GetUInt32(); uint32 entry = fields[0].GetUInt32();
const SpellEntry *spell = sSpellStore.LookupEntry(entry); SpellEntry const* spell = sSpellStore.LookupEntry(entry);
if (!spell) if (!spell)
{ {
sLog->outErrorDb("Spell %u listed in `spell_bonus_data` does not exist", entry); sLog->outErrorDb("Spell %u listed in `spell_bonus_data` does not exist", entry);
@@ -1819,7 +1819,7 @@ void SpellMgr::LoadSpellThreats()
bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1, uint32 spellId_2) const bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1, uint32 spellId_2) const
{ {
SpellEntry const *spellInfo_2 = sSpellStore.LookupEntry(spellId_2); SpellEntry const* spellInfo_2 = sSpellStore.LookupEntry(spellId_2);
if (!spellInfo_1 || !spellInfo_2) return false; if (!spellInfo_1 || !spellInfo_2) return false;
if (spellInfo_1->Id == spellId_2) return false; if (spellInfo_1->Id == spellId_2) return false;
@@ -1866,7 +1866,7 @@ bool SpellMgr::canStackSpellRanks(SpellEntry const *spellInfo)
bool SpellMgr::IsProfessionOrRidingSpell(uint32 spellId) bool SpellMgr::IsProfessionOrRidingSpell(uint32 spellId)
{ {
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo) if (!spellInfo)
return false; return false;
@@ -1886,7 +1886,7 @@ bool SpellMgr::IsProfessionOrRidingSpell(uint32 spellId)
bool SpellMgr::IsProfessionSpell(uint32 spellId) bool SpellMgr::IsProfessionSpell(uint32 spellId)
{ {
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo) if (!spellInfo)
return false; return false;
@@ -1906,7 +1906,7 @@ bool SpellMgr::IsProfessionSpell(uint32 spellId)
bool SpellMgr::IsPrimaryProfessionSpell(uint32 spellId) bool SpellMgr::IsPrimaryProfessionSpell(uint32 spellId)
{ {
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo) if (!spellInfo)
return false; return false;
@@ -1935,7 +1935,7 @@ bool SpellMgr::IsSkillBonusSpell(uint32 spellId) const
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx) for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
{ {
SkillLineAbilityEntry const *pAbility = _spell_idx->second; SkillLineAbilityEntry const* pAbility = _spell_idx->second;
if (!pAbility || pAbility->learnOnGetSkill != ABILITY_LEARNED_ON_GET_PROFESSION_SKILL) if (!pAbility || pAbility->learnOnGetSkill != ABILITY_LEARNED_ON_GET_PROFESSION_SKILL)
continue; continue;
@@ -2070,7 +2070,7 @@ SpellEntry const* SpellMgr::SelectAuraRankForPlayerLevel(SpellEntry const* spell
for (uint32 nextSpellId = spellInfo->Id; nextSpellId != 0; nextSpellId = GetPrevSpellInChain(nextSpellId)) for (uint32 nextSpellId = spellInfo->Id; nextSpellId != 0; nextSpellId = GetPrevSpellInChain(nextSpellId))
{ {
SpellEntry const *nextSpellInfo = sSpellStore.LookupEntry(nextSpellId); SpellEntry const* nextSpellInfo = sSpellStore.LookupEntry(nextSpellId);
if (!nextSpellInfo) if (!nextSpellInfo)
break; break;
@@ -2302,7 +2302,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
for (uint32 i = 0; i < sCreatureFamilyStore.GetNumRows(); ++i) for (uint32 i = 0; i < sCreatureFamilyStore.GetNumRows(); ++i)
{ {
CreatureFamilyEntry const *creatureFamily = sCreatureFamilyStore.LookupEntry(i); CreatureFamilyEntry const* creatureFamily = sCreatureFamilyStore.LookupEntry(i);
if (!creatureFamily) // not exist if (!creatureFamily) // not exist
continue; continue;
@@ -2313,7 +2313,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
for (uint32 k = 0; k < sSkillLineAbilityStore.GetNumRows(); ++k) for (uint32 k = 0; k < sSkillLineAbilityStore.GetNumRows(); ++k)
{ {
SkillLineAbilityEntry const *skillLine = sSkillLineAbilityStore.LookupEntry(k); SkillLineAbilityEntry const* skillLine = sSkillLineAbilityStore.LookupEntry(k);
if (!skillLine) if (!skillLine)
continue; continue;
@@ -2327,7 +2327,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
if (skillLine->learnOnGetSkill != ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL) if (skillLine->learnOnGetSkill != ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL)
continue; continue;
SpellEntry const *spell = sSpellStore.LookupEntry(skillLine->spellId); SpellEntry const* spell = sSpellStore.LookupEntry(skillLine->spellId);
if (!spell) // not exist or triggered or talent if (!spell) // not exist or triggered or talent
continue; continue;
@@ -2364,7 +2364,7 @@ bool LoadPetDefaultSpells_helper(CreatureTemplate const* cInfo, PetDefaultSpells
return false; return false;
// remove duplicates with levelupSpells if any // remove duplicates with levelupSpells if any
if (PetLevelupSpellSet const *levelupSpells = cInfo->family ? sSpellMgr->GetPetLevelupSpellList(cInfo->family) : NULL) if (PetLevelupSpellSet const* levelupSpells = cInfo->family ? sSpellMgr->GetPetLevelupSpellList(cInfo->family) : NULL)
{ {
for (uint8 j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j) for (uint8 j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
{ {
@@ -2448,7 +2448,7 @@ void SpellMgr::LoadPetDefaultSpells()
if (spellEntry->Effect[k] == SPELL_EFFECT_SUMMON || spellEntry->Effect[k] == SPELL_EFFECT_SUMMON_PET) if (spellEntry->Effect[k] == SPELL_EFFECT_SUMMON || spellEntry->Effect[k] == SPELL_EFFECT_SUMMON_PET)
{ {
uint32 creature_id = spellEntry->EffectMiscValue[k]; uint32 creature_id = spellEntry->EffectMiscValue[k];
CreatureTemplate const *cInfo = sObjectMgr->GetCreatureTemplate(creature_id); CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creature_id);
if (!cInfo) if (!cInfo)
continue; continue;
@@ -2533,7 +2533,7 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg)
} }
case SPELL_EFFECT_LEARN_SPELL: case SPELL_EFFECT_LEARN_SPELL:
{ {
SpellEntry const *spellInfo2 = sSpellStore.LookupEntry(spellInfo->EffectTriggerSpell[i]); SpellEntry const* spellInfo2 = sSpellStore.LookupEntry(spellInfo->EffectTriggerSpell[i]);
if (!IsSpellValid(spellInfo2, pl, msg)) if (!IsSpellValid(spellInfo2, pl, msg))
{ {
if (msg) if (msg)
@@ -2609,7 +2609,7 @@ void SpellMgr::LoadSpellAreas()
spellArea.gender = Gender(fields[7].GetUInt8()); spellArea.gender = Gender(fields[7].GetUInt8());
spellArea.autocast = fields[8].GetBool(); spellArea.autocast = fields[8].GetBool();
if (const SpellEntry* spellInfo = sSpellStore.LookupEntry(spell)) if (SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell))
{ {
if (spellArea.autocast) if (spellArea.autocast)
const_cast<SpellEntry*>(spellInfo)->Attributes |= SPELL_ATTR0_CANT_CANCEL; const_cast<SpellEntry*>(spellInfo)->Attributes |= SPELL_ATTR0_CANT_CANCEL;
@@ -2798,7 +2798,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
if (spellInfo->AttributesEx4 & SPELL_ATTR4_CAST_ONLY_IN_OUTLAND) if (spellInfo->AttributesEx4 & SPELL_ATTR4_CAST_ONLY_IN_OUTLAND)
{ {
uint32 v_map = GetVirtualMapForMapAndZone(map_id, zone_id); uint32 v_map = GetVirtualMapForMapAndZone(map_id, zone_id);
MapEntry const *mapEntry = sMapStore.LookupEntry(v_map); MapEntry const* mapEntry = sMapStore.LookupEntry(v_map);
if (!mapEntry || mapEntry->addon < 1 || !mapEntry->IsContinent()) if (!mapEntry || mapEntry->addon < 1 || !mapEntry->IsContinent())
return SPELL_FAILED_INCORRECT_AREA; return SPELL_FAILED_INCORRECT_AREA;
} }
@@ -2806,7 +2806,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
// raid instance limitation // raid instance limitation
if (spellInfo->AttributesEx6 & SPELL_ATTR6_NOT_IN_RAID_INSTANCE) if (spellInfo->AttributesEx6 & SPELL_ATTR6_NOT_IN_RAID_INSTANCE)
{ {
MapEntry const *mapEntry = sMapStore.LookupEntry(map_id); MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
if (!mapEntry || mapEntry->IsRaid()) if (!mapEntry || mapEntry->IsRaid())
return SPELL_FAILED_NOT_IN_RAID_INSTANCE; return SPELL_FAILED_NOT_IN_RAID_INSTANCE;
} }
@@ -2850,7 +2850,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
if (!player) if (!player)
return SPELL_FAILED_REQUIRES_AREA; return SPELL_FAILED_REQUIRES_AREA;
MapEntry const *mapEntry = sMapStore.LookupEntry(map_id); MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
if (!mapEntry) if (!mapEntry)
return SPELL_FAILED_INCORRECT_AREA; return SPELL_FAILED_INCORRECT_AREA;
@@ -2865,7 +2865,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
case 35774: // Gold Team (Horde) case 35774: // Gold Team (Horde)
case 35775: // Green Team (Horde) case 35775: // Green Team (Horde)
{ {
MapEntry const *mapEntry = sMapStore.LookupEntry(map_id); MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
if (!mapEntry) if (!mapEntry)
return SPELL_FAILED_INCORRECT_AREA; return SPELL_FAILED_INCORRECT_AREA;
@@ -2876,14 +2876,14 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
if (!player) if (!player)
return SPELL_FAILED_REQUIRES_AREA; return SPELL_FAILED_REQUIRES_AREA;
MapEntry const *mapEntry = sMapStore.LookupEntry(map_id); MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
if (!mapEntry) if (!mapEntry)
return SPELL_FAILED_INCORRECT_AREA; return SPELL_FAILED_INCORRECT_AREA;
if (!mapEntry->IsBattleArena()) if (!mapEntry->IsBattleArena())
return SPELL_FAILED_REQUIRES_AREA; return SPELL_FAILED_REQUIRES_AREA;
Battleground *bg = player->GetBattleground(); Battleground* bg = player->GetBattleground();
return bg && bg->GetStatus() == STATUS_WAIT_JOIN ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA; return bg && bg->GetStatus() == STATUS_WAIT_JOIN ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
} }
} }
@@ -2915,7 +2915,7 @@ void SpellMgr::LoadSkillLineAbilityMap()
for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i) for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i)
{ {
SkillLineAbilityEntry const *SkillInfo = sSkillLineAbilityStore.LookupEntry(i); SkillLineAbilityEntry const* SkillInfo = sSkillLineAbilityStore.LookupEntry(i);
if (!SkillInfo) if (!SkillInfo)
continue; continue;
@@ -3300,8 +3300,8 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
bool SpellMgr::CanAurasStack(Aura const *aura1, Aura const *aura2, bool sameCaster) const bool SpellMgr::CanAurasStack(Aura const *aura1, Aura const *aura2, bool sameCaster) const
{ {
SpellEntry const *spellInfo_1 = aura1->GetSpellProto(); SpellEntry const* spellInfo_1 = aura1->GetSpellProto();
SpellEntry const *spellInfo_2 = aura2->GetSpellProto(); SpellEntry const* spellInfo_2 = aura2->GetSpellProto();
SpellSpecific spellSpec_1 = GetSpellSpecific(spellInfo_1); SpellSpecific spellSpec_1 = GetSpellSpecific(spellInfo_1);
SpellSpecific spellSpec_2 = GetSpellSpecific(spellInfo_2); SpellSpecific spellSpec_2 = GetSpellSpecific(spellInfo_2);
if (spellSpec_1 && spellSpec_2) if (spellSpec_1 && spellSpec_2)
@@ -3460,7 +3460,7 @@ void SpellMgr::LoadSpellEnchantProcData()
uint32 enchantId = fields[0].GetUInt32(); uint32 enchantId = fields[0].GetUInt32();
SpellItemEnchantmentEntry const *ench = sSpellItemEnchantmentStore.LookupEntry(enchantId); SpellItemEnchantmentEntry const* ench = sSpellItemEnchantmentStore.LookupEntry(enchantId);
if (!ench) if (!ench)
{ {
sLog->outErrorDb("Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId); sLog->outErrorDb("Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId);
@@ -3706,13 +3706,13 @@ void SpellMgr::LoadSpellCustomAttr()
if (IsPartOfSkillLine(SKILL_ENCHANTING, i)) if (IsPartOfSkillLine(SKILL_ENCHANTING, i))
{ {
uint32 enchantId = spellInfo->EffectMiscValue[j]; uint32 enchantId = spellInfo->EffectMiscValue[j];
SpellItemEnchantmentEntry const *enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId); SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId);
for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s) for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
{ {
if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
continue; continue;
SpellEntry const *procInfo = sSpellStore.LookupEntry(enchant->spellid[s]); SpellEntry const* procInfo = sSpellStore.LookupEntry(enchant->spellid[s]);
if (!procInfo) if (!procInfo)
continue; continue;
@@ -4021,7 +4021,7 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER; spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER;
++count; ++count;
break; break;
case 29809: // Desecration Arm - 36 instead of 37 - typo? :/ case 29809: // Desecration Arm - 36 instead of 37 - typo? :/
spellInfo->EffectRadiusIndex[0] = 37; spellInfo->EffectRadiusIndex[0] = 37;
++count; ++count;
break; break;
@@ -4374,7 +4374,7 @@ void SpellMgr::LoadSpellCustomAttr()
} }
} }
SummonPropertiesEntry *properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(121)); SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(121));
properties->Type = SUMMON_TYPE_TOTEM; properties->Type = SUMMON_TYPE_TOTEM;
properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647)); // 52893 properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647)); // 52893
properties->Type = SUMMON_TYPE_TOTEM; properties->Type = SUMMON_TYPE_TOTEM;
@@ -4400,7 +4400,7 @@ void SpellMgr::LoadEnchantCustomAttr()
for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i) for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
{ {
SpellEntry * spellInfo = (SpellEntry*)GetSpellStore()->LookupEntry(i); SpellEntry* spellInfo = (SpellEntry*)GetSpellStore()->LookupEntry(i);
if (!spellInfo) if (!spellInfo)
continue; continue;
@@ -4413,7 +4413,7 @@ void SpellMgr::LoadEnchantCustomAttr()
if (spellInfo->Effect[j] == SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) if (spellInfo->Effect[j] == SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY)
{ {
uint32 enchId = spellInfo->EffectMiscValue[j]; uint32 enchId = spellInfo->EffectMiscValue[j];
SpellItemEnchantmentEntry const *ench = sSpellItemEnchantmentStore.LookupEntry(enchId); SpellItemEnchantmentEntry const* ench = sSpellItemEnchantmentStore.LookupEntry(enchId);
if (!ench) if (!ench)
continue; continue;
mEnchantCustomAttr[enchId] = true; mEnchantCustomAttr[enchId] = true;
+2 -2
View File
@@ -2311,7 +2311,7 @@ bool World::RemoveBanAccount(BanMode mode, std::string nameOrIP)
/// Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban /// Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban
BanReturn World::BanCharacter(std::string name, std::string duration, std::string reason, std::string author) BanReturn World::BanCharacter(std::string name, std::string duration, std::string reason, std::string author)
{ {
Player *pBanned = sObjectMgr->GetPlayer(name.c_str()); Player* pBanned = sObjectMgr->GetPlayer(name.c_str());
uint32 guid = 0; uint32 guid = 0;
uint32 duration_secs = TimeStringToSecs(duration); uint32 duration_secs = TimeStringToSecs(duration);
@@ -2352,7 +2352,7 @@ BanReturn World::BanCharacter(std::string name, std::string duration, std::strin
/// Remove a ban from a character /// Remove a ban from a character
bool World::RemoveBanCharacter(std::string name) bool World::RemoveBanCharacter(std::string name)
{ {
Player *pBanned = sObjectMgr->GetPlayer(name.c_str()); Player* pBanned = sObjectMgr->GetPlayer(name.c_str());
uint32 guid = 0; uint32 guid = 0;
/// Pick a player to ban if not online /// Pick a player to ban if not online