Advertisement
Androide28

Cap HP/AP if Donator item is equipped.

Oct 20th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.99 KB | None | 0 0
  1. float fAddedAP = DEFAULT_CHAR_AP;           ///< AP ÀçÁ¶Á¤
  2.     for (int i = 0; i < MMCIP_END; i++) {
  3.         if (!m_Items.GetItem(MMatchCharItemParts(i))->IsEmpty()) {
  4.             if (m_Items.GetItem(MMatchCharItemParts(i))->GetDesc()->m_bIsCashItem) {
  5.                 CashItem = true;
  6.             }
  7.             fAddedAP += m_Items.GetItem(MMatchCharItemParts(i))->GetDesc()->m_nAP.Ref();
  8.         }
  9.     }
  10.  
  11.     float fAddedHP = DEFAULT_CHAR_HP;           ///< HP ÀçÁ¶Á¤
  12.     for (int i = 0; i < MMCIP_END; i++) {
  13.         if (!m_Items.GetItem(MMatchCharItemParts(i))->IsEmpty()) {
  14.             if (m_Items.GetItem(MMatchCharItemParts(i))->GetDesc()->m_bIsCashItem) {
  15.                 CashItem = true;
  16.             }
  17.             fAddedHP += m_Items.GetItem(MMatchCharItemParts(i))->GetDesc()->m_nHP.Ref();
  18.         }
  19.     }
  20.  
  21.     if (CashItem == true)
  22.     {
  23.         m_Property.fMaxHP.Set_CheckCrc(180);
  24.         m_Property.fMaxAP.Set_CheckCrc(200);
  25.  
  26.         m_fPreMaxHP = 180;
  27.         m_fPreMaxAP = 200;
  28.     }
  29.     else
  30.     {
  31.         m_Property.fMaxHP.Set_CheckCrc(100);
  32.         m_Property.fMaxAP.Set_CheckCrc(120);
  33.  
  34.         m_fPreMaxHP = 100;
  35.         m_fPreMaxAP = 120;
  36.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement