mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 22:27:32 +00:00
Fix Quest / Dialog Modification Names
This commit is contained in:
1 parent
01b08f9fbf
commit
50fd3c1856
4 files changed
+6
-17
No files matched your search
@@ -13,13 +13,10 @@ import kamkeel.npcs.util.ByteBufUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import kamkeel.npcs.network.packets.data.large.GuiDataPacket;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.controllers.DialogController;
|
||||
import noppes.npcs.controllers.QuestController;
|
||||
import noppes.npcs.controllers.data.Dialog;
|
||||
import noppes.npcs.controllers.data.Quest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -83,13 +80,6 @@ public final class DialogSavePacket extends AbstractPacket {
|
||||
} else {
|
||||
NoppesUtilServer.sendDialogData((EntityPlayerMP) player, dialog.category);
|
||||
}
|
||||
|
||||
// Send full dialog data back so the client doesn't need a second round-trip
|
||||
NBTTagCompound dialogData = dialog.writeToNBT(new NBTTagCompound());
|
||||
Quest quest = QuestController.Instance.quests.get(dialog.quest);
|
||||
if (quest != null)
|
||||
dialogData.setString("DialogQuestName", quest.title);
|
||||
GuiDataPacket.sendGuiData((EntityPlayerMP) player, dialogData);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,6 @@ import kamkeel.npcs.util.ByteBufUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import kamkeel.npcs.network.packets.data.large.GuiDataPacket;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.controllers.QuestController;
|
||||
@@ -80,12 +79,6 @@ public final class QuestSavePacket extends AbstractPacket {
|
||||
} else {
|
||||
NoppesUtilServer.sendQuestData((EntityPlayerMP) player, quest.category);
|
||||
}
|
||||
|
||||
// Send full quest data back so the client doesn't need a second round-trip
|
||||
NBTTagCompound questData = new NBTTagCompound();
|
||||
if (quest.hasNewQuest())
|
||||
questData.setString("NextQuestTitle", quest.getNextQuest().title);
|
||||
GuiDataPacket.sendGuiData((EntityPlayerMP) player, quest.writeToNBT(questData));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -411,6 +411,9 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollData
|
||||
}
|
||||
if (subgui instanceof SubGuiNpcDialog) {
|
||||
saveType(true);
|
||||
if (dialog != null && dialog.id >= 0) {
|
||||
setPrevDialogName(dialog.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -401,6 +401,9 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollData,
|
||||
}
|
||||
if (subgui instanceof SubGuiNpcQuest) {
|
||||
saveType(true);
|
||||
if (quest != null && quest.id >= 0) {
|
||||
setPrevQuestName(quest.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user