Fix offset

This commit is contained in:
Qiuzhizhe 2022-10-28 11:05:25 -07:00
parent d4399dd8fc
commit 00e16d235e

View File

@ -2,18 +2,18 @@
#include <MC/ItemActor.hpp>
ItemStack* ItemActor::getItemStack() {
return (ItemStack*)((uintptr_t)this + 1776); // IDA Player::take
return (ItemStack*)((uintptr_t)this + 1568); // IDA Player::take Line127
}
int ItemActor::getDespawnTime() {
return dAccess<int, 489 * 4>(this); // ItemActor::postNormalTick
return dAccess<int, 433>(this); // ItemActor::NormalTick Line258
}
bool ItemActor::setDespawnTime(int a1) {
dAccess<int, 489 * 4>(this) = a1;
dAccess<int, 433>(this) = a1;
return true;
}
int ItemActor::getLatestSpawnTime() {
return dAccess<int, 484 * 4>(this);
return dAccess<int, 428>(this);
}