Credits given on completion of bounty mission, added cap for bounties, can no longer take your own bounty

This commit is contained in:
Waverunner
2014-05-04 12:39:44 -04:00
parent ba02d56ef8
commit db80ef2d7c
5 changed files with 28 additions and 6 deletions
+14 -2
View File
@@ -320,6 +320,15 @@ public class MissionService implements INetworkDispatch {
});
}
public void handleMissionComplete(CreatureObject creature, MissionObject mission) {
MissionObjective objective = mission.getObjective();
if (objective == null)
return;
objective.complete(core, creature);
}
private boolean handleMissionAccept(CreatureObject creature, MissionObject mission) {
SWGObject missionBag = creature.getSlottedObject("mission_bag");
@@ -432,11 +441,14 @@ public class MissionService implements INetworkDispatch {
if (bountyList.size() > 0) {
boolean gotBounty = false;
while (!gotBounty) {
int attempts = 0;
while (!gotBounty && attempts < 5) {
bountyTarget = getRandomBounty();
if (bountyTarget == null || bountyTarget.getAssignedHunters().size() >= 3 || bountyTarget.getCreditReward() < 20000)
if (bountyTarget == null || bountyTarget.getAssignedHunters().size() >= 3 || bountyTarget.getCreditReward() < 20000 || bountyTarget.getObjectId() == player.getObjectId()) {
attempts++;
continue;
}
else
gotBounty = true;
}