Facebook
From Fiery Pheasant, 7 Years ago, written in C++.
Embed
Download Paste or View Raw
Hits: 271
  1. long long CHARACTER::ComputeRefineFee(long long iCost, int iMultiply) const
  2. {
  3.         CGuild* pGuild = GetRefineGuild();
  4.         if (pGuild)
  5.         {
  6.                 if (pGuild == GetGuild())
  7.                         return iCost * iMultiply * 9 / 10;
  8.  
  9.                 // ´Ů¸Ą Á¦±ą »ç¶÷ŔĚ ˝ĂµµÇĎ´Â °ćżě Ăß°ˇ·Î 3ąč ´ő
  10.                 LPCHARACTER chRefineNPC = CHARACTER_MANAGER::instance().Find(m_dwRefineNPCVID);
  11.                 if (chRefineNPC && chRefineNPC->GetEmpire() != GetEmpire())
  12.                         return iCost * iMultiply * 3;
  13.  
  14.                 return iCost * iMultiply;
  15.         }
  16.         else
  17.                 return iCost;
  18. }
  19.  
  20.  
  21. 1. przyjmuje iCost i iMultiply
  22. 2. pGuild = RefineGuild jezeli prawda mnozy cost (prawdopodobnie kowal gildyjny)
  23. 3. inaczej zwraca zwykly koszt