@Override public void sendBaselines(Client destination) { if (destination == null || destination.getSession() == null) { System.out.println("NULL session"); return; } destination.getSession().write(messageBuilder.buildBaseline3()); destination.getSession().write(messageBuilder.buildBaseline6()); if (destination == getClient()) { destination.getSession().write(messageBuilder.buildBaseline1()); destination.getSession().write(messageBuilder.buildBaseline4()); } // destination.getSession().write(messageBuilder.buildBaseline8()); // destination.getSession().write(messageBuilder.buildBaseline9()); if (destination != getClient()) { UpdatePVPStatusMessage upvpm = new UpdatePVPStatusMessage( getObjectID(), NGECore.getInstance() .factionService .calculatePvpStatus((CreatureObject) destination.getParent(), this), getFaction()); destination.getSession().write(upvpm.serialize()); UpdatePostureMessage upm = new UpdatePostureMessage(getObjectID(), getPosture()); destination.getSession().write(upm.serialize()); } }
public void setHealth(int health) { synchronized (objectMutex) { if (getPosture() == 13) { if (health > maxHealth) health = maxHealth; stopIncapTask(); setIncapTask(null); this.health = health; notifyObservers(messageBuilder.buildUpdateHAMListDelta(), true); setPosture((byte) 0); setTurnRadius(1); setSpeedMultiplierBase(1); return; } } IoBuffer delta; synchronized (objectMutex) { if (this.health == health) return; if (health > maxHealth) { setHealth(maxHealth); return; } setHamListCounter(getHamListCounter() + 1); delta = messageBuilder.buildHealthDelta(health); this.health = health; } notifyObservers(delta, true); }
public void setInStealth(boolean inStealth) { synchronized (objectMutex) { this.inStealth = inStealth; } if (getClient() != null && getClient().getSession() != null) { getClient().getSession().write(messageBuilder.buildStealthFlagDelta(inStealth)); } notifyObservers(messageBuilder.buildStealthFlagDelta(inStealth), false); }
public void removeObjectFromEquipList(SWGObject object) { if (object instanceof TangibleObject && equipmentList.contains(object)) { setEquipmentListUpdateCounter(getEquipmentListUpdateCounter() + 1); notifyObservers(messageBuilder.buildRemoveEquipmentDelta((TangibleObject) object), true); equipmentList.get().remove(object); } }
public void addObjectToEquipList(SWGObject object) { if (object instanceof TangibleObject) { equipmentList.get().add(object); setEquipmentListUpdateCounter(getEquipmentListUpdateCounter() + 1); notifyObservers(messageBuilder.buildAddEquipmentDelta((TangibleObject) object), true); } }
public void removeBuff(Buff buff) { synchronized (objectMutex) { buffList.get().remove(buff); setBuffListCounter(getBuffListCounter() + 1); } notifyObservers(messageBuilder.buildRemoveBuffDelta(buff), true); }
public void setIntendedTarget(long intendedTarget) { synchronized (objectMutex) { this.targetId = intendedTarget; } notifyObservers(messageBuilder.buildIntendedTargetDelta(intendedTarget), true); }
public void setDifficulty(byte difficulty) { synchronized (objectMutex) { this.difficulty = difficulty; } notifyObservers(messageBuilder.buildDifficultyDelta(difficulty), true); }
public void setMoodAnimation(String moodAnimation) { synchronized (objectMutex) { this.moodAnimation = moodAnimation; } IoBuffer moodAnimationDelta = messageBuilder.buildMoodAnimationDelta(moodAnimation); notifyObservers(moodAnimationDelta, true); }
public void setStationary(boolean stationary) { synchronized (objectMutex) { this.stationary = stationary; } notifyObservers(messageBuilder.buildStartPerformance(stationary), true); }
public void setLookAtTarget(long lookAtTarget) { synchronized (objectMutex) { this.lookAtTarget = lookAtTarget; } notifyObservers(messageBuilder.buildLookAtTargetDelta(lookAtTarget), true); }
public void updateBuff(Buff buff) { buff.updateRemovalTask(); synchronized (objectMutex) { setBuffListCounter(getBuffListCounter() + 1); notifyObservers(messageBuilder.buildUpdateBuffDelta(buff), true); } }
public void setGrantedHealth(int grantedHealth) { synchronized (objectMutex) { this.grantedHealth = grantedHealth; } notifyObservers(messageBuilder.buildGrantedHealthDelta(grantedHealth), true); }
public void setCashCredits(int cashCredits) { synchronized (objectMutex) { this.cashCredits = cashCredits; } if (getClient() != null && getClient().getSession() != null) { getClient().getSession().write(messageBuilder.buildCashCreditsDelta(cashCredits)); } }
public void setBankCredits(int bankCredits) { synchronized (objectMutex) { this.bankCredits = bankCredits; } if (getClient() != null && getClient().getSession() != null) { getClient().getSession().write(messageBuilder.buildBankCreditsDelta(bankCredits)); } }
public void setPerformanceId(int performanceId, boolean isDance) { synchronized (objectMutex) { this.performanceId = performanceId; } getClient() .getSession() .write(messageBuilder.buildPerformanceId((isDance) ? 0 : performanceId)); }
public void addBuff(Buff buff) { synchronized (objectMutex) { buffList.get().add(buff); setBuffListCounter(getBuffListCounter() + 1); } buff.setStartTime(); notifyObservers(messageBuilder.buildAddBuffDelta(buff), true); }
public void addCashCredits(int amountToAdd) { synchronized (objectMutex) { this.cashCredits += amountToAdd; } if (getClient() != null && getClient().getSession() != null) { getClient().getSession().write(messageBuilder.buildCashCreditsDelta(cashCredits)); } }
public void setCombatFlag(byte combatFlag) { synchronized (objectMutex) { this.combatFlag = combatFlag; } IoBuffer combatDelta = messageBuilder.buildCombatFlagDelta(combatFlag); notifyObservers(combatDelta, true); }
public void setTurnRadius(float turnRadius) { synchronized (objectMutex) { this.turnRadius = turnRadius; } IoBuffer turnDelta = messageBuilder.buildTurnRadiusDelta(turnRadius); notifyObservers(turnDelta, true); }
public void setSpeedMultiplierMod(float speedMultiplierMod) { synchronized (objectMutex) { this.speedMultiplierMod = speedMultiplierMod; } IoBuffer speedDelta = messageBuilder.buildSpeedModDelta(speedMultiplierMod); notifyObservers(speedDelta, true); }
@Override public void setFaction(String faction) { synchronized (objectMutex) { this.faction = faction; } notifyObservers(messageBuilder.buildFactionDelta(faction), true); // updatePvpStatus(); }
public void setPerformanceListenee(CreatureObject performanceListenee) { synchronized (objectMutex) { this.performanceListenee = performanceListenee; } if (getClient() != null) getClient() .getSession() .write(messageBuilder.buildListenToId(performanceListenee.getObjectId())); }
public void setGroupId(long groupId) { synchronized (objectMutex) { this.groupId = groupId; } IoBuffer groupIdDelta = messageBuilder.buildGroupIdDelta(groupId); notifyObservers(groupIdDelta, true); }
public void setWeaponId(long weaponId) { synchronized (objectMutex) { this.weaponId = weaponId; } IoBuffer weaponIdDelta = messageBuilder.buildWeaponIdDelta(weaponId); notifyObservers(weaponIdDelta, true); }
@Override public void setFactionStatus(int factionStatus) { synchronized (objectMutex) { this.factionStatus = factionStatus; } notifyObservers(messageBuilder.buildFactionStatusDelta(factionStatus), true); // updatePvpStatus(); }
public void setHeight(float height) { synchronized (objectMutex) { this.height = height; } IoBuffer heightDelta = messageBuilder.buildHeightDelta(height); notifyObservers(heightDelta, true); }
public void setLevel(short level) { synchronized (objectMutex) { this.level = level; } IoBuffer levelDelta = messageBuilder.buildLevelDelta(level); notifyObservers(levelDelta, true); }
public void setStateBitmask(long stateBitmask) { synchronized (objectMutex) { this.stateBitmask = stateBitmask; } IoBuffer stateDelta = messageBuilder.buildStateDelta(stateBitmask); notifyObservers(stateDelta, true); }
public void setOwnerId(long ownerId) { synchronized (objectMutex) { this.ownerId = ownerId; } setStringAttribute( "owner", NGECore.getInstance().objectService.getObject(ownerId).getCustomName()); notifyObservers(messageBuilder.buildOwnerIdDelta(ownerId), true); }