Addition of player fame and raidpoint limit checks.
This commit is contained in:
+25
-4
@@ -2328,13 +2328,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2351,7 +2362,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2334,13 +2334,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2357,7 +2368,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2336,13 +2336,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2359,7 +2370,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2344,13 +2344,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2367,7 +2378,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2340,13 +2340,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2363,7 +2374,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2340,13 +2340,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2363,7 +2374,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2340,13 +2340,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2363,7 +2374,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2276,13 +2276,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2299,7 +2310,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2306,13 +2306,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2329,7 +2340,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2323,13 +2323,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2346,7 +2357,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+13
-2
@@ -2344,8 +2344,19 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+13
-2
@@ -2255,8 +2255,19 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2300,13 +2300,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2323,7 +2334,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2300,13 +2300,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2323,7 +2334,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2298,13 +2298,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2321,7 +2332,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2309,13 +2309,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2332,7 +2343,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2309,13 +2309,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2332,7 +2343,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2235,13 +2235,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2258,7 +2269,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2297,13 +2297,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2320,7 +2331,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2304,13 +2304,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2327,7 +2338,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+25
-4
@@ -2335,13 +2335,24 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Fame of this NcInstane
|
* Set the Fame of this PlayerInstane
|
||||||
* @param fame
|
* @param fame
|
||||||
*/
|
*/
|
||||||
public void setFame(int fame)
|
public void setFame(int fame)
|
||||||
{
|
{
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, fame), this);
|
int newFame = fame;
|
||||||
_fame = (fame > Config.MAX_PERSONAL_FAME_POINTS) ? Config.MAX_PERSONAL_FAME_POINTS : fame;
|
if (fame > Config.MAX_PERSONAL_FAME_POINTS)
|
||||||
|
{
|
||||||
|
newFame = Config.MAX_PERSONAL_FAME_POINTS;
|
||||||
|
}
|
||||||
|
else if (fame < 0)
|
||||||
|
{
|
||||||
|
newFame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerFameChanged(this, _fame, newFame), this);
|
||||||
|
|
||||||
|
_fame = newFame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2358,7 +2369,17 @@ public class PlayerInstance extends Playable
|
|||||||
*/
|
*/
|
||||||
public void setRaidbossPoints(int points)
|
public void setRaidbossPoints(int points)
|
||||||
{
|
{
|
||||||
_raidbossPoints = points;
|
int value = points;
|
||||||
|
if (points > 2000000000) // Close to integer max value (2147483647).
|
||||||
|
{
|
||||||
|
value = 2000000000;
|
||||||
|
}
|
||||||
|
else if (points < 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_raidbossPoints = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user