Skip to content

Commit 9a67e1c

Browse files
committed
Conflicts: .gitignore
2 parents 5d82432 + 6b565dc commit 9a67e1c

76 files changed

Lines changed: 10607 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ clientdata/
4747
# SWG Client Folders
4848
footprint/
4949
interiorlayout/
50+
clientdata/quest/
5051

5152
# External tool builders
5253
.externalToolBuilders/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Then export the following folders to your clientdata folder(should be located in
4343
- object
4444
- quest
4545
- snapshot
46+
- string
4647
- terrain
4748

4849
Export the same folders from sku1_client.toc, sku2_client.toc and sku3_client.toc to avoid errors with kashyyyk.

options.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
LOAD.SNAPSHOT_OBJECTS=1
2+
LOAD.BUILDOUT_OBJECTS=1

scripts/commands/waypoint.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def run(core, actor, target, commandString):
2828
waypoint.setPlanetCRC(crc.StringtoCRC(planet.getName()))
2929
actorPlayer.getWaypoints().add(waypoint)
3030
actorPlayer.waypointAdd(waypoint)
31-
actor.sendSystemMessage('A waypoint has been created in your datapad at your location.', 0)
31+
actor.sendSystemMessage('A waypoint has been created in your datapad at the location.', 0)
3232
return
3333

3434

@@ -42,7 +42,7 @@ def run(core, actor, target, commandString):
4242
waypoint.setPlanetCRC(crc.StringtoCRC(actor.getPlanet().getName()))
4343
actorPlayer.getWaypoints().add(waypoint)
4444
actorPlayer.waypointAdd(waypoint)
45-
actor.sendSystemMessage('A waypoint has been created in your datapad at your location.', 0)
45+
actor.sendSystemMessage('A waypoint has been created in your datapad at the location.', 0)
4646
return
4747
#/wp X Z Name
4848
elif len(commandArgs) >= 3 and isFloat(commandArgs[0]) and isFloat(commandArgs[1]):
@@ -54,7 +54,7 @@ def run(core, actor, target, commandString):
5454
waypoint.setPlanetCRC(crc.StringtoCRC(actor.getPlanet().getName()))
5555
actorPlayer.getWaypoints().add(waypoint)
5656
actorPlayer.waypointAdd(waypoint)
57-
actor.sendSystemMessage('A waypoint has been created in your datapad at your location.', 0)
57+
actor.sendSystemMessage('A waypoint has been created in your datapad at the location.', 0)
5858
return
5959
#/wp X Z
6060
elif len(commandArgs) >= 2 and isFloat(commandArgs[0]) and isFloat(commandArgs[1]):
@@ -65,7 +65,7 @@ def run(core, actor, target, commandString):
6565
waypoint.setPlanetCRC(crc.StringtoCRC(actor.getPlanet().getName()))
6666
actorPlayer.getWaypoints().add(waypoint)
6767
actorPlayer.waypointAdd(waypoint)
68-
actor.sendSystemMessage('A waypoint has been created in your datapad at your location.', 0)
68+
actor.sendSystemMessage('A waypoint has been created in your datapad at the location.', 0)
6969
return
7070

7171
#/wp planet x z y name
@@ -81,7 +81,7 @@ def run(core, actor, target, commandString):
8181
waypoint.setPlanetCRC(crc.StringtoCRC(actor.getPlanet().getName()))
8282
actorPlayer.getWaypoints().add(waypoint)
8383
actorPlayer.waypointAdd(waypoint)
84-
actor.sendSystemMessage('A waypoint has been created in your datapad at your location.', 0)
84+
actor.sendSystemMessage('A waypoint has been created in your datapad at the location.', 0)
8585
return
8686

8787
#/wp NAME

src/resources/common/AString.java

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2013 <Project SWG>
3+
*
4+
* This File is part of NGECore2.
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*
19+
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
20+
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
21+
******************************************************************************/
22+
package resources.common;
23+
24+
import java.nio.ByteOrder;
25+
26+
import org.apache.mina.core.buffer.IoBuffer;
27+
28+
import com.sleepycat.persist.model.Persistent;
29+
30+
import resources.objects.Delta;
31+
32+
@Persistent
33+
public final class AString extends Delta {
34+
35+
private String string;
36+
37+
public AString() {
38+
string = "";
39+
}
40+
41+
public AString(String string) {
42+
this.string = ((string == null) ? "" : string);
43+
}
44+
45+
public String get() {
46+
synchronized(objectMutex) {
47+
return string;
48+
}
49+
}
50+
51+
public void set(String string) {
52+
synchronized(objectMutex) {
53+
this.string = string;
54+
}
55+
}
56+
57+
public short length() {
58+
synchronized(objectMutex) {
59+
return (short) string.length();
60+
}
61+
}
62+
63+
public byte[] getBytes() {
64+
synchronized(objectMutex) {
65+
return IoBuffer.allocate(2 + string.length(), false).order(ByteOrder.LITTLE_ENDIAN).putShort((short) string.length()).put(string.getBytes()).flip().array();
66+
}
67+
}
68+
69+
}

src/resources/common/Opcodes.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public class Opcodes {
4646
public static int RequestGalaxyLoopTimes = 0x7D842D68;
4747
public static int SelectCharacter = 0xB5098D76;
4848
public static int SuiEventNotification = 0x092D3564;
49-
public static int DeltasMessage = 0x12862153;
49+
public static int BaselinesMessage = CRC.StringtoCRC("BaselinesMessage");
50+
public static int DeltasMessage = CRC.StringtoCRC("DeltasMessage");
5051
public static int ChatAddFriend = 0x6FE7BD90;
5152
public static int GcwRegionsReq = CRC.StringtoCRC("GcwRegionsReq");
5253
public static int GcwRegionsRsp = CRC.StringtoCRC("GcwRegionsRsp");

src/resources/common/Stf.java

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2013 <Project SWG>
3+
*
4+
* This File is part of NGECore2.
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*
19+
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
20+
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
21+
******************************************************************************/
22+
package resources.common;
23+
24+
import org.apache.mina.core.buffer.IoBuffer;
25+
26+
import resources.z.exp.objects.Baseline;
27+
import resources.objects.Delta;
28+
29+
import com.sleepycat.persist.model.Persistent;
30+
31+
@Persistent
32+
public class Stf extends Delta {
33+
34+
private AString stfFilename;
35+
private int spacer = 0;
36+
private AString stfName;
37+
38+
public Stf(String stfFilename, int spacer, String stfName) {
39+
this.stfFilename = new AString(stfFilename);
40+
this.spacer = spacer;
41+
this.stfName = new AString(stfName);
42+
}
43+
44+
public Stf() {
45+
46+
}
47+
48+
public String getStfFilename() {
49+
synchronized(objectMutex) {
50+
return stfFilename.get();
51+
}
52+
}
53+
54+
public void setStfFilename(String stfFilename) {
55+
synchronized(objectMutex) {
56+
this.stfFilename = new AString(stfFilename);
57+
}
58+
}
59+
60+
public int getSpacer() {
61+
synchronized(objectMutex) {
62+
return spacer;
63+
}
64+
}
65+
66+
public void setSpacer(int spacer) {
67+
synchronized(objectMutex) {
68+
this.spacer = spacer;
69+
}
70+
}
71+
72+
public String getStfName() {
73+
synchronized(objectMutex) {
74+
return stfName.get();
75+
}
76+
}
77+
78+
public void setStfName(String stfName) {
79+
synchronized(objectMutex) {
80+
this.stfName = new AString(stfName);
81+
}
82+
}
83+
84+
public byte[] getBytes() {
85+
synchronized(objectMutex) {
86+
int size = stfFilename.getBytes().length + 4 + stfName.getBytes().length;
87+
88+
IoBuffer buffer = Baseline.createBuffer(size);
89+
buffer.put(stfFilename.getBytes());
90+
buffer.putInt(spacer);
91+
buffer.put(stfName.getBytes());
92+
buffer.flip();
93+
94+
return buffer.array();
95+
}
96+
}
97+
98+
}

src/resources/common/UString.java

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2013 <Project SWG>
3+
*
4+
* This File is part of NGECore2.
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*
19+
* Using NGEngine to work with NGECore2 is making a combined work based on NGEngine.
20+
* Therefore all terms and conditions of the GNU Lesser General Public License cover the combination.
21+
******************************************************************************/
22+
package resources.common;
23+
24+
import java.io.UnsupportedEncodingException;
25+
import java.nio.ByteOrder;
26+
27+
import org.apache.mina.core.buffer.IoBuffer;
28+
29+
import com.sleepycat.persist.model.Persistent;
30+
31+
import resources.objects.Delta;
32+
33+
@Persistent
34+
public final class UString extends Delta {
35+
36+
private String string;
37+
38+
public UString() {
39+
string = "";
40+
}
41+
42+
public UString(String string) {
43+
this.string = ((string == null) ? "" : string);
44+
}
45+
46+
public String get() {
47+
synchronized(objectMutex) {
48+
return string;
49+
}
50+
}
51+
52+
public void set(String string) {
53+
synchronized(objectMutex) {
54+
this.string = string;
55+
}
56+
}
57+
58+
public int length() {
59+
synchronized(objectMutex) {
60+
return string.length();
61+
}
62+
}
63+
64+
public byte[] getBytes() {
65+
synchronized(objectMutex) {
66+
try {
67+
return IoBuffer.allocate(4 + string.length(), false).order(ByteOrder.LITTLE_ENDIAN).putInt(string.length()).put(string.getBytes("UTF-16LE")).flip().array();
68+
} catch (UnsupportedEncodingException e) {
69+
e.printStackTrace();
70+
return new byte[] { 0x00, 0x00, 0x00, 0x00 };
71+
}
72+
}
73+
}
74+
75+
}

src/resources/datatables/FactionStatus.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
public class FactionStatus {
2525

26-
public static int OnLeave = 0;
27-
public static int Combatant = 1;
28-
public static int SpecialForces = 2;
26+
public static final int OnLeave = 0;
27+
public static final int Combatant = 1;
28+
public static final int SpecialForces = 2;
2929

3030
}

0 commit comments

Comments
 (0)