This commit is contained in:
Kam committed 2024-03-03 21:35:23 -05:00
1 parent 0a4c8424b0
commit f46a63109c
5 files changed
+35 -35

No files matched your search

@@ -341,19 +341,18 @@ public class ServerEventsHandler {
if (data.quest.type != EnumQuestType.Kill && data.quest.type != EnumQuestType.AreaKill)
continue;
// Disable Area Kill for Party
// if (data.quest.type == EnumQuestType.AreaKill && all) {
// List<EntityPlayer> list = player.worldObj.getEntitiesWithinAABB(EntityPlayer.class, entity.boundingBox.expand(10, 10, 10));
// for (EntityPlayer pl : list) {
// if (pl != player) {
// if(party == null){
// doQuest(pl, entity, false);
// } else if(!party.hasPlayer(pl.getUniqueID())){
// doQuest(pl, entity, false);
// }
// }
// }
// }
if (data.quest.type == EnumQuestType.AreaKill && all) {
List<EntityPlayer> list = player.worldObj.getEntitiesWithinAABB(EntityPlayer.class, entity.boundingBox.expand(10, 10, 10));
for (EntityPlayer pl : list) {
if (pl != player) {
if(party == null){
doQuest(pl, entity, false);
} else if(!party.hasPlayer(pl.getUniqueID())){
doQuest(pl, entity, false);
}
}
}
}
String name = entityName;
QuestKill quest = (QuestKill) data.quest.questInterface;
@@ -7,7 +7,7 @@ public enum EnumPartyObjectives {
All("party.all"),
Leader("party.leader");
String name;
final String name;
EnumPartyObjectives(String name){
this.name = name;
@@ -27,6 +27,8 @@ public abstract class QuestInterface implements IQuestInterface {
public abstract Vector<String> getQuestLogStatus(EntityPlayer player);
public abstract IQuestObjective[] getObjectives(EntityPlayer var1);
// Party Related
public abstract IQuestObjective[] getPartyObjectives(Party party);
public abstract Vector<String> getPartyQuestLogStatus(Party party);
@@ -24,7 +24,6 @@ public class QuestKill extends QuestInterface implements IQuestKill {
@Override
public void writeEntityToNBT(NBTTagCompound compound) {
compound.setTag("QuestKills", NBTTags.nbtStringIntegerMap(targets));
//compound.setTag("QuestDialogs", NBTTags.nbtStringIntegerMap(targets));
compound.setInteger("TargetType",targetType);
compound.setString("CustomTargetType",customTargetType);
}
@@ -38,9 +37,7 @@ public class QuestKill extends QuestInterface implements IQuestKill {
} else {
targets = NBTTags.getStringIntegerMap(compound.getTagList("QuestKills", 10));
}
//targets = NBTTags.getStringIntegerMap(compound.getTagList("QuestDialogs", 10));
targetType = compound.getInteger("TargetType");
targetType = compound.getInteger("TargetType");
customTargetType = compound.getString("CustomTargetType");
}
@@ -70,6 +70,24 @@ public class QuestLocation extends QuestInterface implements IQuestLocation {
return vec;
}
@Override
public IQuestObjective[] getObjectives(EntityPlayer player) {
List<IQuestObjective> list = new ArrayList();
if (!this.location.isEmpty()) {
list.add(new noppes.npcs.quests.QuestLocation.QuestLocationObjective(this, player, this.location, "LocationFound"));
}
if (!this.location2.isEmpty()) {
list.add(new noppes.npcs.quests.QuestLocation.QuestLocationObjective(this, player, this.location2, "Location2Found"));
}
if (!this.location3.isEmpty()) {
list.add(new noppes.npcs.quests.QuestLocation.QuestLocationObjective(this, player, this.location3, "Location3Found"));
}
return (IQuestObjective[])list.toArray(new IQuestObjective[list.size()]);
}
public boolean getFound(QuestData data, int i) {
if(i == 1)
return data.extraData.getBoolean("LocationFound");
@@ -190,23 +208,7 @@ public class QuestLocation extends QuestInterface implements IQuestLocation {
return newFind;
}
public IQuestObjective[] getObjectives(EntityPlayer player) {
List<IQuestObjective> list = new ArrayList();
if (!this.location.isEmpty()) {
list.add(new noppes.npcs.quests.QuestLocation.QuestLocationObjective(this, player, this.location, "LocationFound"));
}
if (!this.location2.isEmpty()) {
list.add(new noppes.npcs.quests.QuestLocation.QuestLocationObjective(this, player, this.location2, "Location2Found"));
}
if (!this.location3.isEmpty()) {
list.add(new noppes.npcs.quests.QuestLocation.QuestLocationObjective(this, player, this.location3, "Location3Found"));
}
return (IQuestObjective[])list.toArray(new IQuestObjective[list.size()]);
}
@Override
public IQuestObjective[] getPartyObjectives(Party party) {
List<IQuestObjective> list = new ArrayList();
if (!this.location.isEmpty()) {