Smaller Sync Packets for Quest / Dialog / Faction Data

This commit is contained in:
Kam committed 2024-03-13 03:33:46 -04:00
1 parent b3846e32c8
commit 8c3b46d4f4
10 files changed
+267 -94

No files matched your search

@@ -157,7 +157,6 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
int id = guibutton.id;
// Edit Cat
if(id == 6){
saveType(false);
if(category != null && category.id > -1){
setSubGui(new SubGuiEditText(category.title));
}
@@ -167,7 +166,6 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
}
// Add Cat
if(id == 4){
saveType(false);
String name = "New";
while(catData.containsKey(name))
name += "_";
@@ -181,7 +179,6 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
}
// Remove Cat
if(id == 5){
saveType(false);
if(catData.containsKey(catScroll.getSelected())) {
Client.sendData(EnumPacketServer.DialogCategoryRemove, category.id);
clearCategory();
@@ -323,12 +320,10 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
public void customScrollClicked(int i, int j, int k, GuiCustomScroll guiCustomScroll) {
if(guiCustomScroll.id == 0)
{
saveType(false);
getCategory(false);
}
if(guiCustomScroll.id == 1)
{
saveType(false);
getDialog(false);
}
}
@@ -161,7 +161,6 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
int id = guibutton.id;
// Edit Cat
if(id == 6){
saveType(false);
if(category != null && category.id > -1){
setSubGui(new SubGuiEditText(category.title));
}
@@ -171,7 +170,6 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
}
// Add Cat
if(id == 4){
saveType(false);
String name = "New";
while(catData.containsKey(name))
name += "_";
@@ -185,7 +183,6 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
}
// Remove Cat
if(id == 5){
saveType(false);
if(catData.containsKey(catScroll.getSelected())) {
Client.sendData(EnumPacketServer.QuestCategoryRemove, category.id);
clearCategory();
@@ -302,7 +299,7 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
catData.put(category.title, category.id);
catScroll.replace(old,category.title);
}
saveType(false);
saveType(false);
}
}
}
@@ -327,12 +324,10 @@ public class GuiNPCManageQuest extends GuiNPCInterface2 implements IScrollGroup,
public void customScrollClicked(int i, int j, int k, GuiCustomScroll guiCustomScroll) {
if(guiCustomScroll.id == 0)
{
saveType(false);
getCategory(false);
}
if(guiCustomScroll.id == 1)
{
saveType(false);
getQuest(false);
}
}