aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/BottleItem.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
commit119bff351450ea16ffda550b6e0f67379b29f708 (patch)
treed9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.World/BottleItem.cpp
parent8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff)
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.World/BottleItem.cpp')
-rw-r--r--Minecraft.World/BottleItem.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.World/BottleItem.cpp b/Minecraft.World/BottleItem.cpp
index 804384f7..3aecafee 100644
--- a/Minecraft.World/BottleItem.cpp
+++ b/Minecraft.World/BottleItem.cpp
@@ -15,7 +15,7 @@ Icon *BottleItem::getIcon(int auxValue)
return Item::potion->getIcon(0);
}
-std::shared_ptr<ItemInstance> BottleItem::use(std::shared_ptr<ItemInstance> itemInstance, Level *level, std::shared_ptr<Player> player)
+shared_ptr<ItemInstance> BottleItem::use(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Player> player)
{
HitResult *hr = getPlayerPOVHitResult(level, player, true);
if (hr == NULL) return itemInstance;
@@ -40,13 +40,13 @@ std::shared_ptr<ItemInstance> BottleItem::use(std::shared_ptr<ItemInstance> item
itemInstance->count--;
if (itemInstance->count <= 0)
{
- return std::shared_ptr<ItemInstance>( new ItemInstance( (Item *)Item::potion) );
+ return shared_ptr<ItemInstance>( new ItemInstance( (Item *)Item::potion) );
}
else
{
- if (!player->inventory->add(std::shared_ptr<ItemInstance>( new ItemInstance( (Item *)Item::potion) )))
+ if (!player->inventory->add(shared_ptr<ItemInstance>( new ItemInstance( (Item *)Item::potion) )))
{
- player->drop( std::shared_ptr<ItemInstance>( new ItemInstance(Item::potion_Id, 1, 0) ));
+ player->drop( shared_ptr<ItemInstance>( new ItemInstance(Item::potion_Id, 1, 0) ));
}
}
}
@@ -60,7 +60,7 @@ std::shared_ptr<ItemInstance> BottleItem::use(std::shared_ptr<ItemInstance> item
}
// 4J-PB - added to allow tooltips
-bool BottleItem::TestUse(Level *level, std::shared_ptr<Player> player)
+bool BottleItem::TestUse(Level *level, shared_ptr<Player> player)
{
HitResult *hr = getPlayerPOVHitResult(level, player, true);
if (hr == NULL) return false;