Advertisement
Kobiesan

Player::LoadFromDB in player.cpp

Jan 13th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | None | 0 0
  1. if (time_diff > 0)
  2.     {
  3.         //speed collect rest bonus in offline, in logout, far from tavern, city (section/in hour)
  4.         float bubble0;
  5.         //speed collect rest bonus in offline, in logout, in tavern, city (section/in hour)
  6.         float bubble1;
  7.         // If has Inner Peace give double rest exp.
  8.         if (HasSpell(90168))
  9.         {
  10.             bubble0 = .062f;
  11.             bubble1 = .25f;
  12.         }
  13.         else
  14.         {
  15.             bubble0 = 0.031f;
  16.             bubble1 = 0.125f;
  17.         }
  18.         float bubble = fields[28].GetUInt8() > 0
  19.             ? bubble1*sWorld->getRate(RATE_REST_OFFLINE_IN_TAVERN_OR_CITY)
  20.             : bubble0*sWorld->getRate(RATE_REST_OFFLINE_IN_WILDERNESS);
  21.  
  22.         SetRestBonus(GetRestBonus() + time_diff*((float)GetUInt32Value(PLAYER_NEXT_LEVEL_XP) / 72000)*bubble);
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement