diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
| commit | 7074f35e4ba831e358117842b99ee35b87f85ae5 (patch) | |
| tree | 7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.World/DamageSource.h | |
| parent | d63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff) | |
shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
Diffstat (limited to 'Minecraft.World/DamageSource.h')
| -rw-r--r-- | Minecraft.World/DamageSource.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Minecraft.World/DamageSource.h b/Minecraft.World/DamageSource.h index 2e1d249d..ecfc2423 100644 --- a/Minecraft.World/DamageSource.h +++ b/Minecraft.World/DamageSource.h @@ -30,13 +30,13 @@ public: static DamageSource *anvil; static DamageSource *fallingBlock; - static DamageSource *mobAttack(shared_ptr<Mob> mob); - static DamageSource *playerAttack(shared_ptr<Player> player); - static DamageSource *arrow(shared_ptr<Arrow> arrow, shared_ptr<Entity> owner); - static DamageSource *fireball(shared_ptr<Fireball> fireball, shared_ptr<Entity> owner); - static DamageSource *thrown(shared_ptr<Entity> entity, shared_ptr<Entity> owner); - static DamageSource *indirectMagic(shared_ptr<Entity> entity, shared_ptr<Entity> owner); - static DamageSource *thorns(shared_ptr<Entity> source); + static DamageSource *mobAttack(std::shared_ptr<Mob> mob); + static DamageSource *playerAttack(std::shared_ptr<Player> player); + static DamageSource *arrow(std::shared_ptr<Arrow> arrow, std::shared_ptr<Entity> owner); + static DamageSource *fireball(std::shared_ptr<Fireball> fireball, std::shared_ptr<Entity> owner); + static DamageSource *thrown(std::shared_ptr<Entity> entity, std::shared_ptr<Entity> owner); + static DamageSource *indirectMagic(std::shared_ptr<Entity> entity, std::shared_ptr<Entity> owner); + static DamageSource *thorns(std::shared_ptr<Entity> source); private: bool _bypassArmor; @@ -66,8 +66,8 @@ protected: public: virtual ~DamageSource() {} - virtual shared_ptr<Entity> getDirectEntity(); - virtual shared_ptr<Entity> getEntity(); + virtual std::shared_ptr<Entity> getDirectEntity(); + virtual std::shared_ptr<Entity> getEntity(); protected: DamageSource *bypassArmor(); @@ -82,8 +82,8 @@ public: DamageSource *setMagic(); // 4J Stu - Made return a packet - //virtual wstring getLocalizedDeathMessage(shared_ptr<Player> player); - virtual shared_ptr<ChatPacket> getDeathMessagePacket(shared_ptr<Player> player); + //virtual wstring getLocalizedDeathMessage(std::shared_ptr<Player> player); + virtual std::shared_ptr<ChatPacket> getDeathMessagePacket(std::shared_ptr<Player> player); bool isFire(); ChatPacket::EChatPacketMessage getMsgId(); // 4J Stu - Used to return String |
