mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-20 10:02:56 -04:00
Baseline changes, cleaned some things
This commit is contained in:
@@ -50,13 +50,11 @@ import main.NGECore;
|
||||
import engine.clients.Client;
|
||||
import resources.buffs.Buff;
|
||||
import resources.buffs.DamageOverTime;
|
||||
import resources.common.Cooldown;
|
||||
import resources.common.OutOfBand;
|
||||
import resources.objects.ObjectMessageBuilder;
|
||||
import resources.objects.SWGList;
|
||||
import resources.objects.SWGMap;
|
||||
import engine.resources.common.CRC;
|
||||
import engine.resources.objects.MissionCriticalObject;
|
||||
import engine.resources.objects.SWGObject;
|
||||
import engine.resources.scene.Planet;
|
||||
import engine.resources.scene.Point3D;
|
||||
@@ -101,7 +99,7 @@ public class CreatureObject extends TangibleObject implements Serializable {
|
||||
private int abilitiesUpdateCounter = 0;
|
||||
private int xpBarValue = 0;
|
||||
|
||||
private SWGList<MissionCriticalObject> missionCriticalObjects;
|
||||
private SWGMap<Long, Long> missionCriticalObjects;
|
||||
@NotPersistent
|
||||
private transient int missionCriticalObjectsUpdateCounter = 0;
|
||||
|
||||
@@ -193,12 +191,12 @@ public class CreatureObject extends TangibleObject implements Serializable {
|
||||
messageBuilder = new CreatureMessageBuilder(this);
|
||||
loadTemplateData();
|
||||
skills = new ArrayList<String>();
|
||||
skillMods = new SWGMap<String, SkillMod>(getObjectID(), 4, 3);
|
||||
abilities = new SWGList<String>(getObjectID(), 4, 14);
|
||||
missionCriticalObjects = new SWGList<MissionCriticalObject>(getObjectID(), 4, 13);
|
||||
equipmentList = new SWGList<Long>(getObjectID(), 6, 0x17);
|
||||
buffList = new SWGList<Buff>(getObjectID(), 6, 0x1A);
|
||||
appearanceEquipmentList = new SWGList<Long>(getObjectID(), 6, 0x1F);
|
||||
skillMods = new SWGMap<String, SkillMod>(this, 4, 3, true);
|
||||
abilities = new SWGList<String>(this, 4, 14, true);
|
||||
missionCriticalObjects = new SWGMap<Long, Long>(this, 4, 13, false);
|
||||
equipmentList = new SWGList<Long>(this, 6, 23, false);
|
||||
buffList = new SWGList<Buff>(this, 6, 26, false);
|
||||
appearanceEquipmentList = new SWGList<Long>(this, 6, 31, false);
|
||||
}
|
||||
|
||||
public CreatureObject() {
|
||||
@@ -810,12 +808,11 @@ public class CreatureObject extends TangibleObject implements Serializable {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public SWGList<MissionCriticalObject> getMissionCriticalObjects() {
|
||||
|
||||
public SWGMap<Long, Long> getMissionCriticalObjects() {
|
||||
return missionCriticalObjects;
|
||||
}
|
||||
|
||||
|
||||
public byte getCombatFlag() {
|
||||
synchronized(objectMutex) {
|
||||
return combatFlag;
|
||||
@@ -1490,7 +1487,7 @@ public class CreatureObject extends TangibleObject implements Serializable {
|
||||
}
|
||||
|
||||
public void playMusic(String sndFile, long targetId, int repetitions, boolean flag) {
|
||||
getClient().getSession().write(new PlayMusicMessage(sndFile, targetId, 1, false));
|
||||
getClient().getSession().write(new PlayMusicMessage(sndFile, targetId, 1, false).serialize());
|
||||
}
|
||||
|
||||
public boolean getGroupDance() {
|
||||
@@ -1801,10 +1798,6 @@ public class CreatureObject extends TangibleObject implements Serializable {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Cooldown getCooldown(String cooldownGroup) {
|
||||
return new Cooldown(getRemainingCooldown(cooldownGroup));
|
||||
}
|
||||
|
||||
public long getRemainingCooldown(String cooldownGroup) {
|
||||
if (cooldowns.containsKey(cooldownGroup)) {
|
||||
if (System.currentTimeMillis() < cooldowns.get(cooldownGroup)) {
|
||||
@@ -1846,12 +1839,34 @@ public class CreatureObject extends TangibleObject implements Serializable {
|
||||
return adder.intValue();
|
||||
}
|
||||
|
||||
//public float getCooldown(String cooldownGroup) {
|
||||
//return ((float) getCooldown(cooldownGroup) / (float) 1000);
|
||||
//}
|
||||
|
||||
public ObjectMessageBuilder getMessageBuilder() {
|
||||
return messageBuilder;
|
||||
}
|
||||
|
||||
public void sendListDelta(byte viewType, short updateType, IoBuffer buffer) {
|
||||
switch (viewType) {
|
||||
case 4: {
|
||||
switch (updateType) {
|
||||
case 3: {
|
||||
buffer = messageBuilder.createDelta("CREO", (byte) 4, (short) 1, (byte) 3, buffer, buffer.array().length + 4);
|
||||
|
||||
if (getClient() != null && getClient().getSession() != null) {
|
||||
getClient().getSession().write(buffer);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
case 3:
|
||||
case 6:
|
||||
case 8:
|
||||
case 9:
|
||||
default: {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user