Advertisement
Guest User

LV-Display

a guest
May 22nd, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. void CInstanceBase::UpdateTextTailLevel(DWORD level)
  2. {
  3. static D3DXCOLOR s_kLevelColor = D3DXCOLOR(152.0f/255.0f, 255.0f/255.0f, 51.0f/255.0f, 1.0f);
  4. char szText[256];
  5.  
  6. #ifdef __PET_SYSTEM__
  7. static D3DXCOLOR s_kPetLevelColor = D3DCOLOR_XRGB(255, 255, 0);
  8.  
  9. if (IsNewPet())
  10. {
  11. sprintf(szText, "Lv %d ", level);
  12. CPythonTextTail::Instance().AttachLevel(GetVirtualID(), szText, s_kPetLevelColor);
  13. }
  14. #endif
  15.  
  16. #ifdef ENABLE_SHOW_MOB_INFO
  17. static D3DXCOLOR s_kMobLevelColor = D3DXCOLOR(119.0f / 255.0f, 246.0f / 255.0f, 168.0f / 255.0f, 1.0f);
  18. static D3DXCOLOR s_kPlayerLevelColor = D3DXCOLOR(152.0f / 255.0f, 255.0f / 255.0f, 51.0f / 255.0f, 1.0f);
  19.  
  20. if (IsPC())
  21. CPythonTextTail::Instance().AttachLevel(GetVirtualID(), szText, s_kPlayerLevelColor);
  22.  
  23. else if (IsEnemy() || IsStone())
  24. CPythonTextTail::Instance().AttachLevel(GetVirtualID(), szText, s_kMobLevelColor);
  25. else
  26. CPythonTextTail::Instance().DetachLevel(GetVirtualID());
  27. #endif
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement