Advertisement
Caminhoneiro

ExperienceLevelAPI

Apr 16th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 24.92 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ExperienceLevelAPI
  4. {
  5.     #region Enumerators for Switchers
  6.  
  7.     /// <summary>
  8.     /// Select if you want your character can reach level zero or not, see whats fits better in your lvl formula
  9.     /// </summary>
  10.     public enum AllowLevelZero
  11.     {
  12.         /// <summary>
  13.         /// Operations made will permit your character reach from or some moment come back to level Zero
  14.         /// </summary>
  15.         allowLevelZero,
  16.         /// <summary>
  17.         /// Operations made will never permit your character reach level zero
  18.         /// </summary>
  19.         dontAllowLevelZero
  20.     }
  21.  
  22.     /// <summary>
  23.     /// Select if you want your character can reach level zero or not, see whats fits better in your lvl formula
  24.     /// </summary>
  25.     public enum AllowXPZero
  26.     {
  27.         /// <summary>
  28.         /// Operations made will permit your character reach from or some moment come back to level Zero
  29.         /// </summary>
  30.         allowXPZero,
  31.         /// <summary>
  32.         /// Operations made will never permit your character reach level zero
  33.         /// </summary>
  34.         dontAllowXPZero
  35.     }
  36.  
  37.     #endregion
  38.  
  39.     /// <summary>
  40.     /// Create level and experience manager for new characters
  41.     /// </summary>
  42.     public class Character
  43.     {
  44.  
  45.         /// <summary>
  46.         /// Select if you want your character can reach level zero or not, see whats fits better in your lvl formula
  47.         /// </summary>
  48.         public AllowLevelZero allowLevelZero;
  49.  
  50.         /// <summary>
  51.         /// Select if you want your character can reach level zero or not, see whats fits better in your lvl formula
  52.         /// </summary>
  53.         public AllowXPZero allowXPZero;
  54.  
  55.         /// <summary>
  56.         /// Level update action > Insert the desired formula inside (Make the method using
  57.         /// the Experience_Current and the ConstantValue/ConstantsValues to reach next lvl)
  58.         /// This action will be called inside LevelUpdateEvent() method and will return the long Level_Current
  59.         /// for the operations
  60.         /// </summary>
  61.         public Action OnLevelUpdate = () => { };
  62.         /// <summary>
  63.         /// Experience update action > Insert the desired formula inside (Make the method using
  64.         /// Level_Current and the constants to update your XP)
  65.         /// This action will be called inside ExperienceUpdateEvent() method and will return the Experience_Current
  66.         /// </summary>
  67.         public Action OnExperienceUpate = () => { };
  68.         /// <summary>
  69.         /// Recomended use the same formula you used to update your lvl, just swap the Level_Current value on the formula
  70.         /// by the Temp_ArbitraryLvl
  71.         /// </summary>
  72.         public Action OnCalculateArbitraryLevel = () => { };
  73.         /// <summary>
  74.         /// Recomended use the same formula you used to update your experience, just swap the Level_Current value on the formula
  75.         /// by the Temp_ArbitraryExperience
  76.         /// </summary>
  77.         public Action OnCalculateArbitraryExperience = () => { };
  78.  
  79.        
  80.         #region Variables
  81.         //***get and set current level
  82.         private long m_Level;
  83.         /// <summary>
  84.         /// Actual Level of your character to Get and Set must be used on the lvl calc formula and used on the character
  85.         /// </summary>
  86.         public long Level_Current
  87.         {
  88.             get { return m_Level; }
  89.             set
  90.             {
  91.                 long v = value;
  92.                 if (m_Level != v)
  93.                     m_Level = v;
  94.             }
  95.         }
  96.  
  97.         private long m_LevelArbitrary;
  98.         /// <summary>
  99.         /// Arbitrary Level of your character to Get and Set must be used on the character
  100.         /// </summary>
  101.         public long Level_Arbitrary
  102.         {
  103.             get { return m_LevelArbitrary; }
  104.             set
  105.             {
  106.                 long v = value;
  107.                 if (m_LevelArbitrary != v)
  108.                     m_LevelArbitrary = v;
  109.             }
  110.         }
  111.  
  112.         //*** get current experience
  113.         private long m_experience;
  114.         /// <summary>
  115.         /// Actual xp of your character to Get and Set
  116.         /// </summary>
  117.         public long Experience_Current
  118.         {
  119.             get { return m_experience; }
  120.             set
  121.             {
  122.                 long v = value;
  123.                 if (m_experience != v)
  124.                     m_experience = v;
  125.             }
  126.         }
  127.  
  128.         private long m_ArbitraryExperience;
  129.         /// <summary>
  130.         /// Arbitrary xp of your character to Get and Set
  131.         /// </summary>
  132.         public long Experience_Arbitrary
  133.         {
  134.             get { return m_ArbitraryExperience; }
  135.             set
  136.             {
  137.                 long v = value;
  138.                 if (m_ArbitraryExperience != v)
  139.                     m_ArbitraryExperience = v;
  140.             }
  141.         }
  142.  
  143.         //To handle single constants
  144.         private float m_constant;
  145.         /// <summary>
  146.         /// Single constant handler for your project (Recomended value 0.4f)
  147.         /// </summary>
  148.         public float ConstantValue
  149.         {
  150.             get { return m_constant; }
  151.             set
  152.             {
  153.                 float v = value;
  154.                 if (m_constant != v)
  155.                     m_constant = v;
  156.             }
  157.         }
  158.  
  159.         private long m_tempPreviousLvl;
  160.         /// <summary>
  161.         /// When lvl updates store the previous lvl
  162.         /// </summary>
  163.         private long Temp_PreviousLevel
  164.         {
  165.             get { return m_tempPreviousLvl; }
  166.             set
  167.             {
  168.                 long v = value;
  169.                 if (m_tempPreviousLvl != v)
  170.                     m_tempPreviousLvl = v;
  171.             }
  172.         }
  173.  
  174.  
  175.  
  176.         private long m_maxExperienceToReachNextLevel;
  177.         /// <summary>
  178.         /// Maximum xp to reach an arbitrary level
  179.         /// </summary>
  180.         public long MaxExperienceToReachDesiredLevel
  181.         {
  182.             get { return m_maxExperienceToReachNextLevel; }
  183.             set
  184.             {
  185.                 long v = value;
  186.                 if (m_maxExperienceToReachNextLevel != v)
  187.                     m_maxExperienceToReachNextLevel = v;
  188.             }
  189.         }
  190.  
  191.         private long m_experienceRemainingToReachNextLevel;
  192.         /// <summary>
  193.         /// Debug your current lvl see how many xp you need to reach the next
  194.         /// </summary>
  195.         /// <returns>xp needed to your next lvl up</returns>
  196.         public long ExperienceRemainingToReachNextLevelDebug
  197.         {
  198.             get
  199.             {
  200.                 return m_experienceRemainingToReachNextLevel;
  201.             }
  202.             set
  203.             {
  204.                 long v = value;
  205.                 if (m_experienceRemainingToReachNextLevel != v)
  206.                     m_experienceRemainingToReachNextLevel = v;
  207.             }
  208.         }
  209.  
  210.  
  211.         private long m_experienceRemainingToReachArbitraryLevel;
  212.         /// <summary>
  213.         /// From your current lvl see how many xp you need to reach the an arbitrary lvl
  214.         /// </summary>
  215.         /// <returns>xp needed to you reach that lvl</returns>
  216.         private long ExperienceRemainingToReachArbitraryLevel
  217.         {
  218.             get { return m_experienceRemainingToReachArbitraryLevel; }
  219.             set
  220.             {
  221.                 long v = value;
  222.                 if (m_experienceRemainingToReachArbitraryLevel != v)
  223.                     m_experienceRemainingToReachArbitraryLevel = v;
  224.             }
  225.         }
  226.  
  227.         private long m_experienceToReachArbitraryLevel;
  228.         /// <summary>
  229.         ///Total XP to an arbitrary lvl
  230.         /// </summary>
  231.         /// <returns>xp needed to you reach that lvl</returns>
  232.         private long ExperienceToReachArbitraryLevel
  233.         {
  234.             get { return m_experienceToReachArbitraryLevel; }
  235.             set
  236.             {
  237.                 long v = value;
  238.                 if (m_experienceToReachArbitraryLevel != v)
  239.                     m_experienceToReachArbitraryLevel = v;
  240.             }
  241.         }
  242.  
  243.  
  244.         private float m_percentualProgressForTheNextLvl;
  245.         /// <summary>
  246.         /// Stores the float percentage of the value to reach next lvl
  247.         /// </summary>
  248.         private float PercentualProgressToNextLevel
  249.         {
  250.             get { return m_percentualProgressForTheNextLvl; }
  251.             set
  252.             {
  253.                 float v = value;
  254.                 if (m_percentualProgressForTheNextLvl != v)
  255.                     m_percentualProgressForTheNextLvl = v;
  256.             }
  257.         }
  258.  
  259.         private long m_levelDesiredToDeltaCall;
  260.         /// <summary>
  261.         /// Stores the lvl reference to calculate the delta between current lvl and the next
  262.         /// </summary>
  263.         public long LevelDisiredToDeltaCall
  264.         {
  265.             get { return m_levelDesiredToDeltaCall; }
  266.             set
  267.             {
  268.                 long v = value;
  269.                 if (m_levelDesiredToDeltaCall != v)
  270.                     m_levelDesiredToDeltaCall = v;
  271.             }
  272.         }
  273.  
  274.  
  275.         #endregion
  276.  
  277.  
  278.         #region Methods
  279.  
  280.         ///**************METHODS***************\\\
  281.  
  282.         /// <summary>
  283.         /// Level Update event (the action with the method for the lvl update runs inside this method)
  284.         /// </summary>
  285.         /// <returns></returns>
  286.         public long LevelUpdateEvent()
  287.         {
  288.             //If the player level is less than 2 method will run an check to see if you can reach lvl/xp 0
  289.             if (Level_Current <= 2)
  290.             {
  291.                 //Check if player can reach level zero
  292.                 switch (allowLevelZero)
  293.                 {
  294.                     case AllowLevelZero.allowLevelZero:
  295.                         if (Experience_Current <= 0)
  296.                             Experience_Current = 0; //Allow player reaches lvl 0
  297.                         break;
  298.                     case AllowLevelZero.dontAllowLevelZero:
  299.                         if (Experience_Current <= 0)
  300.                             Experience_Current = 1; //Dont Allow player reaches lvl 0
  301.                         break;
  302.                     default:
  303.                         if (Experience_Current <= 0)
  304.                             Experience_Current = 1; // By default dont allow player reaches lvl 0
  305.                         break;
  306.                 }
  307.  
  308.                 //Check if player can reach xp zero
  309.                 switch (allowXPZero)
  310.                 {
  311.                     case AllowXPZero.allowXPZero:
  312.                         if (Experience_Current <= 0)
  313.                             Experience_Current = 0; //Allow player reaches xp 0
  314.                         break;
  315.                     case AllowXPZero.dontAllowXPZero:
  316.                         if (Experience_Current <= 0)
  317.                             Experience_Current = 1; //Dont Allow player reaches xp 0
  318.                         break;
  319.                     default:
  320.                         if (Experience_Current <= 0)
  321.                             Experience_Current = 1; // By default dont allow player reaches xp 0
  322.                         break;
  323.                 }
  324.  
  325.             }
  326.             OnLevelUpdate(); //Calls the lvl update action with the method inside
  327.             return Level_Current;
  328.         }
  329.  
  330.         /// <summary>
  331.         /// XP Update event (the action with the method for the lvl update runs inside this method)
  332.         /// </summary>
  333.         /// <returns></returns>
  334.         public long ExperienceUpdateEvent()
  335.         {
  336.  
  337.             //If the player level is less than 2 method will run an check to see if you can reach lvl/xp 0
  338.             if (Level_Current <= 2)
  339.             {
  340.                 //Check if player can reach level zero
  341.                 switch (allowLevelZero)
  342.                 {
  343.                     case AllowLevelZero.allowLevelZero:
  344.                         if (Experience_Current <= 0)
  345.                             Experience_Current = 0; //Allow player reaches lvl 0
  346.                         break;
  347.                     case AllowLevelZero.dontAllowLevelZero:
  348.                         if (Experience_Current <= 0)
  349.                             Experience_Current = 1; //Dont Allow player reaches lvl 0
  350.                         break;
  351.                     default:
  352.                         if (Experience_Current <= 0)
  353.                             Experience_Current = 1; // By default dont allow player reaches lvl 0
  354.                         break;
  355.                 }
  356.  
  357.                 //Check if player can reach xp zero
  358.                 switch (allowXPZero)
  359.                 {
  360.                     case AllowXPZero.allowXPZero:
  361.                         if (Experience_Current <= 0)
  362.                             Experience_Current = 0; //Allow player reaches xp 0
  363.                         break;
  364.                     case AllowXPZero.dontAllowXPZero:
  365.                         if (Experience_Current <= 0)
  366.                             Experience_Current = 1; //Dont Allow player reaches xp 0
  367.                         break;
  368.                     default:
  369.                         if (Experience_Current <= 0)
  370.                             Experience_Current = 1; // By default dont allow player reaches xp 0
  371.                         break;
  372.                 }
  373.  
  374.             }
  375.             OnExperienceUpate(); //Calls the xp update action with the method inside
  376.             return Experience_Current;
  377.         }
  378.  
  379.  
  380.         /// <summary>
  381.         /// Arbitrary XP Update event (the action with the method for the lvl update runs inside this method)
  382.         /// </summary>
  383.         /// <returns></returns>
  384.         public long ArbitraryExperienceUpdateEvent()
  385.         {
  386.  
  387.             //If the player level is less than 2 method will run an check to see if you can reach lvl/xp 0
  388.             if (Level_Current <= 2)
  389.             {
  390.                 //Check if player can reach level zero
  391.                 switch (allowLevelZero)
  392.                 {
  393.                     case AllowLevelZero.allowLevelZero:
  394.                         if (Experience_Current <= 0)
  395.                             Experience_Current = 0; //Allow player reaches lvl 0
  396.                         break;
  397.                     case AllowLevelZero.dontAllowLevelZero:
  398.                         if (Experience_Current <= 0)
  399.                             Experience_Current = 1; //Dont Allow player reaches lvl 0
  400.                         break;
  401.                     default:
  402.                         if (Experience_Current <= 0)
  403.                             Experience_Current = 1; // By default dont allow player reaches lvl 0
  404.                         break;
  405.                 }
  406.  
  407.                 //Check if player can reach xp zero
  408.                 switch (allowXPZero)
  409.                 {
  410.                     case AllowXPZero.allowXPZero:
  411.                         if (Experience_Current <= 0)
  412.                             Experience_Current = 0; //Allow player reaches xp 0
  413.                         break;
  414.                     case AllowXPZero.dontAllowXPZero:
  415.                         if (Experience_Current <= 0)
  416.                             Experience_Current = 1; //Dont Allow player reaches xp 0
  417.                         break;
  418.                     default:
  419.                         if (Experience_Current <= 0)
  420.                             Experience_Current = 1; // By default dont allow player reaches xp 0
  421.                         break;
  422.                 }
  423.  
  424.             }
  425.             OnCalculateArbitraryExperience(); //Calls the xp update action with the method inside
  426.             return Experience_Arbitrary;
  427.         }
  428.  
  429.         /// <summary>
  430.         /// Arbitrary XP Update event (the action with the method for the lvl update runs inside this method)
  431.         /// </summary>
  432.         /// <returns></returns>
  433.         public long ArbitraryLevelUpdateEvent()
  434.         {
  435.  
  436.             //If the player level is less than 2 method will run an check to see if you can reach lvl/xp 0
  437.             if (Level_Current <= 2)
  438.             {
  439.                 //Check if player can reach level zero
  440.                 switch (allowLevelZero)
  441.                 {
  442.                     case AllowLevelZero.allowLevelZero:
  443.                         if (Experience_Current <= 0)
  444.                             Experience_Current = 0; //Allow player reaches lvl 0
  445.                         break;
  446.                     case AllowLevelZero.dontAllowLevelZero:
  447.                         if (Experience_Current <= 0)
  448.                             Experience_Current = 1; //Dont Allow player reaches lvl 0
  449.                         break;
  450.                     default:
  451.                         if (Experience_Current <= 0)
  452.                             Experience_Current = 1; // By default dont allow player reaches lvl 0
  453.                         break;
  454.                 }
  455.  
  456.                 //Check if player can reach xp zero
  457.                 switch (allowXPZero)
  458.                 {
  459.                     case AllowXPZero.allowXPZero:
  460.                         if (Experience_Current <= 0)
  461.                             Experience_Current = 0; //Allow player reaches xp 0
  462.                         break;
  463.                     case AllowXPZero.dontAllowXPZero:
  464.                         if (Experience_Current <= 0)
  465.                             Experience_Current = 1; //Dont Allow player reaches xp 0
  466.                         break;
  467.                     default:
  468.                         if (Experience_Current <= 0)
  469.                             Experience_Current = 1; // By default dont allow player reaches xp 0
  470.                         break;
  471.                 }
  472.  
  473.             }
  474.             OnCalculateArbitraryLevel(); //Calls the xp update action with the method inside
  475.             return Level_Arbitrary;
  476.         }
  477.  
  478.  
  479.         /// <summary>
  480.         /// Add 1 more lvl
  481.         /// </summary>
  482.         /// <param name="lvl">lvl sum value (If you want lvl Up 1 lvl insert 1 here)</param>
  483.         /// <returns></returns>
  484.         public long Level_Add(int lvl)
  485.         {
  486.             m_tempPreviousLvl = Level_Current; //Stores previous lvl before it updates
  487.             Level_Current += lvl; //Sums  lvl points to enter on new lvl
  488.             ExperienceUpdateEvent(); //Runs the XP event formula
  489.             return Level_Current; //Return current lvl
  490.         }
  491.  
  492.         /// <summary>
  493.         /// Subtract 1  lvl
  494.         /// </summary>
  495.         /// <param name="lvl">lvl sub value (If you want make character lost 1 level, insert 1 here)</param>
  496.         /// <returns></returns>
  497.         public long Level_Sub(int lvl)
  498.         {
  499.             m_tempPreviousLvl = Level_Current; //Stores previous lvl before it updates
  500.             Level_Current -= lvl; //Subtract  lvl points to enter on new lvl
  501.             ExperienceUpdateEvent(); //Runs the XP event formula
  502.             return Level_Current; //Return current lvl
  503.         }
  504.  
  505.         /// <summary>
  506.         /// Add Aquired XP value
  507.         /// </summary>
  508.         /// <param name="xp_SumVal">total XP aquired</param>
  509.         /// <returns></returns>
  510.         public long Experience_Add(long xp_SumVal)
  511.         {
  512.             Experience_Current += xp_SumVal; //Sums first and than run LevelUpChecker cause without it LevelUpChecker() will run only beReamininge it return, than if the lvl required is == to current lvl he will not lvl up in correct time, only after
  513.             LevelUpdateEvent(); //Check if character can lvl up
  514.             return Experience_Current;
  515.         }
  516.  
  517.         /// <summary>
  518.         /// Total XP losted
  519.         /// </summary>
  520.         /// <param name="xp_SumVal">XP lost value</param>
  521.         /// <returns></returns>
  522.         public long Experience_Reduce(long xp_SumVal)
  523.         {
  524.             Experience_Current -= xp_SumVal; //Sub first and than run LevelUpChecker cause without it LevelUpChecker() will run only beReamininge it return, than if the lvl required is == to current lvl he will not lvl up in correct time, only after
  525.             LevelUpdateEvent(); //Check if character can lvl up
  526.             return Experience_Current;
  527.         }
  528.  
  529.         /// <summary>
  530.         /// Reset Lvl and XP
  531.         /// </summary>
  532.         /// <returns></returns>
  533.         public long Reset()
  534.         {
  535.             Experience_Current = 0;
  536.             LevelUpdateEvent();
  537.             return Experience_Current;
  538.         }
  539.  
  540.         /// <summary>
  541.         /// Reset experience to the last lvl up
  542.         /// </summary>
  543.         public void ResetXPToLastLvlUp()
  544.         {
  545.             ExperienceUpdateEvent();
  546.             //MAYBE DO AN IF STATEMENT CHECKING IF THE XP VALUE AND LVL IS CORRECT WITH THE LAST LVL UP IF NOT FORCE TO BE
  547.         }
  548.  
  549.         /// <summary>
  550.         /// Update event to calculate the total xp needed for the next lvl
  551.         /// </summary>
  552.         /// <returns>Max experience neeeded to reach your next lvl</returns>
  553.         public long NextLevelCalculateEvent()
  554.         {
  555.             Level_Arbitrary = Level_Current + 1;
  556.             ArbitraryExperienceUpdateEvent();
  557.             return Experience_Arbitrary - Experience_Current;
  558.         }
  559.  
  560.         /// <summary>
  561.         /// Get experience value Reamining to an arbitrary level value (The parameter must be greater than current lvl
  562.         /// Or it will return zero
  563.         /// </summary>
  564.         /// <param name="lvlDesireToReach">Insert the desired lvl for the calculation</param>
  565.         /// <returns></returns>
  566.         public long ExperienceNeededToAnArbitraryLevelValueFromYourLvl(long lvlDesireToReach)
  567.         {
  568.             Level_Arbitrary = lvlDesireToReach; //Stores currently lvl desired to reach in the arbitrary lvl to make the calculation
  569.             OnCalculateArbitraryExperience(); //Calculates arbitrary xp debugs the xp necessary in Experience_Arbitrary
  570.             MaxExperienceToReachDesiredLevel = Experience_Arbitrary;//Put the total xp value in this variable to make the account
  571.             ExperienceRemainingToReachArbitraryLevel = MaxExperienceToReachDesiredLevel - Experience_Current; //Sub this total by your current XP
  572.             return ExperienceRemainingToReachArbitraryLevel; //Return the diference between your XP and the desired lvl
  573.         }
  574.  
  575.  
  576.         /// <summary>
  577.         /// Get experience value  to an arbitrary level value (The parameter must be greater than 0
  578.         /// </summary>
  579.         /// <param name="lvlDesireToReach">Insert the desired lvl for the calculation</param>
  580.         /// <returns>ExperienceToReachArbitraryLevel</returns>
  581.         public long ExperienceNeededToAnArbitraryLevelValue(long lvlDesireToReach)
  582.         {
  583.             //Security logic validator
  584.             if (lvlDesireToReach <= 0)
  585.                 return 0;
  586.  
  587.             Level_Arbitrary = lvlDesireToReach;
  588.             OnCalculateArbitraryExperience();
  589.             ExperienceToReachArbitraryLevel = ArbitraryExperienceUpdateEvent(); //Receive the value
  590.             return ExperienceToReachArbitraryLevel;
  591.         }
  592.  
  593.         /// <summary>
  594.         /// Get LVL value Reamining to an arbitrary XP value (The parameter must be greater than 0)
  595.         /// </summary>
  596.         /// <param name="xpDesireToReach">Insert the desired lvl for the calculation</param>
  597.         /// <returns>Level_Arbitrary</returns>
  598.         public long LevelNeededToAnArbitraryExperienceValue(long xpDesireToReach)
  599.         {
  600.             //Security logic validator
  601.             if (xpDesireToReach <= 0)
  602.                 return 0;
  603.  
  604.             Experience_Arbitrary = xpDesireToReach;
  605.             OnCalculateArbitraryLevel();
  606.             return Level_Arbitrary;
  607.         }
  608.  
  609.         /// <summary>
  610.         /// Get percentual experience progress between last and next level-up
  611.         /// </summary>
  612.         /// <returns>PercentualProgressToNextLevel</returns>
  613.         public float PercentualProgress()
  614.         {
  615.             long tempLvl = Level_Current + 1;
  616.             int maxPointsOfCurrentLevel = (int)ExperienceNeededToAnArbitraryLevelValue(Level_Current);
  617.             int maxPointsToReachNextLevel = (int)ExperienceNeededToAnArbitraryLevelValue(tempLvl);
  618.  
  619.             //Prepare the variables for the calculation of percentage remaining
  620.             float subtractedValueOfTheLastLvl = (float)maxPointsToReachNextLevel - (float)Experience_Current;
  621.             float xpBetweenCurAndNextLevel = (float)maxPointsToReachNextLevel - (float)maxPointsOfCurrentLevel;
  622.  
  623.             PercentualProgressToNextLevel = (subtractedValueOfTheLastLvl / xpBetweenCurAndNextLevel) * 100f;
  624.  
  625.             return PercentualProgressToNextLevel;
  626.         }
  627.  
  628.  
  629.         /// <summary>
  630.         /// Get experience delta between current experience and an arbitrary level value
  631.         /// </summary>
  632.         /// <param name="lvl">lvl desired to calculate</param>
  633.         /// <returns></returns>
  634.         public long ReturnDelta_BetweenXPAndArbitraryLevel(long lvl)
  635.         {
  636.             Level_Arbitrary = lvl;
  637.             ArbitraryExperienceUpdateEvent();
  638.             long subtractedValueOfTheLastLvl = ExperienceNeededToAnArbitraryLevelValue(Level_Arbitrary) - Experience_Current;
  639.             LevelDisiredToDeltaCall = subtractedValueOfTheLastLvl;
  640.             return LevelDisiredToDeltaCall;
  641.         }
  642.  
  643.         #endregion
  644.  
  645.  
  646.     }
  647.  
  648. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement