From f8b1b264d11623eccfe5b125d1d3445f2b4aae1d Mon Sep 17 00:00:00 2001 From: gerripeach Date: Sun, 20 Oct 2013 12:47:54 +0200 Subject: Core/Spells: Fixed diminishing returns on creatures with CREATURE_FLAG_EXTRA_ALL_DIMINISH Closes #11073 --- src/server/game/Spells/Spell.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 2eee80924a4..aa629b46e28 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2680,7 +2680,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA m_diminishLevel = unit->GetDiminishing(m_diminishGroup); DiminishingReturnsType type = GetDiminishingReturnsGroupType(m_diminishGroup); // Increase Diminishing on unit, current informations for actually casts will use values above - if ((type == DRTYPE_PLAYER && unit->GetCharmerOrOwnerPlayerOrPlayerItself()) || type == DRTYPE_ALL) + if ((type == DRTYPE_PLAYER && + (unit->GetCharmerOrOwnerPlayerOrPlayerItself() || (unit->GetTypeId() == TYPEID_UNIT && unit->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH))) || + type == DRTYPE_ALL) unit->IncrDiminishing(m_diminishGroup); } -- cgit v1.2.3 From b81bf7d0250939ee96b942f554c16d950f06c7b1 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 26 Oct 2013 14:39:00 +0200 Subject: Core/Spells: Implemented additional conditions for spells that start cooldown after an event instead of after cast --- src/server/game/DataStores/DBCEnums.h | 6 +++++ src/server/game/DataStores/DBCStores.cpp | 6 +++-- src/server/game/DataStores/DBCStores.h | 3 ++- src/server/game/DataStores/DBCStructure.h | 6 +++++ src/server/game/DataStores/DBCfmt.h | 1 + src/server/game/Entities/Creature/Creature.cpp | 8 +++--- src/server/game/Entities/Pet/Pet.cpp | 2 +- src/server/game/Entities/Player/Player.cpp | 36 ++++++++++++------------- src/server/game/Entities/Unit/Unit.cpp | 10 +++---- src/server/game/Handlers/ItemHandler.cpp | 2 +- src/server/game/Handlers/MovementHandler.cpp | 2 +- src/server/game/Spells/Auras/SpellAuraEffects.h | 8 +++--- src/server/game/Spells/Auras/SpellAuras.cpp | 6 ++--- src/server/game/Spells/Spell.cpp | 4 +-- src/server/game/Spells/SpellEffects.cpp | 10 +++---- src/server/game/Spells/SpellInfo.cpp | 16 ++++++++--- src/server/game/Spells/SpellInfo.h | 4 ++- 17 files changed, 79 insertions(+), 51 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index a7189ea415a..171d0fe8cc2 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -344,6 +344,12 @@ enum ItemLimitCategoryMode ITEM_LIMIT_CATEGORY_MODE_EQUIP = 1 // limit applied to amount equipped items (including used gems) }; +enum SpellCategoryFlags +{ + SPELL_CATEGORY_FLAG_COOLDOWN_SCALES_WITH_WEAPON_SPEED = 0x01, // unused + SPELL_CATEGORY_FLAG_COOLDOWN_STARTS_ON_EVENT = 0x04 +}; + enum TotemCategoryType { TOTEM_CATEGORY_TYPE_KNIFE = 1, diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 95592cd87d9..aa292934021 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -154,10 +154,11 @@ DBCStorage sSoundEntriesStore(SoundEntriesfmt); DBCStorage sSpellItemEnchantmentStore(SpellItemEnchantmentfmt); DBCStorage sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt); DBCStorage sSpellStore(SpellEntryfmt); -SpellCategoryStore sSpellCategoryStore; +SpellCategoryStore sSpellsByCategoryStore; PetFamilySpellsStore sPetFamilySpellsStore; DBCStorage sSpellCastTimesStore(SpellCastTimefmt); +DBCStorage sSpellCategoryStore(SpellCategoryfmt); DBCStorage sSpellDifficultyStore(SpellDifficultyfmt); DBCStorage sSpellDurationStore(SpellDurationfmt); DBCStorage sSpellFocusObjectStore(SpellFocusObjectfmt); @@ -408,7 +409,7 @@ void LoadDBCStores(const std::string& dataPath) { SpellEntry const* spell = sSpellStore.LookupEntry(i); if (spell && spell->Category) - sSpellCategoryStore[spell->Category].insert(i); + sSpellsByCategoryStore[spell->Category].insert(i); } for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) @@ -442,6 +443,7 @@ void LoadDBCStores(const std::string& dataPath) } LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCastTimesStore, dbcPath, "SpellCastTimes.dbc"); + LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCategoryStore, dbcPath, "SpellCategory.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDifficultyStore, dbcPath, "SpellDifficulty.dbc", &CustomSpellDifficultyfmt, &CustomSpellDifficultyIndex); LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDurationStore, dbcPath, "SpellDuration.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sSpellFocusObjectStore, dbcPath, "SpellFocusObject.dbc"); diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index cac93a120a5..808ebb78fa5 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -148,12 +148,13 @@ extern DBCStorage sSkillLineStore; extern DBCStorage sSkillLineAbilityStore; extern DBCStorage sSoundEntriesStore; extern DBCStorage sSpellCastTimesStore; +extern DBCStorage sSpellCategoryStore; extern DBCStorage sSpellDifficultyStore; extern DBCStorage sSpellDurationStore; extern DBCStorage sSpellFocusObjectStore; extern DBCStorage sSpellItemEnchantmentStore; extern DBCStorage sSpellItemEnchantmentConditionStore; -extern SpellCategoryStore sSpellCategoryStore; +extern SpellCategoryStore sSpellsByCategoryStore; extern PetFamilySpellsStore sPetFamilySpellsStore; extern DBCStorage sSpellRadiusStore; extern DBCStorage sSpellRangeStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index aff54f75a40..1dce61e90f6 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1675,6 +1675,12 @@ struct SpellCastTimesEntry //int32 MinCastTime; // 3 unsure }; +struct SpellCategoryEntry +{ + uint32 Id; + uint32 Flags; +}; + struct SpellDifficultyEntry { uint32 ID; // 0 diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 5326ab70fa3..0066db2b049 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -97,6 +97,7 @@ char const SkillLinefmt[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxx char const SkillLineAbilityfmt[] = "niiiixxiiiiixx"; char const SoundEntriesfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; char const SpellCastTimefmt[] = "nixx"; +char const SpellCategoryfmt[] = "ni"; char const SpellDifficultyfmt[] = "niiii"; const std::string CustomSpellDifficultyfmt = "ppppp"; const std::string CustomSpellDifficultyIndex = "id"; diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index f68d87de2f4..e4fda515c8a 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2141,8 +2141,8 @@ void Creature::AddCreatureSpellCooldown(uint32 spellid) if (cooldown) _AddCreatureSpellCooldown(spellid, time(NULL) + cooldown/IN_MILLISECONDS); - if (spellInfo->Category) - _AddCreatureCategoryCooldown(spellInfo->Category, time(NULL)); + if (spellInfo->GetCategory()) + _AddCreatureCategoryCooldown(spellInfo->GetCategory(), time(NULL)); } bool Creature::HasCategoryCooldown(uint32 spell_id) const @@ -2151,7 +2151,7 @@ bool Creature::HasCategoryCooldown(uint32 spell_id) const if (!spellInfo) return false; - CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->Category); + CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->GetCategory()); return(itr != m_CreatureCategoryCooldowns.end() && time_t(itr->second + (spellInfo->CategoryRecoveryTime / IN_MILLISECONDS)) > time(NULL)); } @@ -2185,7 +2185,7 @@ void Creature::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs } // Not send cooldown for this spells - if (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) + if (spellInfo->IsCooldownStartedOnEvent()) continue; if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE) diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 9758564c8f2..dfe658a30d3 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -2056,7 +2056,7 @@ void Pet::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) } // Not send cooldown for this spells - if (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) + if (spellInfo->IsCooldownStartedOnEvent()) continue; if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index eaee6dc090a..80f3f022a20 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3384,7 +3384,7 @@ void Player::SendInitialSpells() data << uint32(itr->first); data << uint16(itr->second.itemid); // cast item id - data << uint16(sEntry->Category); // spell category + data << uint16(sEntry->GetCategory()); // spell category // send infinity cooldown in special format if (itr->second.end >= infTime) @@ -3396,7 +3396,7 @@ void Player::SendInitialSpells() time_t cooldown = itr->second.end > curTime ? (itr->second.end-curTime)*IN_MILLISECONDS : 0; - if (sEntry->Category) // may be wrong, but anyway better than nothing... + if (sEntry->GetCategory()) // may be wrong, but anyway better than nothing... { data << uint32(0); // cooldown data << uint32(cooldown); // category cooldown @@ -4259,16 +4259,16 @@ void Player::RemoveSpellCooldown(uint32 spell_id, bool update /* = false */) // I am not sure which one is more efficient void Player::RemoveCategoryCooldown(uint32 cat) { - SpellCategoryStore::const_iterator i_scstore = sSpellCategoryStore.find(cat); - if (i_scstore != sSpellCategoryStore.end()) + SpellCategoryStore::const_iterator i_scstore = sSpellsByCategoryStore.find(cat); + if (i_scstore != sSpellsByCategoryStore.end()) for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset) RemoveSpellCooldown(*i_scset, true); } void Player::RemoveSpellCategoryCooldown(uint32 cat, bool update /* = false */) { - SpellCategoryStore::const_iterator ct = sSpellCategoryStore.find(cat); - if (ct == sSpellCategoryStore.end()) + SpellCategoryStore::const_iterator ct = sSpellsByCategoryStore.find(cat); + if (ct == sSpellsByCategoryStore.end()) return; const SpellCategorySet& ct_set = ct->second; @@ -20433,13 +20433,13 @@ void Player::PetSpellInitialize() time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILLISECONDS : 0; data << uint32(itr->first); // spell ID - CreatureSpellCooldowns::const_iterator categoryitr = pet->m_CreatureCategoryCooldowns.find(spellInfo->Category); + CreatureSpellCooldowns::const_iterator categoryitr = pet->m_CreatureCategoryCooldowns.find(spellInfo->GetCategory()); if (categoryitr != pet->m_CreatureCategoryCooldowns.end()) { time_t categoryCooldown = (categoryitr->second > curTime) ? (categoryitr->second - curTime) * IN_MILLISECONDS : 0; - data << uint16(spellInfo->Category); // spell category - data << uint32(cooldown); // spell cooldown - data << uint32(categoryCooldown); // category cooldown + data << uint16(spellInfo->GetCategory()); // spell category + data << uint32(cooldown); // spell cooldown + data << uint32(categoryCooldown); // category cooldown } else { @@ -20546,13 +20546,13 @@ void Player::VehicleSpellInitialize() time_t cooldown = (itr->second > now) ? (itr->second - now) * IN_MILLISECONDS : 0; data << uint32(itr->first); // spell ID - CreatureSpellCooldowns::const_iterator categoryitr = vehicle->m_CreatureCategoryCooldowns.find(spellInfo->Category); + CreatureSpellCooldowns::const_iterator categoryitr = vehicle->m_CreatureCategoryCooldowns.find(spellInfo->GetCategory()); if (categoryitr != vehicle->m_CreatureCategoryCooldowns.end()) { time_t categoryCooldown = (categoryitr->second > now) ? (categoryitr->second - now) * IN_MILLISECONDS : 0; - data << uint16(spellInfo->Category); // spell category - data << uint32(cooldown); // spell cooldown - data << uint32(categoryCooldown); // category cooldown + data << uint16(spellInfo->GetCategory()); // spell category + data << uint32(cooldown); // spell cooldown + data << uint32(categoryCooldown); // category cooldown } else { @@ -21220,7 +21220,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) } // Not send cooldown for this spells - if (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) + if (spellInfo->IsCooldownStartedOnEvent()) continue; if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE) @@ -21683,7 +21683,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 ite // if no cooldown found above then base at DBC data if (rec < 0 && catrec < 0) { - cat = spellInfo->Category; + cat = spellInfo->GetCategory(); rec = spellInfo->RecoveryTime; catrec = spellInfo->CategoryRecoveryTime; } @@ -21734,8 +21734,8 @@ void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 ite // category spells if (cat && catrec > 0) { - SpellCategoryStore::const_iterator i_scstore = sSpellCategoryStore.find(cat); - if (i_scstore != sSpellCategoryStore.end()) + SpellCategoryStore::const_iterator i_scstore = sSpellsByCategoryStore.find(cat); + if (i_scstore != sSpellsByCategoryStore.end()) { for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset) { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index c3a611c441f..ef6d9b9edef 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4838,7 +4838,7 @@ void Unit::AddGameObject(GameObject* gameObj) { SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(gameObj->GetSpellId()); // Need disable spell use for owner - if (createBySpell && createBySpell->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) + if (createBySpell && createBySpell->IsCooldownStartedOnEvent()) // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases) ToPlayer()->AddSpellAndCategoryCooldowns(createBySpell, 0, NULL, true); } @@ -4869,7 +4869,7 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del) { SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(spellid); // Need activate spell use for owner - if (createBySpell && createBySpell->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) + if (createBySpell && createBySpell->IsCooldownStartedOnEvent()) // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases) ToPlayer()->SendCooldownEvent(createBySpell); } @@ -9382,7 +9382,7 @@ void Unit::SetMinion(Minion *minion, bool apply) // Send infinity cooldown - client does that automatically but after relog cooldown needs to be set again SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL)); - if (spellInfo && (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)) + if (spellInfo && (spellInfo->IsCooldownStartedOnEvent())) ToPlayer()->AddSpellAndCategoryCooldowns(spellInfo, 0, NULL, true); } } @@ -9424,7 +9424,7 @@ void Unit::SetMinion(Minion *minion, bool apply) { SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL)); // Remove infinity cooldown - if (spellInfo && (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)) + if (spellInfo && (spellInfo->IsCooldownStartedOnEvent())) ToPlayer()->SendCooldownEvent(spellInfo); } @@ -10546,7 +10546,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas break; } // Exorcism - else if (spellProto->Category == 19) + else if (spellProto->GetCategory() == 19) { if (victim->GetCreatureTypeMask() & CREATURE_TYPEMASK_DEMON_OR_UNDEAD) return true; diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 5f458edbb07..d9727ea7ded 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -382,7 +382,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recvData) else { data << uint32(spell->RecoveryTime); - data << uint32(spell->Category); + data << uint32(spell->GetCategory()); data << uint32(spell->CategoryRecoveryTime); } } diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index 36d1e1cb1ea..955f6b3c456 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -354,7 +354,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData) uint32 mstime = getMSTime(); /*----------------------*/ - if(m_clientTimeDelay == 0) + if (m_clientTimeDelay == 0) m_clientTimeDelay = mstime - movementInfo.time; /* process position-change */ diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index 7cfb1e04850..ddd6c1127e1 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -317,11 +317,11 @@ namespace Trinity // Wards if ((spellProtoA->SpellFamilyName == SPELLFAMILY_MAGE) || (spellProtoA->SpellFamilyName == SPELLFAMILY_WARLOCK)) - if (spellProtoA->Category == 56) + if (spellProtoA->GetCategory() == 56) return true; if ((spellProtoB->SpellFamilyName == SPELLFAMILY_MAGE) || (spellProtoB->SpellFamilyName == SPELLFAMILY_WARLOCK)) - if (spellProtoB->Category == 56) + if (spellProtoB->GetCategory() == 56) return false; // Sacred Shield @@ -343,9 +343,9 @@ namespace Trinity return false; // Ice Barrier - if (spellProtoA->Category == 471) + if (spellProtoA->GetCategory() == 471) return true; - if (spellProtoB->Category == 471) + if (spellProtoB->GetCategory() == 471) return false; // Sacrifice diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index d7b8003f19a..4b6423503c1 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -413,7 +413,7 @@ void Aura::_ApplyForTarget(Unit* target, Unit* caster, AuraApplication * auraApp // set infinity cooldown state for spells if (caster && caster->GetTypeId() == TYPEID_PLAYER) { - if (m_spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) + if (m_spellInfo->IsCooldownStartedOnEvent()) { Item* castItem = m_castItemGuid ? caster->ToPlayer()->GetItemByGuid(m_castItemGuid) : NULL; caster->ToPlayer()->AddSpellAndCategoryCooldowns(m_spellInfo, castItem ? castItem->GetEntry() : 0, NULL, true); @@ -446,7 +446,7 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * auraA // reset cooldown state for spells if (caster && caster->GetTypeId() == TYPEID_PLAYER) { - if (GetSpellInfo()->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE) + if (GetSpellInfo()->IsCooldownStartedOnEvent()) // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases) caster->ToPlayer()->SendCooldownEvent(GetSpellInfo()); } @@ -1279,7 +1279,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b break; case SPELLFAMILY_ROGUE: // Sprint (skip non player casted spells by category) - if (GetSpellInfo()->SpellFamilyFlags[0] & 0x40 && GetSpellInfo()->Category == 44) + if (GetSpellInfo()->SpellFamilyFlags[0] & 0x40 && GetSpellInfo()->GetCategory() == 44) // in official maybe there is only one icon? if (target->HasAura(58039)) // Glyph of Blurred Speed target->CastSpell(target, 61922, true); // Sprint (waterwalk) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index aa629b46e28..e91bba13fa0 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3552,7 +3552,7 @@ void Spell::SendSpellCooldown() return; // mana/health/etc potions, disabled by client (until combat out as declarate) - if (m_CastItem && m_CastItem->IsPotion()) + if (m_CastItem && (m_CastItem->IsPotion() || m_spellInfo->IsCooldownStartedOnEvent())) { // need in some way provided data for Spell::finish SendCooldownEvent _player->SetLastPotionId(m_CastItem->GetEntry()); @@ -3560,7 +3560,7 @@ void Spell::SendSpellCooldown() } // have infinity cooldown but set at aura apply // do not set cooldown for triggered spells (needed by reincarnation) - if (m_spellInfo->Attributes & (SPELL_ATTR0_DISABLED_WHILE_ACTIVE | SPELL_ATTR0_PASSIVE) || (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD)) + if (m_spellInfo->IsCooldownStartedOnEvent() || m_spellInfo->IsPassive() || (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD)) return; _player->AddSpellAndCategoryCooldowns(m_spellInfo, m_CastItem ? m_CastItem->GetEntry() : 0, this); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 0732c389bfa..e580a3d0f2d 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -369,7 +369,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) case SPELLFAMILY_WARRIOR: { // Shield Slam - if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209) + if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->GetCategory() == 1209) { uint8 level = m_caster->getLevel(); uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 24.5f), uint32(float(level) * 34.5f)); @@ -943,7 +943,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime - && m_spellInfo->Category == spellInfo->Category) + && m_spellInfo->GetCategory() == spellInfo->GetCategory()) m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id); // original caster guid only for GO cast @@ -996,7 +996,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime - && m_spellInfo->Category == spellInfo->Category) + && m_spellInfo->GetCategory() == spellInfo->GetCategory()) m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id); // original caster guid only for GO cast @@ -2521,7 +2521,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex) // On success dispel // Devour Magic - if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->Category == SPELLCATEGORY_DEVOUR_MAGIC) + if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->GetCategory() == SPELLCATEGORY_DEVOUR_MAGIC) { int32 heal_amount = m_spellInfo->Effects[EFFECT_1].CalcValue(); m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, NULL, NULL, true); @@ -4106,7 +4106,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) case SPELLFAMILY_PALADIN: { // Judgement (seal trigger) - if (m_spellInfo->Category == SPELLCATEGORY_JUDGEMENT) + if (m_spellInfo->GetCategory() == SPELLCATEGORY_JUDGEMENT) { if (!unitTarget || !unitTarget->IsAlive()) return; diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index a0e1ec065cc..0cab2cd4540 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -763,7 +763,7 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] = SpellInfo::SpellInfo(SpellEntry const* spellEntry) { Id = spellEntry->Id; - Category = spellEntry->Category; + CategoryEntry = spellEntry->Category ? sSpellCategoryStore.LookupEntry(spellEntry->Category) : NULL; Dispel = spellEntry->Dispel; Mechanic = spellEntry->Mechanic; Attributes = spellEntry->Attributes; @@ -859,6 +859,11 @@ SpellInfo::~SpellInfo() _UnloadImplicitTargetConditionLists(); } +uint32 SpellInfo::GetCategory() const +{ + return CategoryEntry ? CategoryEntry->Id : 0; +} + bool SpellInfo::HasEffect(SpellEffects effect) const { for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) @@ -1103,6 +1108,11 @@ bool SpellInfo::IsStackableOnOneSlotWithDifferentCasters() const return StackAmount > 1 && !IsChanneled() && !(AttributesEx3 & SPELL_ATTR3_STACK_FOR_DIFF_CASTERS); } +bool SpellInfo::IsCooldownStartedOnEvent() const +{ + return Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE || (CategoryEntry && CategoryEntry->Flags & SPELL_CATEGORY_FLAG_COOLDOWN_STARTS_ON_EVENT); +} + bool SpellInfo::IsDeathPersistent() const { return AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT; @@ -1712,7 +1722,7 @@ SpellCastResult SpellInfo::CheckVehicle(Unit const* caster) const bool SpellInfo::CheckTargetCreatureType(Unit const* target) const { // Curse of Doom & Exorcism: not find another way to fix spell target check :/ - if (SpellFamilyName == SPELLFAMILY_WARLOCK && Category == 1179) + if (SpellFamilyName == SPELLFAMILY_WARLOCK && GetCategory() == 1179) { // not allow cast at player if (target->GetTypeId() == TYPEID_PLAYER) @@ -1816,7 +1826,7 @@ AuraStateType SpellInfo::GetAuraState() const return AURA_STATE_FAERIE_FIRE; // Sting (hunter's pet ability) - if (Category == 1133) + if (GetCategory() == 1133) return AURA_STATE_FAERIE_FIRE; // Victorious diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h index c2ca938d26f..74d95171b4b 100644 --- a/src/server/game/Spells/SpellInfo.h +++ b/src/server/game/Spells/SpellInfo.h @@ -290,7 +290,7 @@ class SpellInfo { public: uint32 Id; - uint32 Category; + SpellCategoryEntry const* CategoryEntry; uint32 Dispel; uint32 Mechanic; uint32 Attributes; @@ -368,6 +368,7 @@ public: SpellInfo(SpellEntry const* spellEntry); ~SpellInfo(); + uint32 GetCategory() const; bool HasEffect(SpellEffects effect) const; bool HasAura(AuraType aura) const; bool HasAreaAuraEffect() const; @@ -393,6 +394,7 @@ public: bool IsPassiveStackableWithRanks() const; bool IsMultiSlotAura() const; bool IsStackableOnOneSlotWithDifferentCasters() const; + bool IsCooldownStartedOnEvent() const; bool IsDeathPersistent() const; bool IsRequiringDeadTarget() const; bool IsAllowingDeadTarget() const; -- cgit v1.2.3 From 0a308144a8e24e7aef0fa15739548f522928b9e2 Mon Sep 17 00:00:00 2001 From: leguybrush Date: Mon, 28 Oct 2013 14:36:07 -0400 Subject: Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }. --- src/server/authserver/Server/AuthSocket.cpp | 4 +--- src/server/collision/DynamicTree.cpp | 4 +--- src/server/game/AI/CoreAI/GuardAI.cpp | 4 +--- src/server/game/AI/CoreAI/TotemAI.cpp | 4 +--- src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 8 ++----- src/server/game/AI/SmartScripts/SmartAI.cpp | 12 +++------- src/server/game/AI/SmartScripts/SmartScript.cpp | 28 ++++++---------------- src/server/game/Accounts/AccountMgr.cpp | 4 +--- src/server/game/Achievements/AchievementMgr.cpp | 4 +--- src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 4 +--- src/server/game/Battlegrounds/Battleground.cpp | 4 +--- .../game/Battlegrounds/Zones/BattlegroundAB.cpp | 4 +--- .../game/Battlegrounds/Zones/BattlegroundAV.cpp | 4 +--- .../game/Battlegrounds/Zones/BattlegroundEY.cpp | 4 +--- .../game/Battlegrounds/Zones/BattlegroundIC.cpp | 8 ++----- .../game/Battlegrounds/Zones/BattlegroundRV.cpp | 4 +--- .../game/Battlegrounds/Zones/BattlegroundSA.cpp | 16 ++++--------- .../game/Battlegrounds/Zones/BattlegroundWS.cpp | 4 +--- src/server/game/Calendar/CalendarMgr.cpp | 4 +--- src/server/game/Chat/ChatLink.cpp | 4 +--- src/server/game/Combat/ThreatManager.cpp | 4 +--- src/server/game/Conditions/ConditionMgr.cpp | 4 +--- src/server/game/DungeonFinding/LFGPlayerData.cpp | 4 +--- src/server/game/DungeonFinding/LFGScripts.cpp | 8 ++----- src/server/game/Entities/Corpse/Corpse.cpp | 4 +--- .../game/Entities/Object/Updates/UpdateData.cpp | 4 +--- src/server/game/Entities/Player/Player.cpp | 4 +--- src/server/game/Entities/Player/SocialMgr.cpp | 8 ++----- src/server/game/Entities/Unit/Unit.cpp | 4 +--- src/server/game/Events/GameEventMgr.cpp | 4 +--- src/server/game/Globals/ObjectAccessor.cpp | 8 ++----- src/server/game/Grids/ObjectGridLoader.cpp | 4 +--- src/server/game/Groups/Group.cpp | 8 ++----- src/server/game/Handlers/AddonHandler.cpp | 8 ++----- src/server/game/Handlers/SpellHandler.cpp | 4 +--- src/server/game/Instances/InstanceSaveMgr.cpp | 4 +--- src/server/game/Mails/Mail.cpp | 8 ++----- src/server/game/Maps/Map.cpp | 12 +++------- src/server/game/Maps/MapManager.cpp | 8 ++----- src/server/game/Maps/MapUpdater.cpp | 4 +--- src/server/game/Maps/TransportMgr.cpp | 8 ++----- src/server/game/Movement/MovementGenerator.cpp | 4 +--- .../MovementGenerators/HomeMovementGenerator.cpp | 4 +--- .../MovementGenerators/PointMovementGenerator.cpp | 4 +--- .../TargetedMovementGenerator.cpp | 8 ++----- .../game/Movement/Waypoints/WaypointManager.cpp | 4 +--- src/server/game/OutdoorPvP/OutdoorPvP.cpp | 8 ++----- src/server/game/Pools/PoolMgr.cpp | 12 +++------- src/server/game/Scripting/ScriptMgr.cpp | 8 ++----- src/server/game/Server/WorldSocketMgr.cpp | 4 +--- src/server/game/Spells/Spell.cpp | 20 ++++------------ src/server/game/Spells/SpellMgr.cpp | 4 +--- src/server/game/Spells/SpellScript.cpp | 8 ++----- src/server/game/Tickets/TicketMgr.cpp | 4 +--- src/server/game/Warden/Warden.cpp | 4 +--- src/server/game/Warden/WardenCheckMgr.cpp | 4 +--- src/server/game/Warden/WardenMac.cpp | 8 ++----- src/server/game/Warden/WardenWin.cpp | 8 ++----- .../SunwellPlateau/sunwell_plateau.cpp | 4 +--- src/server/shared/DataStores/DBCFileLoader.cpp | 4 +--- src/server/shared/Database/MySQLConnection.cpp | 4 +--- src/server/shared/Database/PreparedStatement.cpp | 16 ++++--------- src/server/shared/Dynamic/TypeContainerVisitor.h | 12 +++------- src/server/shared/Logging/Appender.cpp | 8 ++----- src/server/shared/Logging/AppenderDB.cpp | 8 ++----- src/server/shared/Logging/Logger.cpp | 4 +--- src/server/shared/Threading/DelayExecutor.cpp | 4 +--- 67 files changed, 109 insertions(+), 327 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index 829d75ee15c..4312548116a 100644 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -1096,9 +1096,7 @@ PatcherRunnable::PatcherRunnable(class AuthSocket* as) } // Send content of patch file to the client -void PatcherRunnable::run() -{ -} +void PatcherRunnable::run() { } // Preload MD5 hashes of existing patch files on server #ifndef _WIN32 diff --git a/src/server/collision/DynamicTree.cpp b/src/server/collision/DynamicTree.cpp index cf3e50f6e1e..4b2878169d7 100644 --- a/src/server/collision/DynamicTree.cpp +++ b/src/server/collision/DynamicTree.cpp @@ -107,9 +107,7 @@ struct DynTreeImpl : public ParentTree/*, public Intersectable*/ int unbalanced_times; }; -DynamicMapTree::DynamicMapTree() : impl(new DynTreeImpl()) -{ -} +DynamicMapTree::DynamicMapTree() : impl(new DynTreeImpl()) { } DynamicMapTree::~DynamicMapTree() { diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp index 220d53a20e0..188ad4fb450 100644 --- a/src/server/game/AI/CoreAI/GuardAI.cpp +++ b/src/server/game/AI/CoreAI/GuardAI.cpp @@ -31,9 +31,7 @@ int GuardAI::Permissible(Creature const* creature) return PERMIT_BASE_NO; } -GuardAI::GuardAI(Creature* creature) : ScriptedAI(creature) -{ -} +GuardAI::GuardAI(Creature* creature) : ScriptedAI(creature) { } bool GuardAI::CanSeeAlways(WorldObject const* obj) { diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp index bc865b8b6aa..03ba024384f 100644 --- a/src/server/game/AI/CoreAI/TotemAI.cpp +++ b/src/server/game/AI/CoreAI/TotemAI.cpp @@ -40,9 +40,7 @@ TotemAI::TotemAI(Creature* c) : CreatureAI(c), i_victimGuid(0) ASSERT(c->IsTotem()); } -void TotemAI::MoveInLineOfSight(Unit* /*who*/) -{ -} +void TotemAI::MoveInLineOfSight(Unit* /*who*/) { } void TotemAI::EnterEvadeMode() { diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index f5d6932db00..837129fdaa6 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -448,9 +448,7 @@ BossAI::BossAI(Creature* creature, uint32 bossId) : ScriptedAI(creature), instance(creature->GetInstanceScript()), summons(creature), _boundary(instance ? instance->GetBossBoundary(bossId) : NULL), - _bossId(bossId) -{ -} + _bossId(bossId) { } void BossAI::_Reset() { @@ -584,9 +582,7 @@ void BossAI::UpdateAI(uint32 diff) WorldBossAI::WorldBossAI(Creature* creature) : ScriptedAI(creature), - summons(creature) -{ -} + summons(creature) { } void WorldBossAI::_Reset() { diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 2d5ac73b251..4ec0a3e52f2 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -674,9 +674,7 @@ void SmartAI::SummonedCreatureDespawn(Creature* unit) GetScript()->ProcessEventsFor(SMART_EVENT_SUMMON_DESPAWNED, unit); } -void SmartAI::UpdateAIWhileCharmed(const uint32 /*diff*/) -{ -} +void SmartAI::UpdateAIWhileCharmed(const uint32 /*diff*/) { } void SmartAI::CorpseRemoved(uint32& respawnDelay) { @@ -720,9 +718,7 @@ void SmartAI::SetData(uint32 id, uint32 value) GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, NULL, id, value); } -void SmartAI::SetGUID(uint64 /*guid*/, int32 /*id*/) -{ -} +void SmartAI::SetGUID(uint64 /*guid*/, int32 /*id*/) { } uint64 SmartAI::GetGUID(int32 /*id*/) const { @@ -755,9 +751,7 @@ void SmartAI::sGossipSelect(Player* player, uint32 sender, uint32 action) GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_SELECT, player, sender, action); } -void SmartAI::sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) -{ -} +void SmartAI::sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { } void SmartAI::sQuestAccept(Player* player, Quest const* quest) { diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 7ea6895d028..d064c5e62bc 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -3363,43 +3363,29 @@ void SmartScript::OnMoveInLineOfSight(Unit* who) } /* -void SmartScript::UpdateAIWhileCharmed(const uint32 diff) -{ -} +void SmartScript::UpdateAIWhileCharmed(const uint32 diff) { } -void SmartScript::DoAction(const int32 param) -{ -} +void SmartScript::DoAction(const int32 param) { } uint32 SmartScript::GetData(uint32 id) { return 0; } -void SmartScript::SetData(uint32 id, uint32 value) -{ -} +void SmartScript::SetData(uint32 id, uint32 value) { } -void SmartScript::SetGUID(uint64 guid, int32 id) -{ -} +void SmartScript::SetGUID(uint64 guid, int32 id) { } uint64 SmartScript::GetGUID(int32 id) { return 0; } -void SmartScript::MovepointStart(uint32 id) -{ -} +void SmartScript::MovepointStart(uint32 id) { } -void SmartScript::SetRun(bool run) -{ -} +void SmartScript::SetRun(bool run) { } -void SmartScript::SetMovePathEndAction(SMART_ACTION action) -{ -} +void SmartScript::SetMovePathEndAction(SMART_ACTION action) { } uint32 SmartScript::DoChat(int8 id, uint64 whisperGuid) { diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 1cff80ba10d..4d95b913e05 100644 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -25,9 +25,7 @@ #include "SHA1.h" #include "WorldSession.h" -AccountMgr::AccountMgr() -{ -} +AccountMgr::AccountMgr() { } AccountMgr::~AccountMgr() { diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 91e2473a260..2449aa76992 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -437,9 +437,7 @@ AchievementMgr::AchievementMgr(Player* player) m_player = player; } -AchievementMgr::~AchievementMgr() -{ -} +AchievementMgr::~AchievementMgr() { } void AchievementMgr::Reset() { diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index ef50746b9ea..7c3c1a59712 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -37,9 +37,7 @@ enum eAuctionHouse AH_MINIMUM_DEPOSIT = 100 }; -AuctionHouseMgr::AuctionHouseMgr() -{ -} +AuctionHouseMgr::AuctionHouseMgr() { } AuctionHouseMgr::~AuctionHouseMgr() { diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index c1bd511a554..8f0cc0c8688 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1894,9 +1894,7 @@ int32 Battleground::GetObjectType(uint64 guid) return -1; } -void Battleground::HandleKillUnit(Creature* /*victim*/, Player* /*killer*/) -{ -} +void Battleground::HandleKillUnit(Creature* /*victim*/, Player* /*killer*/) { } void Battleground::CheckArenaAfterTimerConditions() { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index da292d050e9..d7cb4af5a42 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -41,9 +41,7 @@ BattlegroundAB::BattlegroundAB() StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AB_HAS_BEGUN; } -BattlegroundAB::~BattlegroundAB() -{ -} +BattlegroundAB::~BattlegroundAB() { } void BattlegroundAB::PostUpdateImpl(uint32 diff) { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index f8c9e888176..d5d9ac7577f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -39,9 +39,7 @@ BattlegroundAV::BattlegroundAV() StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AV_HAS_BEGUN; } -BattlegroundAV::~BattlegroundAV() -{ -} +BattlegroundAV::~BattlegroundAV() { } uint16 BattlegroundAV::GetBonusHonor(uint8 kills) /// @todo move this function to Battleground.cpp (needs to find a way to get m_MaxLevel) { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index 95808065d62..600106dbdc1 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -50,9 +50,7 @@ BattlegroundEY::BattlegroundEY() StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_EY_HAS_BEGUN; } -BattlegroundEY::~BattlegroundEY() -{ -} +BattlegroundEY::~BattlegroundEY() { } void BattlegroundEY::PostUpdateImpl(uint32 diff) { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 0855408c932..60a725b3eb7 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -57,9 +57,7 @@ BattlegroundIC::BattlegroundIC() gunshipAlliance = NULL; } -BattlegroundIC::~BattlegroundIC() -{ -} +BattlegroundIC::~BattlegroundIC() { } void BattlegroundIC::HandlePlayerResurrect(Player* player) { @@ -842,9 +840,7 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go) SendMessage2ToAll(lang_entry, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (player->GetTeamId() == TEAM_ALLIANCE ? LANG_BG_IC_HORDE_KEEP : LANG_BG_IC_ALLIANCE_KEEP)); } -void BattlegroundIC::EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/) -{ -} +void BattlegroundIC::EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/) { } WorldSafeLocsEntry const* BattlegroundIC::GetClosestGraveYard(Player* player) { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp index 3ca9b6d4f72..d88c9c7a73f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp @@ -73,9 +73,7 @@ void BattlegroundRV::PostUpdateImpl(uint32 diff) setTimer(getTimer() - diff); } -void BattlegroundRV::StartingEventCloseDoors() -{ -} +void BattlegroundRV::StartingEventCloseDoors() { } void BattlegroundRV::StartingEventOpenDoors() { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 03c4b84b817..4eb56db700a 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -44,9 +44,7 @@ BattlegroundSA::BattlegroundSA() memset(&GraveyardStatus, 0, sizeof(GraveyardStatus)); } -BattlegroundSA::~BattlegroundSA() -{ -} +BattlegroundSA::~BattlegroundSA() { } void BattlegroundSA::Reset() { @@ -392,13 +390,9 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) } } -void BattlegroundSA::StartingEventCloseDoors() -{ -} +void BattlegroundSA::StartingEventCloseDoors() { } -void BattlegroundSA::StartingEventOpenDoors() -{ -} +void BattlegroundSA::StartingEventOpenDoors() { } void BattlegroundSA::FillInitialWorldStates(WorldPacket& data) { @@ -472,9 +466,7 @@ void BattlegroundSA::AddPlayer(Player* player) PlayerScores[player->GetGUID()] = sc; } -void BattlegroundSA::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/) -{ -} +void BattlegroundSA::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/) { } void BattlegroundSA::HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/) { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index 5e0cade9b37..f0e66d1e15d 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -56,9 +56,7 @@ BattlegroundWS::BattlegroundWS() _flagDebuffState = 0; } -BattlegroundWS::~BattlegroundWS() -{ -} +BattlegroundWS::~BattlegroundWS() { } void BattlegroundWS::PostUpdateImpl(uint32 diff) { diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp index d2a166c492c..3272ded7829 100644 --- a/src/server/game/Calendar/CalendarMgr.cpp +++ b/src/server/game/Calendar/CalendarMgr.cpp @@ -34,9 +34,7 @@ CalendarEvent::~CalendarEvent() sCalendarMgr->FreeEventId(_eventId); } -CalendarMgr::CalendarMgr() -{ -} +CalendarMgr::CalendarMgr() { } CalendarMgr::~CalendarMgr() { diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index 729bbb60bf7..3305492520b 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -536,9 +536,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss) return true; } -LinkExtractor::LinkExtractor(const char* msg) : _iss(msg) -{ -} +LinkExtractor::LinkExtractor(const char* msg) : _iss(msg) { } LinkExtractor::~LinkExtractor() { diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index b24979d9131..ed23a72bee1 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -390,9 +390,7 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileR //=================== ThreatManager ========================== //============================================================ -ThreatManager::ThreatManager(Unit* owner) : iCurrentVictim(NULL), iOwner(owner), iUpdateTimer(THREAT_UPDATE_INTERVAL) -{ -} +ThreatManager::ThreatManager(Unit* owner) : iCurrentVictim(NULL), iOwner(owner), iUpdateTimer(THREAT_UPDATE_INTERVAL) { } //============================================================ diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 933d77cc2e8..f6d6c47e96f 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -515,9 +515,7 @@ uint32 Condition::GetMaxAvailableConditionTargets() } } -ConditionMgr::ConditionMgr() -{ -} +ConditionMgr::ConditionMgr() { } ConditionMgr::~ConditionMgr() { diff --git a/src/server/game/DungeonFinding/LFGPlayerData.cpp b/src/server/game/DungeonFinding/LFGPlayerData.cpp index f285f01990d..305263cb73d 100644 --- a/src/server/game/DungeonFinding/LFGPlayerData.cpp +++ b/src/server/game/DungeonFinding/LFGPlayerData.cpp @@ -24,9 +24,7 @@ LfgPlayerData::LfgPlayerData(): m_State(LFG_STATE_NONE), m_OldState(LFG_STATE_NO m_Team(0), m_Group(0), m_Roles(0), m_Comment("") { } -LfgPlayerData::~LfgPlayerData() -{ -} +LfgPlayerData::~LfgPlayerData() { } void LfgPlayerData::SetState(LfgState state) { diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index 9dfbb0e9fb3..2a4096a45ae 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -32,9 +32,7 @@ namespace lfg { -LFGPlayerScript::LFGPlayerScript() : PlayerScript("LFGPlayerScript") -{ -} +LFGPlayerScript::LFGPlayerScript() : PlayerScript("LFGPlayerScript") { } void LFGPlayerScript::OnLevelChanged(Player* player, uint8 /*oldLevel*/) { @@ -120,9 +118,7 @@ void LFGPlayerScript::OnMapChanged(Player* player) player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW); } -LFGGroupScript::LFGGroupScript() : GroupScript("LFGGroupScript") -{ -} +LFGGroupScript::LFGGroupScript() : GroupScript("LFGGroupScript") { } void LFGGroupScript::OnAddMember(Group* group, uint64 guid) { diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp index ccceec7185b..58e21b5096c 100644 --- a/src/server/game/Entities/Corpse/Corpse.cpp +++ b/src/server/game/Entities/Corpse/Corpse.cpp @@ -41,9 +41,7 @@ Corpse::Corpse(CorpseType type) : WorldObject(type != CORPSE_BONES), m_type(type lootRecipient = NULL; } -Corpse::~Corpse() -{ -} +Corpse::~Corpse() { } void Corpse::AddToWorld() { diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp index ba4a4070e63..acf1e12b11b 100644 --- a/src/server/game/Entities/Object/Updates/UpdateData.cpp +++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp @@ -25,9 +25,7 @@ #include "World.h" #include "zlib.h" -UpdateData::UpdateData() : m_blockCount(0) -{ -} +UpdateData::UpdateData() : m_blockCount(0) { } void UpdateData::AddOutOfRangeGUID(std::set& guids) { diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 4f0d48d1a53..ea18a9836a7 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -22193,9 +22193,7 @@ inline void UpdateVisibilityOf_helper(std::set& s64, Player* target, std } template -inline void BeforeVisibilityDestroy(T* /*t*/, Player* /*p*/) -{ -} +inline void BeforeVisibilityDestroy(T* /*t*/, Player* /*p*/) { } template<> inline void BeforeVisibilityDestroy(Creature* t, Player* p) diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp index 8b37fef9500..6416455ebb6 100644 --- a/src/server/game/Entities/Player/SocialMgr.cpp +++ b/src/server/game/Entities/Player/SocialMgr.cpp @@ -191,13 +191,9 @@ bool PlayerSocial::HasIgnore(uint32 ignore_guid) return false; } -SocialMgr::SocialMgr() -{ -} +SocialMgr::SocialMgr() { } -SocialMgr::~SocialMgr() -{ -} +SocialMgr::~SocialMgr() { } void SocialMgr::GetFriendInfo(Player* player, uint32 friendGUID, FriendInfo &friendInfo) { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index ef6d9b9edef..f861d0cba7b 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -13570,9 +13570,7 @@ CharmInfo::CharmInfo(Unit* unit) } } -CharmInfo::~CharmInfo() -{ -} +CharmInfo::~CharmInfo() { } void CharmInfo::RestoreState() { diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 0d59b7fa2f4..892a23687de 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -1493,9 +1493,7 @@ void GameEventMgr::UpdateWorldStates(uint16 event_id, bool Activate) } } -GameEventMgr::GameEventMgr() : isSystemInit(false) -{ -} +GameEventMgr::GameEventMgr() : isSystemInit(false) { } void GameEventMgr::HandleQuestComplete(uint32 quest_id) { diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index 67474c1dca0..77d455d72a7 100644 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -39,13 +39,9 @@ #include -ObjectAccessor::ObjectAccessor() -{ -} +ObjectAccessor::ObjectAccessor() { } -ObjectAccessor::~ObjectAccessor() -{ -} +ObjectAccessor::~ObjectAccessor() { } template T* ObjectAccessor::GetObjectInWorld(uint32 mapid, float x, float y, uint64 guid, T* /*fake*/) { diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index be2fedfb70d..e43c624018e 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -77,9 +77,7 @@ class ObjectWorldLoader uint32 i_corpses; }; -template void ObjectGridLoader::SetObjectCell(T* /*obj*/, CellCoord const& /*cellCoord*/) -{ -} +template void ObjectGridLoader::SetObjectCell(T* /*obj*/, CellCoord const& /*cellCoord*/) { } template<> void ObjectGridLoader::SetObjectCell(Creature* obj, CellCoord const& cellCoord) { diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 8ec6aac9d4e..e5d737a7b36 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -39,13 +39,9 @@ Roll::Roll(uint64 _guid, LootItem const& li) : itemGUID(_guid), itemid(li.itemid), itemRandomPropId(li.randomPropertyId), itemRandomSuffix(li.randomSuffix), itemCount(li.count), totalPlayersRolling(0), totalNeed(0), totalGreed(0), totalPass(0), itemSlot(0), -rollVoteMask(ROLL_ALL_TYPE_NO_DISENCHANT) -{ -} +rollVoteMask(ROLL_ALL_TYPE_NO_DISENCHANT) { } -Roll::~Roll() -{ -} +Roll::~Roll() { } void Roll::setLoot(Loot* pLoot) { diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp index 7110768cf1f..31404113eca 100644 --- a/src/server/game/Handlers/AddonHandler.cpp +++ b/src/server/game/Handlers/AddonHandler.cpp @@ -22,13 +22,9 @@ #include "Opcodes.h" #include "Log.h" -AddonHandler::AddonHandler() -{ -} +AddonHandler::AddonHandler() { } -AddonHandler::~AddonHandler() -{ -} +AddonHandler::~AddonHandler() { } bool AddonHandler::BuildAddonPacket(WorldPacket* source, WorldPacket* target) { diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 418709c8407..791e2d4c816 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -476,9 +476,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket) pet->AddCreatureSpellCooldown(spellId); } -void WorldSession::HandleCancelGrowthAuraOpcode(WorldPacket& /*recvPacket*/) -{ -} +void WorldSession::HandleCancelGrowthAuraOpcode(WorldPacket& /*recvPacket*/) { } void WorldSession::HandleCancelAutoRepeatSpellOpcode(WorldPacket& /*recvPacket*/) { diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index d7ffb70ccfa..d552f822f0a 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -163,9 +163,7 @@ void InstanceSaveManager::RemoveInstanceSave(uint32 InstanceId) InstanceSave::InstanceSave(uint16 MapId, uint32 InstanceId, Difficulty difficulty, time_t resetTime, bool canReset) : m_resetTime(resetTime), m_instanceid(InstanceId), m_mapid(MapId), - m_difficulty(difficulty), m_canReset(canReset), m_toDelete(false) -{ -} + m_difficulty(difficulty), m_canReset(canReset), m_toDelete(false) { } InstanceSave::~InstanceSave() { diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp index 2fa0a03e63f..fd4bcbd5dc0 100644 --- a/src/server/game/Mails/Mail.cpp +++ b/src/server/game/Mails/Mail.cpp @@ -62,9 +62,7 @@ MailSender::MailSender(CalendarEvent* sender) } MailSender::MailSender(AuctionEntry* sender) - : m_messageType(MAIL_AUCTION), m_senderId(sender->GetHouseId()), m_stationery(MAIL_STATIONERY_AUCTION) -{ -} + : m_messageType(MAIL_AUCTION), m_senderId(sender->GetHouseId()), m_stationery(MAIL_STATIONERY_AUCTION) { } MailSender::MailSender(Player* sender) { @@ -73,9 +71,7 @@ MailSender::MailSender(Player* sender) m_senderId = sender->GetGUIDLow(); } -MailReceiver::MailReceiver(Player* receiver) : m_receiver(receiver), m_receiver_lowguid(receiver->GetGUIDLow()) -{ -} +MailReceiver::MailReceiver(Player* receiver) : m_receiver(receiver), m_receiver_lowguid(receiver->GetGUIDLow()) { } MailReceiver::MailReceiver(Player* receiver, uint32 receiver_lowguid) : m_receiver(receiver), m_receiver_lowguid(receiver_lowguid) { diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 8d279ccba5e..64c3a186d33 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -295,9 +295,7 @@ void Map::AddToGrid(GameObject* obj, Cell const& cell) } template -void Map::SwitchGridContainers(T* /*obj*/, bool /*on*/) -{ -} +void Map::SwitchGridContainers(T* /*obj*/, bool /*on*/) { } template<> void Map::SwitchGridContainers(Creature* obj, bool on) @@ -492,9 +490,7 @@ bool Map::AddPlayerToMap(Player* player) } template -void Map::InitializeObject(T* /*obj*/) -{ -} +void Map::InitializeObject(T* /*obj*/) { } template<> void Map::InitializeObject(Creature* obj) @@ -2561,9 +2557,7 @@ void Map::AddToActive(DynamicObject* d) } template -void Map::RemoveFromActive(T* /*obj*/) -{ -} +void Map::RemoveFromActive(T* /*obj*/) { } template <> void Map::RemoveFromActive(Creature* c) diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index 5aa8b85fbca..2d9366cba23 100644 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -45,9 +45,7 @@ MapManager::MapManager() i_timer.SetInterval(sWorld->getIntConfig(CONFIG_INTERVAL_MAPUPDATE)); } -MapManager::~MapManager() -{ -} +MapManager::~MapManager() { } void MapManager::Initialize() { @@ -296,9 +294,7 @@ void MapManager::Update(uint32 diff) i_timer.SetCurrent(0); } -void MapManager::DoDelayedMovesAndRemoves() -{ -} +void MapManager::DoDelayedMovesAndRemoves() { } bool MapManager::ExistMapAndVMap(uint32 mapid, float x, float y) { diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp index 5e5f520505c..f3a5a66bf66 100644 --- a/src/server/game/Maps/MapUpdater.cpp +++ b/src/server/game/Maps/MapUpdater.cpp @@ -58,9 +58,7 @@ class MapUpdateRequest : public ACE_Method_Request }; MapUpdater::MapUpdater(): -m_executor(), m_mutex(), m_condition(m_mutex), pending_requests(0) -{ -} +m_executor(), m_mutex(), m_condition(m_mutex), pending_requests(0) { } MapUpdater::~MapUpdater() { diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp index fe49be5607d..c0da12c5614 100644 --- a/src/server/game/Maps/TransportMgr.cpp +++ b/src/server/game/Maps/TransportMgr.cpp @@ -32,13 +32,9 @@ TransportTemplate::~TransportTemplate() delete *itr; } -TransportMgr::TransportMgr() -{ -} +TransportMgr::TransportMgr() { } -TransportMgr::~TransportMgr() -{ -} +TransportMgr::~TransportMgr() { } void TransportMgr::Unload() { diff --git a/src/server/game/Movement/MovementGenerator.cpp b/src/server/game/Movement/MovementGenerator.cpp index 408614833bb..b102f554c2f 100644 --- a/src/server/game/Movement/MovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerator.cpp @@ -18,6 +18,4 @@ #include "MovementGenerator.h" -MovementGenerator::~MovementGenerator() -{ -} +MovementGenerator::~MovementGenerator() { } diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp index a94ef5d4f87..2d9fe4dd27f 100644 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp @@ -39,9 +39,7 @@ void HomeMovementGenerator::DoFinalize(Creature* owner) } } -void HomeMovementGenerator::DoReset(Creature*) -{ -} +void HomeMovementGenerator::DoReset(Creature*) { } void HomeMovementGenerator::_setTargetLocation(Creature* owner) { diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp index 917872c5960..f4968b21bd8 100755 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp @@ -102,9 +102,7 @@ void PointMovementGenerator::DoReset(T* unit) } template -void PointMovementGenerator::MovementInform(T* /*unit*/) -{ -} +void PointMovementGenerator::MovementInform(T* /*unit*/) { } template <> void PointMovementGenerator::MovementInform(Creature* unit) { diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index f457443dc8c..f71eddd2f89 100644 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -216,9 +216,7 @@ void ChaseMovementGenerator::DoReset(T* owner) } template -void ChaseMovementGenerator::MovementInform(T* /*unit*/) -{ -} +void ChaseMovementGenerator::MovementInform(T* /*unit*/) { } template<> void ChaseMovementGenerator::MovementInform(Creature* unit) @@ -290,9 +288,7 @@ void FollowMovementGenerator::DoReset(T* owner) } template -void FollowMovementGenerator::MovementInform(T* /*unit*/) -{ -} +void FollowMovementGenerator::MovementInform(T* /*unit*/) { } template<> void FollowMovementGenerator::MovementInform(Creature* unit) diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp index 27df7b8a47f..406ac95322a 100644 --- a/src/server/game/Movement/Waypoints/WaypointManager.cpp +++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp @@ -22,9 +22,7 @@ #include "MapManager.h" #include "Log.h" -WaypointMgr::WaypointMgr() -{ -} +WaypointMgr::WaypointMgr() { } WaypointMgr::~WaypointMgr() { diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index 73b5399fa89..4d68e03a1c6 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -231,9 +231,7 @@ void OutdoorPvP::DeleteSpawns() m_capturePoints.clear(); } -OutdoorPvP::OutdoorPvP() : m_sendUpdate(true) -{ -} +OutdoorPvP::OutdoorPvP() : m_sendUpdate(true) { } OutdoorPvP::~OutdoorPvP() { @@ -257,9 +255,7 @@ void OutdoorPvP::HandlePlayerLeaveZone(Player* player, uint32 /*zone*/) TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "Player %s left an outdoorpvp zone", player->GetName().c_str()); } -void OutdoorPvP::HandlePlayerResurrects(Player* /*player*/, uint32 /*zone*/) -{ -} +void OutdoorPvP::HandlePlayerResurrects(Player* /*player*/, uint32 /*zone*/) { } bool OutdoorPvP::Update(uint32 diff) { diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index 1ea2ff9894a..8cb0c8e6191 100644 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -525,22 +525,16 @@ void PoolGroup::ReSpawn1Object(PoolObject* obj) // Nothing to do for a child Pool template <> -void PoolGroup::ReSpawn1Object(PoolObject* /*obj*/) -{ -} +void PoolGroup::ReSpawn1Object(PoolObject* /*obj*/) { } // Nothing to do for a quest template <> -void PoolGroup::ReSpawn1Object(PoolObject* /*obj*/) -{ -} +void PoolGroup::ReSpawn1Object(PoolObject* /*obj*/) { } //////////////////////////////////////////////////////////// // Methods of class PoolMgr -PoolMgr::PoolMgr() : max_pool_id(0) -{ -} +PoolMgr::PoolMgr() : max_pool_id(0) { } void PoolMgr::Initialize() { diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 26b3bb5f78f..c74cf1735ff 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -176,13 +176,9 @@ struct TSpellSummary } *SpellSummary; ScriptMgr::ScriptMgr() - : _scriptCount(0), _scheduledScripts(0) -{ -} + : _scriptCount(0), _scheduledScripts(0) { } -ScriptMgr::~ScriptMgr() -{ -} +ScriptMgr::~ScriptMgr() { } void ScriptMgr::Initialize() { diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp index 57a77773d52..12da93fb537 100644 --- a/src/server/game/Server/WorldSocketMgr.cpp +++ b/src/server/game/Server/WorldSocketMgr.cpp @@ -217,9 +217,7 @@ WorldSocketMgr::WorldSocketMgr() : m_SockOutKBuff(-1), m_SockOutUBuff(65536), m_UseNoDelay(true), - m_Acceptor (0) -{ -} + m_Acceptor (0) { } WorldSocketMgr::~WorldSocketMgr() { diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index e91bba13fa0..a28d4d8cf5b 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -99,9 +99,7 @@ SpellCastTargets::SpellCastTargets() : m_elevation(0), m_speed(0), m_strTarget() m_targetMask = 0; } -SpellCastTargets::~SpellCastTargets() -{ -} +SpellCastTargets::~SpellCastTargets() { } void SpellCastTargets::Read(ByteBuffer& data, Unit* caster) { @@ -7375,9 +7373,7 @@ bool WorldObjectSpellTargetCheck::operator()(WorldObject* target) WorldObjectSpellNearbyTargetCheck::WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList) - : WorldObjectSpellTargetCheck(caster, caster, spellInfo, selectionType, condList), _range(range), _position(caster) -{ -} + : WorldObjectSpellTargetCheck(caster, caster, spellInfo, selectionType, condList), _range(range), _position(caster) { } bool WorldObjectSpellNearbyTargetCheck::operator()(WorldObject* target) { @@ -7392,9 +7388,7 @@ bool WorldObjectSpellNearbyTargetCheck::operator()(WorldObject* target) WorldObjectSpellAreaTargetCheck::WorldObjectSpellAreaTargetCheck(float range, Position const* position, Unit* caster, Unit* referer, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList) - : WorldObjectSpellTargetCheck(caster, referer, spellInfo, selectionType, condList), _range(range), _position(position) -{ -} + : WorldObjectSpellTargetCheck(caster, referer, spellInfo, selectionType, condList), _range(range), _position(position) { } bool WorldObjectSpellAreaTargetCheck::operator()(WorldObject* target) { @@ -7405,9 +7399,7 @@ bool WorldObjectSpellAreaTargetCheck::operator()(WorldObject* target) WorldObjectSpellConeTargetCheck::WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit* caster, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList) - : WorldObjectSpellAreaTargetCheck(range, caster, caster, caster, spellInfo, selectionType, condList), _coneAngle(coneAngle) -{ -} + : WorldObjectSpellAreaTargetCheck(range, caster, caster, caster, spellInfo, selectionType, condList), _coneAngle(coneAngle) { } bool WorldObjectSpellConeTargetCheck::operator()(WorldObject* target) { @@ -7430,9 +7422,7 @@ bool WorldObjectSpellConeTargetCheck::operator()(WorldObject* target) } WorldObjectSpellTrajTargetCheck::WorldObjectSpellTrajTargetCheck(float range, Position const* position, Unit* caster, SpellInfo const* spellInfo) - : WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, TARGET_CHECK_DEFAULT, NULL) -{ -} + : WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, TARGET_CHECK_DEFAULT, NULL) { } bool WorldObjectSpellTrajTargetCheck::operator()(WorldObject* target) { diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 52ffb2ff525..6138cbef773 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -347,9 +347,7 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group) } } -SpellMgr::SpellMgr() -{ -} +SpellMgr::SpellMgr() { } SpellMgr::~SpellMgr() { diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index bb9aab023af..172a9dbcc52 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -204,9 +204,7 @@ void SpellScript::HitHandler::Call(SpellScript* spellScript) } SpellScript::TargetHook::TargetHook(uint8 _effectIndex, uint16 _targetType, bool _area) - : _SpellScript::EffectHook(_effectIndex), targetType(_targetType), area(_area) -{ -} + : _SpellScript::EffectHook(_effectIndex), targetType(_targetType), area(_area) { } std::string SpellScript::TargetHook::ToString() { @@ -727,9 +725,7 @@ void AuraScript::AuraDispelHandler::Call(AuraScript* auraScript, DispelInfo* _di } AuraScript::EffectBase::EffectBase(uint8 _effIndex, uint16 _effName) - : _SpellScript::EffectAuraNameCheck(_effName), _SpellScript::EffectHook(_effIndex) -{ -} + : _SpellScript::EffectAuraNameCheck(_effName), _SpellScript::EffectHook(_effIndex) { } bool AuraScript::EffectBase::CheckEffect(SpellInfo const* spellEntry, uint8 effIndex) { diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp index 4cb7a8ffc18..608f0a1ace5 100644 --- a/src/server/game/Tickets/TicketMgr.cpp +++ b/src/server/game/Tickets/TicketMgr.cpp @@ -240,9 +240,7 @@ void GmTicket::SetChatLog(std::list time, std::string const& log) /////////////////////////////////////////////////////////////////////////////////////////////////// // Ticket manager TicketMgr::TicketMgr() : _status(true), _lastTicketId(0), _lastSurveyId(0), _openTicketCount(0), - _lastChange(time(NULL)) -{ -} + _lastChange(time(NULL)) { } TicketMgr::~TicketMgr() { diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp index f02cbf321b3..5e2cd82f6cc 100644 --- a/src/server/game/Warden/Warden.cpp +++ b/src/server/game/Warden/Warden.cpp @@ -30,9 +30,7 @@ #include "Warden.h" #include "AccountMgr.h" -Warden::Warden() : _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0), _dataSent(false), _initialized(false) -{ -} +Warden::Warden() : _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0), _dataSent(false), _initialized(false) { } Warden::~Warden() { diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp index a8bcd61db73..cdd2a2f6bac 100644 --- a/src/server/game/Warden/WardenCheckMgr.cpp +++ b/src/server/game/Warden/WardenCheckMgr.cpp @@ -25,9 +25,7 @@ #include "WardenCheckMgr.h" #include "Warden.h" -WardenCheckMgr::WardenCheckMgr() -{ -} +WardenCheckMgr::WardenCheckMgr() { } WardenCheckMgr::~WardenCheckMgr() { diff --git a/src/server/game/Warden/WardenMac.cpp b/src/server/game/Warden/WardenMac.cpp index 27e859e741d..1cd4a4ea877 100644 --- a/src/server/game/Warden/WardenMac.cpp +++ b/src/server/game/Warden/WardenMac.cpp @@ -30,13 +30,9 @@ #include "WardenMac.h" #include "WardenModuleMac.h" -WardenMac::WardenMac() : Warden() -{ -} +WardenMac::WardenMac() : Warden() { } -WardenMac::~WardenMac() -{ -} +WardenMac::~WardenMac() { } void WardenMac::Init(WorldSession* pClient, BigNumber* K) { diff --git a/src/server/game/Warden/WardenWin.cpp b/src/server/game/Warden/WardenWin.cpp index 60a1fecedc9..a9fcc041ff6 100644 --- a/src/server/game/Warden/WardenWin.cpp +++ b/src/server/game/Warden/WardenWin.cpp @@ -34,13 +34,9 @@ #include "WardenCheckMgr.h" #include "AccountMgr.h" -WardenWin::WardenWin() : Warden() -{ -} +WardenWin::WardenWin() : Warden() { } -WardenWin::~WardenWin() -{ -} +WardenWin::~WardenWin() { } void WardenWin::Init(WorldSession* session, BigNumber* k) { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp index 2db77197eb0..4b190f04a70 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp @@ -62,6 +62,4 @@ enum LiadrinnSpeeches #define CS_GOSSIP3 "Why did they stop?" #define CS_GOSSIP4 "Your insight is appreciated." -void AddSC_sunwell_plateau() -{ -} +void AddSC_sunwell_plateau() { } diff --git a/src/server/shared/DataStores/DBCFileLoader.cpp b/src/server/shared/DataStores/DBCFileLoader.cpp index 5e82579d29d..0aa94f1d14a 100644 --- a/src/server/shared/DataStores/DBCFileLoader.cpp +++ b/src/server/shared/DataStores/DBCFileLoader.cpp @@ -23,9 +23,7 @@ #include "DBCFileLoader.h" #include "Errors.h" -DBCFileLoader::DBCFileLoader() : fieldsOffset(NULL), data(NULL), stringTable(NULL) -{ -} +DBCFileLoader::DBCFileLoader() : fieldsOffset(NULL), data(NULL), stringTable(NULL) { } bool DBCFileLoader::Load(const char* filename, const char* fmt) { diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index 4307cab98f2..25ffbc18614 100644 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -41,9 +41,7 @@ m_queue(NULL), m_worker(NULL), m_Mysql(NULL), m_connectionInfo(connInfo), -m_connectionFlags(CONNECTION_SYNCH) -{ -} +m_connectionFlags(CONNECTION_SYNCH) { } MySQLConnection::MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInfo& connInfo) : m_reconnecting(false), diff --git a/src/server/shared/Database/PreparedStatement.cpp b/src/server/shared/Database/PreparedStatement.cpp index 24097ca41c5..84f1e1b6fd1 100644 --- a/src/server/shared/Database/PreparedStatement.cpp +++ b/src/server/shared/Database/PreparedStatement.cpp @@ -21,13 +21,9 @@ PreparedStatement::PreparedStatement(uint32 index) : m_stmt(NULL), -m_index(index) -{ -} +m_index(index) { } -PreparedStatement::~PreparedStatement() -{ -} +PreparedStatement::~PreparedStatement() { } void PreparedStatement::BindParameters() { @@ -451,16 +447,12 @@ std::string MySQLPreparedStatement::getQueryString(std::string const& sqlPattern //- Execution PreparedStatementTask::PreparedStatementTask(PreparedStatement* stmt) : m_stmt(stmt), -m_has_result(false) -{ -} +m_has_result(false) { } PreparedStatementTask::PreparedStatementTask(PreparedStatement* stmt, PreparedQueryResultFuture result) : m_stmt(stmt), m_has_result(true), -m_result(result) -{ -} +m_result(result) { } PreparedStatementTask::~PreparedStatementTask() diff --git a/src/server/shared/Dynamic/TypeContainerVisitor.h b/src/server/shared/Dynamic/TypeContainerVisitor.h index d09a12f22c3..8ca3ee8dbc4 100644 --- a/src/server/shared/Dynamic/TypeContainerVisitor.h +++ b/src/server/shared/Dynamic/TypeContainerVisitor.h @@ -38,9 +38,7 @@ template void VisitorHelper(VISITOR &v, TYP } // terminate condition for container list -template void VisitorHelper(VISITOR &/*v*/, ContainerList &/*c*/) -{ -} +template void VisitorHelper(VISITOR &/*v*/, ContainerList &/*c*/) { } template void VisitorHelper(VISITOR &v, ContainerList &c) { @@ -55,9 +53,7 @@ template void VisitorHelper(VISITOR &v, Contain } // terminate condition container map list -template void VisitorHelper(VISITOR &/*v*/, ContainerMapList &/*c*/) -{ -} +template void VisitorHelper(VISITOR &/*v*/, ContainerMapList &/*c*/) { } template void VisitorHelper(VISITOR &v, ContainerMapList &c) { @@ -77,9 +73,7 @@ template void VisitorHelper(VISITOR &v, ContainerArrayLi v.Visit(c._element); } -template void VisitorHelper(VISITOR &/*v*/, ContainerArrayList &/*c*/) -{ -} +template void VisitorHelper(VISITOR &/*v*/, ContainerArrayList &/*c*/) { } // recursion template void VisitorHelper(VISITOR &v, ContainerArrayList > &c) diff --git a/src/server/shared/Logging/Appender.cpp b/src/server/shared/Logging/Appender.cpp index f47cbc3b095..89fe8d39a1d 100644 --- a/src/server/shared/Logging/Appender.cpp +++ b/src/server/shared/Logging/Appender.cpp @@ -33,13 +33,9 @@ std::string LogMessage::getTimeStr() } Appender::Appender(uint8 _id, std::string const& _name, AppenderType _type /* = APPENDER_NONE*/, LogLevel _level /* = LOG_LEVEL_DISABLED */, AppenderFlags _flags /* = APPENDER_FLAGS_NONE */): -id(_id), name(_name), type(_type), level(_level), flags(_flags) -{ -} +id(_id), name(_name), type(_type), level(_level), flags(_flags) { } -Appender::~Appender() -{ -} +Appender::~Appender() { } uint8 Appender::getId() const { diff --git a/src/server/shared/Logging/AppenderDB.cpp b/src/server/shared/Logging/AppenderDB.cpp index ae5fc17de73..8b237277d79 100644 --- a/src/server/shared/Logging/AppenderDB.cpp +++ b/src/server/shared/Logging/AppenderDB.cpp @@ -19,13 +19,9 @@ #include "Database/DatabaseEnv.h" AppenderDB::AppenderDB(uint8 id, std::string const& name, LogLevel level) - : Appender(id, name, APPENDER_DB, level), realmId(0), enabled(false) -{ -} + : Appender(id, name, APPENDER_DB, level), realmId(0), enabled(false) { } -AppenderDB::~AppenderDB() -{ -} +AppenderDB::~AppenderDB() { } void AppenderDB::_write(LogMessage const& message) { diff --git a/src/server/shared/Logging/Logger.cpp b/src/server/shared/Logging/Logger.cpp index 641a9ea1a4b..5cb0d0966f4 100644 --- a/src/server/shared/Logging/Logger.cpp +++ b/src/server/shared/Logging/Logger.cpp @@ -17,9 +17,7 @@ #include "Logger.h" -Logger::Logger(): name(""), type(LOG_FILTER_GENERAL), level(LOG_LEVEL_DISABLED) -{ -} +Logger::Logger(): name(""), type(LOG_FILTER_GENERAL), level(LOG_LEVEL_DISABLED) { } void Logger::Create(std::string const& _name, LogFilterType _type, LogLevel _level) { diff --git a/src/server/shared/Threading/DelayExecutor.cpp b/src/server/shared/Threading/DelayExecutor.cpp index 685e86e2a2f..ba8a19429b2 100644 --- a/src/server/shared/Threading/DelayExecutor.cpp +++ b/src/server/shared/Threading/DelayExecutor.cpp @@ -10,9 +10,7 @@ DelayExecutor* DelayExecutor::instance() } DelayExecutor::DelayExecutor() - : pre_svc_hook_(0), post_svc_hook_(0), activated_(false) -{ -} + : pre_svc_hook_(0), post_svc_hook_(0), activated_(false) { } DelayExecutor::~DelayExecutor() { -- cgit v1.2.3