[Cleanup] Remove tabs which have crept into the source
This commit is contained in:
parent
368b8e8147
commit
b5c8fd1b54
@ -1977,8 +1977,8 @@ bool ChatHandler::HandleNpcSpawnDistCommand(char* args)
|
|||||||
|
|
||||||
Creature* pCreature = getSelectedCreature();
|
Creature* pCreature = getSelectedCreature();
|
||||||
|
|
||||||
if (!pCreature)
|
if (!pCreature)
|
||||||
{ return false; }
|
{ return false; }
|
||||||
|
|
||||||
pCreature->SetRespawnRadius((float)option);
|
pCreature->SetRespawnRadius((float)option);
|
||||||
pCreature->SetDefaultMovementType(mtype);
|
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);
|
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 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) &&
|
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))
|
GetTypeId() != TYPEID_PLAYER && !((Creature*)this)->GetCharmerOrOwnerGuid() && !pVictim->HasInArc(M_PI_F, this))
|
||||||
{
|
{
|
||||||
// -probability is between 0% and 40%
|
// -probability is between 0% and 40%
|
||||||
// 20% base chance
|
// 20% base chance
|
||||||
float Probability = 20.0f;
|
float Probability = 20.0f;
|
||||||
|
|
||||||
// there is a newbie protection, at level 10 just 7% base chance; assuming linear function
|
// there is a newbie protection, at level 10 just 7% base chance; assuming linear function
|
||||||
if (pVictim->getLevel() < 30)
|
if (pVictim->getLevel() < 30)
|
||||||
{
|
{
|
||||||
Probability = 0.65f * pVictim->getLevel() + 0.5f;
|
Probability = 0.65f * pVictim->getLevel() + 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 VictimDefense = pVictim->GetDefenseSkillValue();
|
uint32 VictimDefense = pVictim->GetDefenseSkillValue();
|
||||||
uint32 AttackerMeleeSkill = GetUnitMeleeSkill();
|
uint32 AttackerMeleeSkill = GetUnitMeleeSkill();
|
||||||
|
|
||||||
Probability *= AttackerMeleeSkill / (float)VictimDefense;
|
Probability *= AttackerMeleeSkill / (float)VictimDefense;
|
||||||
|
|
||||||
if (Probability > 40.0f)
|
if (Probability > 40.0f)
|
||||||
{
|
{
|
||||||
Probability = 40.0f;
|
Probability = 40.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roll_chance_f(Probability))
|
if (roll_chance_f(Probability))
|
||||||
{
|
{
|
||||||
CastSpell(pVictim, 1604, true);
|
CastSpell(pVictim, 1604, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// update at damage Judgement aura duration that applied by attacker at victim
|
// update at damage Judgement aura duration that applied by attacker at victim
|
||||||
if (damageInfo->damage)
|
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_y = y;
|
||||||
float i_z = z;
|
float i_z = z;
|
||||||
|
|
||||||
bool isFlying;
|
bool isFlying;
|
||||||
bool isSwimming = true;
|
bool isSwimming = true;
|
||||||
switch (unit->GetTypeId())
|
switch (unit->GetTypeId())
|
||||||
{
|
{
|
||||||
@ -2362,8 +2362,8 @@ bool Map::GetReachableRandomPosition(Unit* unit, float& x, float& y, float& z, f
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool newDestAssigned;
|
bool newDestAssigned;
|
||||||
if (isFlying)
|
if (isFlying)
|
||||||
{
|
{
|
||||||
newDestAssigned = GetRandomPointInTheAir(i_x, i_y, i_z, radius);
|
newDestAssigned = GetRandomPointInTheAir(i_x, i_y, i_z, radius);
|
||||||
}
|
}
|
||||||
|
@ -106,8 +106,8 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj)
|
|||||||
if (!entry)
|
if (!entry)
|
||||||
{ return NULL; }
|
{ return NULL; }
|
||||||
|
|
||||||
Map* m;
|
Map* m;
|
||||||
if (entry->Instanceable())
|
if (entry->Instanceable())
|
||||||
{
|
{
|
||||||
MANGOS_ASSERT(obj && obj->GetTypeId() == TYPEID_PLAYER);
|
MANGOS_ASSERT(obj && obj->GetTypeId() == TYPEID_PLAYER);
|
||||||
// create DungeonMap object
|
// create DungeonMap object
|
||||||
|
@ -1334,7 +1334,7 @@ bool ScriptAction::HandleScriptStep()
|
|||||||
}
|
}
|
||||||
case SCRIPT_COMMAND_RESPAWN_GO: // 9
|
case SCRIPT_COMMAND_RESPAWN_GO: // 9
|
||||||
{
|
{
|
||||||
GameObject* pGo;
|
GameObject* pGo;
|
||||||
if (m_script->respawnGo.goGuid)
|
if (m_script->respawnGo.goGuid)
|
||||||
{
|
{
|
||||||
GameObjectData const* goData = sObjectMgr.GetGOData(m_script->respawnGo.goGuid);
|
GameObjectData const* goData = sObjectMgr.GetGOData(m_script->respawnGo.goGuid);
|
||||||
@ -1368,7 +1368,7 @@ bool ScriptAction::HandleScriptStep()
|
|||||||
if (pGo->isSpawned())
|
if (pGo->isSpawned())
|
||||||
{ break; } // gameobject already spawned
|
{ 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->SetLootState(GO_READY);
|
||||||
pGo->SetRespawnTime(time_to_despawn); // despawn object in ? seconds
|
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);
|
Cell::VisitAllObjects(m_caster, searcher, max_range);
|
||||||
break;
|
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:
|
case TARGET_RANDOM_FRIEND_CHAIN_IN_AREA:
|
||||||
{
|
{
|
||||||
MaNGOS::AnyFriendlyUnitInObjectRangeCheck u_check(m_caster, max_range);
|
MaNGOS::AnyFriendlyUnitInObjectRangeCheck u_check(m_caster, max_range);
|
||||||
|
@ -49,10 +49,10 @@ void BIH::subdivide(int left, int right, std::vector<uint32>& tempTree, buildDat
|
|||||||
}
|
}
|
||||||
// calculate extents
|
// calculate extents
|
||||||
int axis = -1, rightOrig;
|
int axis = -1, rightOrig;
|
||||||
float clipL;
|
float clipL;
|
||||||
float clipR;
|
float clipR;
|
||||||
float prevClip = G3D::fnan();
|
float prevClip = G3D::fnan();
|
||||||
float split = G3D::fnan();
|
float split = G3D::fnan();
|
||||||
bool wasLeft = true;
|
bool wasLeft = true;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
@ -211,8 +211,8 @@ namespace VMAP
|
|||||||
pResultHitPos = pResultHitPos + dir * pModifyDist;
|
pResultHitPos = pResultHitPos + dir * pModifyDist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pResultHitPos = pPos2;
|
pResultHitPos = pPos2;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================
|
//=========================================================
|
||||||
|
@ -328,7 +328,7 @@ namespace VMAP
|
|||||||
model.SetGroupModels(groupsArray);
|
model.SetGroupModels(groupsArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
return model.WriteFile(iDestDir + "/" + pModelFilename + ".vmo");
|
return model.WriteFile(iDestDir + "/" + pModelFilename + ".vmo");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TileAssembler::exportGameobjectModels(const char *RAW_VMAP_MAGIC)
|
void TileAssembler::exportGameobjectModels(const char *RAW_VMAP_MAGIC)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user