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 15:58:20 +07:00
|
|
|
std::shared_ptr<Entity> entity;
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
public:
|
2026-03-02 15:58:20 +07:00
|
|
|
//EntityDamageSource(const wstring &msgId, std::shared_ptr<Entity> entity);
|
|
|
|
|
EntityDamageSource(ChatPacket::EChatPacketMessage msgId, std::shared_ptr<Entity> entity);
|
2026-03-01 12:16:08 +08:00
|
|
|
virtual ~EntityDamageSource() { }
|
|
|
|
|
|
2026-03-02 15:58:20 +07:00
|
|
|
std::shared_ptr<Entity> getEntity();
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
// 4J Stu - Made return a packet
|
2026-03-02 15:58:20 +07:00
|
|
|
//virtual wstring getLocalizedDeathMessage(std::shared_ptr<Player> player);
|
|
|
|
|
virtual std::shared_ptr<ChatPacket> getDeathMessagePacket(std::shared_ptr<Player> player);
|
2026-03-01 12:16:08 +08:00
|
|
|
|
|
|
|
|
virtual bool scalesWithDifficulty();
|
|
|
|
|
};
|