diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index e95fbf9d2d9..6517f8157b7 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -1694,7 +1694,7 @@ bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry) // completed as have req. count of completed criterias if(achievementForTestCount > 0 && achievementForTestCount <= count) - return true; + return true; } // all criterias completed requirement diff --git a/src/game/BattleGroundAV.cpp b/src/game/BattleGroundAV.cpp index bd84ac0f91b..8f45038f6d9 100644 --- a/src/game/BattleGroundAV.cpp +++ b/src/game/BattleGroundAV.cpp @@ -265,7 +265,7 @@ void BattleGroundAV::Update(uint32 diff) if (m_Nodes[i].Timer > diff) m_Nodes[i].Timer -= diff; else - EventPlayerDestroyedPoint(i); + EventPlayerDestroyedPoint(i); } } } @@ -477,9 +477,9 @@ void BattleGroundAV::ChangeMineOwner(uint8 mine, uint32 team) bool BattleGroundAV::PlayerCanDoMineQuest(int32 GOId, uint32 team) { if (GOId == BG_AV_OBJECTID_MINE_N) - return (m_Mine_Owner[BG_AV_NORTH_MINE] == GetTeamIndexByTeamId(team)); + return (m_Mine_Owner[BG_AV_NORTH_MINE] == GetTeamIndexByTeamId(team)); if (GOId == BG_AV_OBJECTID_MINE_S) - return (m_Mine_Owner[BG_AV_SOUTH_MINE] == GetTeamIndexByTeamId(team)); + return (m_Mine_Owner[BG_AV_SOUTH_MINE] == GetTeamIndexByTeamId(team)); return true; // cause it's no mine'object it is ok if this is true } diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index a2bbe46bbe5..1047447c294 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -2239,7 +2239,7 @@ uint32 ChatHandler::extractAccountId(char* args, std::string* accountName /*= NU if (accountName) sAccountMgr.GetName(account_id, *accountName); - + if (targetIfNullArg) *targetIfNullArg = targetPlayer; diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index 8318f538958..d4cb2cd0f9c 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -337,7 +337,7 @@ struct AchievementCriteriaEntry uint32 rollValue; // 3 uint32 count; // 4 } roll_need_on_loot; - // ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51 + // ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT = 51 struct { uint32 rollValue; // 3 diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 01d18bccbaf..e9e77ff1c34 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -961,7 +961,7 @@ bool ChatHandler::HandleAccountSetPasswordCommand(const char* args) uint32 targetAccountId = extractAccountId((char*)args, &account_name); if (!targetAccountId) return false; - + char *szPassword1 = strtok (NULL," "); char *szPassword2 = strtok (NULL," "); if (!szPassword1 || !szPassword2) diff --git a/src/game/Map.cpp b/src/game/Map.cpp index c86066ca031..79d623bd7e6 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1560,13 +1560,13 @@ inline ZLiquidStatus GridMap::getLiquidStatus(float x, float y, float z, uint8 R int delta = int((liquid_level - z) * 10); // Get position delta - if (delta > 20) // Under water + if (delta > 20) // Under water return LIQUID_MAP_UNDER_WATER; - if (delta > 0 ) // In water + if (delta > 0 ) // In water return LIQUID_MAP_IN_WATER; - if (delta > -1) // Walk on water + if (delta > -1) // Walk on water return LIQUID_MAP_WATER_WALK; - // Above water + // Above water return LIQUID_MAP_ABOVE_WATER; } diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index da25068b8f4..bf03a30467e 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -1312,7 +1312,7 @@ void WorldSession::HandleSetTitleOpcode( WorldPacket & recv_data ) // -1 at none if(title > 0 && title < MAX_TITLE_INDEX) { - if(!GetPlayer()->HasTitle(title)) + if(!GetPlayer()->HasTitle(title)) return; } else diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index 73187de8dff..c43ce0f4f2f 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -421,7 +421,7 @@ void MotionMaster::propagateSpeedChange() MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType() const { if(empty()) - return IDLE_MOTION_TYPE; + return IDLE_MOTION_TYPE; return top()->GetMovementGeneratorType(); } @@ -429,7 +429,7 @@ MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType() const bool MotionMaster::GetDestination(float &x, float &y, float &z) { if(empty()) - return false; + return false; return top()->GetDestination(x,y,z); } diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 01ac0b42a10..95a5b4f8bd0 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -466,7 +466,7 @@ void Pet::setDeathState(DeathState s) // overwrite virtual SetUInt32Value( UNIT_DYNAMIC_FLAGS, 0x00 ); RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); - //lose happiness when died and not in BG/Arena + //lose happiness when died and not in BG/Arena MapEntry const* mapEntry = sMapStore.LookupEntry(GetMapId()); if(!mapEntry || (mapEntry->map_type != MAP_ARENA && mapEntry->map_type != MAP_BATTLEGROUND)) ModifyPower(POWER_HAPPINESS, -HAPPINESS_LEVEL_SIZE); diff --git a/src/game/RandomMovementGenerator.cpp b/src/game/RandomMovementGenerator.cpp index 27ae9a4bfe0..4ada553a6ab 100644 --- a/src/game/RandomMovementGenerator.cpp +++ b/src/game/RandomMovementGenerator.cpp @@ -178,8 +178,8 @@ bool RandomMovementGenerator::Update(Creature &creature, const uint32 } else if (creature.isPet() && creature.GetOwner() && !creature.IsWithinDist(creature.GetOwner(), PET_FOLLOW_DIST+2.5f)) { - creature.AddSplineFlag(SPLINEFLAG_WALKMODE); - _setRandomLocation(creature); + creature.AddSplineFlag(SPLINEFLAG_WALKMODE); + _setRandomLocation(creature); } } return true; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 9f95827a1e8..9ee5f82449c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5258,8 +5258,8 @@ SpellCastResult Spell::CheckCasterAuras() const { if(!(*itr)->isAffectedOnSpell(m_spellInfo)) { - prevented_reason = SPELL_FAILED_CASTER_AURASTATE; - break; + prevented_reason = SPELL_FAILED_CASTER_AURASTATE; + break; } } } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index f84cefe9e57..67a83887ab2 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3998,7 +3998,7 @@ void Aura::HandleModStealth(bool apply, bool Real) if (apply) { // drop flag at stealth in bg - m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION); + m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION); // only at real aura add if (Real) @@ -4082,7 +4082,7 @@ void Aura::HandleInvisibility(bool apply, bool Real) { m_target->m_invisibilityMask |= (1 << m_modifier.m_miscvalue); - m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION); + m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION); if(Real && m_target->GetTypeId()==TYPEID_PLAYER) { @@ -5001,7 +5001,7 @@ void Aura::HandlePeriodicDamagePCT(bool apply, bool /*Real*/) void Aura::HandlePeriodicLeech(bool apply, bool /*Real*/) { m_isPeriodic = apply; - + // For prevent double apply bonuses bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading()); @@ -6898,7 +6898,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real) //Borrowed Time Unit::AuraList const& borrowedTime = caster->GetAurasByType(SPELL_AURA_DUMMY); for(Unit::AuraList::const_iterator itr = borrowedTime.begin(); itr != borrowedTime.end(); ++itr) - { + { SpellEntry const* i_spell = (*itr)->GetSpellProto(); if(i_spell->SpellFamilyName==SPELLFAMILY_PRIEST && i_spell->SpellIconID == 2899 && i_spell->EffectMiscValue[(*itr)->GetEffIndex()] == 24) { @@ -7082,7 +7082,7 @@ void Aura::PeriodicTick() else pdamage = uint32(m_target->GetMaxHealth()*amount/100); - + // SpellDamageBonus for magic spells if(GetSpellProto()->DmgClass == SPELL_DAMAGE_CLASS_NONE || GetSpellProto()->DmgClass == SPELL_DAMAGE_CLASS_MAGIC) pdamage = m_target->SpellDamageBonusTaken(pCaster, GetSpellProto(), pdamage, DOT, GetStackAmount()); @@ -8304,19 +8304,19 @@ void Aura::HandleAuraModAllCritChance(bool apply, bool Real) void Aura::HandleAllowOnlyAbility(bool apply, bool Real) { if(!Real) - return; + return; if(apply) { - m_target->setAttackTimer(BASE_ATTACK,m_duration); - m_target->setAttackTimer(RANGED_ATTACK,m_duration); - m_target->setAttackTimer(OFF_ATTACK,m_duration); + m_target->setAttackTimer(BASE_ATTACK,m_duration); + m_target->setAttackTimer(RANGED_ATTACK,m_duration); + m_target->setAttackTimer(OFF_ATTACK,m_duration); } else { - m_target->resetAttackTimer(BASE_ATTACK); - m_target->resetAttackTimer(RANGED_ATTACK); - m_target->resetAttackTimer(OFF_ATTACK); + m_target->resetAttackTimer(BASE_ATTACK); + m_target->resetAttackTimer(RANGED_ATTACK); + m_target->resetAttackTimer(OFF_ATTACK); } m_target->UpdateDamagePhysical(BASE_ATTACK); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 8048d526e92..e14845d14d3 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -663,7 +663,7 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx) if (m_spellInfo->SpellIconID == 1578) { if (m_caster->HasAura(57627)) // Charge 6 sec post-affect - damage *= 2; + damage *= 2; } // Mongoose Bite else if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x000000002)) && m_spellInfo->SpellVisual[0]==342) @@ -2300,8 +2300,8 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) ((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000200000)) && (*itr)->GetCastItemGUID() == item->GetGUID()) { - m_damage += m_damage * damage / 100; - return; + m_damage += m_damage * damage / 100; + return; } } } @@ -3781,7 +3781,7 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx) case SUMMON_PROP_TYPE_DK: case SUMMON_PROP_TYPE_CONSTRUCT: { - // JC golems - 32804, etc -- fits much better totem AI + // JC golems - 32804, etc -- fits much better totem AI if(m_spellInfo->SpellIconID == 2056) DoSummonTotem(eff_idx); if(prop_id == 832) // scrapbot @@ -6962,13 +6962,13 @@ void Spell::DoSummonCritter(SpellEffectIndex eff_idx, uint32 forceFaction) // If dest location if present if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION) { - x = m_targets.m_destX; - y = m_targets.m_destY; - z = m_targets.m_destZ; + x = m_targets.m_destX; + y = m_targets.m_destY; + z = m_targets.m_destZ; } // Summon if dest location not present near caster else - m_caster->GetClosePoint(x, y, z, critter->GetObjectSize()); + m_caster->GetClosePoint(x, y, z, critter->GetObjectSize()); critter->Relocate(x, y, z, m_caster->GetOrientation()); critter->SetSummonPoint(x, y, z, m_caster->GetOrientation()); diff --git a/src/game/Transports.cpp b/src/game/Transports.cpp index c39bec59dc0..b54152df5aa 100644 --- a/src/game/Transports.cpp +++ b/src/game/Transports.cpp @@ -90,7 +90,7 @@ void MapManager::LoadTransports() uint32 mapid; x = t->m_WayPoints[0].x; y = t->m_WayPoints[0].y; z = t->m_WayPoints[0].z; mapid = t->m_WayPoints[0].mapid; o = 1; - // creates the Gameobject + // creates the Gameobject if(!t->Create(entry, mapid, x, y, z, o, 100, 0)) { delete t; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 99a138c4b08..f5ea1b8f07c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1340,13 +1340,13 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da // Physical Immune check if (damageInfo->target->IsImmunedToDamage(damageInfo->damageSchoolMask)) { - damageInfo->HitInfo |= HITINFO_NORMALSWING; - damageInfo->TargetState = VICTIMSTATE_IS_IMMUNE; + damageInfo->HitInfo |= HITINFO_NORMALSWING; + damageInfo->TargetState = VICTIMSTATE_IS_IMMUNE; - damageInfo->procEx |=PROC_EX_IMMUNE; - damageInfo->damage = 0; - damageInfo->cleanDamage = 0; - return; + damageInfo->procEx |=PROC_EX_IMMUNE; + damageInfo->damage = 0; + damageInfo->cleanDamage = 0; + return; } damage += CalculateDamage (damageInfo->attackType, false); // Add melee damage bonus @@ -1671,33 +1671,33 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss) AuraList const& vDamageShields = pVictim->GetAurasByType(SPELL_AURA_DAMAGE_SHIELD); for(AuraList::const_iterator i = vDamageShields.begin(); i != vDamageShields.end();) { - if (alreadyDone.find(*i) == alreadyDone.end()) - { - alreadyDone.insert(*i); - uint32 damage=(*i)->GetModifier()->m_amount; - SpellEntry const *i_spellProto = (*i)->GetSpellProto(); - //Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist? - //uint32 absorb; - //uint32 resist; - //CalcAbsorbResist(pVictim, SpellSchools(spellProto->School), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist); - //damage-=absorb + resist; - - pVictim->DealDamageMods(this,damage,NULL); - - WorldPacket data(SMSG_SPELLDAMAGESHIELD,(8+8+4+4+4+4)); - data << uint64(pVictim->GetGUID()); - data << uint64(GetGUID()); - data << uint32(i_spellProto->Id); - data << uint32(damage); // Damage - data << uint32(0); // Overkill - data << uint32(i_spellProto->SchoolMask); - pVictim->SendMessageToSet(&data, true ); - - pVictim->DealDamage(this, damage, 0, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(i_spellProto), i_spellProto, true); - - i = vDamageShields.begin(); - } - else + if (alreadyDone.find(*i) == alreadyDone.end()) + { + alreadyDone.insert(*i); + uint32 damage=(*i)->GetModifier()->m_amount; + SpellEntry const *i_spellProto = (*i)->GetSpellProto(); + //Calculate absorb resist ??? no data in opcode for this possibly unable to absorb or resist? + //uint32 absorb; + //uint32 resist; + //CalcAbsorbResist(pVictim, SpellSchools(spellProto->School), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist); + //damage-=absorb + resist; + + pVictim->DealDamageMods(this,damage,NULL); + + WorldPacket data(SMSG_SPELLDAMAGESHIELD,(8+8+4+4+4+4)); + data << uint64(pVictim->GetGUID()); + data << uint64(GetGUID()); + data << uint32(i_spellProto->Id); + data << uint32(damage); // Damage + data << uint32(0); // Overkill + data << uint32(i_spellProto->SchoolMask); + pVictim->SendMessageToSet(&data, true ); + + pVictim->DealDamage(this, damage, 0, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(i_spellProto), i_spellProto, true); + + i = vDamageShields.begin(); + } + else ++i; } } @@ -2314,7 +2314,7 @@ void Unit::CalculateAbsorbResistBlock(Unit *pCaster, SpellNonMeleeDamage *damage default: break; } - + if (blocked) { damageInfo->blocked = GetShieldBlockValue(); @@ -5563,7 +5563,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu return true; // Crititcal counted -> roll chance if (roll_chance_i(triggerAmount)) - CastSpell(this, 48108, true, castItem, triggeredByAura); + CastSpell(this, 48108, true, castItem, triggeredByAura); } mod->m_amount = 25; return true; @@ -7670,8 +7670,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB if (!(10*(int32(GetHealth() - damage)) < int32(3 * GetMaxHealth()))) return false; - if(pVictim && pVictim->isAlive()) - pVictim->getThreatManager().modifyThreatPercent(this,-10); + if(pVictim && pVictim->isAlive()) + pVictim->getThreatManager().modifyThreatPercent(this,-10); basepoints[0] = triggerAmount * GetMaxHealth() / 100; trigger_spell_id = 31616; @@ -7901,7 +7901,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB // try detect target manually if not set if (target == NULL) - target = !(procFlags & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL) && IsPositiveSpell(trigger_spell_id) ? this : pVictim; + target = !(procFlags & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL) && IsPositiveSpell(trigger_spell_id) ? this : pVictim; // default case if (!target || target!=this && !target->isAlive()) @@ -9789,7 +9789,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit *pCaster, SpellEntry const *spellProto, // Healing Done // Done total percent damage auras - int32 TakenTotal = 0; + int32 TakenTotal = 0; // Taken fixed damage bonus auras int32 TakenAdvertisedBenefit = SpellBaseHealingBonusTaken(GetSpellSchoolMask(spellProto)); @@ -10179,7 +10179,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType // Frost Strike if (spellProto && spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellProto->SpellFamilyFlags & UI64LIT(0x0000000400000000)) - { + { // search disease bool found = false; Unit::AuraMap const& auras = pVictim->GetAuras(); @@ -10308,7 +10308,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit *pCaster, uint32 pdamage,WeaponAttackTyp // FLAT damage bonus auras // ======================= int32 TakenFlat = 0; - + // ..taken flat (base at attack power for marked target and base at attack power for creature type) if (attType == RANGED_ATTACK) TakenFlat += GetTotalAuraModifier(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN); @@ -10341,7 +10341,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit *pCaster, uint32 pdamage,WeaponAttackTyp // special dummys/class scripts and other effects // ============================================= - + // .. taken (dummy auras) AuraList const& mDummyAuras = GetAurasByType(SPELL_AURA_DUMMY); for(AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i) @@ -11601,7 +11601,7 @@ int32 Unit::CalculateSpellDuration(SpellEntry const* spellProto, SpellEffectInde int32 durationMod_not_stack = target->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK, mechanic); if (!IsPositiveSpell(spellProto->Id)) - durationMod_always += target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_MAGIC_EFFECTS, spellProto->DmgClass); + durationMod_always += target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_MAGIC_EFFECTS, spellProto->DmgClass); int32 durationMod = 0; // Select strongest negative mod @@ -12444,8 +12444,8 @@ bool InitTriggerAuraData() { for (int i=0;i size()) - throw ByteBufferException(false, _rpos, len, size()); + throw ByteBufferException(false, _rpos, len, size()); memcpy(dest, &_storage[_rpos], len); _rpos += len; } @@ -406,7 +406,7 @@ class ByteBuffer void put(size_t pos, const uint8 *src, size_t cnt) { if(pos + cnt > size()) - throw ByteBufferException(true, pos, cnt, size()); + throw ByteBufferException(true, pos, cnt, size()); memcpy(&_storage[pos], src, cnt); } diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index bf737476e77..83d75a56337 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -169,7 +169,7 @@ void Log::SetLogLevel(char* level) newLevel = LOG_LVL_DEBUG; m_logLevel = LogLevel(newLevel); - + printf("LogLevel is %u\n", m_logLevel); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d6b3ee6e491..667705874fa 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9843" + #define REVISION_NR "9844" #endif // __REVISION_NR_H__