mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-11 01:13:05 -04:00
Rare loot system stage added
Rare loot system stage in effect for every loot session. Added legendary,exceptional,rare loot chests
This commit is contained in:
@@ -37,25 +37,50 @@ import resources.objects.tangible.TangibleObject;
|
||||
public class LootRollSession {
|
||||
|
||||
private String SessionID; // leaderName-SystemTime
|
||||
private boolean sessionValid;
|
||||
private GroupObject playerGroup;
|
||||
private List<TangibleObject> droppedItems;
|
||||
private Planet sessionPlanet;
|
||||
private List<String> errorMessages;
|
||||
private int sessionLootMode;
|
||||
private boolean allowRareLoot;
|
||||
private boolean increasedRLSChance;
|
||||
|
||||
public LootRollSession(){
|
||||
}
|
||||
|
||||
public LootRollSession(CreatureObject requester){
|
||||
public LootRollSession(CreatureObject requester, TangibleObject lootedObject){
|
||||
long requesterGroupId = requester.getGroupId();
|
||||
if (requesterGroupId>0){
|
||||
this.playerGroup = (GroupObject) NGECore.getInstance().objectService.getObject(requesterGroupId);
|
||||
this.SessionID = playerGroup.getGroupLeader().getCustomName()+"-"+System.currentTimeMillis();
|
||||
|
||||
} else {
|
||||
this.SessionID = requester.getCustomName()+"-"+System.currentTimeMillis();
|
||||
}
|
||||
|
||||
if (lootedObject instanceof CreatureObject){
|
||||
CreatureObject lootedCreature = (CreatureObject)lootedObject;
|
||||
// Exclude rare loot depending on creature level
|
||||
// For groups maybe average CL?
|
||||
if (requester.getLevel()-lootedCreature.getLevel()<=6){
|
||||
this.setAllowRareLoot(true);
|
||||
}
|
||||
}
|
||||
|
||||
// Group situation
|
||||
if (this.getPlayerGroup()!=null){
|
||||
if (this.getPlayerGroup().getMemberList().size()>=4)
|
||||
this.setIncreasedRLSChance(true);
|
||||
}
|
||||
|
||||
// Possible AFKer check here
|
||||
|
||||
|
||||
droppedItems = new ArrayList<TangibleObject>();
|
||||
errorMessages = new ArrayList<String>();
|
||||
sessionPlanet = requester.getPlanet();
|
||||
allowRareLoot = false;
|
||||
}
|
||||
|
||||
public List<TangibleObject> getDroppedItems() {
|
||||
@@ -89,4 +114,40 @@ public class LootRollSession {
|
||||
public void addErrorMessage(String errorMessage) {
|
||||
this.errorMessages.add(errorMessage);
|
||||
}
|
||||
|
||||
public int getSessionLootMode() {
|
||||
return sessionLootMode;
|
||||
}
|
||||
|
||||
public void setSessionLootMode(int sessionLootMode) {
|
||||
this.sessionLootMode = sessionLootMode;
|
||||
}
|
||||
|
||||
public boolean isAllowRareLoot() {
|
||||
return allowRareLoot;
|
||||
}
|
||||
|
||||
public void setAllowRareLoot(boolean allowRareLoot) {
|
||||
this.allowRareLoot = allowRareLoot;
|
||||
}
|
||||
|
||||
public GroupObject getPlayerGroup() {
|
||||
return playerGroup;
|
||||
}
|
||||
|
||||
public boolean isIncreasedRLSChance() {
|
||||
return increasedRLSChance;
|
||||
}
|
||||
|
||||
public void setIncreasedRLSChance(boolean increasedRLSChance) {
|
||||
this.increasedRLSChance = increasedRLSChance;
|
||||
}
|
||||
|
||||
public boolean isSessionValid() {
|
||||
return sessionValid;
|
||||
}
|
||||
|
||||
public void setSessionValid(boolean sessionValid) {
|
||||
this.sessionValid = sessionValid;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user