mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-21 11:03:00 -04:00
Credits given on completion of bounty mission, added cap for bounties, can no longer take your own bounty
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user