diff --git a/src/game/ChatCommands/Level2.cpp b/src/game/ChatCommands/Level2.cpp index 22ab52b9..87fe3609 100644 --- a/src/game/ChatCommands/Level2.cpp +++ b/src/game/ChatCommands/Level2.cpp @@ -1977,8 +1977,8 @@ bool ChatHandler::HandleNpcSpawnDistCommand(char* args) Creature* pCreature = getSelectedCreature(); - if (!pCreature) - { return false; } + if (!pCreature) + { return false; } pCreature->SetRespawnRadius((float)option); pCreature->SetDefaultMovementType(mtype); diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp index 9eba4e41..08ba7cda 100644 --- a/src/game/Object/Unit.cpp +++ b/src/game/Object/Unit.cpp @@ -1767,35 +1767,35 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) DealDamage(pVictim, damageInfo->damage, &cleanDamage, DIRECT_DAMAGE, SpellSchoolMask(damageInfo->damageSchoolMask), NULL, durabilityLoss); // If this is a creature and it attacks from behind it has a probability to daze it's victim - if ((!damageInfo->absorb) && (damageInfo->hitOutCome == MELEE_HIT_CRIT || damageInfo->hitOutCome == MELEE_HIT_CRUSHING || damageInfo->hitOutCome == MELEE_HIT_NORMAL || damageInfo->hitOutCome == MELEE_HIT_GLANCING) && - GetTypeId() != TYPEID_PLAYER && !((Creature*)this)->GetCharmerOrOwnerGuid() && !pVictim->HasInArc(M_PI_F, this)) - { - // -probability is between 0% and 40% - // 20% base chance - float Probability = 20.0f; + if ((!damageInfo->absorb) && (damageInfo->hitOutCome == MELEE_HIT_CRIT || damageInfo->hitOutCome == MELEE_HIT_CRUSHING || damageInfo->hitOutCome == MELEE_HIT_NORMAL || damageInfo->hitOutCome == MELEE_HIT_GLANCING) && + GetTypeId() != TYPEID_PLAYER && !((Creature*)this)->GetCharmerOrOwnerGuid() && !pVictim->HasInArc(M_PI_F, this)) + { + // -probability is between 0% and 40% + // 20% base chance + float Probability = 20.0f; - // there is a newbie protection, at level 10 just 7% base chance; assuming linear function - if (pVictim->getLevel() < 30) - { - Probability = 0.65f * pVictim->getLevel() + 0.5f; - } + // there is a newbie protection, at level 10 just 7% base chance; assuming linear function + if (pVictim->getLevel() < 30) + { + Probability = 0.65f * pVictim->getLevel() + 0.5f; + } - uint32 VictimDefense = pVictim->GetDefenseSkillValue(); - uint32 AttackerMeleeSkill = GetUnitMeleeSkill(); + uint32 VictimDefense = pVictim->GetDefenseSkillValue(); + uint32 AttackerMeleeSkill = GetUnitMeleeSkill(); - Probability *= AttackerMeleeSkill / (float)VictimDefense; + Probability *= AttackerMeleeSkill / (float)VictimDefense; - if (Probability > 40.0f) - { - Probability = 40.0f; - } + if (Probability > 40.0f) + { + Probability = 40.0f; + } - if (roll_chance_f(Probability)) - { - CastSpell(pVictim, 1604, true); - } + if (roll_chance_f(Probability)) + { + CastSpell(pVictim, 1604, true); + } - } + } // update at damage Judgement aura duration that applied by attacker at victim if (damageInfo->damage) diff --git a/src/game/WorldHandlers/Map.cpp b/src/game/WorldHandlers/Map.cpp index e6eac845..5d194121 100644 --- a/src/game/WorldHandlers/Map.cpp +++ b/src/game/WorldHandlers/Map.cpp @@ -2340,7 +2340,7 @@ bool Map::GetReachableRandomPosition(Unit* unit, float& x, float& y, float& z, f float i_y = y; float i_z = z; - bool isFlying; + bool isFlying; bool isSwimming = true; switch (unit->GetTypeId()) { @@ -2362,8 +2362,8 @@ bool Map::GetReachableRandomPosition(Unit* unit, float& x, float& y, float& z, f return false; } - bool newDestAssigned; - if (isFlying) + bool newDestAssigned; + if (isFlying) { newDestAssigned = GetRandomPointInTheAir(i_x, i_y, i_z, radius); } diff --git a/src/game/WorldHandlers/MapManager.cpp b/src/game/WorldHandlers/MapManager.cpp index c057ebd0..90afc0e9 100644 --- a/src/game/WorldHandlers/MapManager.cpp +++ b/src/game/WorldHandlers/MapManager.cpp @@ -106,8 +106,8 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj) if (!entry) { return NULL; } - Map* m; - if (entry->Instanceable()) + Map* m; + if (entry->Instanceable()) { MANGOS_ASSERT(obj && obj->GetTypeId() == TYPEID_PLAYER); // create DungeonMap object diff --git a/src/game/WorldHandlers/ScriptMgr.cpp b/src/game/WorldHandlers/ScriptMgr.cpp index fac56e70..7f40d9a4 100644 --- a/src/game/WorldHandlers/ScriptMgr.cpp +++ b/src/game/WorldHandlers/ScriptMgr.cpp @@ -1334,7 +1334,7 @@ bool ScriptAction::HandleScriptStep() } case SCRIPT_COMMAND_RESPAWN_GO: // 9 { - GameObject* pGo; + GameObject* pGo; if (m_script->respawnGo.goGuid) { GameObjectData const* goData = sObjectMgr.GetGOData(m_script->respawnGo.goGuid); @@ -1367,8 +1367,8 @@ bool ScriptAction::HandleScriptStep() if (pGo->isSpawned()) { break; } // gameobject already spawned - - uint32 time_to_despawn = m_script->respawnGo.despawnDelay < 5 ? 5 : m_script->respawnGo.despawnDelay; + + uint32 time_to_despawn = m_script->respawnGo.despawnDelay < 5 ? 5 : m_script->respawnGo.despawnDelay; pGo->SetLootState(GO_READY); pGo->SetRespawnTime(time_to_despawn); // despawn object in ? seconds diff --git a/src/game/WorldHandlers/Spell.cpp b/src/game/WorldHandlers/Spell.cpp index d0511faf..28b2eaba 100644 --- a/src/game/WorldHandlers/Spell.cpp +++ b/src/game/WorldHandlers/Spell.cpp @@ -1575,7 +1575,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& Cell::VisitAllObjects(m_caster, searcher, max_range); break; } - case TARGET_RANDOM_UNIT_CHAIN_IN_AREA: // This works the same as Target_random_friend_chain_in_area but is named differently for some reason + case TARGET_RANDOM_UNIT_CHAIN_IN_AREA: // This works the same as Target_random_friend_chain_in_area but is named differently for some reason case TARGET_RANDOM_FRIEND_CHAIN_IN_AREA: { MaNGOS::AnyFriendlyUnitInObjectRangeCheck u_check(m_caster, max_range); @@ -6515,7 +6515,7 @@ bool Spell::IsLockInRange(GameObject* go) { const SpellRangeEntry* srange = sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex); - + // This check is not related to bounding radius float dx = m_caster->GetPositionX() - go->GetPositionX(); float dy = m_caster->GetPositionY() - go->GetPositionY(); diff --git a/src/game/vmap/BIH.cpp b/src/game/vmap/BIH.cpp index 37604b9e..5cacb8eb 100644 --- a/src/game/vmap/BIH.cpp +++ b/src/game/vmap/BIH.cpp @@ -49,10 +49,10 @@ void BIH::subdivide(int left, int right, std::vector& tempTree, buildDat } // calculate extents int axis = -1, rightOrig; - float clipL; - float clipR; - float prevClip = G3D::fnan(); - float split = G3D::fnan(); + float clipL; + float clipR; + float prevClip = G3D::fnan(); + float split = G3D::fnan(); bool wasLeft = true; while (true) { diff --git a/src/game/vmap/MapTree.cpp b/src/game/vmap/MapTree.cpp index 54838c74..a92f9a90 100644 --- a/src/game/vmap/MapTree.cpp +++ b/src/game/vmap/MapTree.cpp @@ -211,8 +211,8 @@ namespace VMAP pResultHitPos = pResultHitPos + dir * pModifyDist; } } - pResultHitPos = pPos2; - return false; + pResultHitPos = pPos2; + return false; } //========================================================= diff --git a/src/game/vmap/TileAssembler.cpp b/src/game/vmap/TileAssembler.cpp index 20616d99..f9e428b9 100644 --- a/src/game/vmap/TileAssembler.cpp +++ b/src/game/vmap/TileAssembler.cpp @@ -328,7 +328,7 @@ namespace VMAP model.SetGroupModels(groupsArray); } - return model.WriteFile(iDestDir + "/" + pModelFilename + ".vmo"); + return model.WriteFile(iDestDir + "/" + pModelFilename + ".vmo"); } void TileAssembler::exportGameobjectModels(const char *RAW_VMAP_MAGIC)