mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-28 13:12:54 -04:00
ShowFlyText has customText (ie. for ent ticks)
This commit is contained in:
@@ -38,11 +38,12 @@ public class ShowFlyText extends ObjControllerObject {
|
||||
private int unknownInt2;
|
||||
private String stfFile;
|
||||
private String stfString;
|
||||
private short unknownShort2;
|
||||
private short xp;
|
||||
private float scale;
|
||||
private RGB color;
|
||||
private int displayType;
|
||||
private boolean alternativeStructure;
|
||||
private String customText;
|
||||
|
||||
public ShowFlyText(long recieverId, long objectId, String stfFile, String stfString, float scale, RGB color, int displayType) {
|
||||
this.recieverId = recieverId;
|
||||
@@ -55,7 +56,7 @@ public class ShowFlyText extends ObjControllerObject {
|
||||
this.alternativeStructure = false;
|
||||
}
|
||||
|
||||
public ShowFlyText(long recieverId, long objectId, int unknownInt1, int unknownShort1, int unknownByte1, int unknownInt2, String stfFile, String stfString, int unknownShort2, float scale, RGB color, int displayType) {
|
||||
public ShowFlyText(long recieverId, long objectId, int unknownInt1, int unknownShort1, int unknownByte1, int unknownInt2, String stfFile, String stfString, String customText, int xp, float scale, RGB color, int displayType) {
|
||||
this.recieverId = recieverId;
|
||||
this.objectId = objectId;
|
||||
this.unknownInt1 = unknownInt1;
|
||||
@@ -64,7 +65,8 @@ public class ShowFlyText extends ObjControllerObject {
|
||||
this.unknownInt2 = unknownInt2;
|
||||
this.stfFile = stfFile;
|
||||
this.stfString = stfString;
|
||||
this.unknownShort2 = (short) unknownShort2;
|
||||
this.customText = customText;
|
||||
this.xp = (short) xp;
|
||||
this.scale = scale;
|
||||
this.color = color;
|
||||
this.alternativeStructure = true;
|
||||
@@ -115,8 +117,8 @@ public class ShowFlyText extends ObjControllerObject {
|
||||
result.putLong(0);
|
||||
result.putLong(0);
|
||||
result.putLong(0);
|
||||
result.putInt(0);
|
||||
result.putShort((short) unknownShort2);
|
||||
result.put(getUnicodeString(customText));
|
||||
result.putShort(xp);
|
||||
result.putLong(0);
|
||||
result.putFloat(scale);
|
||||
result.put(color.getBytes());
|
||||
|
||||
@@ -59,7 +59,7 @@ public class TangibleObject extends SWGObject {
|
||||
protected int optionsBitmask = 0;
|
||||
private int maxDamage = 0;
|
||||
private boolean staticObject = false;
|
||||
protected String faction = "";
|
||||
protected String faction = "neutral"; // Says you're "Imperial Special Forces" if it's 0 for some reason
|
||||
@NotPersistent
|
||||
private Vector<TangibleObject> defendersList = new Vector<TangibleObject>(); // unused in packets but useful for the server
|
||||
@NotPersistent
|
||||
@@ -123,7 +123,7 @@ public class TangibleObject extends SWGObject {
|
||||
public void setOptionsBitmask(int optionsBitmask) {
|
||||
this.optionsBitmask = optionsBitmask;
|
||||
}
|
||||
|
||||
|
||||
public int getMaxDamage() {
|
||||
return maxDamage;
|
||||
}
|
||||
@@ -245,15 +245,15 @@ public class TangibleObject extends SWGObject {
|
||||
}
|
||||
}
|
||||
|
||||
public void showFlyText(String stfFile, String stfString, int xp, float scale, RGB color, int displayType) {
|
||||
public void showFlyText(String stfFile, String stfString, String customText, int xp, float scale, RGB color, int displayType) {
|
||||
Set<Client> observers = getObservers();
|
||||
|
||||
if (getClient() != null) {
|
||||
getClient().getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(getObjectID(), getObjectID(), 56, 1, 1, -1, stfFile, stfString, xp, scale, color, displayType))).serialize());
|
||||
getClient().getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(getObjectID(), getObjectID(), 56, 1, 1, -1, stfFile, stfString, customText, xp, scale, color, displayType))).serialize());
|
||||
}
|
||||
|
||||
for (Client client : observers) {
|
||||
client.getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(client.getParent().getObjectID(), getObjectID(), 56, 1, 1, -1, stfFile, stfString, xp, scale, color, displayType))).serialize());
|
||||
client.getSession().write((new ObjControllerMessage(0x0000000B, new ShowFlyText(client.getParent().getObjectID(), getObjectID(), 56, 1, 1, -1, stfFile, stfString, customText, xp, scale, color, displayType))).serialize());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -330,8 +330,7 @@ public class PlayerService implements INetworkDispatch {
|
||||
|
||||
// 1. Add the experience.
|
||||
if (experience > 0) {
|
||||
creature.showFlyText("base_player", "prose_flytext_xp", experience, (float) 2.5, new RGB(180, 60, 240), 1);
|
||||
//creature.showFlyText("base_player", "prose_flytext_xp", "", experience, (float) 2.5, new RGB(180, 60, 240), 1);
|
||||
creature.showFlyText("base_player", "prose_flytext_xp", "", experience, (float) 2.5, new RGB(180, 60, 240), 1);
|
||||
}
|
||||
|
||||
String xpType = ((player.getProfession().contains("entertainer")) ? "entertainer" : ((player.getProfession().contains("trader")) ? "crafting" : "combat_general"));
|
||||
|
||||
Reference in New Issue
Block a user