Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Party List HP-SD Main 5.2  (Visto 1413 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline Bé Phanh Posteado: May 27, 2025, 03:19:11 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 4
  • Gracias recibida: 129
  • vn
Main

NewUIPartyListWindow.cpp

Find : bool CNewUIPartyListWindow::Render()

Replace ALL

Code: [Select]
bool CNewUIPartyListWindow::Render()
{
if( !m_bActive )
return true;

EnableAlphaTest();
glColor4f(1.f, 1.f, 1.f, 1.f);

g_pRenderText->SetFont( g_hFont );
g_pRenderText->SetTextColor( 255, 255, 255, 255 );
g_pRenderText->SetBgColor( 0, 0, 0, 0 );

for( int i=0 ; i<PartyNumber ; i++)
{
int iVal = i*m_iVal;


glColor4f ( 0.f, 0.f, 0.f, 0.9f );
RenderColor( float(m_Pos.x+2), float(m_Pos.y+2+iVal), PARTY_LIST_WINDOW_WIDTH-3, PARTY_LIST_WINDOW_HEIGHT-6 );
EnableAlphaTest();

if( Party[i].index == -1 )
{
glColor4f ( 0.3f, 0.f, 0.f, 0.5f );
RenderColor( m_Pos.x+2, m_Pos.y+2+iVal, PARTY_LIST_WINDOW_WIDTH-3, PARTY_LIST_WINDOW_HEIGHT-6 );
EnableAlphaTest();
}
else
{
if( Party[i].index >= 0 && Party[i].index < MAX_CHARACTERS_CLIENT )
{
CHARACTER* pChar = &CharactersClient[Party[i].index];
OBJECT* pObj = &pChar->Object;

if(g_isCharacterBuff(pObj, eBuff_Defense) == true)
{
glColor4f ( 0.2f, 1.f, 0.2f, 0.2f );
RenderColor( m_Pos.x+2, m_Pos.y+2+iVal, PARTY_LIST_WINDOW_WIDTH-3, PARTY_LIST_WINDOW_HEIGHT-6 );
EnableAlphaTest();
}
}

}

EndRenderColor();

        // Image Link DRAWBARIMAGE
RenderImage(DRAWBARIMAGE, m_Pos.x, m_Pos.y + iVal, PARTY_LIST_WINDOW_WIDTH + 1.0f, PARTY_LIST_WINDOW_HEIGHT);

    char szIndex[8];

sprintf(szIndex, "%d", i + 1);

g_pRenderText->SetTextColor(255, 255, 0, 255);

g_pRenderText->RenderText(m_Pos.x + 6, m_Pos.y - 2 + iVal + 5, szIndex, 20, RT3_SORT_LEFT);

if( i==0 )
{
if( Party[i].index == -1 )
{
g_pRenderText->SetTextColor( RGBA( 128, 75, 11, 255 ) );
}
else
{
g_pRenderText->SetTextColor( RGBA( 255, 148, 22, 255 ) );
}

// Image Link DRAWBARFLAG
RenderImage(DRAWBARFLAG, m_Pos.x + 65, m_Pos.y + 3, 7, 7);

g_pRenderText->RenderText(m_Pos.x + 15, m_Pos.y + 2+ iVal, Party[i].Name, m_iLimitUserIDHeight[0], 0, RT3_SORT_LEFT );
}
else
{
if( Party[i].index == -1 )
{
g_pRenderText->SetTextColor( RGBA( 128, 128, 128, 255 ) );
}
else
{
g_pRenderText->SetTextColor( RGBA( 255, 255, 255, 255 ) );
}
g_pRenderText->RenderText( m_Pos.x+15, m_Pos.y+ 2+iVal, Party[i].Name, m_iLimitUserIDHeight[1], 0, RT3_SORT_LEFT );
}

int iStepHP = min( 10, Party[i].stepHP );

float fLife = (((float)iStepHP / 10) * (float)PARTY_LIST_HP_BAR_WIDTH) * 1.1f;

    // Image Link IMAGE_HP
RenderImage(IMAGE_HP, m_Pos.x + 2, m_Pos.y + 13 + iVal, fLife, 2.5f);


int iStepSD = min(10, Party[i].stepSD);

float fShield = (((float)iStepSD / 10) * (float)PARTY_LIST_HP_BAR_WIDTH) * 1.1f;

        // Image Link IMAGE_SD
RenderImage(IMAGE_SD, m_Pos.x + 2, m_Pos.y + 18 + iVal, fShield, 2.5f);

if( !strcmp( Party[0].Name, Hero->ID ) || !strcmp( Party[i].Name, Hero->ID ) )
{
m_BtnPartyExit[i].Render();
}

}

DisableAlphaBlend();

return true;
}


Wsclient.cpp

Find : void ReceivePartyList(BYTE* ReceiveBuffer)

Replace ALL

Code: [Select]
void ReceivePartyList(BYTE* ReceiveBuffer)
{
LPPRECEIVE_PARTY_LISTS Data = (LPPRECEIVE_PARTY_LISTS)ReceiveBuffer;
int Offset = sizeof(PRECEIVE_PARTY_LISTS);
PartyNumber = Data->Count;
for (int i = 0; i < Data->Count; i++)
{
LPPRECEIVE_PARTY_LIST Data2 = (LPPRECEIVE_PARTY_LIST)(ReceiveBuffer + Offset);
PARTY_t* p = &Party[i];
memcpy(p->Name, Data2->ID, MAX_ID_SIZE);
p->Name[MAX_ID_SIZE] = NULL;
p->Number = Data2->Number;
p->Map = Data2->Map;
p->x = Data2->x;
p->y = Data2->y;
p->currHP = Data2->currHP;
p->maxHP = Data2->maxHP;
p->currSD = Data2->CurSD;
p->maxSD = Data2->MaxSD;
Offset += sizeof(PRECEIVE_PARTY_LIST);
}

g_ConsoleDebug->Write(MCD_RECEIVE, "0x42 [ReceivePartyList(partynum : %d)]", Data->Count);
}

Find : void ReceivePartyInfo( BYTE *ReceiveBuffer )

Replace ALL

Code: [Select]
void ReceivePartyInfo(BYTE* ReceiveBuffer)
{
LPPRECEIVE_PARTY_INFOS Data = (LPPRECEIVE_PARTY_INFOS)ReceiveBuffer;
int Offset = sizeof(PRECEIVE_PARTY_INFOS);
for (int i = 0; i < Data->Count; i++)
{
LPPRECEIVE_PARTY_INFO Data2 = (LPPRECEIVE_PARTY_INFO)(ReceiveBuffer + Offset);
char stepHP = Data2->value & 0xf;
char stepSD = Data2->value2 & 0xf;
PARTY_t* p = &Party[i];
p->stepHP = min(10, max(0, stepHP));
p->stepSD = min(10, max(0, stepSD));
Offset += sizeof(PRECEIVE_PARTY_INFO);
}
}

Wsclient.h

Find : PRECEIVE_PARTY_LIST

ADD

Code: [Select]
        int			CurSD;
int MaxSD;

Find : PRECEIVE_PARTY_INFO

ADD

Code: [Select]
BYTE         value2

_struct.h

Find : PARTY_t

ADD

Code: [Select]
        int     currSD;
int     maxSD;
BYTE    stepSD;

GameServer

Party.cpp

Find :    void CParty::GCPartyLifeSend(int index)

ADD

Code: [Select]
info.number2 = ((n * 16) & 0xF0) | ((BYTE)(lpObj->Shield / ((lpObj->MaxShield + lpObj->AddShield) / 10)) & 0x0F);

Find : Void CParty::GCPartyListSend(int index)

Add
Code: [Select]
info.CurSD = (DWORD)(lpObj->Shield);
info.MaxSD = (DWORD)(lpObj->MaxShield + lpObj->AddShield);

Find : void CParty::CGPartyListRecv(int aIndex)

Add

Code: [Select]
info.CurSD = (DWORD)(lpTarget->Shield);

info.MaxSD = (DWORD)(lpTarget->MaxShield + lpTarget->AddShield);

Party.h

Find : struct PMSG_PARTY_LIFE

ADD

Code: [Select]
BYTE number2;

Find : struct PMSG_PARTY_LIST

Add

Code: [Select]
DWORD CurSD;
DWORD MaxSD;







https://mega.nz/file/4Uhm3DQI#-s9IGrHMeOIHCEKm6QfS0be2XLwpiqDGomy0POIhoVc

🌸 𝓓𝓲𝓼𝓬𝓸𝓻𝓭 : 𝐩𝐡𝐚𝐧𝐡𝐱𝐢𝐧𝐡_𝟗𝟕 🌸

Gracias:


Offline muccone #1 Posteado: May 27, 2025, 10:15:33 AM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 50
  • Gracias recibida: 171
  • tw
Can you share all UI?

Telegram Account :@mucone    develop Mu

Offline tuyendam #2 Posteado: May 27, 2025, 12:00:40 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 21
  • Gracias recibida: 11
  • vn

Offline bigmed #3 Posteado: May 27, 2025, 02:07:05 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 12
  • Gracias recibida: 5
  • br
tem o fix para deixa o nome do personagem sempre ativo ?


Offline xufqing #4 Posteado: May 29, 2025, 11:21:03 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 32
  • Gracias recibida: 70
  • cn
I want your damage number,can you share?


Offline erickmalfoy #5 Posteado: May 30, 2025, 02:49:32 AM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 669
  • Gracias recibida: 711
  • ar
Excelente BRO  aplausos
Libera tus SRC se ven muy Buenos  Musicx2


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
917 Views
Last post November 14, 2018, 06:40:45 AM
by cachobmx
6 Replies
4762 Views
Last post December 04, 2018, 10:00:31 PM
by JYachelini
0 Replies
610 Views
Last post May 01, 2020, 02:11:39 PM
by Strovo
3 Replies
788 Views
Last post February 11, 2025, 11:19:03 AM
by plyn
17 Replies
4795 Views
Last post July 11, 2025, 06:14:05 PM
by nujd00