diff options
author | XTZGZoReX <none@none> | 2010-01-13 18:22:31 +0100 |
---|---|---|
committer | XTZGZoReX <none@none> | 2010-01-13 18:22:31 +0100 |
commit | 5a9ef604e20d6ea30fa94a3ddbae6bc4ac6fe93e (patch) | |
tree | ec6088e76eca8d912bd6b9893d5e4ee01e35becf | |
parent | c27674a327a1e8646813dd8482b1068f4b7794e1 (diff) |
* Fix CRLF.
--HG--
branch : trunk
-rw-r--r-- | src/game/PetHandler.cpp | 4 | ||||
-rw-r--r-- | src/game/Player.cpp | 78 | ||||
-rw-r--r-- | src/game/Player.h | 4 | ||||
-rw-r--r-- | src/game/Spell.cpp | 80 | ||||
-rw-r--r-- | src/game/SpellAuraEffects.cpp | 38 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 4 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 4 | ||||
-rw-r--r-- | src/game/Unit.cpp | 168 |
8 files changed, 190 insertions, 190 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 1ffe4bc1632..edd3a9d4f2b 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -236,8 +236,8 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid return; } - if (spellInfo->StartRecoveryCategory > 0)
- if (((Creature*)pet)->GetGlobalCooldown() > 0)
+ if (spellInfo->StartRecoveryCategory > 0) + if (((Creature*)pet)->GetGlobalCooldown() > 0) return; for (uint32 i = 0; i < 3; ++i) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8e4bd3052a7..ce57dce8020 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1323,12 +1323,12 @@ void Player::Update( uint32 p_time ) m_zoneUpdateTimer -= p_time; } - if (m_timeSyncTimer > 0)
- {
- if(p_time >= m_timeSyncTimer)
- SendTimeSync();
- else
- m_timeSyncTimer -= p_time;
+ if (m_timeSyncTimer > 0) + { + if(p_time >= m_timeSyncTimer) + SendTimeSync(); + else + m_timeSyncTimer -= p_time; } if (isAlive()) @@ -7139,11 +7139,11 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl armor = ssvarmor; } - if (armor)
- {
- UnitModifierType modType = TOTAL_VALUE;
- if (proto->Class == ITEM_CLASS_ARMOR)
- {
+ if (armor) + { + UnitModifierType modType = TOTAL_VALUE; + if (proto->Class == ITEM_CLASS_ARMOR) + { switch (proto->SubClass) { case ITEM_SUBCLASS_ARMOR_CLOTH: @@ -7153,13 +7153,13 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl case ITEM_SUBCLASS_ARMOR_SHIELD: modType = BASE_VALUE; break; - }
- }
- HandleStatModifier(UNIT_MOD_ARMOR, modType, float(armor), apply);
- }
-
- // Add armor bonus from ArmorDamageModifier if > 0
- if (proto->ArmorDamageModifier > 0)
+ } + } + HandleStatModifier(UNIT_MOD_ARMOR, modType, float(armor), apply); + } + + // Add armor bonus from ArmorDamageModifier if > 0 + if (proto->ArmorDamageModifier > 0) HandleStatModifier(UNIT_MOD_ARMOR, TOTAL_VALUE, float(proto->ArmorDamageModifier), apply); if (proto->Block) @@ -7320,13 +7320,13 @@ void Player::_ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType att } if (!item->IsBroken()&&item->IsFitToSpellRequirements(aura->GetSpellProto())) - {
- HandleStatModifier(unitMod, unitModType, float(aura->GetAmount()),apply);
-
- if (unitModType == TOTAL_PCT)
- ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT,aura->GetAmount()/100.0f,apply);
- else
- ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS,aura->GetAmount(),apply);
+ { + HandleStatModifier(unitMod, unitModType, float(aura->GetAmount()),apply); + + if (unitModType == TOTAL_PCT) + ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT,aura->GetAmount()/100.0f,apply); + else + ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS,aura->GetAmount(),apply); } } @@ -20236,7 +20236,7 @@ void Player::SendInitialPacketsAfterAddToMap() GetZoneAndAreaId(newzone,newarea); UpdateZone(newzone,newarea); // also call SendInitWorldStates(); - ResetTimeSync();
+ ResetTimeSync(); SendTimeSync(); CastSpell(this, SPELL_LOGINEFFECT_836, true); // LOGINEFFECT @@ -23042,7 +23042,7 @@ void Player::ActivateSpec(uint8 spec) InitTalentForLevel(); // Let client clear his current Actions - SendActionButtons(2);
+ SendActionButtons(2); m_actionButtons.clear(); if (QueryResult *result = CharacterDatabase.PQuery("SELECT button,action,type FROM character_action WHERE guid = '%u' AND spec = '%u' ORDER BY button", GetGUIDLow(), m_activeSpec)) _LoadActions(result, false); @@ -23057,20 +23057,20 @@ void Player::ActivateSpec(uint8 spec) SetPower(pw, 0); } -void Player::ResetTimeSync()
-{
- m_timeSyncCount = 0;
- m_timeSyncTimer = 0;
+void Player::ResetTimeSync() +{ + m_timeSyncCount = 0; + m_timeSyncTimer = 0; } -void Player::SendTimeSync()
-{
- WorldPacket data(SMSG_TIME_SYNC_REQ, 4);
- data << uint32(m_timeSyncCount++);
- GetSession()->SendPacket(&data);
-
- // Send another opcode in 10s again
- m_timeSyncTimer = 10000;
+void Player::SendTimeSync() +{ + WorldPacket data(SMSG_TIME_SYNC_REQ, 4); + data << uint32(m_timeSyncCount++); + GetSession()->SendPacket(&data); + + // Send another opcode in 10s again + m_timeSyncTimer = 10000; } void Player::SetReputation(uint32 factionentry, uint32 value) diff --git a/src/game/Player.h b/src/game/Player.h index b2f1798c36f..1067105d227 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -2437,7 +2437,7 @@ Spell * m_spellModTakingSpell; EnchantDurationList m_enchantDuration; ItemDurationList m_itemDuration; - void ResetTimeSync();
+ void ResetTimeSync(); void SendTimeSync(); uint64 m_resurrectGUID; @@ -2576,7 +2576,7 @@ Spell * m_spellModTakingSpell; uint32 m_ChampioningFaction; - uint32 m_timeSyncCount;
+ uint32 m_timeSyncCount; uint32 m_timeSyncTimer; }; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index f1c31d6434c..d0c7c7d549a 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1209,14 +1209,14 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) if (canEffectTrigger && missInfo != SPELL_MISS_REFLECT) caster->ProcDamageAndSpell(unit, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo, m_triggeredByAuraSpell); - // Failed Pickpocket, reveal rogue
- if (missInfo == SPELL_MISS_RESIST
- && m_customAttr & SPELL_ATTR_CU_PICKPOCKET
- && unitTarget->GetTypeId() == TYPEID_UNIT)
- {
- m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK);
- if (((Creature*)unitTarget)->IsAIEnabled)
- ((Creature*)unitTarget)->AI()->AttackStart(m_caster);
+ // Failed Pickpocket, reveal rogue + if (missInfo == SPELL_MISS_RESIST + && m_customAttr & SPELL_ATTR_CU_PICKPOCKET + && unitTarget->GetTypeId() == TYPEID_UNIT) + { + m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK); + if (((Creature*)unitTarget)->IsAIEnabled) + ((Creature*)unitTarget)->AI()->AttackStart(m_caster); } } @@ -4129,7 +4129,7 @@ SpellCastResult Spell::CheckRuneCost(uint32 runeCostID) for (uint32 i = 0; i < RUNE_DEATH; ++i) { runeCost[i] = src->RuneCost[i]; - if(Player* modOwner = m_caster->GetSpellModOwner())
+ if(Player* modOwner = m_caster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runeCost[i], this); } @@ -4451,37 +4451,37 @@ SpellCastResult Spell::CheckCast(bool strict) if (target->hasUnitState(UNIT_STAT_UNATTACKABLE)) return SPELL_FAILED_BAD_TARGETS; - if(!m_IsTriggeredSpell && (target->HasAuraType(SPELL_AURA_MOD_STEALTH)
- || target->m_invisibilityMask) && !m_caster->canSeeOrDetect(target, true))
- return SPELL_FAILED_BAD_TARGETS;
-
- if (m_caster->GetTypeId() == TYPEID_PLAYER)
- {
- // Not allow banish not self target
- if (m_spellInfo->Mechanic == MECHANIC_BANISH)
- if (target->GetTypeId() == TYPEID_UNIT &&
- !((Player*)m_caster)->isAllowedToLoot((Creature*)target))
- return SPELL_FAILED_CANT_CAST_ON_TAPPED;
-
- if (m_customAttr & SPELL_ATTR_CU_PICKPOCKET)
- {
- if (target->GetTypeId() == TYPEID_PLAYER)
- return SPELL_FAILED_BAD_TARGETS;
- else if ((target->GetCreatureTypeMask() & CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) == 0)
- return SPELL_FAILED_TARGET_NO_POCKETS;
- }
-
- // Not allow disarm unarmed player
- if (m_spellInfo->Mechanic == MECHANIC_DISARM)
- {
- if (target->GetTypeId() == TYPEID_PLAYER)
- {
- if(!((Player*)target)->GetWeaponForAttack(BASE_ATTACK) || !((Player*)target)->IsUseEquipedWeapon(true))
- return SPELL_FAILED_TARGET_NO_WEAPONS;
- }
- else if (!target->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID))
- return SPELL_FAILED_TARGET_NO_WEAPONS;
- }
+ if(!m_IsTriggeredSpell && (target->HasAuraType(SPELL_AURA_MOD_STEALTH) + || target->m_invisibilityMask) && !m_caster->canSeeOrDetect(target, true)) + return SPELL_FAILED_BAD_TARGETS; + + if (m_caster->GetTypeId() == TYPEID_PLAYER) + { + // Not allow banish not self target + if (m_spellInfo->Mechanic == MECHANIC_BANISH) + if (target->GetTypeId() == TYPEID_UNIT && + !((Player*)m_caster)->isAllowedToLoot((Creature*)target)) + return SPELL_FAILED_CANT_CAST_ON_TAPPED; + + if (m_customAttr & SPELL_ATTR_CU_PICKPOCKET) + { + if (target->GetTypeId() == TYPEID_PLAYER) + return SPELL_FAILED_BAD_TARGETS; + else if ((target->GetCreatureTypeMask() & CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) == 0) + return SPELL_FAILED_TARGET_NO_POCKETS; + } + + // Not allow disarm unarmed player + if (m_spellInfo->Mechanic == MECHANIC_DISARM) + { + if (target->GetTypeId() == TYPEID_PLAYER) + { + if(!((Player*)target)->GetWeaponForAttack(BASE_ATTACK) || !((Player*)target)->IsUseEquipedWeapon(true)) + return SPELL_FAILED_TARGET_NO_WEAPONS; + } + else if (!target->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID)) + return SPELL_FAILED_TARGET_NO_WEAPONS; + } } if(!m_IsTriggeredSpell && VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target)) diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp index 792152ad882..5373f2aa75c 100644 --- a/src/game/SpellAuraEffects.cpp +++ b/src/game/SpellAuraEffects.cpp @@ -5997,26 +5997,26 @@ void AuraEffect::HandleAuraEmpathy(AuraApplication const * aurApp, uint8 mode, b target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply); } -void AuraEffect::HandleAuraModFaction(AuraApplication const * aurApp, uint8 mode, bool apply) const
-{
+void AuraEffect::HandleAuraModFaction(AuraApplication const * aurApp, uint8 mode, bool apply) const +{ if(!(mode & AURA_EFFECT_HANDLE_REAL)) - return;
-
- Unit * target = aurApp->GetTarget();
-
- if(apply)
- {
- target->setFaction(GetMiscValue());
- if(target->GetTypeId()==TYPEID_PLAYER)
- target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
- }
- else
- {
- target->RestoreFaction();
- if(target->GetTypeId()==TYPEID_PLAYER)
- target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
- }
-}
+ return; + + Unit * target = aurApp->GetTarget(); + + if(apply) + { + target->setFaction(GetMiscValue()); + if(target->GetTypeId()==TYPEID_PLAYER) + target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + } + else + { + target->RestoreFaction(); + if(target->GetTypeId()==TYPEID_PLAYER) + target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + } +} void AuraEffect::HandleComprehendLanguage(AuraApplication const * aurApp, uint8 mode, bool apply) const diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 79abeac66cb..7f13e49a73d 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -6622,8 +6622,8 @@ void Spell::EffectQuestComplete(uint32 i) void Spell::EffectForceDeselect(uint32 i) { - WorldPacket data(SMSG_CLEAR_TARGET, 8);
- data << uint64(m_caster->GetGUID());
+ WorldPacket data(SMSG_CLEAR_TARGET, 8); + data << uint64(m_caster->GetGUID()); m_caster->SendMessageToSet(&data, true); } diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index b934b9823df..35ccabd1c60 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -3542,8 +3542,8 @@ void SpellMgr::LoadSpellCustomAttr() mSpellCustomAttr[i] |= SPELL_ATTR_CU_CHARGE; count++; break; - case SPELL_EFFECT_PICKPOCKET:
- mSpellCustomAttr[i] |= SPELL_ATTR_CU_PICKPOCKET;
+ case SPELL_EFFECT_PICKPOCKET: + mSpellCustomAttr[i] |= SPELL_ATTR_CU_PICKPOCKET; break; case SPELL_EFFECT_TRIGGER_SPELL: if (IsPositionTarget(spellInfo->EffectImplicitTargetA[j]) || 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 |