mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-01-08 07:27:41 +01:00
Fixed resources not saving
This commit is contained in:
parent
1a1346d3bc
commit
a653ffbfe1
@ -77,12 +77,11 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
|
|||||||
private PlayerClass profess;
|
private PlayerClass profess;
|
||||||
private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints, skillTreeReallocationPoints, skillReallocationPoints;
|
private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints, skillTreeReallocationPoints, skillReallocationPoints;
|
||||||
private double experience;
|
private double experience;
|
||||||
private double mana, stamina, stellium;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Health is stored in playerData because when saving the playerData we can't access the player health anymore as the payer is Offline.
|
* Saving resources (especially health) right in player data fixes TONS of issues.
|
||||||
*/
|
*/
|
||||||
private double health;
|
private double health, mana, stamina, stellium;
|
||||||
private Guild guild;
|
private Guild guild;
|
||||||
private SkillCastingInstance skillCasting;
|
private SkillCastingInstance skillCasting;
|
||||||
private final PlayerQuests questData;
|
private final PlayerQuests questData;
|
||||||
@ -1005,7 +1004,7 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getHealth() {
|
public double getHealth() {
|
||||||
return isOnline() ? getPlayer().getHealth() : health;
|
return isSynchronized() && isOnline() ? getPlayer().getHealth() : health;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user