From 209db2e0025b28b3fd89ce837f3555fd773a3f67 Mon Sep 17 00:00:00 2001 From: Qiuzhizhe <42761326+quizhizhe@users.noreply.github.com> Date: Fri, 28 Oct 2022 23:05:59 -0700 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=B8=E6=88=8F=E5=86=85?= =?UTF-8?q?=E4=BC=A4=E5=AE=B3=E4=B8=8D=E6=AD=A3=E5=B8=B8=EF=BC=88=E4=B8=BA?= =?UTF-8?q?=E4=BB=80=E4=B9=88=E6=94=B9=E6=88=90int=E5=B0=B1=E6=B2=A1?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BA=86=E5=91=A2=EF=BC=9F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LiteLoader/Header/EventAPI.h | 2 +- LiteLoader/Kernel/EventAPI.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LiteLoader/Header/EventAPI.h b/LiteLoader/Header/EventAPI.h index d9819c1..37de7ac 100644 --- a/LiteLoader/Header/EventAPI.h +++ b/LiteLoader/Header/EventAPI.h @@ -493,7 +493,7 @@ class MobHurtEvent : public EventTemplate { public: Mob* mMob; ActorDamageSource* mDamageSource; - float mDamage; + int mDamage; }; class MobDieEvent : public EventTemplate { diff --git a/LiteLoader/Kernel/EventAPI.cpp b/LiteLoader/Kernel/EventAPI.cpp index f9b607b..b83e466 100644 --- a/LiteLoader/Kernel/EventAPI.cpp +++ b/LiteLoader/Kernel/EventAPI.cpp @@ -1589,7 +1589,7 @@ TInstanceHook(bool, "?useItemOn@GameMode@@UEAA_NAEAVItemStack@@AEBVBlockPos@@EAE /////////////////// MobHurt /////////////////// TInstanceHook(bool, "?_hurt@Mob@@MEAA_NAEBVActorDamageSource@@H_N1@Z", - Mob, ActorDamageSource& src, float damage, bool unk1_1, bool unk2_0) { + Mob, ActorDamageSource& src, int damage, bool unk1_1, bool unk2_0) { IF_LISTENED(MobHurtEvent) { if (this) { MobHurtEvent ev{};