Permalink
Browse files

[Cleanup] Remove tabs which have crept into the source

  • Loading branch information...
billy1arm committed Jan 10, 2019
1 parent 368b8e8 commit b5c8fd1b5406795ff82d8d193597a98cb23583ba
@@ -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);
@@ -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;

// 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();

Probability *= AttackerMeleeSkill / (float)VictimDefense;

if (Probability > 40.0f)
{
Probability = 40.0f;
}

if (roll_chance_f(Probability))
{
CastSpell(pVictim, 1604, true);
}

}
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;
}

uint32 VictimDefense = pVictim->GetDefenseSkillValue();
uint32 AttackerMeleeSkill = GetUnitMeleeSkill();

Probability *= AttackerMeleeSkill / (float)VictimDefense;

if (Probability > 40.0f)
{
Probability = 40.0f;
}

if (roll_chance_f(Probability))
{
CastSpell(pVictim, 1604, true);
}

}

// update at damage Judgement aura duration that applied by attacker at victim
if (damageInfo->damage)
@@ -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);
}
@@ -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
@@ -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
@@ -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();
@@ -49,10 +49,10 @@ void BIH::subdivide(int left, int right, std::vector<uint32>& 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)
{
@@ -211,8 +211,8 @@ namespace VMAP
pResultHitPos = pResultHitPos + dir * pModifyDist;
}
}
pResultHitPos = pPos2;
return false;
pResultHitPos = pPos2;
return false;
}

//=========================================================
@@ -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)

0 comments on commit b5c8fd1

Please sign in to comment.