From 5a9ef604e20d6ea30fa94a3ddbae6bc4ac6fe93e Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Wed, 13 Jan 2010 18:22:31 +0100 Subject: * Fix CRLF. --HG-- branch : trunk --- src/game/Unit.cpp | 168 +++++++++++++++++++++++++++--------------------------- 1 file changed, 84 insertions(+), 84 deletions(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3ff0991ccf2..efa51337008 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1850,13 +1850,13 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff RemainingDamage -= int32(currentAbsorb * pVictim->GetTotalAttackPowerValue(BASE_ATTACK) / 100); continue; } - // Moonkin Form passive - if (spellProto->Id == 69366) - { - //reduces all damage taken while Stunned - if (unitflag & UNIT_FLAG_STUNNED) - RemainingDamage -= RemainingDamage * currentAbsorb / 100; - continue; + // Moonkin Form passive + if (spellProto->Id == 69366) + { + //reduces all damage taken while Stunned + if (unitflag & UNIT_FLAG_STUNNED) + RemainingDamage -= RemainingDamage * currentAbsorb / 100; + continue; } break; } @@ -6566,21 +6566,21 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger // Sacred Shield if (dummySpell->SpellFamilyFlags[1]&0x00080000) { - if (procFlag & PROC_FLAG_TAKEN_POSITIVE_MAGIC_SPELL) - { - if (procSpell->SpellFamilyName == SPELLFAMILY_PALADIN - && (procSpell->SpellFamilyFlags[0] & 0x40000000)) - { - basepoints0 = int32(float(damage)/12.0f); - CastCustomSpell(this,66922,&basepoints0,NULL,NULL,true,0,triggeredByAura, pVictim->GetGUID()); - return true; - } - else - return false; - } - else - triggered_spell_id = 58597; - target = this; + if (procFlag & PROC_FLAG_TAKEN_POSITIVE_MAGIC_SPELL) + { + if (procSpell->SpellFamilyName == SPELLFAMILY_PALADIN + && (procSpell->SpellFamilyFlags[0] & 0x40000000)) + { + basepoints0 = int32(float(damage)/12.0f); + CastCustomSpell(this,66922,&basepoints0,NULL,NULL,true,0,triggeredByAura, pVictim->GetGUID()); + return true; + } + else + return false; + } + else + triggered_spell_id = 58597; + target = this; break; } // Righteous Vengeance @@ -8578,7 +8578,7 @@ bool Unit::IsHostileTo(Unit const* unit) const //= PvP states // Green/Blue (can't attack) - if (!pTester->HasAuraType(SPELL_AURA_MOD_FACTION) && !pTarget->HasAuraType(SPELL_AURA_MOD_FACTION)) + if (!pTester->HasAuraType(SPELL_AURA_MOD_FACTION) && !pTarget->HasAuraType(SPELL_AURA_MOD_FACTION)) { if(pTester->GetTeam()==pTarget->GetTeam()) return false; @@ -8693,7 +8693,7 @@ bool Unit::IsFriendlyTo(Unit const* unit) const //= PvP states // Green/Blue (non-attackable) - if (!pTester->HasAuraType(SPELL_AURA_MOD_FACTION) && !pTarget->HasAuraType(SPELL_AURA_MOD_FACTION)) + if (!pTester->HasAuraType(SPELL_AURA_MOD_FACTION) && !pTarget->HasAuraType(SPELL_AURA_MOD_FACTION)) { if(pTester->GetTeam()==pTarget->GetTeam()) return true; @@ -9575,14 +9575,14 @@ void Unit::UnsummonAllTotems() void Unit::SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, bool critical) { // we guess size - WorldPacket data(SMSG_SPELLHEALLOG, (8+8+4+4+4+4+1)); - data.append(pVictim->GetPackGUID()); - data.append(GetPackGUID()); - data << uint32(SpellID); - data << uint32(Damage); - data << uint32(OverHeal); - data << uint32(0); // Absorb amount - data << uint8(critical ? 1 : 0); + WorldPacket data(SMSG_SPELLHEALLOG, (8+8+4+4+4+4+1)); + data.append(pVictim->GetPackGUID()); + data.append(GetPackGUID()); + data << uint32(SpellID); + data << uint32(Damage); + data << uint32(OverHeal); + data << uint32(0); // Absorb amount + data << uint8(critical ? 1 : 0); SendMessageToSet(&data, true); } @@ -10673,13 +10673,13 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo) if (itr->type == spellInfo->Mechanic) return true; } - - for (int i=0;i<3;++i) - { - // State/effect immunities applied by aura expect full spell immunity - // However function also check for mechanic, so ignore that for now - if (IsImmunedToSpellEffect(spellInfo, i, false)) - return true; + + for (int i=0;i<3;++i) + { + // State/effect immunities applied by aura expect full spell immunity + // However function also check for mechanic, so ignore that for now + if (IsImmunedToSpellEffect(spellInfo, i, false)) + return true; } if (spellInfo->Id != 42292 && spellInfo->Id !=59752) @@ -11123,25 +11123,25 @@ void Unit::Mount(uint32 mount, uint32 VehicleId) ((Player*)this)->UnsummonPetTemporaryIfAny(); } - if(VehicleId !=0) - { - if(VehicleEntry const *ve = sVehicleStore.LookupEntry(VehicleId)) - { - - if (CreateVehicleKit(VehicleId)) - { - GetVehicleKit()->Reset(); - - // Send others that we now have a vehicle - WorldPacket data( SMSG_PLAYER_VEHICLE_DATA, GetPackGUID().size()+4); - data.appendPackGUID(GetGUID()); - data << uint32(VehicleId); - SendMessageToSet( &data,true ); - - data.Initialize(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0); - ((Player*)this)->GetSession()->SendPacket( &data ); - } - } + if(VehicleId !=0) + { + if(VehicleEntry const *ve = sVehicleStore.LookupEntry(VehicleId)) + { + + if (CreateVehicleKit(VehicleId)) + { + GetVehicleKit()->Reset(); + + // Send others that we now have a vehicle + WorldPacket data( SMSG_PLAYER_VEHICLE_DATA, GetPackGUID().size()+4); + data.appendPackGUID(GetGUID()); + data << uint32(VehicleId); + SendMessageToSet( &data,true ); + + data.Initialize(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0); + ((Player*)this)->GetSession()->SendPacket( &data ); + } + } } } @@ -11170,15 +11170,15 @@ void Unit::Unmount() else ((Player*)this)->ResummonPetTemporaryUnSummonedIfAny(); } - if(GetTypeId()==TYPEID_PLAYER && GetVehicleKit()) - { - // Send other players that we are no longer a vehicle - WorldPacket data( SMSG_PLAYER_VEHICLE_DATA, 8+4 ); - data.appendPackGUID(GetGUID()); - data << uint32(0); - ((Player*)this)->SendMessageToSet(&data, true); - // Remove vehicle class from player - RemoveVehicleKit(); + if(GetTypeId()==TYPEID_PLAYER && GetVehicleKit()) + { + // Send other players that we are no longer a vehicle + WorldPacket data( SMSG_PLAYER_VEHICLE_DATA, 8+4 ); + data.appendPackGUID(GetGUID()); + data << uint32(0); + ((Player*)this)->SendMessageToSet(&data, true); + // Remove vehicle class from player + RemoveVehicleKit(); } } @@ -11524,9 +11524,9 @@ bool Unit::canDetectStealthOf(Unit const* target, float distance) const if ((*iter)->GetCasterGUID() == GetGUID()) return true; - //Visible distance based on stealth value (stealth rank 4 300MOD, 10.5 - 3 = 7.5) - float visibleDistance = 7.5f; - //Visible distance is modified by -Level Diff (every level diff = 1.0f in visible distance) + //Visible distance based on stealth value (stealth rank 4 300MOD, 10.5 - 3 = 7.5) + float visibleDistance = 7.5f; + //Visible distance is modified by -Level Diff (every level diff = 1.0f in visible distance) visibleDistance += float(getLevelForTarget(target)) - target->GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH)/5.0f; //-Stealth Mod(positive like Master of Deception) and Stealth Detection(negative like paranoia) //based on wowwiki every 5 mod we have 1 more level diff in calculation @@ -14988,20 +14988,20 @@ bool Unit::CreateVehicleKit(uint32 id) return true; } -void Unit::RemoveVehicleKit() -{ - if (!m_vehicleKit) - return; - - m_vehicleKit->Uninstall(); - delete m_vehicleKit; - - m_vehicleKit = NULL; - - m_updateFlag &= ~UPDATEFLAG_VEHICLE; - m_unitTypeMask &= ~UNIT_MASK_VEHICLE; - RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); - RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE); +void Unit::RemoveVehicleKit() +{ + if (!m_vehicleKit) + return; + + m_vehicleKit->Uninstall(); + delete m_vehicleKit; + + m_vehicleKit = NULL; + + m_updateFlag &= ~UPDATEFLAG_VEHICLE; + m_unitTypeMask &= ~UNIT_MASK_VEHICLE; + RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); + RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE); } Unit *Unit::GetVehicleBase() const -- cgit v1.2.3