Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void __stdcall SkillIconDelayDraw2(CellContext *context, int x, int y, int dwl, int nTransLvl, BYTE Color)
- {
- D2GFX_DrawCellContextEx(context, x, y, dwl, nTransLvl, Color); //#10019
- UnitAny *pUnit = *D2CLIENT_PlayerUnit;
- Skill *pSkill = NULL;
- D2ASSERT(pSkill, "!pSkill");
- D2ASSERT(pUnit, "!pUnit");
- if (D2COMMON_GetLeftSkill(pUnit))
- {
- pSkill = D2COMMON_GetLeftSkill(pUnit);
- LABEL_1:
- goto LABEL_2;
- }
- if (D2COMMON_GetRightSkill(pUnit))
- {
- pSkill = D2COMMON_GetRightSkill(pUnit);
- goto LABEL_1;
- }
- LABEL_2:
- if (pUnit->dwType == UNIT_TYPE_PLAYER && pSkill)
- {
- DWORD GameFrame = *D2CLIENT_gdwClientGameFrame;
- DWORD dwEndFrame = pUnit->pSkillDelays[pSkill->pSkillsTxt->wSkillId];
- if (dwEndFrame > GameFrame)
- {
- BYTE iRes = CalcPercent(dwEndFrame - GameFrame, dwMaxFrame, 0);
- D2GFX_DrawRectangle(x, y - 48, x + (iRes >> 1) - 2, y, 0, 2);
- wchar_t text[256];
- _snwprintf(text, sizeof(text), L"%d", ((dwEndFrame - GameFrame) / 25) + 1);
- D2WIN_DrawText(text, x, y, COL_ORANGE, 0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement