Added proffessionWheelPosition delta, changed walkspeed, added skillmods

This commit is contained in:
Waverunner
2014-03-08 18:10:27 -05:00
parent b0172a87d6
commit b08b7eaae7
4 changed files with 23 additions and 2 deletions
@@ -90,8 +90,8 @@ public class CreatureObject extends TangibleObject implements IPersistent {
private float slopeModAngle = 1;
private float slopeModPercent = 1;
private float turnRadius = 1;
private float walkSpeed = (float) 2.75;
private float waterModPercent = 1;
private float walkSpeed = (float) 1.549;
private float waterModPercent = (float) 0.75;
private SWGList<String> abilities;
private int abilitiesUpdateCounter = 0;
@@ -382,6 +382,18 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder {
return result.flip();
}
public IoBuffer buildProfessionWheelPositionDelta(String professionWheelPosition) {
IoBuffer buffer = bufferPool.allocate(2 + professionWheelPosition.length(), false).order(ByteOrder.LITTLE_ENDIAN);
buffer.put(getAsciiString(professionWheelPosition));
int size = buffer.position();
buffer.flip();
buffer = createDelta("PLAY", (byte) 8, (short) 1, (short) 8, buffer, size + 4);
return buffer;
}
public IoBuffer buildWaypointAddDelta(WaypointObject waypoint) {
PlayerObject player = (PlayerObject) object;
@@ -343,6 +343,9 @@ public class PlayerObject extends IntangibleObject {
synchronized(objectMutex) {
this.professionWheelPosition = professionWheelPosition;
}
if (getContainer() != null && getContainer().getClient() != null && getContainer().getClient().getSession() != null) {
getContainer().getClient().getSession().write(messageBuilder.buildProfessionWheelPositionDelta(professionWheelPosition));
}
}
public int getExperimentationFlag() {
+6
View File
@@ -259,6 +259,12 @@ public class CharacterService implements INetworkDispatch {
if (stamina >= 1) core.skillModService.addSkillMod(object, "stamina", (int) stamina);
if (agility >= 1) core.skillModService.addSkillMod(object, "agility", (int) agility);
core.skillModService.addSkillMod(object, "language_basic_comprehend", 100);
core.skillModService.addSkillMod(object, "language_basic_speak", 100);
core.skillModService.addSkillMod(object, "creature_harvesting", 25);
core.skillModService.addSkillMod(object, "language_wookiee_comprehend", 100);
object.createTransaction(core.getCreatureODB().getEnvironment());
PlayerObject player = (PlayerObject) core.objectService.createObject("object/player/shared_player.iff", object.getPlanet());