sapphire dev
-
Автор темы
- #1
Click:
//Haha naebal, eto broadcast_event dlia better open case. Patterni ne dam!
struct EventShit
{
uint64_t VtableField;
uint16_t Symbol;
__declspec(align(4)) uint64_t ShitWord;
int gap14;
char* SecondWord;
char* FirstWord;
uint32_t dword28;
};
//static_assert(EventShit == 48);
bool CS_FASTCALL H::broadcast_event(void* p_this, uintptr_t event_)
{
if (event_ == uintptr_t(I::failed_to_open_crate_WORD) && I::UIEngine->broadcast_event(uintptr_t(I::item_customization_notification_WORD)))
{
EventShit* _ptrShitStr = (EventShit*)std::malloc(sizeof(EventShit));
_ptrShitStr->Symbol = *I::item_customization_notification_WORD;
_ptrShitStr->ShitWord = *I::item_customization_notification_SHITWORD;
_ptrShitStr->dword28 = * (uint32_t *)(I::RetOfsub_180E03800 + 0x28);
I::SomethingForConvertStrToShit(_ptrShitStr->FirstWord, "crate_unlock");
I::SomethingForConvertStrToShit(_ptrShitStr->SecondWord, std::to_string(econ_item->itemID).c_str());
auto event__ = I::fnCreateEventShitObj(_ptrShitStr);
I::UIEngine->dispatchEvent(uintptr_t(event__));
free(_ptrShitStr);
}
return hkbroadcast_event.GetOriginal()(p_this, event_);
}
// эта хуета устанавливает предмет в пизде, мне пох на него
bool CS_FASTCALL H::SetItemBackpackPosition(void* rcx, EconItemView* rdx, int r8, int r9, bool a3)
{
if (rdx->get_inventory() == 0)
{
rdx->get_inventory() = I::inventoryManager->getLocalInventory()->getHighestIDs().second + 1;
rdx->get_soc_data()->inventory = rdx->get_inventory();
I::UIEngine->send_panorama_component_my_persona_inventory_updated();
}
return hkSetItemBackpackPosition.GetOriginal()(rcx, rdx, r8, r9, a3);
}
Последнее редактирование: