aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bindings/scripts/scripts/world/npc_innkeeper.cpp2
-rw-r--r--src/game/LootMgr.cpp50
-rw-r--r--src/game/LootMgr.h2
-rw-r--r--src/game/PoolHandler.h2
4 files changed, 27 insertions, 29 deletions
diff --git a/src/bindings/scripts/scripts/world/npc_innkeeper.cpp b/src/bindings/scripts/scripts/world/npc_innkeeper.cpp
index e484642f435..3cb53c6e9f3 100644
--- a/src/bindings/scripts/scripts/world/npc_innkeeper.cpp
+++ b/src/bindings/scripts/scripts/world/npc_innkeeper.cpp
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp
index 6b47d14ad1c..e1b6b0c5a21 100644
--- a/src/game/LootMgr.cpp
+++ b/src/game/LootMgr.cpp
@@ -83,7 +83,7 @@ void LootStore::Clear()
// Actual checks are done within LootTemplate::Verify() which is called for every template
void LootStore::Verify() const
{
- for (LootTemplateMap::const_iterator i = m_LootTemplates.begin(); i != m_LootTemplates.end(); ++i )
+ for (LootTemplateMap::const_iterator i = m_LootTemplates.begin(); i != m_LootTemplates.end(); ++i)
i->second->Verify(*this, i->first);
}
@@ -1063,9 +1063,9 @@ void LootTemplate::CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_se
{
for (LootStoreItemList::const_iterator ieItr = Entries.begin(); ieItr != Entries.end(); ++ieItr)
{
- if(ieItr->mincountOrRef < 0)
+ if (ieItr->mincountOrRef < 0)
{
- if(!LootTemplates_Reference.GetLootFor(-ieItr->mincountOrRef))
+ if (!LootTemplates_Reference.GetLootFor(-ieItr->mincountOrRef))
LootTemplates_Reference.ReportNotExistedId(-ieItr->mincountOrRef);
else if(ref_set)
ref_set->erase(-ieItr->mincountOrRef);
@@ -1082,7 +1082,7 @@ void LoadLootTemplates_Creature()
LootTemplates_Creature.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for (uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i)
{
if(CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i))
{
@@ -1108,13 +1108,13 @@ void LoadLootTemplates_Disenchant()
LootTemplates_Disenchant.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for (uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sItemStorage.MaxEntry; ++i)
{
- if(ItemPrototype const* proto = sItemStorage.LookupEntry<ItemPrototype>(i))
+ if (ItemPrototype const* proto = sItemStorage.LookupEntry<ItemPrototype>(i))
{
- if(uint32 lootid = proto->DisenchantID)
+ if (uint32 lootid = proto->DisenchantID)
{
- if(!ids_set.count(lootid))
+ if (!ids_set.count(lootid))
LootTemplates_Disenchant.ReportNotExistedId(lootid);
else
ids_setUsed.insert(lootid);
@@ -1133,12 +1133,10 @@ void LoadLootTemplates_Fishing()
LootTemplates_Fishing.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for (uint32 i = 1; i < sAreaStore.GetNumRows(); ++i )
- {
- if(AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(i))
- if(ids_set.count(areaEntry->ID))
+ for (uint32 i = 1; i < sAreaStore.GetNumRows(); ++i)
+ if (AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(i))
+ if (ids_set.count(areaEntry->ID))
ids_set.erase(areaEntry->ID);
- }
// output error for any still listed (not referenced from appropriate table) ids
LootTemplates_Fishing.ReportUnusedIds(ids_set);
@@ -1152,11 +1150,11 @@ void LoadLootTemplates_Gameobject()
// remove real entries and check existence loot
for (uint32 i = 1; i < sGOStorage.MaxEntry; ++i )
{
- if(GameObjectInfo const* gInfo = sGOStorage.LookupEntry<GameObjectInfo>(i))
+ if (GameObjectInfo const* gInfo = sGOStorage.LookupEntry<GameObjectInfo>(i))
{
- if(uint32 lootid = gInfo->GetLootId())
+ if (uint32 lootid = gInfo->GetLootId())
{
- if(!ids_set.count(lootid))
+ if (!ids_set.count(lootid))
LootTemplates_Gameobject.ReportNotExistedId(lootid);
else
ids_setUsed.insert(lootid);
@@ -1243,13 +1241,13 @@ void LoadLootTemplates_Prospecting()
for (uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
{
ItemPrototype const* proto = sItemStorage.LookupEntry<ItemPrototype>(i);
- if(!proto)
+ if (!proto)
continue;
- if((proto->BagFamily & BAG_FAMILY_MASK_MINING_SUPP)==0)
+ if ((proto->BagFamily & BAG_FAMILY_MASK_MINING_SUPP)==0)
continue;
- if(ids_set.count(proto->ItemId))
+ if (ids_set.count(proto->ItemId))
ids_set.erase(proto->ItemId);
}
@@ -1264,12 +1262,12 @@ void LoadLootTemplates_QuestMail()
// remove real entries and check existence loot
ObjectMgr::QuestMap const& questMap = objmgr.GetQuestTemplates();
- for (ObjectMgr::QuestMap::const_iterator itr = questMap.begin(); itr != questMap.end(); ++itr )
+ for (ObjectMgr::QuestMap::const_iterator itr = questMap.begin(); itr != questMap.end(); ++itr)
{
- if(!itr->second->GetRewMailTemplateId())
+ if (!itr->second->GetRewMailTemplateId())
continue;
- if(ids_set.count(itr->first))
+ if (ids_set.count(itr->first))
ids_set.erase(itr->first);
/* disabled reporting: some quest mails not include items
else
@@ -1287,13 +1285,13 @@ void LoadLootTemplates_Skinning()
LootTemplates_Skinning.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for (uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i)
{
- if(CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i))
+ if (CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i))
{
- if(uint32 lootid = cInfo->SkinLootId)
+ if (uint32 lootid = cInfo->SkinLootId)
{
- if(!ids_set.count(lootid))
+ if (!ids_set.count(lootid))
LootTemplates_Skinning.ReportNotExistedId(lootid);
else
ids_setUsed.insert(lootid);
diff --git a/src/game/LootMgr.h b/src/game/LootMgr.h
index 7bad72a20c0..f436d644eab 100644
--- a/src/game/LootMgr.h
+++ b/src/game/LootMgr.h
@@ -88,7 +88,7 @@ struct LootStoreItem
// Constructor, converting ChanceOrQuestChance -> (chance, needs_quest)
// displayid is filled in IsValid() which must be called after
- LootStoreItem(uint32 _itemid, float _chanceOrQuestChance, uint8 _group, uint16 _lootmode, uint8 _conditionId, int32 _mincountOrRef, uint8 _maxcount)
+ LootStoreItem(uint32 _itemid, float _chanceOrQuestChance, uint16 _lootmode, uint8 _group, uint8 _conditionId, int32 _mincountOrRef, uint8 _maxcount)
: itemid(_itemid), chance(fabs(_chanceOrQuestChance)), mincountOrRef(_mincountOrRef), lootmode(_lootmode),
group(_group), needs_quest(_chanceOrQuestChance < 0), maxcount(_maxcount), conditionId(_conditionId)
{}
diff --git a/src/game/PoolHandler.h b/src/game/PoolHandler.h
index 10ed000ea25..652d8e2cf3b 100644
--- a/src/game/PoolHandler.h
+++ b/src/game/PoolHandler.h
@@ -58,7 +58,7 @@ class PoolGroup
typedef std::vector<PoolObject> PoolObjectList;
PoolObjectList ExplicitlyChanced;
PoolObjectList EqualChanced;
- uint32 m_LastDespawnedNode ; // Store the guid of the removed creature/gameobject during a pool update
+ uint32 m_LastDespawnedNode; // Store the guid of the removed creature/gameobject during a pool update
uint32 m_SpawnedPoolAmount; // Used to know the number of spawned objects
};