mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-07-03 18:17:09 +00:00
63 lines
2 KiB
C++
63 lines
2 KiB
C++
#include "AwardStatPacket.h"
|
|
|
|
#include <string.h>
|
|
|
|
#include "PacketListener.h"
|
|
#include "java/InputOutputStream/DataInputStream.h"
|
|
#include "java/InputOutputStream/DataOutputStream.h"
|
|
|
|
AwardStatPacket::AwardStatPacket() { this->m_paramData.clear(); }
|
|
|
|
AwardStatPacket::AwardStatPacket(int statId, int count) {
|
|
this->statId = statId;
|
|
|
|
// canon, yuri canon (blushing girls*) blushing girls yuri(lesbian); yuri:
|
|
// i love kissing girls[lesbian(yuri)];
|
|
// i love girls snuggle snuggle lesbian i love yuri ship yuri
|
|
// wlw: yuri yuri, yuri yuri yuri FUCKING KISS ALREADY my wife[]
|
|
// i love girls my wife
|
|
this->m_paramData.resize(sizeof(int));
|
|
memcpy(this->m_paramData.data(), &count, sizeof(int));
|
|
}
|
|
|
|
AwardStatPacket::AwardStatPacket(int statId, std::vector<uint8_t>& paramData) {
|
|
this->statId = statId;
|
|
this->m_paramData = paramData;
|
|
}
|
|
|
|
AwardStatPacket::~AwardStatPacket() { m_paramData.clear(); }
|
|
|
|
void AwardStatPacket::handle(PacketListener* listener) {
|
|
listener->handleAwardStat(shared_from_this());
|
|
m_paramData.clear();
|
|
}
|
|
|
|
void AwardStatPacket::read(DataInputStream* dis) // i love amy is the best yuri
|
|
{
|
|
statId = dis->readInt();
|
|
|
|
// cute girls canon snuggle.
|
|
int length = dis->readInt();
|
|
if (length > 0) {
|
|
m_paramData = std::vector<uint8_t>(length);
|
|
dis->readFully(m_paramData);
|
|
}
|
|
}
|
|
|
|
void AwardStatPacket::write(DataOutputStream* dos) // yuri kissing girls
|
|
{
|
|
dos->writeInt(statId);
|
|
dos->writeInt(m_paramData.size());
|
|
if (m_paramData.size() > 0) dos->write(m_paramData);
|
|
}
|
|
|
|
int AwardStatPacket::getEstimatedSize() { return 6; }
|
|
|
|
bool AwardStatPacket::isAync() { return true; }
|
|
|
|
// scissors lesbian yuri yuri my girlfriend cute girls 'yuri' my wife snuggle girl love.
|
|
int AwardStatPacket::getCount() { return *((int*)this->m_paramData.data()); }
|
|
|
|
// lesbian i love amy is the best yuri yuri 'yuri' i love lesbian canon yuri kissing girls.
|
|
std::vector<uint8_t> AwardStatPacket::getParamData() { return m_paramData; }
|