2026-03-01 12:16:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
#include "DamageSource.h"
|
|
|
|
|
|
|
|
|
|
class Entity;
|
|
|
|
|
class Player;
|
|
|
|
|
|
|
|
|
|
class EntityDamageSource : public DamageSource
|
|
|
|
|
{
|
|
|
|
|
protected:
|
2026-03-02 17:37:16 +07:00
|
|
|
shared_ptr<Entity> entity;
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
public:
|
2026-03-02 17:37:16 +07:00
|
|
|
//EntityDamageSource(const wstring &msgId, shared_ptr<Entity> entity);
|
2026-03-03 03:04:10 +08:00
|
|
|
EntityDamageSource(ChatPacket::EChatPacketMessage msgId, ChatPacket::EChatPacketMessage msgWithItemId, shared_ptr<Entity> entity);
|
2026-03-01 12:16:08 +08:00
|
|
|
virtual ~EntityDamageSource() { }
|
|
|
|
|
|
2026-03-03 03:04:10 +08:00
|
|
|
shared_ptr<Entity> getEntity();
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
// 4J Stu - Made return a packet
|
2026-03-02 17:37:16 +07:00
|
|
|
//virtual wstring getLocalizedDeathMessage(shared_ptr<Player> player);
|
2026-03-03 03:04:10 +08:00
|
|
|
virtual shared_ptr<ChatPacket> getDeathMessagePacket(shared_ptr<LivingEntity> player);
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
virtual bool scalesWithDifficulty();
|
2026-03-03 03:04:10 +08:00
|
|
|
|
|
|
|
|
virtual DamageSource *copy();
|
2026-03-01 12:16:08 +08:00
|
|
|
};
|