Função
Código:
void pItemDurSend::GCItemDurSend(int aIndex, char pos, char dur, char flag)
{
float * Sprite = (float*)&lpObj[aIndex].pInventory[8];
if(lpObj[aIndex].pInventory[8].IsItem() == true)
{
if(lpObj[aIndex].pInventory[8].m_Type == 419)
{
if(Load.Pet.Dinorant != 0)
{
*(float*)&Sprite[9] = 1.0;
}
}
else if(lpObj[aIndex].pInventory[8].m_Type == 417)
{
if(Load.Pet.Imp != 0)
{
*(float*)&Sprite[9] = 1.0;
}
}
else if(lpObj[aIndex].pInventory[8].m_Type == 418)
{
if(Load.Pet.Uniria != 0)
{
*(float*)&Sprite[9] = 1.0;
}
}
else if(lpObj[aIndex].pInventory[8].m_Type == 416)
{
if(Load.Pet.Angel != 0)
{
*(float*)&Sprite[9] = 1.0;
}
}
}
PMSG_ITEMDUR pMsg;
pMsg.h.c = 0xC1;
pMsg.h.head = 42;
pMsg.h.size = 6;
pMsg.IPos = pos;
pMsg.Dur = dur;
pMsg.Flag = flag;
DataSend(aIndex, &pMsg.h.c, (DWORD)pMsg.h.size);
}
Struct
Código:
struct PMSG_ITEMDUR
{
PBMSG_HEAD h;
char IPos;
char Dur;
char Flag;
};
Offset para hook
Créditos: antonio.fr