*Some cleanup (mostly whitespace changes)
--HG-- branch : trunk
This commit is contained in:
@@ -428,16 +428,14 @@ void BattleGround::Update(uint32 diff)
|
||||
plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
|
||||
// remove auras with duration lower than 30s
|
||||
Unit::AuraMap & aurMap = plr->GetAuras();
|
||||
for (Unit::AuraMap::iterator iter = aurMap.begin(); iter != aurMap.end(); )
|
||||
for (Unit::AuraMap::iterator iter = aurMap.begin(); iter != aurMap.end();)
|
||||
{
|
||||
if (!iter->second->IsPermanent()
|
||||
&& iter->second->GetAuraDuration()<=30*IN_MILISECONDS
|
||||
&& iter->second->IsPositive()
|
||||
&& (!(iter->second->GetSpellProto()->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY))
|
||||
&& (!iter->second->IsAuraType(SPELL_AURA_MOD_INVISIBILITY)))
|
||||
{
|
||||
plr->RemoveAura(iter);
|
||||
}
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
|
||||
@@ -1132,9 +1132,9 @@ BattleGroundMgr::~BattleGroundMgr()
|
||||
|
||||
void BattleGroundMgr::DeleteAllBattleGrounds()
|
||||
{
|
||||
for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
|
||||
for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i)
|
||||
{
|
||||
for (BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end(); )
|
||||
for (BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end();)
|
||||
{
|
||||
BattleGround * bg = itr->second;
|
||||
m_BattleGrounds[i].erase(itr++);
|
||||
@@ -1157,7 +1157,7 @@ void BattleGroundMgr::DeleteAllBattleGrounds()
|
||||
void BattleGroundMgr::Update(uint32 diff)
|
||||
{
|
||||
BattleGroundSet::iterator itr, next;
|
||||
for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
|
||||
for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i)
|
||||
{
|
||||
itr = m_BattleGrounds[i].begin();
|
||||
// skip updating battleground template
|
||||
@@ -1530,7 +1530,7 @@ uint32 BattleGroundMgr::CreateClientVisibleInstanceId(BattleGroundTypeId bgTypeI
|
||||
// the following works, because std::set is default ordered with "<"
|
||||
// the optimalization would be to use as bitmask std::vector<uint32> - but that would only make code unreadable
|
||||
uint32 lastId = 0;
|
||||
for (std::set<uint32>::iterator itr = m_ClientBattleGroundIds[bgTypeId][queue_id].begin(); itr != m_ClientBattleGroundIds[bgTypeId][queue_id].end(); )
|
||||
for (std::set<uint32>::iterator itr = m_ClientBattleGroundIds[bgTypeId][queue_id].begin(); itr != m_ClientBattleGroundIds[bgTypeId][queue_id].end();)
|
||||
{
|
||||
if( (++lastId) != *itr) //if there is a gap between the ids, we will break..
|
||||
break;
|
||||
|
||||
+1
-1
@@ -837,7 +837,7 @@ bool ChatHandler::hasStringAbbr(const char* name, const char* part)
|
||||
if (!*part)
|
||||
return false;
|
||||
|
||||
for (; ; )
|
||||
for (;;)
|
||||
{
|
||||
if (!*part)
|
||||
return true;
|
||||
|
||||
@@ -675,7 +675,7 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
|
||||
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, text_emote, 0, unit);
|
||||
|
||||
//Send scripted event call
|
||||
if (unit && unit->GetTypeId()==TYPEID_UNIT && ((Creature*)unit)->AI())
|
||||
if (unit && unit->GetTypeId() == TYPEID_UNIT && ((Creature*)unit)->AI())
|
||||
((Creature*)unit)->AI()->ReceiveEmote(GetPlayer(),text_emote);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ namespace Trinity
|
||||
|
||||
inline uint32 Gain(Player *pl, Unit *u)
|
||||
{
|
||||
if (u->GetTypeId()==TYPEID_UNIT && (
|
||||
if (u->GetTypeId() == TYPEID_UNIT && (
|
||||
((Creature*)u)->isTotem() || ((Creature*)u)->isPet() ||
|
||||
(((Creature*)u)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL) ))
|
||||
return 0;
|
||||
|
||||
@@ -792,7 +792,7 @@ namespace Trinity
|
||||
if(!u->isAlive())
|
||||
return false;
|
||||
|
||||
if(u->GetTypeId()==TYPEID_UNIT && ((Creature*)u)->isTotem())
|
||||
if(u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem())
|
||||
return false;
|
||||
|
||||
return i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u);
|
||||
@@ -910,7 +910,7 @@ namespace Trinity
|
||||
// Check contains checks for: live, non-selectable, non-attackable flags, flight check and GM check, ignore totems
|
||||
if (!u->isTargetableForAttack())
|
||||
return false;
|
||||
if(u->GetTypeId()==TYPEID_UNIT && ((Creature*)u)->isTotem())
|
||||
if(u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem())
|
||||
return false;
|
||||
|
||||
if(( i_targetForPlayer ? !i_funit->IsFriendlyTo(u) : i_funit->IsHostileTo(u) )&& i_obj->IsWithinDistInMap(u, i_range))
|
||||
|
||||
@@ -151,7 +151,7 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
|
||||
if(!target->isAlive() || target->isInFlight() )
|
||||
return;
|
||||
|
||||
if(target->GetTypeId()==TYPEID_UNIT && ((Creature*)target)->isTotem())
|
||||
if(target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->isTotem())
|
||||
return;
|
||||
|
||||
if (!i_dynobject.IsWithinDistInMap(target, i_dynobject.GetRadius()))
|
||||
@@ -162,7 +162,7 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
|
||||
return;
|
||||
|
||||
// Evade target
|
||||
if( target->GetTypeId()==TYPEID_UNIT && ((Creature*)target)->IsInEvadeMode() )
|
||||
if( target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->IsInEvadeMode() )
|
||||
return;
|
||||
|
||||
//Check player targets and remove if in GM mode or GM invisibility (for not self casting case)
|
||||
|
||||
+2
-2
@@ -1164,7 +1164,7 @@ void Group::_setLeader(const uint64 &guid)
|
||||
{
|
||||
for (uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
|
||||
{
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); )
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end();)
|
||||
{
|
||||
if(itr->second.perm)
|
||||
{
|
||||
@@ -1487,7 +1487,7 @@ void Group::ResetInstances(uint8 method, Player* SendMsgTo)
|
||||
// we assume that when the difficulty changes, all instances that can be reset will be
|
||||
uint8 dif = GetDifficulty();
|
||||
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[dif].begin(); itr != m_boundInstances[dif].end(); )
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[dif].begin(); itr != m_boundInstances[dif].end();)
|
||||
{
|
||||
InstanceSave *p = itr->second.save;
|
||||
const MapEntry *entry = sMapStore.LookupEntry(itr->first);
|
||||
|
||||
+1
-1
@@ -1720,7 +1720,7 @@ Item* Guild::StoreItem(uint8 tabId, GuildItemPosCountVec const& dest, Item* pIte
|
||||
|
||||
Item* lastItem = pItem;
|
||||
|
||||
for (GuildItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); )
|
||||
for (GuildItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end();)
|
||||
{
|
||||
uint8 slot = itr->Slot;
|
||||
uint32 count = itr->Count;
|
||||
|
||||
@@ -627,7 +627,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, bool warn, uint32 timeLe
|
||||
}
|
||||
|
||||
// remove all binds to instances of the given map
|
||||
for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); )
|
||||
for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end();)
|
||||
{
|
||||
if(itr->second->GetMapId() == mapid)
|
||||
_ResetSave(itr);
|
||||
|
||||
+2
-2
@@ -6457,7 +6457,7 @@ bool ChatHandler::HandleMovegensCommand(const char* /*args*/)
|
||||
break;
|
||||
}
|
||||
case HOME_MOTION_TYPE:
|
||||
if(unit->GetTypeId()==TYPEID_UNIT)
|
||||
if(unit->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
float x,y,z;
|
||||
mg->GetDestination(x,y,z);
|
||||
@@ -6838,7 +6838,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(const char *args)
|
||||
for (uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
|
||||
{
|
||||
Player::BoundInstancesMap &binds = player->GetBoundInstances(i);
|
||||
for (Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end(); )
|
||||
for (Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end();)
|
||||
{
|
||||
if(itr->first != player->GetMapId())
|
||||
{
|
||||
|
||||
+3
-3
@@ -768,7 +768,7 @@ void Map::Update(const uint32 &t_diff)
|
||||
// non-player active objects
|
||||
if (!m_activeNonPlayers.empty())
|
||||
{
|
||||
for (m_activeNonPlayersIter = m_activeNonPlayers.begin(); m_activeNonPlayersIter != m_activeNonPlayers.end(); )
|
||||
for (m_activeNonPlayersIter = m_activeNonPlayers.begin(); m_activeNonPlayersIter != m_activeNonPlayers.end();)
|
||||
{
|
||||
// skip not in world
|
||||
WorldObject* obj = *m_activeNonPlayersIter;
|
||||
@@ -1220,7 +1220,7 @@ void Map::UnloadAll()
|
||||
// clear all delayed moves, useless anyway do this moves before map unload.
|
||||
i_creaturesToMove.clear();
|
||||
|
||||
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end(); )
|
||||
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end();)
|
||||
{
|
||||
NGridType &grid(*i->getSource());
|
||||
++i;
|
||||
@@ -2268,7 +2268,7 @@ void Map::DelayedUpdate(const uint32 t_diff)
|
||||
// This isn't really bother us, since as soon as we have instanced BG-s, the whole map unloads as the BG gets ended
|
||||
if (!IsBattleGroundOrArena())
|
||||
{
|
||||
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end(); )
|
||||
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end();)
|
||||
{
|
||||
NGridType *grid = i->getSource();
|
||||
GridInfo *info = i->getSource()->getGridInfoRef();
|
||||
|
||||
+4
-4
@@ -1783,7 +1783,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
{
|
||||
// Remove Demonic Sacrifice auras (known pet)
|
||||
Unit::AuraEffectList const& auraClassScripts = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr!=auraClassScripts.end(); )
|
||||
for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr!=auraClassScripts.end();)
|
||||
{
|
||||
if((*itr)->GetMiscValue()==2228)
|
||||
{
|
||||
@@ -1864,7 +1864,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
{
|
||||
// Remove Demonic Sacrifice auras (known pet)
|
||||
Unit::AuraEffectList const& auraClassScripts = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr!=auraClassScripts.end(); )
|
||||
for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr!=auraClassScripts.end();)
|
||||
{
|
||||
if((*itr)->GetMiscValue()==2228)
|
||||
{
|
||||
@@ -1903,7 +1903,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
|
||||
return NULL;
|
||||
}
|
||||
go->SetRespawnTime(respawnTime);
|
||||
if(GetTypeId() == TYPEID_PLAYER || GetTypeId()==TYPEID_UNIT) //not sure how to handle this
|
||||
if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT) //not sure how to handle this
|
||||
((Unit*)this)->AddGameObject(go);
|
||||
else
|
||||
go->SetSpawnedByDefault(false);
|
||||
@@ -1920,7 +1920,7 @@ Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint3
|
||||
return NULL;
|
||||
|
||||
//summon->SetName(GetName());
|
||||
if(GetTypeId() == TYPEID_PLAYER || GetTypeId()==TYPEID_UNIT)
|
||||
if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
summon->setFaction(((Unit*)this)->getFaction());
|
||||
summon->SetLevel(((Unit*)this)->getLevel());
|
||||
|
||||
@@ -54,7 +54,7 @@ ObjectGridRespawnMover::Visit(CreatureMapType &m)
|
||||
// creature in unloading grid can have respawn point in another grid
|
||||
// if it will be unloaded then it will not respawn in original grid until unload/load original grid
|
||||
// move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn.
|
||||
for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); )
|
||||
for (CreatureMapType::iterator iter = m.begin(); iter != m.end();)
|
||||
{
|
||||
Creature * c = iter->getSource();
|
||||
++iter;
|
||||
|
||||
@@ -3399,7 +3399,7 @@ void ObjectMgr::LoadGroups()
|
||||
|
||||
// clean groups
|
||||
// TODO: maybe delete from the DB before loading in this case
|
||||
for (GroupSet::iterator itr = mGroupSet.begin(); itr != mGroupSet.end(); )
|
||||
for (GroupSet::iterator itr = mGroupSet.begin(); itr != mGroupSet.end();)
|
||||
{
|
||||
if((*itr)->GetMembersCount() < 2)
|
||||
{
|
||||
@@ -7372,7 +7372,7 @@ bool ObjectMgr::LoadTrinityStrings(DatabaseType& db, char const* table, int32 mi
|
||||
}
|
||||
|
||||
// cleanup affected map part for reloading case
|
||||
for (TrinityStringLocaleMap::iterator itr = mTrinityStringLocaleMap.begin(); itr != mTrinityStringLocaleMap.end(); )
|
||||
for (TrinityStringLocaleMap::iterator itr = mTrinityStringLocaleMap.begin(); itr != mTrinityStringLocaleMap.end();)
|
||||
{
|
||||
if (itr->first >= start_value && itr->first < end_value)
|
||||
mTrinityStringLocaleMap.erase(itr++);
|
||||
|
||||
@@ -275,7 +275,7 @@ bool OPvPCapturePoint::Update(uint32 diff)
|
||||
|
||||
for (uint32 team = 0; team < 2; ++team)
|
||||
{
|
||||
for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); )
|
||||
for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end();)
|
||||
{
|
||||
Player *player = *itr;
|
||||
++itr;
|
||||
|
||||
+3
-3
@@ -1093,7 +1093,7 @@ void Pet::_SaveSpellCooldowns()
|
||||
time_t curTime = time(NULL);
|
||||
|
||||
// remove oudated and save active
|
||||
for (CreatureSpellCooldowns::iterator itr = m_CreatureSpellCooldowns.begin(); itr != m_CreatureSpellCooldowns.end(); )
|
||||
for (CreatureSpellCooldowns::iterator itr = m_CreatureSpellCooldowns.begin(); itr != m_CreatureSpellCooldowns.end();)
|
||||
{
|
||||
if (itr->second <= curTime)
|
||||
m_CreatureSpellCooldowns.erase(itr++);
|
||||
@@ -1575,7 +1575,7 @@ bool Pet::resetTalents(bool no_cost)
|
||||
|
||||
for (uint8 j = 0; j < MAX_TALENT_RANK; ++j)
|
||||
{
|
||||
for (PetSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); )
|
||||
for (PetSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end();)
|
||||
{
|
||||
if (itr->second.state == PETSPELL_REMOVED)
|
||||
{
|
||||
@@ -1865,7 +1865,7 @@ void Pet::CastPetAuras(bool current)
|
||||
if (!IsPermanentPetFor((Player*)owner))
|
||||
return;
|
||||
|
||||
for (PetAuraSet::const_iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end(); )
|
||||
for (PetAuraSet::const_iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end();)
|
||||
{
|
||||
PetAura const* pa = *itr;
|
||||
++itr;
|
||||
|
||||
+18
-18
@@ -3608,7 +3608,7 @@ void Player::RemoveSpellCategoryCooldown(uint32 cat, bool update /* = false */)
|
||||
return;
|
||||
|
||||
const SpellCategorySet& ct_set = ct->second;
|
||||
for (SpellCooldowns::const_iterator i = m_spellCooldowns.begin(); i != m_spellCooldowns.end(); )
|
||||
for (SpellCooldowns::const_iterator i = m_spellCooldowns.begin(); i != m_spellCooldowns.end();)
|
||||
{
|
||||
if (ct_set.find(i->first) != ct_set.end())
|
||||
RemoveSpellCooldown((i++)->first, update);
|
||||
@@ -3695,7 +3695,7 @@ void Player::_SaveSpellCooldowns()
|
||||
time_t infTime = curTime + infinityCooldownDelayCheck;
|
||||
|
||||
// remove outdated and save active
|
||||
for (SpellCooldowns::iterator itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); )
|
||||
for (SpellCooldowns::iterator itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end();)
|
||||
{
|
||||
if(itr->second.end <= curTime)
|
||||
m_spellCooldowns.erase(itr++);
|
||||
@@ -6806,7 +6806,7 @@ void Player::DuelComplete(DuelCompleteType type)
|
||||
|
||||
/* remove auras */
|
||||
AuraMap &itsAuras = duel->opponent->GetAuras();
|
||||
for (AuraMap::iterator i = itsAuras.begin(); i != itsAuras.end(); )
|
||||
for (AuraMap::iterator i = itsAuras.begin(); i != itsAuras.end();)
|
||||
{
|
||||
if (!i->second->IsPositive() && i->second->GetCasterGUID() == GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
||||
duel->opponent->RemoveAura(i);
|
||||
@@ -6815,7 +6815,7 @@ void Player::DuelComplete(DuelCompleteType type)
|
||||
}
|
||||
|
||||
AuraMap &myAuras = GetAuras();
|
||||
for (AuraMap::iterator i = myAuras.begin(); i != myAuras.end(); )
|
||||
for (AuraMap::iterator i = myAuras.begin(); i != myAuras.end();)
|
||||
{
|
||||
if (!i->second->IsPositive() && i->second->GetCasterGUID() == duel->opponent->GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
||||
RemoveAura(i);
|
||||
@@ -10799,7 +10799,7 @@ Item* Player::StoreItem( ItemPosCountVec const& dest, Item* pItem, bool update )
|
||||
|
||||
Item* lastItem = pItem;
|
||||
uint32 entry = pItem->GetEntry();
|
||||
for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); )
|
||||
for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end();)
|
||||
{
|
||||
uint16 pos = itr->pos;
|
||||
uint32 count = itr->count;
|
||||
@@ -12099,7 +12099,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
|
||||
|
||||
sLog.outDebug("Player::UpdateItemDuration(%u,%u)", time, realtimeonly);
|
||||
|
||||
for (ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); )
|
||||
for (ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end();)
|
||||
{
|
||||
Item* item = *itr;
|
||||
++itr; // current element can be erased in UpdateDuration
|
||||
@@ -12148,7 +12148,7 @@ void Player::AddEnchantmentDurations(Item *item)
|
||||
|
||||
void Player::RemoveEnchantmentDurations(Item *item)
|
||||
{
|
||||
for (EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end(); )
|
||||
for (EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end();)
|
||||
{
|
||||
if (itr->item == item)
|
||||
{
|
||||
@@ -16470,7 +16470,7 @@ void Player::SaveGoldToDB()
|
||||
|
||||
void Player::_SaveActions()
|
||||
{
|
||||
for (ActionButtonList::iterator itr = m_actionButtons.begin(); itr != m_actionButtons.end(); )
|
||||
for (ActionButtonList::iterator itr = m_actionButtons.begin(); itr != m_actionButtons.end();)
|
||||
{
|
||||
switch (itr->second.uState)
|
||||
{
|
||||
@@ -16635,7 +16635,7 @@ void Player::_SaveMail()
|
||||
}
|
||||
|
||||
//deallocate deleted mails...
|
||||
for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); )
|
||||
for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end();)
|
||||
{
|
||||
if ((*itr)->state == MAIL_STATE_DELETED)
|
||||
{
|
||||
@@ -16693,7 +16693,7 @@ void Player::_SaveDailyQuestStatus()
|
||||
|
||||
void Player::_SaveSpells()
|
||||
{
|
||||
for (PlayerSpellMap::iterator itr = m_spells.begin(), next = m_spells.begin(); itr != m_spells.end(); )
|
||||
for (PlayerSpellMap::iterator itr = m_spells.begin(), next = m_spells.begin(); itr != m_spells.end();)
|
||||
{
|
||||
if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->state == PLAYERSPELL_CHANGED)
|
||||
CharacterDatabase.PExecute("DELETE FROM character_spell WHERE guid = '%u' and spell = '%u'", GetGUIDLow(), itr->first);
|
||||
@@ -16939,7 +16939,7 @@ void Player::ResetInstances(uint8 method)
|
||||
// we assume that when the difficulty changes, all instances that can be reset will be
|
||||
uint8 dif = GetDifficulty();
|
||||
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[dif].begin(); itr != m_boundInstances[dif].end(); )
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[dif].begin(); itr != m_boundInstances[dif].end();)
|
||||
{
|
||||
InstanceSave *p = itr->second.save;
|
||||
const MapEntry *entry = sMapStore.LookupEntry(itr->first);
|
||||
@@ -17557,7 +17557,7 @@ void Player::RemoveSpellMods(Spell * spell)
|
||||
std::set <Aura *> checkedSpells;
|
||||
|
||||
AuraEffectList const & auraList = GetAurasByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
|
||||
for (AuraEffectList::const_iterator itr = auraList.begin(); itr != auraList.end(); )
|
||||
for (AuraEffectList::const_iterator itr = auraList.begin(); itr != auraList.end();)
|
||||
{
|
||||
AuraEffect * aur = *itr;
|
||||
++itr;
|
||||
@@ -17586,7 +17586,7 @@ void Player::RemoveSpellMods(Spell * spell)
|
||||
|
||||
for (uint8 i=0; i<MAX_SPELLMOD; ++i)
|
||||
{
|
||||
for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end(); )
|
||||
for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end();)
|
||||
{
|
||||
SpellModifier *mod = *itr;
|
||||
++itr;
|
||||
@@ -20046,7 +20046,7 @@ bool Player::CanNoReagentCast(SpellEntry const* spellInfo) const
|
||||
void Player::RemoveItemDependentAurasAndCasts( Item * pItem )
|
||||
{
|
||||
AuraMap& auras = GetAuras();
|
||||
for (AuraMap::iterator itr = auras.begin(); itr != auras.end(); )
|
||||
for (AuraMap::iterator itr = auras.begin(); itr != auras.end();)
|
||||
{
|
||||
Aura* aura = itr->second;
|
||||
|
||||
@@ -20208,7 +20208,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
|
||||
if(pGroupGuy->isAlive()|| !pGroupGuy->GetCorpse())
|
||||
{
|
||||
// normal creature (not pet/etc) can be only in !PvP case
|
||||
if(pVictim->GetTypeId()==TYPEID_UNIT)
|
||||
if(pVictim->GetTypeId() == TYPEID_UNIT)
|
||||
pGroupGuy->KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetGUID());
|
||||
}
|
||||
}
|
||||
@@ -20239,7 +20239,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
|
||||
pet->GivePetXP(xp);
|
||||
|
||||
// normal creature (not pet/etc) can be only in !PvP case
|
||||
if(pVictim->GetTypeId()==TYPEID_UNIT)
|
||||
if(pVictim->GetTypeId() == TYPEID_UNIT)
|
||||
KilledMonster(((Creature*)pVictim)->GetCreatureInfo(), pVictim->GetGUID());
|
||||
}
|
||||
}
|
||||
@@ -20356,7 +20356,7 @@ void Player::UpdateZoneDependentAuras( uint32 newZone )
|
||||
void Player::UpdateAreaDependentAuras( uint32 newArea )
|
||||
{
|
||||
// remove auras from spells with area limitations
|
||||
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
|
||||
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
|
||||
{
|
||||
// use m_zoneUpdateId for speed: UpdateArea called from UpdateZone or instead UpdateZone in both cases m_zoneUpdateId up-to-date
|
||||
if(spellmgr.GetSpellAllowedInLocationError(iter->second->GetSpellProto(),GetMapId(),m_zoneUpdateId,newArea,this) != SPELL_CAST_OK)
|
||||
@@ -21780,7 +21780,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
|
||||
|
||||
void Player::_SaveEquipmentSets()
|
||||
{
|
||||
for (EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end(); )
|
||||
for (EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end();)
|
||||
{
|
||||
uint32 index = itr->first;
|
||||
EquipmentSet& eqset = itr->second;
|
||||
|
||||
+4
-4
@@ -725,7 +725,7 @@ void Spell::SelectSpellTargets()
|
||||
else if (m_auraScaleMask)
|
||||
{
|
||||
bool checkLvl = !m_UniqueTargetInfo.empty();
|
||||
for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); )
|
||||
for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end();)
|
||||
{
|
||||
// remove targets which did not pass min level check
|
||||
if(m_auraScaleMask && ihit->effectMask == m_auraScaleMask)
|
||||
@@ -834,7 +834,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura)
|
||||
m_procEx |= PROC_EX_INTERNAL_TRIGGERED;
|
||||
}
|
||||
// Totem casts require spellfamilymask defined in spell_proc_event to proc
|
||||
if (m_originalCaster && m_caster != m_originalCaster && m_caster->GetTypeId()==TYPEID_UNIT && ((Creature*)m_caster)->isTotem() && m_caster->IsControlledByPlayer())
|
||||
if (m_originalCaster && m_caster != m_originalCaster && m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->isTotem() && m_caster->IsControlledByPlayer())
|
||||
{
|
||||
m_procEx |= PROC_EX_INTERNAL_REQ_FAMILY;
|
||||
}
|
||||
@@ -2298,7 +2298,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
if (!(m_targets.getUnitTarget() && (m_targets.getUnitTarget()->GetEntry() == 26125 && m_targets.getUnitTarget()->GetOwnerGUID() == m_caster->GetGUID()
|
||||
|| (m_targets.getUnitTarget()->getDeathState() == CORPSE
|
||||
&& m_targets.getUnitTarget()->GetDisplayId() == m_targets.getUnitTarget()->GetNativeDisplayId()
|
||||
&& m_targets.getUnitTarget()->GetTypeId()== TYPEID_UNIT
|
||||
&& m_targets.getUnitTarget()->GetTypeId() == TYPEID_UNIT
|
||||
&& !((Creature*)m_targets.getUnitTarget())->isDeadByDefault()
|
||||
&& !(m_targets.getUnitTarget()->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL))
|
||||
&& m_targets.getUnitTarget()->GetDisplayId() == m_targets.getUnitTarget()->GetNativeDisplayId())))
|
||||
@@ -3324,7 +3324,7 @@ void Spell::finish(bool ok)
|
||||
if(!ok)
|
||||
return;
|
||||
|
||||
if (m_caster->GetTypeId()==TYPEID_UNIT && ((Creature*)m_caster)->isSummon())
|
||||
if (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->isSummon())
|
||||
{
|
||||
// Unsummon statue
|
||||
uint32 spell = m_caster->GetUInt32Value(UNIT_CREATED_BY_SPELL);
|
||||
|
||||
@@ -3899,7 +3899,7 @@ void AuraEffect::HandleChannelDeathItem(bool apply, bool Real, bool /*changeAmou
|
||||
// Soul Shard only from non-grey units
|
||||
if( spellInfo->EffectItemType[m_effIndex] == 6265 &&
|
||||
(victim->getLevel() <= Trinity::XP::GetGrayLevel(caster->getLevel()) ||
|
||||
victim->GetTypeId()==TYPEID_UNIT && !((Player*)caster)->isAllowedToLoot((Creature*)victim)) )
|
||||
victim->GetTypeId() == TYPEID_UNIT && !((Player*)caster)->isAllowedToLoot((Creature*)victim)) )
|
||||
return;
|
||||
//Adding items
|
||||
uint32 noSpaceForCount = 0;
|
||||
@@ -4476,7 +4476,7 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA
|
||||
if(apply && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
|
||||
{
|
||||
Unit::AuraMap& Auras = m_target->GetAuras();
|
||||
for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); )
|
||||
for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();)
|
||||
{
|
||||
SpellEntry const *spell = iter->second->GetSpellProto();
|
||||
if (spell->Id != GetId())
|
||||
@@ -4557,7 +4557,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(bool apply, bool Real, bool /*chang
|
||||
{
|
||||
uint32 school_mask = GetMiscValue();
|
||||
Unit::AuraMap& Auras = m_target->GetAuras();
|
||||
for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); )
|
||||
for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();)
|
||||
{
|
||||
SpellEntry const *spell = iter->second->GetSpellProto();
|
||||
if((GetSpellSchoolMask(spell) & school_mask)//Check for school mask
|
||||
|
||||
@@ -1438,7 +1438,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
|
||||
// immediately finishes the cooldown on Frost spells
|
||||
const SpellCooldowns& cm = ((Player *)m_caster)->GetSpellCooldownMap();
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end(); )
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
|
||||
{
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
|
||||
@@ -1696,7 +1696,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
|
||||
//immediately finishes the cooldown on certain Rogue abilities
|
||||
const SpellCooldowns& cm = ((Player *)m_caster)->GetSpellCooldownMap();
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end(); )
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
|
||||
{
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
|
||||
@@ -1739,7 +1739,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
|
||||
// immediately finishes the cooldown on your other Hunter abilities except Bestial Wrath
|
||||
const SpellCooldowns& cm = ((Player*)m_caster)->GetSpellCooldownMap();
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end(); )
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
|
||||
{
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
|
||||
@@ -2145,7 +2145,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
// So called only for not proccessed cases
|
||||
if(gameObjTarget)
|
||||
Script->EffectDummyGameObj(m_caster, m_spellInfo->Id, i, gameObjTarget);
|
||||
else if(unitTarget && unitTarget->GetTypeId()==TYPEID_UNIT)
|
||||
else if(unitTarget && unitTarget->GetTypeId() == TYPEID_UNIT)
|
||||
Script->EffectDummyCreature(m_caster, m_spellInfo->Id, i, (Creature*)unitTarget);
|
||||
else if(itemTarget)
|
||||
Script->EffectDummyItem(m_caster, m_spellInfo->Id, i, itemTarget);
|
||||
@@ -2337,7 +2337,7 @@ void Spell::EffectTriggerSpell(uint32 effIndex)
|
||||
{
|
||||
uint32 dispelMask = GetDispellMask(DISPEL_ALL);
|
||||
Unit::AuraMap& Auras = unitTarget->GetAuras();
|
||||
for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); )
|
||||
for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();)
|
||||
{
|
||||
// remove all harmful spells on you...
|
||||
SpellEntry const* spell = iter->second->GetSpellProto();
|
||||
@@ -5772,7 +5772,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
case 55709:
|
||||
{
|
||||
int pct = 100;
|
||||
if (unitTarget->GetTypeId()==TYPEID_UNIT && ((Creature*)unitTarget)->isPet())
|
||||
if (unitTarget->GetTypeId() == TYPEID_UNIT && ((Creature*)unitTarget)->isPet())
|
||||
if (Unit* owner = ((Creature*)unitTarget)->GetOwner())
|
||||
owner->CastCustomSpell(unitTarget, 54114, &pct, NULL, NULL, true);
|
||||
break;
|
||||
|
||||
+128
-130
@@ -3202,7 +3202,7 @@ void SpellMgr::LoadSpellEnchantProcData()
|
||||
mSpellEnchantProcEventMap[enchantId] = spe;
|
||||
|
||||
++count;
|
||||
} while( result->NextRow() );
|
||||
} while(result->NextRow());
|
||||
|
||||
delete result;
|
||||
|
||||
@@ -3218,17 +3218,17 @@ void SpellMgr::LoadSpellRequired()
|
||||
|
||||
if(result == NULL)
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
barGoLink bar(1);
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString( ">> Loaded 0 spell required records" );
|
||||
sLog.outString(">> Loaded 0 spell required records");
|
||||
sLog.outErrorDb("`spell_required` table is empty!");
|
||||
return;
|
||||
}
|
||||
uint32 rows = 0;
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
barGoLink bar(result->GetRowCount());
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
@@ -3240,7 +3240,7 @@ void SpellMgr::LoadSpellRequired()
|
||||
mSpellsReqSpell.insert (std::pair<uint32, uint32>(spell_req, spell_id));
|
||||
mSpellReq[spell_id] = spell_req;
|
||||
++rows;
|
||||
} while( result->NextRow() );
|
||||
} while (result->NextRow());
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
@@ -3266,19 +3266,19 @@ struct SpellRankEntry
|
||||
bool operator < (const SpellRankEntry & _Right) const
|
||||
{
|
||||
return (SkillId != _Right.SkillId ? SkillId < _Right.SkillId
|
||||
: SpellName!=_Right.SpellName ? SpellName < _Right.SpellName
|
||||
: ProcFlags!=_Right.ProcFlags ? ProcFlags < _Right.ProcFlags
|
||||
: SpellName != _Right.SpellName ? SpellName < _Right.SpellName
|
||||
: ProcFlags != _Right.ProcFlags ? ProcFlags < _Right.ProcFlags
|
||||
|
||||
: Effect!=_Right.Effect ? Effect < _Right.Effect
|
||||
: Aura!=_Right.Aura ? Aura < _Right.Aura
|
||||
: TalentID!=_Right.TalentID ? TalentID < _Right.TalentID
|
||||
: (CastingTimeIndex!=_Right.CastingTimeIndex) && (!CastingTimeIndex || !_Right.CastingTimeIndex || CastingTimeIndex==1 || !_Right.CastingTimeIndex==1) ? CastingTimeIndex < _Right.CastingTimeIndex
|
||||
: Effect != _Right.Effect ? Effect < _Right.Effect
|
||||
: Aura != _Right.Aura ? Aura < _Right.Aura
|
||||
: TalentID != _Right.TalentID ? TalentID < _Right.TalentID
|
||||
: (CastingTimeIndex != _Right.CastingTimeIndex) && (!CastingTimeIndex || !_Right.CastingTimeIndex || CastingTimeIndex == 1 || !_Right.CastingTimeIndex == 1) ? CastingTimeIndex < _Right.CastingTimeIndex
|
||||
|
||||
: SpellFamilyFlags!=_Right.SpellFamilyFlags ? SpellFamilyFlags < _Right.SpellFamilyFlags
|
||||
: (SpellVisual!=_Right.SpellVisual) && (!SpellVisual || !_Right.SpellVisual) ? SpellVisual < _Right.SpellVisual
|
||||
: (ManaCost!=_Right.ManaCost) && (!ManaCost || !_Right.ManaCost) ? ManaCost < _Right.ManaCost
|
||||
: (DurationIndex!=_Right.DurationIndex) && (!DurationIndex || !_Right.DurationIndex)? DurationIndex < _Right.DurationIndex
|
||||
: (RangeIndex!=_Right.RangeIndex) && (!RangeIndex || !_Right.RangeIndex || RangeIndex==1 || !_Right.RangeIndex==1) ? RangeIndex < _Right.RangeIndex
|
||||
: SpellFamilyFlags != _Right.SpellFamilyFlags ? SpellFamilyFlags < _Right.SpellFamilyFlags
|
||||
: (SpellVisual != _Right.SpellVisual) && (!SpellVisual || !_Right.SpellVisual) ? SpellVisual < _Right.SpellVisual
|
||||
: (ManaCost != _Right.ManaCost) && (!ManaCost || !_Right.ManaCost) ? ManaCost < _Right.ManaCost
|
||||
: (DurationIndex != _Right.DurationIndex) && (!DurationIndex || !_Right.DurationIndex)? DurationIndex < _Right.DurationIndex
|
||||
: (RangeIndex != _Right.RangeIndex) && (!RangeIndex || !_Right.RangeIndex || RangeIndex == 1 || !_Right.RangeIndex == 1) ? RangeIndex < _Right.RangeIndex
|
||||
: TargetAuraState < _Right.TargetAuraState
|
||||
);
|
||||
}
|
||||
@@ -3296,7 +3296,7 @@ void SpellMgr::LoadSpellChains()
|
||||
mSpellChains.clear(); // need for reload case
|
||||
|
||||
std::vector<uint32> ChainedSpells;
|
||||
for (uint32 ability_id=0; ability_id<sSkillLineAbilityStore.GetNumRows(); ability_id++)
|
||||
for (uint32 ability_id = 0; ability_id < sSkillLineAbilityStore.GetNumRows(); ++ability_id)
|
||||
{
|
||||
SkillLineAbilityEntry const *AbilityInfo=sSkillLineAbilityStore.LookupEntry(ability_id);
|
||||
if (!AbilityInfo)
|
||||
@@ -3308,24 +3308,24 @@ void SpellMgr::LoadSpellChains()
|
||||
|
||||
std::multimap<SpellRankEntry, SpellRankValue> RankMap;
|
||||
|
||||
for (uint32 ability_id=0; ability_id<sSkillLineAbilityStore.GetNumRows(); ability_id++)
|
||||
for (uint32 ability_id = 0; ability_id < sSkillLineAbilityStore.GetNumRows(); ++ability_id)
|
||||
{
|
||||
SkillLineAbilityEntry const *AbilityInfo=sSkillLineAbilityStore.LookupEntry(ability_id);
|
||||
if (!AbilityInfo)
|
||||
continue;
|
||||
|
||||
//get only spell with lowest ability_id to prevent doubles
|
||||
uint32 spell_id=AbilityInfo->spellId;
|
||||
bool found=false;
|
||||
for (uint32 i=0; i<ChainedSpells.size(); i++)
|
||||
uint32 spell_id = AbilityInfo->spellId;
|
||||
bool found = false;
|
||||
for (uint32 i = 0; i < ChainedSpells.size(); ++i)
|
||||
{
|
||||
if (ChainedSpells.at(i)==spell_id)
|
||||
found=true;
|
||||
if (ChainedSpells.at(i) == spell_id)
|
||||
found = true;
|
||||
}
|
||||
if (found)
|
||||
continue;
|
||||
|
||||
if(mSkillLineAbilityMap.lower_bound(spell_id)->second->id!=ability_id)
|
||||
if(mSkillLineAbilityMap.lower_bound(spell_id)->second->id != ability_id)
|
||||
continue;
|
||||
SpellEntry const *SpellInfo=sSpellStore.LookupEntry(spell_id);
|
||||
if (!SpellInfo)
|
||||
@@ -3334,31 +3334,31 @@ void SpellMgr::LoadSpellChains()
|
||||
if(sRank.empty())
|
||||
continue;
|
||||
//exception to polymorph spells-make pig and turtle other chain than sheep
|
||||
if ((SpellInfo->SpellFamilyName==SPELLFAMILY_MAGE) && (SpellInfo->SpellFamilyFlags[0] & 0x1000000) && (SpellInfo->SpellIconID!=82))
|
||||
if (SpellInfo->SpellFamilyName == SPELLFAMILY_MAGE && (SpellInfo->SpellFamilyFlags[0] & 0x1000000) && SpellInfo->SpellIconID != 82)
|
||||
continue;
|
||||
|
||||
SpellRankEntry entry;
|
||||
SpellRankValue value;
|
||||
entry.SkillId=AbilityInfo->skillId;
|
||||
entry.SpellName=SpellInfo->SpellName[sWorld.GetDefaultDbcLocale()];
|
||||
entry.DurationIndex=SpellInfo->DurationIndex;
|
||||
entry.RangeIndex=SpellInfo->rangeIndex;
|
||||
entry.ProcFlags=SpellInfo->procFlags;
|
||||
entry.SpellFamilyFlags=SpellInfo->SpellFamilyFlags;
|
||||
entry.TargetAuraState=SpellInfo->TargetAuraState;
|
||||
entry.SpellVisual=SpellInfo->SpellVisual[0];
|
||||
entry.ManaCost=SpellInfo->manaCost;
|
||||
entry.CastingTimeIndex=0;
|
||||
entry.TalentID=0;
|
||||
for (; ; )
|
||||
entry.SkillId = AbilityInfo->skillId;
|
||||
entry.SpellName = SpellInfo->SpellName[sWorld.GetDefaultDbcLocale()];
|
||||
entry.DurationIndex = SpellInfo->DurationIndex;
|
||||
entry.RangeIndex = SpellInfo->rangeIndex;
|
||||
entry.ProcFlags = SpellInfo->procFlags;
|
||||
entry.SpellFamilyFlags = SpellInfo->SpellFamilyFlags;
|
||||
entry.TargetAuraState = SpellInfo->TargetAuraState;
|
||||
entry.SpellVisual = SpellInfo->SpellVisual[0];
|
||||
entry.ManaCost = SpellInfo->manaCost;
|
||||
entry.CastingTimeIndex = 0;
|
||||
entry.TalentID = 0;
|
||||
for (;;)
|
||||
{
|
||||
AbilityInfo=mSkillLineAbilityMap.lower_bound(spell_id)->second;
|
||||
value.Id=spell_id;
|
||||
value.Rank=SpellInfo->Rank[sWorld.GetDefaultDbcLocale()];
|
||||
value.strict=false;
|
||||
AbilityInfo = mSkillLineAbilityMap.lower_bound(spell_id)->second;
|
||||
value.Id = spell_id;
|
||||
value.Rank = SpellInfo->Rank[sWorld.GetDefaultDbcLocale()];
|
||||
value.strict = false;
|
||||
RankMap.insert(std::pair<SpellRankEntry, SpellRankValue>(entry,value));
|
||||
spell_id=AbilityInfo->forward_spellid;
|
||||
SpellInfo=sSpellStore.LookupEntry(spell_id);
|
||||
spell_id = AbilityInfo->forward_spellid;
|
||||
SpellInfo = sSpellStore.LookupEntry(spell_id);
|
||||
if (!SpellInfo)
|
||||
break;
|
||||
}
|
||||
@@ -3366,117 +3366,117 @@ void SpellMgr::LoadSpellChains()
|
||||
|
||||
barGoLink bar(RankMap.size());
|
||||
|
||||
uint32 count=0;
|
||||
uint32 count = 0;
|
||||
|
||||
for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr = RankMap.begin(); itr!=RankMap.end(); )
|
||||
for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr = RankMap.begin(); itr!=RankMap.end();)
|
||||
{
|
||||
SpellRankEntry entry=itr->first;
|
||||
SpellRankEntry entry = itr->first;
|
||||
//trac errors in extracted data
|
||||
std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator> RankErrorMap;
|
||||
for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry); itr2!=RankMap.upper_bound(entry); itr2++)
|
||||
for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry); itr2 != RankMap.upper_bound(entry); ++itr2)
|
||||
{
|
||||
bar.step();
|
||||
RankErrorMap.insert(std::pair<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>(itr2->second.Rank,itr2));
|
||||
}
|
||||
|
||||
bool error=false;
|
||||
bool error = false;
|
||||
//if strict == true strict check is not needed
|
||||
if (!itr->second.strict)
|
||||
//check for rank duplicates, if there are any do strict check
|
||||
for (std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>::iterator itr2 = RankErrorMap.begin(); itr2!=RankErrorMap.end(); )
|
||||
for (std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>::iterator itr2 = RankErrorMap.begin(); itr2!=RankErrorMap.end();)
|
||||
{
|
||||
char const * err_entry=itr2->first;
|
||||
char const *err_entry = itr2->first;
|
||||
uint32 rank_count=RankErrorMap.count(itr2->first);
|
||||
if (rank_count>1)
|
||||
if (rank_count > 1)
|
||||
{
|
||||
error=true;
|
||||
error = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
itr2++;
|
||||
++itr2;
|
||||
}
|
||||
bool allHaveTalents=true;
|
||||
bool allHaveTalents = true;
|
||||
if (error)
|
||||
{
|
||||
std::list<uint32> ConflictedSpells;
|
||||
for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry); itr2!=RankMap.upper_bound(entry); itr2=RankMap.lower_bound(entry))
|
||||
for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry); itr2 != RankMap.upper_bound(entry); itr2 = RankMap.lower_bound(entry))
|
||||
{
|
||||
ConflictedSpells.push_back(itr2->second.Id);
|
||||
if (!GetTalentSpellPos(itr2->second.Id))
|
||||
allHaveTalents=false;
|
||||
allHaveTalents = false;
|
||||
RankMap.erase(itr2);
|
||||
}
|
||||
SpellRankEntry nextEntry, currEntry;
|
||||
for (; !ConflictedSpells.empty(); ConflictedSpells.pop_front())
|
||||
{
|
||||
SpellEntry const *SpellInfo=sSpellStore.LookupEntry(ConflictedSpells.front());
|
||||
currEntry.SkillId=entry.SkillId;
|
||||
currEntry.SpellName=SpellInfo->SpellName[sWorld.GetDefaultDbcLocale()];
|
||||
currEntry.DurationIndex=SpellInfo->DurationIndex;
|
||||
currEntry.RangeIndex=SpellInfo->rangeIndex;
|
||||
currEntry.ProcFlags=SpellInfo->procFlags;
|
||||
currEntry.SpellFamilyFlags=SpellInfo->SpellFamilyFlags;
|
||||
SpellEntry const *SpellInfo = sSpellStore.LookupEntry(ConflictedSpells.front());
|
||||
currEntry.SkillId = entry.SkillId;
|
||||
currEntry.SpellName = SpellInfo->SpellName[sWorld.GetDefaultDbcLocale()];
|
||||
currEntry.DurationIndex = SpellInfo->DurationIndex;
|
||||
currEntry.RangeIndex = SpellInfo->rangeIndex;
|
||||
currEntry.ProcFlags = SpellInfo->procFlags;
|
||||
currEntry.SpellFamilyFlags = SpellInfo->SpellFamilyFlags;
|
||||
//compare talents only when all spells from chain have entry
|
||||
//to prevent wrong results with spells which have first rank talented and other not
|
||||
if (allHaveTalents)
|
||||
currEntry.TalentID=GetTalentSpellPos(ConflictedSpells.front())->talent_id;
|
||||
else
|
||||
currEntry.TalentID=0;
|
||||
currEntry.TargetAuraState=SpellInfo->TargetAuraState;
|
||||
currEntry.SpellVisual=SpellInfo->SpellVisual[0];
|
||||
currEntry.ManaCost=SpellInfo->manaCost;
|
||||
currEntry.TalentID = 0;
|
||||
currEntry.TargetAuraState = SpellInfo->TargetAuraState;
|
||||
currEntry.SpellVisual = SpellInfo->SpellVisual[0];
|
||||
currEntry.ManaCost = SpellInfo->manaCost;
|
||||
|
||||
//compare effects and casting time
|
||||
currEntry.CastingTimeIndex=SpellInfo->CastingTimeIndex;
|
||||
currEntry.Effect[0]=SpellInfo->Effect[0];
|
||||
currEntry.Effect[1]=SpellInfo->Effect[1];
|
||||
currEntry.Effect[2]=SpellInfo->Effect[2];
|
||||
currEntry.CastingTimeIndex = SpellInfo->CastingTimeIndex;
|
||||
currEntry.Effect[0] = SpellInfo->Effect[0];
|
||||
currEntry.Effect[1] = SpellInfo->Effect[1];
|
||||
currEntry.Effect[2] = SpellInfo->Effect[2];
|
||||
|
||||
currEntry.Aura[0]=SpellInfo->EffectApplyAuraName[0];
|
||||
currEntry.Aura[1]=SpellInfo->EffectApplyAuraName[1];
|
||||
currEntry.Aura[2]=SpellInfo->EffectApplyAuraName[2];
|
||||
currEntry.Aura[0] = SpellInfo->EffectApplyAuraName[0];
|
||||
currEntry.Aura[1] = SpellInfo->EffectApplyAuraName[1];
|
||||
currEntry.Aura[2] = SpellInfo->EffectApplyAuraName[2];
|
||||
|
||||
SpellRankValue currValue;
|
||||
currValue.Id=ConflictedSpells.front();
|
||||
currValue.Rank=SpellInfo->Rank[sWorld.GetDefaultDbcLocale()];
|
||||
currValue.strict=true;
|
||||
currValue.Id = ConflictedSpells.front();
|
||||
currValue.Rank = SpellInfo->Rank[sWorld.GetDefaultDbcLocale()];
|
||||
currValue.strict = true;
|
||||
RankMap.insert(std::pair<SpellRankEntry, SpellRankValue>(currEntry,currValue));
|
||||
}
|
||||
itr=RankMap.begin();
|
||||
itr = RankMap.begin();
|
||||
continue;
|
||||
}
|
||||
else
|
||||
for (std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>::iterator itr2 = RankErrorMap.begin(); itr2!=RankErrorMap.end(); )
|
||||
for (std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>::iterator itr2 = RankErrorMap.begin(); itr2!=RankErrorMap.end();)
|
||||
{
|
||||
char const * err_entry=itr2->first;
|
||||
uint32 rank_count=RankErrorMap.count(itr2->first);
|
||||
if (rank_count>1)
|
||||
for (itr2 = RankErrorMap.lower_bound(err_entry); itr2!=RankErrorMap.upper_bound(err_entry); itr2++)
|
||||
char const *err_entry = itr2->first;
|
||||
uint32 rank_count = RankErrorMap.count(itr2->first);
|
||||
if (rank_count > 1)
|
||||
for (itr2 = RankErrorMap.lower_bound(err_entry); itr2 != RankErrorMap.upper_bound(err_entry); ++itr2)
|
||||
{
|
||||
sLog.outDebug("There is a duplicate rank entry (%s) for spell: %u",itr2->first,itr2->second->second.Id);
|
||||
if (!(itr2->second->second.Id==47541 || itr2->second->second.Id==45902 || itr2->second->second.Id==7620))
|
||||
if (itr2->second->second.Id != 47541 && itr2->second->second.Id != 45902 && itr2->second->second.Id != 7620)
|
||||
{
|
||||
sLog.outDebug("Spell %u removed from chain data.",itr2->second->second.Id);
|
||||
RankMap.erase(itr2->second);
|
||||
}
|
||||
}
|
||||
else
|
||||
itr2++;
|
||||
++itr2;
|
||||
}
|
||||
|
||||
//order spells by spellLevel
|
||||
std::list<uint32> RankedSpells;
|
||||
uint32 min_spell_lvl=0;
|
||||
uint32 min_spell_lvl = 0;
|
||||
std::multimap<SpellRankEntry, SpellRankValue>::iterator min_itr;
|
||||
for (; RankMap.count(entry); )
|
||||
for (; RankMap.count(entry);)
|
||||
{
|
||||
for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry); itr2!=RankMap.upper_bound(entry); itr2++)
|
||||
for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry); itr2!=RankMap.upper_bound(entry); ++itr2)
|
||||
{
|
||||
SpellEntry const *SpellInfo=sSpellStore.LookupEntry(itr2->second.Id);
|
||||
if (SpellInfo->spellLevel<min_spell_lvl || itr2==RankMap.lower_bound(entry))
|
||||
if (SpellInfo->spellLevel<min_spell_lvl || itr2 == RankMap.lower_bound(entry))
|
||||
{
|
||||
min_spell_lvl=SpellInfo->spellLevel;
|
||||
min_itr=itr2;
|
||||
min_spell_lvl = SpellInfo->spellLevel;
|
||||
min_itr = itr2;
|
||||
}
|
||||
}
|
||||
RankedSpells.push_back(min_itr->second.Id);
|
||||
@@ -3484,63 +3484,61 @@ void SpellMgr::LoadSpellChains()
|
||||
}
|
||||
|
||||
//use data from talent.dbc
|
||||
uint16 talent_id=0;
|
||||
for (std::list<uint32>::iterator itr2 = RankedSpells.begin(); itr2!=RankedSpells.end(); )
|
||||
uint16 talent_id = 0;
|
||||
for (std::list<uint32>::iterator itr2 = RankedSpells.begin(); itr2 != RankedSpells.end();)
|
||||
{
|
||||
if (TalentSpellPos const* TalentPos=GetTalentSpellPos(*itr2))
|
||||
if (TalentSpellPos const *TalentPos = GetTalentSpellPos(*itr2))
|
||||
{
|
||||
talent_id=TalentPos->talent_id;
|
||||
talent_id = TalentPos->talent_id;
|
||||
RankedSpells.erase(itr2);
|
||||
itr2 = RankedSpells.begin();
|
||||
}
|
||||
else
|
||||
itr2++;
|
||||
++itr2;
|
||||
}
|
||||
if (talent_id)
|
||||
{
|
||||
TalentEntry const *TalentInfo = sTalentStore.LookupEntry(talent_id);
|
||||
for (uint8 rank=5; rank; rank--)
|
||||
{
|
||||
for (uint8 rank = MAX_TALENT_RANK; rank > 0; --rank)
|
||||
if (TalentInfo->RankID[rank-1])
|
||||
RankedSpells.push_front(TalentInfo->RankID[rank-1]);
|
||||
}
|
||||
}
|
||||
|
||||
//do not proceed for spells with less than 2 ranks
|
||||
itr=RankMap.begin();
|
||||
if (RankedSpells.size()<2)
|
||||
itr = RankMap.begin();
|
||||
if (RankedSpells.size() < 2)
|
||||
continue;
|
||||
|
||||
count++;
|
||||
++count;
|
||||
|
||||
uint32 spell_rank=1;
|
||||
for (std::list<uint32>::iterator itr2 = RankedSpells.begin(); itr2!=RankedSpells.end(); spell_rank++)
|
||||
uint32 spell_rank = 1;
|
||||
for (std::list<uint32>::iterator itr2 = RankedSpells.begin(); itr2 != RankedSpells.end(); ++spell_rank)
|
||||
{
|
||||
uint32 spell_id=*itr2;
|
||||
mSpellChains[spell_id].rank=spell_rank;
|
||||
mSpellChains[spell_id].first=RankedSpells.front();
|
||||
mSpellChains[spell_id].last=RankedSpells.back();
|
||||
uint32 spell_id = *itr2;
|
||||
mSpellChains[spell_id].rank = spell_rank;
|
||||
mSpellChains[spell_id].first = RankedSpells.front();
|
||||
mSpellChains[spell_id].last = RankedSpells.back();
|
||||
|
||||
itr2++;
|
||||
++itr2;
|
||||
if (spell_rank<2)
|
||||
mSpellChains[spell_id].prev=0;
|
||||
mSpellChains[spell_id].prev = 0;
|
||||
|
||||
if (spell_id==RankedSpells.back())
|
||||
mSpellChains[spell_id].next=0;
|
||||
if (spell_id == RankedSpells.back())
|
||||
mSpellChains[spell_id].next = 0;
|
||||
else
|
||||
{
|
||||
mSpellChains[*itr2].prev=spell_id;
|
||||
mSpellChains[spell_id].next=*itr2;
|
||||
mSpellChains[*itr2].prev = spell_id;
|
||||
mSpellChains[spell_id].next = *itr2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//uncomment these two lines to print yourself list of spell_chains on startup
|
||||
//for (UNORDERED_MAP<uint32, SpellChainNode>::iterator itr=mSpellChains.begin(); itr!=mSpellChains.end(); itr++)
|
||||
//sLog.outString( "Id: %u, Rank: %d , %s, %u, %u, %u, %u",itr->first,itr->second.rank, sSpellStore.LookupEntry(itr->first)->Rank[sWorld.GetDefaultDbcLocale()], itr->second.first, itr->second.last,itr->second.next ,itr->second.prev);
|
||||
//for(UNORDERED_MAP<uint32, SpellChainNode>::iterator itr = mSpellChains.begin(); itr != mSpellChains.end(); ++itr)
|
||||
//sLog.outString("Id: %u, Rank: %d , %s, %u, %u, %u, %u",itr->first,itr->second.rank, sSpellStore.LookupEntry(itr->first)->Rank[sWorld.GetDefaultDbcLocale()], itr->second.first, itr->second.last,itr->second.next, itr->second.prev);
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString( ">> Loaded %u spell chains",count);
|
||||
sLog.outString(">> Loaded %u spell chains",count);
|
||||
}
|
||||
|
||||
// set data in core for now
|
||||
@@ -3553,12 +3551,12 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
{
|
||||
mSpellCustomAttr[i] = 0;
|
||||
spellInfo = (SpellEntry*)GetSpellStore()->LookupEntry(i);
|
||||
if(!spellInfo)
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
for (uint32 j = 0; j < 3; ++j)
|
||||
{
|
||||
switch(spellInfo->EffectApplyAuraName[j])
|
||||
switch (spellInfo->EffectApplyAuraName[j])
|
||||
{
|
||||
case SPELL_AURA_MOD_ROOT:
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_AURA_CC;
|
||||
@@ -3571,7 +3569,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
break;
|
||||
}
|
||||
|
||||
switch(spellInfo->Effect[j])
|
||||
switch (spellInfo->Effect[j])
|
||||
{
|
||||
case SPELL_EFFECT_SCHOOL_DAMAGE:
|
||||
case SPELL_EFFECT_WEAPON_DAMAGE:
|
||||
@@ -3596,7 +3594,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
break;
|
||||
}
|
||||
|
||||
switch(SpellTargetType[spellInfo->EffectImplicitTargetA[j]])
|
||||
switch (SpellTargetType[spellInfo->EffectImplicitTargetA[j]])
|
||||
{
|
||||
case TARGET_TYPE_UNIT_TARGET:
|
||||
case TARGET_TYPE_DEST_TARGET:
|
||||
@@ -3611,7 +3609,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
|
||||
for (uint32 j = 0; j < 3; ++j)
|
||||
{
|
||||
switch(spellInfo->EffectApplyAuraName[j])
|
||||
switch (spellInfo->EffectApplyAuraName[j])
|
||||
{
|
||||
case SPELL_AURA_MOD_POSSESS:
|
||||
case SPELL_AURA_MOD_CONFUSE:
|
||||
@@ -3625,17 +3623,17 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
}
|
||||
}
|
||||
|
||||
if(!_isPositiveEffect(i, 0, false))
|
||||
if (!_isPositiveEffect(i, 0, false))
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_NEGATIVE_EFF0;
|
||||
if(!_isPositiveEffect(i, 1, false))
|
||||
if (!_isPositiveEffect(i, 1, false))
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_NEGATIVE_EFF1;
|
||||
if(!_isPositiveEffect(i, 2, false))
|
||||
if (!_isPositiveEffect(i, 2, false))
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_NEGATIVE_EFF2;
|
||||
|
||||
if(spellInfo->SpellVisual[0] == 3879)
|
||||
if (spellInfo->SpellVisual[0] == 3879)
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_CONE_BACK;
|
||||
|
||||
if(spellInfo->activeIconID == 2158) //flight
|
||||
if (spellInfo->activeIconID == 2158) // flight
|
||||
spellInfo->Attributes |= SPELL_ATTR_PASSIVE;
|
||||
|
||||
switch(i)
|
||||
@@ -3752,14 +3750,14 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
case 39805: // Lightning Overload
|
||||
case 52437: // Sudden Death
|
||||
case 64823: // Item - Druid T8 Balance 4P Bonus
|
||||
spellInfo->procCharges=1;
|
||||
spellInfo->procCharges = 1;
|
||||
break;
|
||||
case 44544: // Fingers of Frost
|
||||
spellInfo->procCharges=2;
|
||||
spellInfo->procCharges = 2;
|
||||
spellInfo->EffectSpellClassMask[0] = flag96(685904631,1151048,0);
|
||||
break;
|
||||
case 28200: // Ascendance (Talisman of Ascendance trinket)
|
||||
spellInfo->procCharges=6;
|
||||
spellInfo->procCharges = 6;
|
||||
break;
|
||||
case 51852: // The Eye of Acherus (no spawn in phase 2 in db)
|
||||
spellInfo->EffectMiscValue[0] |= 1;
|
||||
|
||||
@@ -214,7 +214,7 @@ void TempSummon::InitSummon()
|
||||
Unit* owner = GetSummoner();
|
||||
if(owner)
|
||||
{
|
||||
if(owner->GetTypeId()==TYPEID_UNIT && ((Creature*)owner)->IsAIEnabled)
|
||||
if(owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->IsAIEnabled)
|
||||
((Creature*)owner)->AI()->JustSummoned(this);
|
||||
if(IsAIEnabled)
|
||||
AI()->IsSummonedBy(owner);
|
||||
|
||||
@@ -277,7 +277,7 @@ HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilRe
|
||||
std::list<HostilReference*>::const_iterator lastRef = iThreatList.end();
|
||||
lastRef--;
|
||||
|
||||
for (std::list<HostilReference*>::const_iterator iter = iThreatList.begin(); iter != iThreatList.end() && !found; )
|
||||
for (std::list<HostilReference*>::const_iterator iter = iThreatList.begin(); iter != iThreatList.end() && !found;)
|
||||
{
|
||||
currentRef = (*iter);
|
||||
|
||||
@@ -377,7 +377,7 @@ void ThreatManager::addThreat(Unit* pVictim, float fThreat, SpellSchoolMask scho
|
||||
if (!pVictim->isAlive() || !getOwner()->isAlive())
|
||||
return;
|
||||
|
||||
assert(getOwner()->GetTypeId()== TYPEID_UNIT);
|
||||
assert(getOwner()->GetTypeId() == TYPEID_UNIT);
|
||||
|
||||
float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, fThreat, schoolMask, pThreatSpell);
|
||||
|
||||
|
||||
@@ -440,7 +440,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
|
||||
Map const* oldMap = GetMap();
|
||||
Relocate(x, y, z);
|
||||
|
||||
for (PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end(); )
|
||||
for (PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end();)
|
||||
{
|
||||
Player *plr = *itr;
|
||||
++itr;
|
||||
@@ -536,7 +536,7 @@ void Transport::Update(uint32 /*p_time*/)
|
||||
}
|
||||
*/
|
||||
/*
|
||||
for (PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end(); )
|
||||
for (PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end();)
|
||||
{
|
||||
PlayerSet::const_iterator it2 = itr;
|
||||
++itr;
|
||||
|
||||
+783
-813
File diff suppressed because it is too large
Load Diff
@@ -387,7 +387,7 @@ bool OPvPWintergrasp::SetupOutdoorPvP()
|
||||
// Load Graveyard
|
||||
GraveYardMap::const_iterator graveLow = objmgr.mGraveYardMap.lower_bound(ZONE_WINTERGRASP);
|
||||
GraveYardMap::const_iterator graveUp = objmgr.mGraveYardMap.upper_bound(ZONE_WINTERGRASP);
|
||||
for (AreaPOIList::iterator itr = areaPOIs.begin(); itr != areaPOIs.end(); )
|
||||
for (AreaPOIList::iterator itr = areaPOIs.begin(); itr != areaPOIs.end();)
|
||||
{
|
||||
if ((*itr)->icon[1] == 8)
|
||||
{
|
||||
|
||||
+1
-1
@@ -280,7 +280,7 @@ bool World::HasRecentlyDisconnected(WorldSession* session)
|
||||
|
||||
if (uint32 tolerance = getConfig(CONFIG_INTERVAL_DISCONNECT_TOLERANCE))
|
||||
{
|
||||
for (DisconnectMap::iterator i = m_disconnects.begin(); i != m_disconnects.end(); )
|
||||
for (DisconnectMap::iterator i = m_disconnects.begin(); i != m_disconnects.end();)
|
||||
{
|
||||
if (difftime(i->second, time(NULL)) < tolerance)
|
||||
{
|
||||
|
||||
@@ -171,7 +171,7 @@ class ReactorRunnable : protected ACE_Task_Base
|
||||
|
||||
AddNewSockets ();
|
||||
|
||||
for (i = m_Sockets.begin (); i != m_Sockets.end (); )
|
||||
for (i = m_Sockets.begin (); i != m_Sockets.end ();)
|
||||
{
|
||||
if ((*i)->Update () == -1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user