Core: Continued cleanup

If and for whitespaces.
This commit is contained in:
kaelima
2011-06-12 02:30:32 +02:00
parent da03bbbdab
commit b9e8694540
46 changed files with 219 additions and 222 deletions
@@ -78,7 +78,7 @@ bool VendorItemData::RemoveItem(uint32 item_id)
VendorItem const* VendorItemData::FindItemCostPair(uint32 item_id, uint32 extendedCost) const
{
for (VendorItemList::const_iterator i = m_items.begin(); i != m_items.end(); ++i)
if((*i)->item == item_id && (*i)->ExtendedCost == extendedCost)
if ((*i)->item == item_id && (*i)->ExtendedCost == extendedCost)
return *i;
return NULL;
}
@@ -241,7 +241,7 @@ void Creature::RemoveCorpse(bool setSpawnTime)
AI()->CorpseRemoved(respawnDelay);
// Should get removed later, just keep "compatibility" with scripts
if(setSpawnTime)
if (setSpawnTime)
m_respawnTime = time(NULL) + respawnDelay;
float x, y, z, o;
@@ -2252,7 +2252,7 @@ void Creature::AllLootRemovedFromCorpse()
if (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE))
{
time_t now = time(NULL);
if(m_corpseRemoveTime <= now)
if (m_corpseRemoveTime <= now)
return;
float decayRate;
@@ -254,7 +254,7 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title
data << uint32(eEmote._Emote); // NPC emote
size_t count_pos = data.wpos();
data << uint8 ( _questMenu.GetMenuItemCount());
data << uint8 (_questMenu.GetMenuItemCount());
uint32 count = 0;
for (; count < _questMenu.GetMenuItemCount(); ++count)
{
@@ -232,13 +232,13 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
case GAMEOBJECT_TYPE_TRAP:
if (GetGOInfo()->trap.stealthed)
{
m_stealth.AddFlag( STEALTH_TRAP);
m_stealth.AddFlag(STEALTH_TRAP);
m_stealth.AddValue(STEALTH_TRAP, 300);
}
if (GetGOInfo()->trap.invisible)
{
m_invisibility.AddFlag( INVISIBILITY_TRAP);
m_invisibility.AddFlag(INVISIBILITY_TRAP);
m_invisibility.AddValue(INVISIBILITY_TRAP, 70);
}
@@ -255,7 +255,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
void GameObject::Update(uint32 diff)
{
if(!AI())
if (!AI())
{
if (!AIM_Initialize())
sLog->outError("Could not initialize GameObjectAI");
@@ -1523,10 +1523,10 @@ void GameObject::Use(Unit* user)
if (player->CanUseBattlegroundObject())
{
// in battleground check
Battleground *bg = player->GetBattleground();
Battleground* bg = player->GetBattleground();
if (!bg)
return;
if( player->GetVehicle())
if (player->GetVehicle())
return;
// BG flag dropped
// WS:
@@ -1589,7 +1589,7 @@ void GameObject::Use(Unit* user)
if (!spellId)
return;
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo)
{
if (user->GetTypeId() != TYPEID_PLAYER || !sOutdoorPvPMgr->HandleCustomSpell(user->ToPlayer(), spellId, this))
+1 -1
View File
@@ -1520,7 +1520,7 @@ bool Position::HasInArc(float arc, const Position *obj) const
// move angle to range -pi ... +pi
angle = MapManager::NormalizeOrientation(angle);
if(angle > M_PI)
if (angle > M_PI)
angle -= 2.0f*M_PI;
float lborder = -1 * (arc/2.0f); // in range -pi..0
@@ -39,12 +39,12 @@ ObjectPosSelector::ObjectPosSelector(float x, float y, float size, float dist)
ObjectPosSelector::UsedPosList::value_type const* ObjectPosSelector::nextUsedPos(UsedPosType uptype)
{
UsedPosList::const_iterator itr = m_nextUsedPos[uptype];
if(itr!=m_UsedPosLists[uptype].end())
if (itr!=m_UsedPosLists[uptype].end())
++itr;
if(itr==m_UsedPosLists[uptype].end())
if (itr==m_UsedPosLists[uptype].end())
{
if(!m_UsedPosLists[~uptype].empty())
if (!m_UsedPosLists[~uptype].empty())
return &*m_UsedPosLists[~uptype].rbegin();
else
return NULL;
@@ -55,7 +55,7 @@ ObjectPosSelector::UsedPosList::value_type const* ObjectPosSelector::nextUsedPos
void ObjectPosSelector::AddUsedPos(float size, float angle, float dist)
{
if(angle>=0)
if (angle>=0)
m_UsedPosLists[USED_POS_PLUS].insert(UsedPosList::value_type(angle, UsedPos(1.0, size, dist)));
else
m_UsedPosLists[USED_POS_MINUS].insert(UsedPosList::value_type(-angle, UsedPos(-1.0, size, dist)));
@@ -75,9 +75,9 @@ void ObjectPosSelector::InitializeAngle()
bool ObjectPosSelector::FirstAngle(float& angle)
{
if(m_UsedPosLists[USED_POS_PLUS].empty() && !m_UsedPosLists[USED_POS_MINUS].empty() )
if (m_UsedPosLists[USED_POS_PLUS].empty() && !m_UsedPosLists[USED_POS_MINUS].empty() )
return NextAngleFor(*m_UsedPosLists[USED_POS_MINUS].begin(), 1.0, USED_POS_PLUS, angle);
else if(m_UsedPosLists[USED_POS_MINUS].empty() && !m_UsedPosLists[USED_POS_PLUS].empty() )
else if (m_UsedPosLists[USED_POS_MINUS].empty() && !m_UsedPosLists[USED_POS_PLUS].empty() )
return NextAngleFor(*m_UsedPosLists[USED_POS_PLUS].begin(), -1.0, USED_POS_MINUS, angle);
return false;
@@ -90,7 +90,7 @@ bool ObjectPosSelector::NextAngle(float& angle)
m_smallStepOk[USED_POS_PLUS] || m_smallStepOk[USED_POS_MINUS] )
{
// calculate next possible angle
if(NextPosibleAngle(angle))
if (NextPosibleAngle(angle))
return true;
}
@@ -103,53 +103,49 @@ bool ObjectPosSelector::NextUsedAngle(float& angle)
m_nextUsedPos[USED_POS_MINUS]!=m_UsedPosLists[USED_POS_MINUS].end() )
{
// calculate next possible angle
if(!NextPosibleAngle(angle))
if (!NextPosibleAngle(angle))
return true;
}
return false;
}
bool ObjectPosSelector::NextPosibleAngle( float& angle )
bool ObjectPosSelector::NextPosibleAngle(float& angle)
{
// ++ direction less updated
if( m_nextUsedPos[USED_POS_PLUS]!=m_UsedPosLists[USED_POS_PLUS].end() &&
if (m_nextUsedPos[USED_POS_PLUS]!=m_UsedPosLists[USED_POS_PLUS].end() &&
(m_nextUsedPos[USED_POS_MINUS]==m_UsedPosLists[USED_POS_MINUS].end() || m_nextUsedPos[USED_POS_PLUS]->first <= m_nextUsedPos[USED_POS_MINUS]->first) )
{
bool ok;
if(m_smallStepOk[USED_POS_PLUS])
if (m_smallStepOk[USED_POS_PLUS])
ok = NextSmallStepAngle(1.0, USED_POS_PLUS, angle);
else
ok = NextAngleFor(*m_nextUsedPos[USED_POS_PLUS], 1.0, USED_POS_PLUS, angle);
if(!ok)
if (!ok)
++m_nextUsedPos[USED_POS_PLUS]; // increase. only at fail (original or checked)
return ok;
}
// -- direction less updated
else if( m_nextUsedPos[USED_POS_MINUS]!=m_UsedPosLists[USED_POS_MINUS].end())
else if (m_nextUsedPos[USED_POS_MINUS]!=m_UsedPosLists[USED_POS_MINUS].end())
{
bool ok;
if(m_smallStepOk[USED_POS_MINUS])
if (m_smallStepOk[USED_POS_MINUS])
ok = NextSmallStepAngle(-1.0, USED_POS_MINUS, angle);
else
ok = NextAngleFor(*m_nextUsedPos[USED_POS_MINUS], -1.0, USED_POS_MINUS, angle);
if(!ok)
if (!ok)
++m_nextUsedPos[USED_POS_MINUS];
return ok;
}
else // both list empty
{
if( m_smallStepOk[USED_POS_PLUS] && (!m_smallStepOk[USED_POS_MINUS] || m_smallStepAngle[USED_POS_PLUS] <= m_smallStepAngle[USED_POS_MINUS]) )
{
if (m_smallStepOk[USED_POS_PLUS] && (!m_smallStepOk[USED_POS_MINUS] || m_smallStepAngle[USED_POS_PLUS] <= m_smallStepAngle[USED_POS_MINUS]))
return NextSmallStepAngle(1.0, USED_POS_PLUS, angle);
}
// -- direction less updated
else if( m_smallStepOk[USED_POS_MINUS] )
{
else if (m_smallStepOk[USED_POS_MINUS])
return NextSmallStepAngle(-1.0, USED_POS_MINUS, angle);
}
}
// no angles
@@ -53,14 +53,14 @@ struct ObjectPosSelector
bool NextAngle(float& angle);
bool NextUsedAngle(float& angle);
bool NextPosibleAngle( float& angle );
bool NextPosibleAngle(float& angle);
bool CheckAngle(UsedPosList::value_type const& nextUsedPos, float sign, float angle ) const
{
float angle_step2 = GetAngle(nextUsedPos.second);
float next_angle = nextUsedPos.first;
if(nextUsedPos.second.sign * sign < 0) // last node from diff. list (-pi+alpha)
if (nextUsedPos.second.sign * sign < 0) // last node from diff. list (-pi+alpha)
next_angle = 2*M_PI-next_angle; // move to positive
return fabs(angle)+angle_step2 <= next_angle;
@@ -68,13 +68,13 @@ struct ObjectPosSelector
bool CheckOriginal() const
{
return (m_UsedPosLists[USED_POS_PLUS].empty() || CheckAngle( *m_UsedPosLists[USED_POS_PLUS].begin(), 1.0, 0)) &&
(m_UsedPosLists[USED_POS_MINUS].empty() || CheckAngle( *m_UsedPosLists[USED_POS_MINUS].begin(), -1.0, 0));
return (m_UsedPosLists[USED_POS_PLUS].empty() || CheckAngle(*m_UsedPosLists[USED_POS_PLUS].begin(), 1.0, 0)) &&
(m_UsedPosLists[USED_POS_MINUS].empty() || CheckAngle(*m_UsedPosLists[USED_POS_MINUS].begin(), -1.0, 0));
}
bool IsNonBalanced() const { return m_UsedPosLists[USED_POS_PLUS].empty() != m_UsedPosLists[USED_POS_MINUS].empty(); }
bool NextAngleFor( UsedPosList::value_type const& usedPos, float sign, UsedPosType uptype, float &angle )
bool NextAngleFor(UsedPosList::value_type const& usedPos, float sign, UsedPosType uptype, float &angle)
{
float angle_step = GetAngle(usedPos.second);
@@ -82,10 +82,10 @@ struct ObjectPosSelector
angle = usedPos.first * usedPos.second.sign + angle_step * sign;
UsedPosList::value_type const* nextNode = nextUsedPos(uptype);
if(nextNode)
if (nextNode)
{
// if next node permit use selected angle, then do it
if(!CheckAngle(*nextNode, sign, angle))
if (!CheckAngle(*nextNode, sign, angle))
{
m_smallStepOk[uptype] = false;
return false;
@@ -100,27 +100,27 @@ struct ObjectPosSelector
return true;
}
bool NextSmallStepAngle( float sign, UsedPosType uptype, float &angle )
bool NextSmallStepAngle(float sign, UsedPosType uptype, float &angle)
{
// next possible angle
angle = m_smallStepAngle[uptype] + m_anglestep * sign;
if(fabs(angle) > M_PI)
if (fabs(angle) > M_PI)
{
m_smallStepOk[uptype] = false;
return false;
}
if(m_smallStepNextUsedPos[uptype])
if (m_smallStepNextUsedPos[uptype])
{
if(fabs(angle) >= m_smallStepNextUsedPos[uptype]->first)
if (fabs(angle) >= m_smallStepNextUsedPos[uptype]->first)
{
m_smallStepOk[uptype] = false;
return false;
}
// if next node permit use selected angle, then do it
if(!CheckAngle(*m_smallStepNextUsedPos[uptype], sign, angle))
if (!CheckAngle(*m_smallStepNextUsedPos[uptype], sign, angle))
{
m_smallStepOk[uptype] = false;
return false;
+12 -12
View File
@@ -299,7 +299,7 @@ Item* TradeData::GetItem(TradeSlots slot) const
bool TradeData::HasItem(uint64 item_guid) const
{
for(uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
for (uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
if (m_items[i] == item_guid)
return true;
@@ -7227,7 +7227,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, int32 honor, bool pvpt
uint32 itemId = sWorld->getIntConfig(CONFIG_PVP_TOKEN_ID);
int32 count = sWorld->getIntConfig(CONFIG_PVP_TOKEN_COUNT);
if(AddItem(itemId, count))
if (AddItem(itemId, count))
ChatHandler(this).PSendSysMessage("You have been awarded a token for slaying another player.");
}
}
@@ -7923,7 +7923,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const *proto, uint8 slot, bool apply
attType = OFF_ATTACK;
}
if(CanUseAttackType(attType))
if (CanUseAttackType(attType))
_ApplyWeaponDamage(slot, proto, ssv, apply);
int32 extraDPS = ssv->getDPSMod(proto->ScalingStatValue);
@@ -11185,10 +11185,10 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
{
bool b_found = false;
for (int t = KEYRING_SLOT_START; t < KEYRING_SLOT_END; ++t)
for (uint8 t = KEYRING_SLOT_START; t < KEYRING_SLOT_END; ++t)
{
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
if( pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_keys[t-KEYRING_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
pItem2 = GetItemByPos(INVENTORY_SLOT_BAG_0, t);
if (pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_keys[t-KEYRING_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
{
inv_keys[t-KEYRING_SLOT_START] += pItem->GetCount();
b_found = true;
@@ -11200,7 +11200,7 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
for (int t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; ++t)
{
pItem2 = GetItemByPos(INVENTORY_SLOT_BAG_0, t);
if( pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_tokens[t-CURRENCYTOKEN_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
if (pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_tokens[t-CURRENCYTOKEN_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
{
inv_tokens[t-CURRENCYTOKEN_SLOT_START] += pItem->GetCount();
b_found = true;
@@ -11212,7 +11212,7 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
for (int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
{
pItem2 = GetItemByPos(INVENTORY_SLOT_BAG_0, t);
if( pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_slot_items[t-INVENTORY_SLOT_ITEM_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
if (pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_slot_items[t-INVENTORY_SLOT_ITEM_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
{
inv_slot_items[t-INVENTORY_SLOT_ITEM_START] += pItem->GetCount();
b_found = true;
@@ -11230,7 +11230,7 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
for (uint32 j = 0; j < bag->GetBagSize(); j++)
{
pItem2 = GetItemByPos(t, j);
if( pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_bags[t-INVENTORY_SLOT_BAG_START][j] + pItem->GetCount() <= pProto->GetMaxStackSize())
if (pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_bags[t-INVENTORY_SLOT_BAG_START][j] + pItem->GetCount() <= pProto->GetMaxStackSize())
{
inv_bags[t-INVENTORY_SLOT_BAG_START][j] += pItem->GetCount();
b_found = true;
@@ -12357,7 +12357,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
{
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
// Also remove all contained items if the item is a bag.
// This if() prevents item saving crashes if the condition for a bag to be empty before being destroyed was bypassed somehow.
// This if () prevents item saving crashes if the condition for a bag to be empty before being destroyed was bypassed somehow.
if (pItem->IsNotEmptyBag())
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
DestroyItem(slot, i, update);
@@ -13517,7 +13517,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
// If we're dealing with a gem inside a prismatic socket we need to check the prismatic socket requirements
// rather than the gem requirements itself. If the socket has no color it is a prismatic socket.
if((slot == SOCK_ENCHANTMENT_SLOT || slot == SOCK_ENCHANTMENT_SLOT_2 || slot == SOCK_ENCHANTMENT_SLOT_3)
if ((slot == SOCK_ENCHANTMENT_SLOT || slot == SOCK_ENCHANTMENT_SLOT_2 || slot == SOCK_ENCHANTMENT_SLOT_3)
&& !item->GetTemplate()->Socket[slot-SOCK_ENCHANTMENT_SLOT].Color)
{
// Check if the requirements for the prismatic socket are met before applying the gem stats
@@ -24463,7 +24463,7 @@ bool Player::AddItem(uint32 itemId, uint32 count)
}
Item* item = StoreNewItem(dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId));
if(item)
if (item)
SendNewItem(item, count, true, false);
else
return false;
@@ -541,7 +541,7 @@ bool Transport::RemovePassenger(Player* passenger)
void Transport::Update(uint32 p_diff)
{
if(!AI())
if (!AI())
{
if (!AIM_Initialize())
sLog->outError("Could not initialize GameObjectAI for Transport");
@@ -669,7 +669,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y,
pCreature->SetHomePosition(pCreature->GetPositionX(), pCreature->GetPositionY(), pCreature->GetPositionZ(), pCreature->GetOrientation());
if(!pCreature->IsPositionValid())
if (!pCreature->IsPositionValid())
{
sLog->outError("Creature (guidlow %d, entry %d) not created. Suggested coordinates isn't valid (X: %f Y: %f)", pCreature->GetGUIDLow(), pCreature->GetEntry(), pCreature->GetPositionX(), pCreature->GetPositionY());
delete pCreature;
+13 -13
View File
@@ -1948,12 +1948,12 @@ void Unit::AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType, bool ex
GetGUIDLow(), pVictim->GetGUIDLow(), pVictim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
}
if(!extra && m_extraAttacks)
if (!extra && m_extraAttacks)
{
while(m_extraAttacks)
{
AttackerStateUpdate(pVictim, BASE_ATTACK, true);
if(m_extraAttacks > 0)
if (m_extraAttacks > 0)
--m_extraAttacks;
}
}
@@ -6619,7 +6619,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
break;
}
// Glyph of Mend Pet
if(dummySpell->Id == 57870)
if (dummySpell->Id == 57870)
{
pVictim->CastSpell(pVictim, 57894, true, NULL, NULL, GetGUID());
return true;
@@ -7208,7 +7208,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
case 70808:
{
// Chain Heal
if((procSpell->SpellFamilyFlags[0] & 0x100) && (procEx & PROC_EX_CRITICAL_HIT))
if ((procSpell->SpellFamilyFlags[0] & 0x100) && (procEx & PROC_EX_CRITICAL_HIT))
{
triggered_spell_id = 70809;
SpellEntry const* triggeredSpell = sSpellStore.LookupEntry(triggered_spell_id);
@@ -7222,7 +7222,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
case 70811:
{
// Lightning Bolt & Chain Lightning
if(procSpell->SpellFamilyFlags[0] & 0x3)
if (procSpell->SpellFamilyFlags[0] & 0x3)
{
if (ToPlayer()->HasSpellCooldown(16166))
{
@@ -8417,14 +8417,14 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
//Item - Coliseum 25 Normal Caster Trinket
case 67712:
{
if(!pVictim || !pVictim->isAlive())
if (!pVictim || !pVictim->isAlive())
return false;
// stacking
CastSpell(this, 67713, true, NULL, triggeredByAura);
Aura * dummy = GetAura(67713);
// release at 3 aura in stack (cont contain in basepoint of trigger aura)
if(!dummy || dummy->GetStackAmount() < triggerAmount)
if (!dummy || dummy->GetStackAmount() < triggerAmount)
return false;
RemoveAurasDueToSpell(67713);
@@ -8435,14 +8435,14 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
//Item - Coliseum 25 Heroic Caster Trinket
case 67758:
{
if(!pVictim || !pVictim->isAlive())
if (!pVictim || !pVictim->isAlive())
return false;
// stacking
CastSpell(this, 67759, true, NULL, triggeredByAura);
Aura * dummy = GetAura(67759);
// release at 3 aura in stack (cont contain in basepoint of trigger aura)
if(!dummy || dummy->GetStackAmount() < triggerAmount)
if (!dummy || dummy->GetStackAmount() < triggerAmount)
return false;
RemoveAurasDueToSpell(67759);
@@ -10560,7 +10560,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
break;
case SPELLFAMILY_HUNTER:
// Steady Shot
if(spellProto->SpellFamilyFlags[1] & 0x1)
if (spellProto->SpellFamilyFlags[1] & 0x1)
if (AuraEffect * aurEff = GetAuraEffect(56826, 0)) // Glyph of Steady Shot
if (pVictim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_HUNTER, 0x00004000, 0, 0, GetGUID()))
AddPctN(DoneTotalMod, aurEff->GetAmount());
@@ -12895,7 +12895,7 @@ Unit* Creature::SelectVictim()
}
Unit::AuraEffectList const& iAuras = GetAuraEffectsByType(SPELL_AURA_MOD_INVISIBILITY);
if(!iAuras.empty())
if (!iAuras.empty())
{
for (Unit::AuraEffectList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr)
{
@@ -14195,7 +14195,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag,
if (isVictim)
procExtra &= ~PROC_EX_INTERNAL_REQ_FAMILY;
SpellEntry const* spellProto = itr->second->GetBase()->GetSpellProto();
if(!IsTriggeredAtSpellProcEvent(pTarget, triggerData.aura, procSpell, procFlag, procExtra, attType, isVictim, active, triggerData.spellProcEvent))
if (!IsTriggeredAtSpellProcEvent(pTarget, triggerData.aura, procSpell, procFlag, procExtra, attType, isVictim, active, triggerData.spellProcEvent))
continue;
// Triggered spells not triggering additional spells
@@ -16750,7 +16750,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
uint64 origCasterGUID = (itr->second.castFlags & NPC_CLICK_CAST_ORIG_CASTER_OWNER) ? GetOwnerGUID() : clicker->GetGUID();
SpellEntry const* spellEntry = sSpellStore.LookupEntry(itr->second.spellId);
// if(!spellEntry) should be checked at npc_spellclick load
// if (!spellEntry) should be checked at npc_spellclick load
if (seatId > -1)
{
+1 -1
View File
@@ -500,7 +500,7 @@ void Vehicle::InitMovementInfoForBase()
if (vehicleFlags & VEHICLE_FLAG_FULLSPEEDTURNING)
me->AddExtraUnitMovementFlag(MOVEMENTFLAG2_FULL_SPEED_TURNING);
if (vehicleFlags & VEHICLE_FLAG_ALLOW_PITCHING)
me->AddExtraUnitMovementFlag( MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING);
me->AddExtraUnitMovementFlag(MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING);
if (vehicleFlags & VEHICLE_FLAG_FULLSPEEDPITCHING)
me->AddExtraUnitMovementFlag(MOVEMENTFLAG2_FULL_SPEED_PITCHING);
}