Remove BYTE from mob effect packets

This commit is contained in:
notmatthewbeshay
2026-03-10 07:53:04 +11:00
parent 97d12ae2d8
commit 3da761347f
2 changed files with 5 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ UpdateMobEffectPacket::UpdateMobEffectPacket()
UpdateMobEffectPacket::UpdateMobEffectPacket(int entityId, MobEffectInstance *effect)
{
this->entityId = entityId;
this->effectId = (BYTE) (effect->getId() & 0xff);
this->effectId = static_cast<std::uint8_t>(effect->getId() & 0xff);
this->effectAmplifier = (char) (effect->getAmplifier() & 0xff);
this->effectDurationTicks = (short) effect->getDuration();
}
@@ -57,4 +57,4 @@ bool UpdateMobEffectPacket::isInvalidatedBy(std::shared_ptr<Packet> packet)
{
std::shared_ptr<UpdateMobEffectPacket> target = std::dynamic_pointer_cast<UpdateMobEffectPacket>(packet);
return target->entityId == entityId && target->effectId == effectId;
}
}