[Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions)

This commit is contained in:
Spp
2011-09-15 14:12:57 +02:00
parent 9006e4e8dc
commit af05915b9e
431 changed files with 3131 additions and 3131 deletions
@@ -31,13 +31,13 @@ Bag::Bag(): Item()
m_valuesCount = CONTAINER_END;
memset(m_bagslot, 0, sizeof(Item *) * MAX_BAG_SIZE);
memset(m_bagslot, 0, sizeof(Item* ) * MAX_BAG_SIZE);
}
Bag::~Bag()
{
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
if (Item *item = m_bagslot[i])
if (Item* item = m_bagslot[i])
{
if (item->IsInWorld())
{
@@ -153,7 +153,7 @@ void Bag::RemoveItem(uint8 slot, bool /*update*/)
SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (slot * 2), 0);
}
void Bag::StoreItem(uint8 slot, Item *pItem, bool /*update*/)
void Bag::StoreItem(uint8 slot, Item* pItem, bool /*update*/)
{
ASSERT(slot < MAX_BAG_SIZE);
@@ -168,7 +168,7 @@ void Bag::StoreItem(uint8 slot, Item *pItem, bool /*update*/)
}
}
void Bag::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const
void Bag::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const
{
Item::BuildCreateUpdateBlockForPlayer(data, target);
@@ -189,7 +189,7 @@ bool Bag::IsEmpty() const
uint32 Bag::GetItemCount(uint32 item, Item* eItem) const
{
Item *pItem;
Item* pItem;
uint32 count = 0;
for (uint32 i=0; i < GetBagSize(); ++i)
{
@@ -215,9 +215,9 @@ uint32 Bag::GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipItem)
{
uint32 count = 0;
for (uint32 i = 0; i < GetBagSize(); ++i)
if (Item *pItem = m_bagslot[i])
if (Item* pItem = m_bagslot[i])
if (pItem != skipItem)
if (ItemTemplate const *pProto = pItem->GetTemplate())
if (ItemTemplate const* pProto = pItem->GetTemplate())
if (pProto->ItemLimitCategory == limitCategory)
count += m_bagslot[i]->GetCount();
@@ -38,7 +38,7 @@ class Bag : public Item
bool Create(uint32 guidlow, uint32 itemid, Player const* owner);
void Clear();
void StoreItem(uint8 slot, Item *pItem, bool update);
void StoreItem(uint8 slot, Item* pItem, bool update);
void RemoveItem(uint8 slot, bool update);
Item* GetItemByPos(uint8 slot) const;
@@ -58,7 +58,7 @@ class Bag : public Item
// overwrite virtual Item::DeleteFromDB
void DeleteFromDB(SQLTransaction& trans);
void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const;
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const;
protected:
+18 -18
View File
@@ -110,11 +110,11 @@ void AddItemsSetItem(Player* player, Item* item)
}
}
void RemoveItemsSetItem(Player*player, ItemTemplate const *proto)
void RemoveItemsSetItem(Player*player, ItemTemplate const* proto)
{
uint32 setid = proto->ItemSet;
ItemSetEntry const *set = sItemSetStore.LookupEntry(setid);
ItemSetEntry const* set = sItemSetStore.LookupEntry(setid);
if (!set)
{
@@ -122,7 +122,7 @@ void RemoveItemsSetItem(Player*player, ItemTemplate const *proto)
return;
}
ItemSetEffect *eff = NULL;
ItemSetEffect* eff = NULL;
size_t setindex = 0;
for (; setindex < player->ItemSetEff.size(); setindex++)
{
@@ -168,7 +168,7 @@ void RemoveItemsSetItem(Player*player, ItemTemplate const *proto)
}
}
bool ItemCanGoIntoBag(ItemTemplate const *pProto, ItemTemplate const *pBagProto)
bool ItemCanGoIntoBag(ItemTemplate const* pProto, ItemTemplate const* pBagProto)
{
if (!pProto || !pBagProto)
return false;
@@ -264,7 +264,7 @@ bool Item::Create(uint32 guidlow, uint32 itemid, Player const* owner)
SetUInt64Value(ITEM_FIELD_OWNER, owner ? owner->GetGUID() : 0);
SetUInt64Value(ITEM_FIELD_CONTAINED, owner ? owner->GetGUID() : 0);
ItemTemplate const *itemProto = sObjectMgr->GetItemTemplate(itemid);
ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(itemid);
if (!itemProto)
return false;
@@ -497,7 +497,7 @@ void Item::DeleteFromInventoryDB(SQLTransaction& trans)
DeleteFromInventoryDB(trans, GetGUIDLow());
}
ItemTemplate const *Item::GetTemplate() const
ItemTemplate const* Item::GetTemplate() const
{
return sObjectMgr->GetItemTemplate(GetEntry());
}
@@ -586,7 +586,7 @@ uint32 Item::GetSpell()
int32 Item::GenerateItemRandomPropertyId(uint32 item_id)
{
ItemTemplate const *itemProto = sObjectMgr->GetItemTemplate(item_id);
ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(item_id);
if (!itemProto)
return 0;
@@ -606,7 +606,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id)
if (itemProto->RandomProperty)
{
uint32 randomPropId = GetItemEnchantMod(itemProto->RandomProperty);
ItemRandomPropertiesEntry const *random_id = sItemRandomPropertiesStore.LookupEntry(randomPropId);
ItemRandomPropertiesEntry const* random_id = sItemRandomPropertiesStore.LookupEntry(randomPropId);
if (!random_id)
{
sLog->outErrorDb("Enchantment id #%u used but it doesn't have records in 'ItemRandomProperties.dbc'", randomPropId);
@@ -619,7 +619,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id)
else
{
uint32 randomPropId = GetItemEnchantMod(itemProto->RandomSuffix);
ItemRandomSuffixEntry const *random_id = sItemRandomSuffixStore.LookupEntry(randomPropId);
ItemRandomSuffixEntry const* random_id = sItemRandomSuffixStore.LookupEntry(randomPropId);
if (!random_id)
{
sLog->outErrorDb("Enchantment id #%u used but it doesn't have records in sItemRandomSuffixStore.", randomPropId);
@@ -637,7 +637,7 @@ void Item::SetItemRandomProperties(int32 randomPropId)
if (randomPropId > 0)
{
ItemRandomPropertiesEntry const *item_rand = sItemRandomPropertiesStore.LookupEntry(randomPropId);
ItemRandomPropertiesEntry const* item_rand = sItemRandomPropertiesStore.LookupEntry(randomPropId);
if (item_rand)
{
if (GetInt32Value(ITEM_FIELD_RANDOM_PROPERTIES_ID) != int32(item_rand->ID))
@@ -651,7 +651,7 @@ void Item::SetItemRandomProperties(int32 randomPropId)
}
else
{
ItemRandomSuffixEntry const *item_rand = sItemRandomSuffixStore.LookupEntry(-randomPropId);
ItemRandomSuffixEntry const* item_rand = sItemRandomSuffixStore.LookupEntry(-randomPropId);
if (item_rand)
{
if (GetInt32Value(ITEM_FIELD_RANDOM_PROPERTIES_ID) != -int32(item_rand->ID) ||
@@ -676,7 +676,7 @@ void Item::UpdateItemSuffixFactor()
SetUInt32Value(ITEM_FIELD_PROPERTY_SEED, suffixFactor);
}
void Item::SetState(ItemUpdateState state, Player *forplayer)
void Item::SetState(ItemUpdateState state, Player* forplayer)
{
if (uState == ITEM_NEW && state == ITEM_REMOVED)
{
@@ -778,7 +778,7 @@ bool Item::CanBeTraded(bool mail, bool trade) const
return true;
}
bool Item::HasEnchantRequiredSkill(const Player *pPlayer) const
bool Item::HasEnchantRequiredSkill(const Player* pPlayer) const
{
// Check all enchants for required skill
@@ -1036,7 +1036,7 @@ Item* Item::CreateItem(uint32 item, uint32 count, Player const* player)
if (count < 1)
return NULL; //don't create item at zero count
ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(item);
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item);
if (pProto)
{
if (count > pProto->GetMaxStackSize())
@@ -1044,7 +1044,7 @@ Item* Item::CreateItem(uint32 item, uint32 count, Player const* player)
ASSERT(count !=0 && "pProto->Stackable == 0 but checked at loading already");
Item *pItem = NewItemOrBag(pProto);
Item* pItem = NewItemOrBag(pProto);
if (pItem->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), item, player))
{
pItem->SetCount(count);
@@ -1116,7 +1116,7 @@ bool ItemRequiredTarget::IsFitToRequirements(Unit* pUnitTarget) const
void Item::BuildUpdate(UpdateDataMapType& data_map)
{
if (Player *owner = GetOwner())
if (Player* owner = GetOwner())
BuildFieldsUpdate(owner, data_map);
ClearUpdateMask(false);
}
@@ -1136,7 +1136,7 @@ void Item::DeleteRefundDataFromDB(SQLTransaction* trans)
(*trans)->PAppend("DELETE FROM item_refund_instance WHERE item_guid = '%u'", GetGUIDLow());
}
void Item::SetNotRefundable(Player *owner, bool changestate /*=true*/, SQLTransaction* trans /*=NULL*/)
void Item::SetNotRefundable(Player* owner, bool changestate /*=true*/, SQLTransaction* trans /*=NULL*/)
{
if (!HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE))
return;
@@ -1154,7 +1154,7 @@ void Item::SetNotRefundable(Player *owner, bool changestate /*=true*/, SQLTransa
owner->DeleteRefundReference(GetGUIDLow());
}
void Item::UpdatePlayedTime(Player *owner)
void Item::UpdatePlayedTime(Player* owner)
{
/* Here we update our played time
We simply add a number to the current played time,
+9 -9
View File
@@ -33,7 +33,7 @@ struct ItemSetEffect
{
uint32 setid;
uint32 item_count;
SpellInfo const *spells[8];
SpellInfo const* spells[8];
};
enum InventoryResult
@@ -221,7 +221,7 @@ struct ItemRequiredTarget
bool IsFitToRequirements(Unit* pUnitTarget) const;
};
bool ItemCanGoIntoBag(ItemTemplate const *proto, ItemTemplate const *pBagProto);
bool ItemCanGoIntoBag(ItemTemplate const* proto, ItemTemplate const* pBagProto);
class Item : public Object
{
@@ -264,7 +264,7 @@ class Item : public Object
void SetInTrade(bool b = true) { mb_in_trade = b; }
bool IsInTrade() const { return mb_in_trade; }
bool HasEnchantRequiredSkill(const Player *pPlayer) const;
bool HasEnchantRequiredSkill(const Player* pPlayer) const;
uint32 GetEnchantRequiredLevel() const;
bool IsFitToSpellRequirements(SpellInfo const* spellInfo) const;
@@ -280,11 +280,11 @@ class Item : public Object
InventoryResult CanBeMergedPartlyWith(ItemTemplate const* proto) const;
uint8 GetSlot() const {return m_slot;}
Bag *GetContainer() { return m_container; }
Bag* GetContainer() { return m_container; }
uint8 GetBagSlot() const;
void SetSlot(uint8 slot) { m_slot = slot; }
uint16 GetPos() const { return uint16(GetBagSlot()) << 8 | GetSlot(); }
void SetContainer(Bag *container) { m_container = container; }
void SetContainer(Bag* container) { m_container = container; }
bool IsInBag() const { return m_container != NULL; }
bool IsEquipped() const;
@@ -321,7 +321,7 @@ class Item : public Object
// Update States
ItemUpdateState GetState() const { return uState; }
void SetState(ItemUpdateState state, Player *forplayer = NULL);
void SetState(ItemUpdateState state, Player* forplayer = NULL);
void AddToUpdateQueueOf(Player* player);
void RemoveFromUpdateQueueOf(Player* player);
bool IsInUpdateQueue() const { return uQueuePos != -1; }
@@ -339,7 +339,7 @@ class Item : public Object
bool IsConjuredConsumable() const { return GetTemplate()->IsConjuredConsumable(); }
// Item Refund system
void SetNotRefundable(Player *owner, bool changestate = true, SQLTransaction* trans = NULL);
void SetNotRefundable(Player* owner, bool changestate = true, SQLTransaction* trans = NULL);
void SetRefundRecipient(uint32 pGuidLow) { m_refundRecipient = pGuidLow; }
void SetPaidMoney(uint32 money) { m_paidMoney = money; }
void SetPaidExtendedCost(uint32 iece) { m_paidExtendedCost = iece; }
@@ -347,7 +347,7 @@ class Item : public Object
uint32 GetPaidMoney() { return m_paidMoney; }
uint32 GetPaidExtendedCost() { return m_paidExtendedCost; }
void UpdatePlayedTime(Player *owner);
void UpdatePlayedTime(Player* owner);
uint32 GetPlayedTime();
bool IsRefundExpired();
@@ -361,7 +361,7 @@ class Item : public Object
private:
std::string m_text;
uint8 m_slot;
Bag *m_container;
Bag* m_container;
ItemUpdateState uState;
int16 uQueuePos;
bool mb_in_trade; // true if item is currently in trade-window
@@ -57,7 +57,7 @@ void LoadRandomEnchantmentsTable()
do
{
Field *fields = result->Fetch();
Field* fields = result->Fetch();
uint32 entry = fields[0].GetUInt32();
uint32 ench = fields[1].GetUInt32();
@@ -120,14 +120,14 @@ uint32 GetItemEnchantMod(int32 entry)
uint32 GenerateEnchSuffixFactor(uint32 item_id)
{
ItemTemplate const *itemProto = sObjectMgr->GetItemTemplate(item_id);
ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(item_id);
if (!itemProto)
return 0;
if (!itemProto->RandomSuffix)
return 0;
RandomPropertiesPointsEntry const *randomProperty = sRandomPropertiesPointsStore.LookupEntry(itemProto->ItemLevel);
RandomPropertiesPointsEntry const* randomProperty = sRandomPropertiesPointsStore.LookupEntry(itemProto->ItemLevel);
if (!randomProperty)
return 0;