mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 06:45:39 +00:00
First Working Version of Party Kill Quest Completion
This commit is contained in:
1 parent
607b3f54d8
commit
2328b0dadf
16 files changed
+508
-104
No files matched your search
@@ -202,6 +202,10 @@ public class GuiParty extends GuiCNPCInventory implements ITextfieldListener, IT
|
||||
// Leave Party
|
||||
Client.sendData(EnumPacketServer.LeavePlayer, this.player.getCommandSenderName());
|
||||
break;
|
||||
case 4:
|
||||
// Drop Party Quest
|
||||
Client.sendData(EnumPacketServer.SetPartyQuest, "", "");
|
||||
break;
|
||||
}
|
||||
receivedData = false;
|
||||
initGui();
|
||||
@@ -273,7 +277,10 @@ public class GuiParty extends GuiCNPCInventory implements ITextfieldListener, IT
|
||||
this.showQuestText = true;
|
||||
break;
|
||||
case 410:
|
||||
Client.sendData(EnumPacketServer.SetPartyQuest, "", "");
|
||||
if (this.isLeader) {
|
||||
GuiYesNo yesnoDisband = new GuiYesNo(this, "Confirm", StatCollector.translateToLocal("party.disbandConfirm"), 4);
|
||||
displayGuiScreen(yesnoDisband);
|
||||
}
|
||||
break;
|
||||
}
|
||||
initGui();
|
||||
|
||||
@@ -2,6 +2,8 @@ package noppes.npcs.client.gui.player.inventory;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiYesNo;
|
||||
import net.minecraft.client.gui.GuiYesNoCallback;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -21,7 +23,7 @@ import tconstruct.client.tabs.TabRegistry;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class GuiQuestLog extends GuiCNPCInventory implements ITopButtonListener,ICustomScrollListener, IGuiData, IPartyData {
|
||||
public class GuiQuestLog extends GuiCNPCInventory implements ITopButtonListener,ICustomScrollListener, IGuiData, IPartyData, GuiYesNoCallback {
|
||||
|
||||
private final ResourceLocation resource = new ResourceLocation("customnpcs","textures/gui/standardbg.png");
|
||||
|
||||
@@ -117,6 +119,18 @@ public class GuiQuestLog extends GuiCNPCInventory implements ITopButtonListener,
|
||||
getButton(3).visible = getButton(4).visible;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void confirmClicked(boolean flag, int i) {
|
||||
if (flag) {
|
||||
if (i == 0) {
|
||||
Client.sendData(EnumPacketServer.SetPartyQuest, data.selectedCategory, data.selectedQuest);
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
displayGuiScreen(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton guibutton){
|
||||
if(guibutton.id == 1){
|
||||
@@ -130,7 +144,8 @@ public class GuiQuestLog extends GuiCNPCInventory implements ITopButtonListener,
|
||||
if (Objects.equals(ClientCacheHandler.party.getCurrentQuestName(), data.selectedQuest)) {
|
||||
Client.sendData(EnumPacketServer.SetPartyQuest, "", "");
|
||||
} else {
|
||||
Client.sendData(EnumPacketServer.SetPartyQuest, data.selectedCategory, data.selectedQuest);
|
||||
GuiYesNo yesnoDisband = new GuiYesNo(this, "Confirm", StatCollector.translateToLocal("party.setQuestConfirm"), 0);
|
||||
displayGuiScreen(yesnoDisband);
|
||||
}
|
||||
}
|
||||
if(guibutton.id == 4){
|
||||
|
||||
Reference in new issue
Block a user