aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Item/Item.cpp16
-rw-r--r--src/server/game/Entities/Item/Item.h6
-rw-r--r--src/server/game/Entities/Item/ItemTemplate.h6
3 files changed, 14 insertions, 14 deletions
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 5683328a00f..20fc96a2394 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -292,11 +292,11 @@ Item::Item()
memset(&_bonusData, 0, sizeof(_bonusData));
}
-bool Item::Create(ObjectGuid::LowType guidlow, uint32 itemid, Player const* owner)
+bool Item::Create(ObjectGuid::LowType guidlow, uint32 itemId, Player const* owner)
{
Object::_Create(ObjectGuid::Create<HighGuid::Item>(guidlow));
- SetEntry(itemid);
+ SetEntry(itemId);
SetObjectScale(1.0f);
if (owner)
@@ -305,7 +305,7 @@ bool Item::Create(ObjectGuid::LowType guidlow, uint32 itemid, Player const* owne
SetGuidValue(ITEM_FIELD_CONTAINED, owner->GetGUID());
}
- ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(itemid);
+ ItemTemplate const* itemProto = sObjectMgr->GetItemTemplate(itemId);
if (!itemProto)
return false;
@@ -1365,10 +1365,10 @@ void Item::SendTimeUpdate(Player* owner)
owner->GetSession()->SendPacket(itemTimeUpdate.Write());
}
-Item* Item::CreateItem(uint32 itemEntry, uint32 count, Player const* player)
+Item* Item::CreateItem(uint32 itemEntry, uint32 count, Player const* player /*= nullptr*/)
{
if (count < 1)
- return NULL; //don't create item at zero count
+ return nullptr; //don't create item at zero count
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemEntry);
if (proto)
@@ -1389,14 +1389,14 @@ Item* Item::CreateItem(uint32 itemEntry, uint32 count, Player const* player)
}
else
ABORT();
- return NULL;
+ return nullptr;
}
-Item* Item::CloneItem(uint32 count, Player const* player) const
+Item* Item::CloneItem(uint32 count, Player const* player /*= nullptr*/) const
{
Item* newItem = CreateItem(GetEntry(), count, player);
if (!newItem)
- return NULL;
+ return nullptr;
newItem->SetGuidValue(ITEM_FIELD_CREATOR, GetGuidValue(ITEM_FIELD_CREATOR));
newItem->SetGuidValue(ITEM_FIELD_GIFTCREATOR, GetGuidValue(ITEM_FIELD_GIFTCREATOR));
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index 2f1afb66096..84e3e0f200a 100644
--- a/src/server/game/Entities/Item/Item.h
+++ b/src/server/game/Entities/Item/Item.h
@@ -130,12 +130,12 @@ class TC_GAME_API Item : public Object
friend void AddItemToUpdateQueueOf(Item* item, Player* player);
friend void RemoveItemFromUpdateQueueOf(Item* item, Player* player);
public:
- static Item* CreateItem(uint32 itemEntry, uint32 count, Player const* player = NULL);
- Item* CloneItem(uint32 count, Player const* player = NULL) const;
+ static Item* CreateItem(uint32 itemEntry, uint32 count, Player const* player = nullptr);
+ Item* CloneItem(uint32 count, Player const* player = nullptr) const;
Item();
- virtual bool Create(ObjectGuid::LowType guidlow, uint32 itemid, Player const* owner);
+ virtual bool Create(ObjectGuid::LowType guidlow, uint32 itemId, Player const* owner);
ItemTemplate const* GetTemplate() const;
BonusData const* GetBonus() const { return &_bonusData; }
diff --git a/src/server/game/Entities/Item/ItemTemplate.h b/src/server/game/Entities/Item/ItemTemplate.h
index 7395842cce5..3d6617f7410 100644
--- a/src/server/game/Entities/Item/ItemTemplate.h
+++ b/src/server/game/Entities/Item/ItemTemplate.h
@@ -177,7 +177,7 @@ enum ItemFlags : uint32
ITEM_FLAG_HEROIC_TOOLTIP = 0x00000008, // Makes green "Heroic" text appear on item
ITEM_FLAG_DEPRECATED = 0x00000010, // Cannot equip or use
ITEM_FLAG_NO_USER_DESTROY = 0x00000020, // Item can not be destroyed, except by using spell (item can be reagent for spell)
- ITEM_FLAG_PLAYERCAST = 0x00000040,
+ ITEM_FLAG_PLAYERCAST = 0x00000040, // Item's spells are castable by players
ITEM_FLAG_NO_EQUIP_COOLDOWN = 0x00000080, // No default 30 seconds cooldown when equipped
ITEM_FLAG_MULTI_LOOT_QUEST = 0x00000100,
ITEM_FLAG_IS_WRAPPER = 0x00000200, // Item can wrap other items
@@ -185,7 +185,7 @@ enum ItemFlags : uint32
ITEM_FLAG_MULTI_DROP = 0x00000800, // Looting this item does not remove it from available loot
ITEM_FLAG_ITEM_PURCHASE_RECORD = 0x00001000, // Item can be returned to vendor for its original cost (extended cost)
ITEM_FLAG_PETITION = 0x00002000, // Item is guild or arena charter
- ITEM_FLAG_HAS_TEXT = 0x00004000,
+ ITEM_FLAG_HAS_TEXT = 0x00004000, // Only readable items have this (but not all)
ITEM_FLAG_NO_DISENCHANT = 0x00008000,
ITEM_FLAG_REAL_DURATION = 0x00010000,
ITEM_FLAG_NO_CREATOR = 0x00020000,
@@ -193,7 +193,7 @@ enum ItemFlags : uint32
ITEM_FLAG_UNIQUE_EQUIPPABLE = 0x00080000, // You can only equip one of these
ITEM_FLAG_IGNORE_FOR_AURAS = 0x00100000,
ITEM_FLAG_IGNORE_DEFAULT_ARENA_RESTRICTIONS = 0x00200000, // Item can be used during arena match
- ITEM_FLAG_NO_DURABILITY_LOSS = 0x00400000,
+ ITEM_FLAG_NO_DURABILITY_LOSS = 0x00400000, // Some Thrown weapons have it (and only Thrown) but not all
ITEM_FLAG_USE_WHEN_SHAPESHIFTED = 0x00800000, // Item can be used in shapeshift forms
ITEM_FLAG_HAS_QUEST_GLOW = 0x01000000,
ITEM_FLAG_HIDE_UNUSABLE_RECIPE = 0x02000000, // Profession recipes: can only be looted if you meet requirements and don't already know it