mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-19 09:03:02 -04:00
Created and updated some SWG objects
This commit is contained in:
@@ -46,6 +46,7 @@ import resources.collections.SWGList;
|
||||
import resources.collections.SWGMap;
|
||||
import resources.encodables.player.Equipment;
|
||||
import resources.network.BaselineBuilder;
|
||||
import resources.network.NetBuffer;
|
||||
import resources.objects.SWGObject;
|
||||
import resources.objects.player.PlayerObject;
|
||||
import resources.objects.tangible.OptionFlag;
|
||||
@@ -116,8 +117,8 @@ public class CreatureObject extends TangibleObject {
|
||||
|
||||
private SWGMap<String, SkillMod> skillMods = new SWGMap<>(4, 3, StringType.ASCII); // TODO: SkillMod structure
|
||||
private SWGMap<Long, Long> missionCriticalObjs = new SWGMap<>(4, 13);
|
||||
private SWGMap<String, Integer> abilities = new SWGMap<>(4, 14, StringType.ASCII);
|
||||
private SWGMap<Integer, Long> buffs = new SWGMap<>(6, 26); // TODO: Buff structure
|
||||
private SWGMap<String, Long> abilities = new SWGMap<>(4, 14, StringType.ASCII);
|
||||
private SWGMap<Integer, Integer> buffs = new SWGMap<>(6, 26); // TODO: Buff structure
|
||||
|
||||
public CreatureObject(long objectId) {
|
||||
super(objectId, BaselineType.CREO);
|
||||
@@ -709,7 +710,7 @@ public class CreatureObject extends TangibleObject {
|
||||
return attributes.get(2);
|
||||
}
|
||||
|
||||
public void addAbility(String abilityName){ abilities.put(abilityName, 1); }//TODO: Figure out what the integer value should be for each ability
|
||||
public void addAbility(String abilityName){ abilities.put(abilityName, 1L); }//TODO: Figure out what the integer value should be for each ability
|
||||
|
||||
public void removeAbility(String abilityName) { abilities.remove(abilityName); }
|
||||
|
||||
@@ -839,6 +840,8 @@ public class CreatureObject extends TangibleObject {
|
||||
|
||||
public void createBaseline1(Player target, BaselineBuilder bb) {
|
||||
super.createBaseline1(target, bb); // 0 variables
|
||||
if (getStringId().toString().equals("@obj_n:unknown_object"))
|
||||
return;
|
||||
bb.addInt(bankBalance); // 0
|
||||
bb.addInt(cashBalance); // 1
|
||||
bb.addObject(baseAttributes); // Attributes player has without any gear on -- 2
|
||||
@@ -849,6 +852,8 @@ public class CreatureObject extends TangibleObject {
|
||||
|
||||
public void createBaseline3(Player target, BaselineBuilder bb) {
|
||||
super.createBaseline3(target, bb); // 13 variables - TANO3 (9) + BASE3 (4)
|
||||
if (getStringId().toString().equals("@obj_n:unknown_object"))
|
||||
return;
|
||||
bb.addByte(posture.getId()); // 13
|
||||
bb.addByte(factionRank); // 14
|
||||
bb.addLong(ownerId); // 15
|
||||
@@ -861,6 +866,8 @@ public class CreatureObject extends TangibleObject {
|
||||
|
||||
public void createBaseline4(Player target, BaselineBuilder bb) {
|
||||
super.createBaseline4(target, bb); // 0 variables
|
||||
if (getStringId().toString().equals("@obj_n:unknown_object"))
|
||||
return;
|
||||
bb.addFloat((float) accelPercent); // 0
|
||||
bb.addFloat((float) accelScale); // 1
|
||||
bb.addObject(hamEncumbList); // Rename to bonusAttributes? 2
|
||||
@@ -883,6 +890,8 @@ public class CreatureObject extends TangibleObject {
|
||||
|
||||
public void createBaseline6(Player target, BaselineBuilder bb) {
|
||||
super.createBaseline6(target, bb); // 8 variables - TANO6 (6) + BASE6 (2)
|
||||
if (getStringId().toString().equals("@obj_n:unknown_object"))
|
||||
return;
|
||||
bb.addShort(level); // 8
|
||||
bb.addInt(levelHealthGranted); // 9
|
||||
bb.addAscii(animation); // 10
|
||||
@@ -914,12 +923,80 @@ public class CreatureObject extends TangibleObject {
|
||||
bb.incrementOperandCount(27);
|
||||
}
|
||||
|
||||
public void createBaseline8(Player target, BaselineBuilder bb) {
|
||||
super.createBaseline8(target, bb);
|
||||
protected void parseBaseline1(NetBuffer buffer) {
|
||||
super.parseBaseline1(buffer);
|
||||
if (getStringId().toString().equals("@obj_n:unknown_object"))
|
||||
return;
|
||||
bankBalance = buffer.getInt();
|
||||
cashBalance = buffer.getInt();
|
||||
baseAttributes = buffer.getSwgList(1, 2, Integer.class);
|
||||
skills = buffer.getSwgList(1, 2, StringType.ASCII);
|
||||
}
|
||||
|
||||
public void createBaseline9(Player target, BaselineBuilder bb) {
|
||||
super.createBaseline9(target, bb);
|
||||
protected void parseBaseline3(NetBuffer buffer) {
|
||||
super.parseBaseline3(buffer);
|
||||
if (getStringId().toString().equals("@obj_n:unknown_object"))
|
||||
return;
|
||||
posture = Posture.getFromId(buffer.getByte());
|
||||
factionRank = buffer.getByte();
|
||||
ownerId = buffer.getLong();
|
||||
height = buffer.getFloat();
|
||||
battleFatigue = buffer.getInt();
|
||||
statesBitmask = buffer.getLong();
|
||||
}
|
||||
|
||||
protected void parseBaseline4(NetBuffer buffer) {
|
||||
super.parseBaseline4(buffer);
|
||||
if (getStringId().toString().equals("@obj_n:unknown_object"))
|
||||
return;
|
||||
accelPercent = buffer.getFloat();
|
||||
hamEncumbList = buffer.getSwgList(4, 2, Integer.class);
|
||||
skillMods = buffer.getSwgMap(4, 3, StringType.ASCII, SkillMod.class);
|
||||
movementPercent = buffer.getFloat();
|
||||
movementScale = buffer.getFloat();
|
||||
performanceListenTarget = buffer.getLong();
|
||||
runSpeed = buffer.getFloat();
|
||||
slopeModAngle = buffer.getFloat();
|
||||
slopeModPercent = buffer.getFloat();
|
||||
turnScale = buffer.getFloat();
|
||||
walkSpeed = buffer.getFloat();
|
||||
waterModPercent = buffer.getFloat();
|
||||
missionCriticalObjs = buffer.getSwgMap(4, 13, Long.class, Long.class);
|
||||
abilities = buffer.getSwgMap(4, 14, StringType.ASCII, Long.class);
|
||||
totalLevelXp = buffer.getInt();
|
||||
}
|
||||
|
||||
protected void parseBaseline6(NetBuffer buffer) {
|
||||
super.parseBaseline6(buffer);
|
||||
if (getStringId().toString().equals("@obj_n:unknown_object"))
|
||||
return;
|
||||
level = buffer.getShort();
|
||||
levelHealthGranted = buffer.getInt();
|
||||
animation = buffer.getAscii();
|
||||
moodAnimation = buffer.getAscii();
|
||||
equippedWeaponId = buffer.getLong();
|
||||
groupId = buffer.getLong();
|
||||
inviterData = buffer.getEncodable(GroupInviterData.class);
|
||||
guildId = buffer.getInt();
|
||||
lookAtTargetId = buffer.getLong();
|
||||
intendedTargetId = buffer.getLong();
|
||||
moodId = buffer.getByte();
|
||||
performanceCounter = buffer.getInt();
|
||||
performanceId = buffer.getInt();
|
||||
attributes = buffer.getSwgList(6, 21, Integer.class);
|
||||
maxAttributes = buffer.getSwgList(6, 22, Integer.class);
|
||||
equipmentList = buffer.getSwgList(6, 23, Equipment.class);
|
||||
costume = buffer.getAscii();
|
||||
visible = buffer.getBoolean();
|
||||
buffs = buffer.getSwgMap(6, 26, Integer.class, Integer.class);
|
||||
performing = buffer.getBoolean();
|
||||
difficulty = CreatureDifficulty.getForDifficulty(buffer.getByte());
|
||||
hologramColour = HologramColour.getForValue(buffer.getInt());
|
||||
shownOnRadar = buffer.getBoolean();
|
||||
beast = buffer.getBoolean();
|
||||
buffer.getBoolean();
|
||||
appearanceList = buffer.getSwgList(6, 33, Equipment.class);
|
||||
buffer.getLong();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user