Mostrar posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - liron003

Paginas: [1]
1
:'(:'( Help !

I think is lacking object sctruct

same problem someone know how to fix it ? i check struct and offsets everything correct
Help please

2
Sources Generales / Re: Right Click Mouse
« Posteado: August 13, 2022, 11:56:21 AM »
get main close when i click on item on the chaos machine to the inventory any idea why ?

3
Sources Generales / Re: Error on healthbar packet
« Posteado: August 01, 2022, 03:57:17 PM »
?UP!

4
Sources Generales / Re: Error on healthbar packet
« Posteado: July 30, 2022, 10:55:45 AM »
someone?

5
Sources Generales / SOURCES Error on healthbar packet
« Posteado: July 28, 2022, 04:39:57 AM »
i work on files s6 and the packet on healthbar not send as well , the client recognize only 1 player each someone can help ? PLZ
ServerSide:
Code: [Select]
void GCNewHealthBarSend(LPOBJ lpObj) // OK
{

BYTE send[8192];

PMSG_NEW_HEALTH_BAR_SEND pMsg;
PMSG_NEW_HEALTH_BAR info;

pMsg.header.set(0xF3, 0xE2, 0);

int size = sizeof(pMsg);

pMsg.count = 0;


for (int n = 0;n < MAX_VIEWPORT;n++)
{
if (lpObj->VpPlayer[n].state != VIEWPORT_SEND && lpObj->VpPlayer[n].state != VIEWPORT_WAIT)
{
continue;
}

if (lpObj->VpPlayer[n].type != OBJ_USER)
{
continue;
}


if (OBJECT_RANGE(lpObj->VpPlayer[n].number) == 0)
{
continue;
}

if (gObj[lpObj->VpPlayer[n].number].Live == 0 )
{
continue;
}
info.index = lpObj->VpPlayer[n].number;

info.type = (BYTE)gObj[lpObj->VpPlayer[n].number].Type;

info.rate = (BYTE)((gObj[lpObj->VpPlayer[n].number].Life * 100) / (gObj[lpObj->VpPlayer[n].number].MaxLife + gObj[lpObj->VpPlayer[n].number].AddLife));

info.monsterid = gObj[lpObj->VpPlayer[n].number].Class;

info.Life = gObj[lpObj->VpPlayer[n].number].Life;

info.MaxLife = gObj[lpObj->VpPlayer[n].number].MaxLife + gObj[lpObj->VpPlayer[n].number].AddLife;

info.Level = gObj[lpObj->VpPlayer[n].number].Level;

info.Reset = 0;

if (gObj[lpObj->VpPlayer[n].number].Type == OBJ_USER)
{

if (gObj[lpObj->VpPlayer[n].number].iMaxShield + gObj[lpObj->VpPlayer[n].number].iAddShield > 0)
{
info.SDrate = (BYTE)((gObj[lpObj->VpPlayer[n].number].iShield * 100) / (gObj[lpObj->VpPlayer[n].number].iMaxShield + gObj[lpObj->VpPlayer[n].number].iAddShield));

info.Shield = gObj[lpObj->VpPlayer[n].number].iShield;

info.MaxShield = gObj[lpObj->VpPlayer[n].number].iMaxShield + gObj[lpObj->VpPlayer[n].number].iAddShield;
}

info.isSameGuild = (lpObj->m_PlayerData->GuildNumber>0 ? ((lpObj->m_PlayerData->GuildNumber == gObj[lpObj->VpPlayer[n].number].m_PlayerData->GuildNumber) ? true : false) : false);

info.HaveGuild = (gObj[lpObj->VpPlayer[n].number].m_PlayerData->GuildNumber>0 ? true : false);

if (info.HaveGuild == true)
{
memcpy(info.GuildName, gObj[lpObj->VpPlayer[n].number].m_PlayerData->GuildName, sizeof(info.GuildName));
}


}
else
{
info.Reset = 0;

info.SDrate = 0;

info.Shield = 0;

info.MaxShield = 0;

info.isSameGuild = 0;
}


memcpy(&send[size], &info, sizeof(info));
size += sizeof(info);

pMsg.count++;
}

pMsg.header.size[0] = SET_NUMBERHB(size);

pMsg.header.size[1] = SET_NUMBERLB(size);

memcpy(send, &pMsg, sizeof(pMsg));
IOCP.DataSend(lpObj->m_Index, send, size);
}

Client Side:
Code: [Select]
void GCNewHealthBarRecv(PMSG_NEW_HEALTH_BAR_RECV* lpMsg) // OK
{

ClearNewHealthBar();
for (int n = 0;n < lpMsg->count;n++)
{
PMSG_NEW_HEALTH_RECV* lpInfo = (PMSG_NEW_HEALTH_RECV*)(((BYTE*)lpMsg) + sizeof(PMSG_NEW_HEALTH_BAR_RECV) + (sizeof(PMSG_NEW_HEALTH_RECV) * n));


InsertNewHealthBar(lpInfo);
}
}

Paginas: [1]