2016-04-19 21:25:26 +00:00
|
|
|
#ifndef __URDE_CDAMAGEINFO_HPP__
|
|
|
|
#define __URDE_CDAMAGEINFO_HPP__
|
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
2016-11-22 20:43:16 +00:00
|
|
|
#include "Weapon/CWeaponMgr.hpp"
|
2016-12-22 19:57:21 +00:00
|
|
|
#include "Weapon/CWeaponMode.hpp"
|
2016-04-19 21:25:26 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
2016-05-20 09:17:51 +00:00
|
|
|
class CDamageVulnerability;
|
2016-04-19 21:25:26 +00:00
|
|
|
class CDamageInfo
|
|
|
|
{
|
2016-12-22 19:57:21 +00:00
|
|
|
CWeaponMode x0_weaponMode;
|
2016-05-20 09:17:51 +00:00
|
|
|
float x8_damage;
|
|
|
|
float xc_radiusDamage;
|
2016-04-19 21:25:26 +00:00
|
|
|
float x10_radius;
|
|
|
|
float x14_knockback;
|
|
|
|
bool x18_ = false;
|
|
|
|
public:
|
2016-04-25 05:46:28 +00:00
|
|
|
CDamageInfo() = default;
|
2016-04-19 21:25:26 +00:00
|
|
|
CDamageInfo(CInputStream& in)
|
|
|
|
{
|
|
|
|
in.readUint32Big();
|
2016-12-22 19:57:21 +00:00
|
|
|
x0_weaponMode = CWeaponMode(EWeaponType(in.readUint32Big()));
|
2016-05-20 09:17:51 +00:00
|
|
|
x8_damage = in.readFloatBig();
|
|
|
|
xc_radiusDamage = x8_damage;
|
2016-04-19 21:25:26 +00:00
|
|
|
x10_radius = in.readFloatBig();
|
|
|
|
x14_knockback = in.readFloatBig();
|
|
|
|
}
|
2016-12-22 19:57:21 +00:00
|
|
|
CDamageInfo(const CWeaponMode&, float damage, float radius, float knockback);
|
|
|
|
CDamageInfo(const CDamageInfo& other) = default;
|
2016-05-20 09:17:51 +00:00
|
|
|
|
2016-12-22 19:57:21 +00:00
|
|
|
const CWeaponMode& GetWeaponMode() const { return x0_weaponMode; }
|
|
|
|
float GetRadius() const { return x10_radius; }
|
|
|
|
void SetRadius(float r) { x10_radius = r; }
|
|
|
|
float GetKnockBackPower() const { return x14_knockback; }
|
|
|
|
float GetDamage() const { return x8_damage; }
|
|
|
|
void GetDamage(const CDamageVulnerability& dVuln);
|
2016-05-20 09:17:51 +00:00
|
|
|
float GetRadiusDamage() const { return xc_radiusDamage; }
|
|
|
|
float GetRadiusDamage(const CDamageVulnerability& dVuln);
|
2016-04-19 21:25:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CDAMAGEINFO_HPP__
|