Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DrawPlayerPercents() {
- UnitAny *pPlayer = D2CLIENT_GetPlayerUnit();
- for(Room1* pRoom = pPlayer->pAct->pRoom1; pRoom; pRoom = pRoom->next)
- {
- for(UnitAny* pUnit = pRoom->pUnitFirst; pUnit; pUnit = pUnit->pListNext)
- {
- //Draw lines
- POINT Start, End;
- Start.x=GetPlayerCoords().x;
- Start.y=GetPlayerCoords().y;
- POINT StartCalc, EndCalc;
- MapToScreenCoords(Start);
- ScreenToAutomapRelative(&StartCalc,Start.x,Start.y);
- if(pUnit->dwType == UNIT_PLAYER) {
- if(pUnit->dwMode == PLAYER_MODE_WALK_OUTTOWN || pUnit->dwMode == PLAYER_MODE_RUN || pUnit->dwMode == PLAYER_MODE_SEQUENCE) {
- End.x=pUnit->pPath->xTarget;
- End.y=pUnit->pPath->yTarget;
- MapToScreenCoords(End);
- ScreenToAutomapRelative(&EndCalc,End.x,End.y);
- if(GetDistance(Myself->pPath->xPos, Myself->pPath->yPos, pUnit->pPath->xPos, pUnit->pPath->yPos) < 200)
- D2GFX_DrawLine(StartCalc.x,StartCalc.y,EndCalc.x,EndCalc.y,11,0xff);
- }
- }
- if(pUnit)
- if(pUnit->dwType == UNIT_PLAYER)
- if(pUnit->dwUnitId != Myself->dwUnitId) {
- RosterUnit *pRoster = FindPartyById(pUnit->dwUnitId);
- if(!pRoster)
- return;
- TextHook(pUnit->pPath->xPos, pUnit->pPath->yPos, 4, true, 4, 5, "%d%%", pRoster->dwPartyLife);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement