Moved Loot objs out of baseline dir

This commit is contained in:
Treeku
2014-04-29 23:04:53 +01:00
parent 77515ecae4
commit fac4c7fe3b
8 changed files with 10 additions and 9 deletions
-51
View File
@@ -1,51 +0,0 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package resources.objects.loot;
import java.util.ArrayList;
import java.util.List;
public class LootDrop {
private List<String> elements = new ArrayList<String>();
private String droppedItemTemplate;
public LootDrop(){
}
public void addElement(String element){
elements.add(element);
}
public List<String> getElements(){
return elements;
}
public String getDroppedItemTemplate() {
return droppedItemTemplate;
}
public void setDroppedItemTemplate(String droppedItemTemplate) {
this.droppedItemTemplate = droppedItemTemplate;
}
}
-64
View File
@@ -1,64 +0,0 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package resources.objects.loot;
import com.sleepycat.persist.model.Persistent;
/**
* @author Charon
*/
@Persistent(version=0)
public class LootGroup {
private String[] lootPoolNames;
private double[] lootPoolChances;
private double lootGroupChance;
public LootGroup(){
}
public LootGroup(String[] lootPoolNames, double[] lootPoolChances, double lootGroupChance){
this.lootPoolNames = lootPoolNames;
this.lootPoolChances = lootPoolChances;
this.lootGroupChance = lootGroupChance;
}
public void addLootData(String[] lootPoolNames, double[] lootPoolChances, double lootGroupChance){
this.lootPoolNames = lootPoolNames;
this.lootPoolChances = lootPoolChances;
this.lootGroupChance = lootGroupChance;
}
public String[] getLootPoolNames() {
return lootPoolNames;
}
public double[] getLootPoolChances() {
return lootPoolChances;
}
public double getLootGroupChance() {
return lootGroupChance;
}
}
-33
View File
@@ -1,33 +0,0 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package resources.objects.loot;
/**
* @author Charon
*/
public class LootPool {
public LootPool(){
}
}
@@ -1,163 +0,0 @@
/*******************************************************************************
* Copyright (c) 2013 <Project SWG>
*
* This File is part of NGECore2.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
******************************************************************************/
package resources.objects.loot;
import java.util.ArrayList;
import java.util.List;
import engine.resources.scene.Planet;
import main.NGECore;
import resources.objects.creature.CreatureObject;
import resources.objects.group.GroupObject;
import resources.objects.tangible.TangibleObject;
/**
* @author Charon
*/
public class LootRollSession {
private String SessionID; // leaderName-SystemTime
private boolean sessionValid;
private GroupObject playerGroup;
private CreatureObject requester;
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, 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();
this.requester = requester;
allowRareLoot = false;
}
public List<TangibleObject> getDroppedItems() {
return droppedItems;
}
public void addDroppedItem(TangibleObject droppedItem) {
this.droppedItems.add(droppedItem);
}
public String getSessionID() {
return SessionID;
}
public void setSessionID(String sessionID) {
SessionID = sessionID;
}
public void generateSessionID(String sessionID) {
SessionID = sessionID;
}
public Planet getSessionPlanet() {
return sessionPlanet;
}
public List<String> getErrorMessages() {
return errorMessages;
}
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;
}
public CreatureObject getRequester() {
return requester;
}
public void setRequester(CreatureObject requester) {
this.requester = requester;
}
}
@@ -40,8 +40,8 @@ import protocol.swg.objectControllerObjects.ShowFlyText;
import resources.common.OutOfBand;
import resources.common.RGB;
import resources.datatables.Options;
import resources.loot.LootGroup;
import resources.objects.creature.CreatureObject;
import resources.objects.loot.LootGroup;
import resources.visitors.IDManagerVisitor;
import com.sleepycat.persist.model.NotPersistent;