From aea5f3a4b876d2e463cdbaa098d4bb8d5b5dfa06 Mon Sep 17 00:00:00 2001 From: Waverunner Date: Tue, 17 Dec 2013 19:00:24 -0500 Subject: [PATCH 01/35] Fixed list update issues with friend and ignore list, /findfriend now destroys existing wp's, fixed string bug on updating wps --- scripts/commands/addfriend.py | 7 +- scripts/commands/addignore.py | 9 + scripts/commands/findfriend.py | 29 ++- scripts/commands/getfriendlist.py | 6 +- scripts/commands/lfg.py | 1 - scripts/commands/waypoint.py | 9 +- src/protocol/swg/ChatFriendsListUpdate.java | 8 +- src/protocol/swg/ChatOnGetFriendsList.java | 5 +- .../objects/player/PlayerMessageBuilder.java | 80 +++++---- .../objects/player/PlayerObject.java | 8 +- src/services/CharacterService.java | 29 +++ src/services/chat/ChatService.java | 166 ++++++++---------- src/services/object/ObjectService.java | 18 +- 13 files changed, 218 insertions(+), 157 deletions(-) diff --git a/scripts/commands/addfriend.py b/scripts/commands/addfriend.py index d839b59b..c612261d 100644 --- a/scripts/commands/addfriend.py +++ b/scripts/commands/addfriend.py @@ -5,7 +5,12 @@ def setup(): def run(core, actor, target, commandString): actorGhost = actor.getSlottedObject("ghost") + chatSrvc = core.chatService if chatSrvc and actorGhost and commandString: - chatSrvc.addFriend(actorGhost, commandString, 1) + if actorGhost.getFriendList().contains(commandString.split(" ")[0].lower()): + actor.sendSystemMessage(commandString.split(" ")[0].lower() + ' is already in your friend list.', 0) + return + else: + chatSrvc.addFriend(actorGhost, commandString) return \ No newline at end of file diff --git a/scripts/commands/addignore.py b/scripts/commands/addignore.py index d8da29a8..04b1ca6b 100644 --- a/scripts/commands/addignore.py +++ b/scripts/commands/addignore.py @@ -6,5 +6,14 @@ def setup(): def run(core, actor, target, commandString): actorGhost = actor.getSlottedObject("ghost") chatSrvc = core.chatService + + if not actorGhost and chatSrvc and commandString: + return + + if actorGhost.getIgnoreList().contains(commandString.split(" ")[0].lower()): + actor.sendSystemMessage(commandString.split(' ')[0].lower() + ' is already in your ignore list.', 0) + return + chatSrvc.addToIgnoreList(actor, commandString) + return \ No newline at end of file diff --git a/scripts/commands/findfriend.py b/scripts/commands/findfriend.py index 992efa35..c6f528ac 100644 --- a/scripts/commands/findfriend.py +++ b/scripts/commands/findfriend.py @@ -1,3 +1,5 @@ +from resources.objects.waypoint import WaypointObject +from engine.resources.common import CRC import sys def setup(): @@ -11,8 +13,29 @@ def run(core, actor, target, commandString): friendObj = core.chatService.getObjectByFirstName(friend) if friendObj is not None: if friendObj.getSlottedObject('ghost').getFriendList().contains(actor.getCustomName().lower().split(' ')[0]): - fPos = friendObj.getPosition() - core.commandService.callCommand(actor, 'waypoint', None, friendObj.getPlanet().name + ' ' + str(fPos.x) + ' ' + str(fPos.z) + ' ' + str(fPos.y) + ' blue ' + friendObj.getCustomName()) + createWaypoint(core, actor, friendObj) return return - return \ No newline at end of file + return + + +def createWaypoint(core, actor, friendObj): + ghost = actor.getSlottedObject('ghost') + friendName = friendObj.getCustomName().split(' ')[0] + wp = WaypointObject() + + for wp in ghost.getWaypoints(): + if wp.getName() == friendName and wp.getPlanet() == friendObj.getPlanet(): + core.commandService.callCommand(actor, 'serverdestroyobject', wp, '') + break + + waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', friendObj.getPlanet(), friendObj.getWorldPosition().x, friendObj.getWorldPosition().z, friendObj.getWorldPosition().y) + waypoint.setName(friendName) + waypoint.setActive(True) + waypoint.setColor(WaypointObject.YELLOW) + waypoint.setName(friendName) + waypoint.setPlanetCRC(CRC.StringtoCRC(friendObj.getPlanet().name)) + waypoint.setStringAttribute('', '') + ghost.waypointAdd(waypoint) + actor.sendSystemMessage('A waypoint has been created in your datapad at the location.', 0) + return diff --git a/scripts/commands/getfriendlist.py b/scripts/commands/getfriendlist.py index 0a478a48..5826dfac 100644 --- a/scripts/commands/getfriendlist.py +++ b/scripts/commands/getfriendlist.py @@ -5,7 +5,7 @@ def setup(): return def run(core, actor, target, commandString): - ghost = actor.getSlottedObject('ghost') - friendsListMessage = ChatOnGetFriendsList(ghost) - actor.getClient().getSession().write(friendsListMessage.serialize()) + #ghost = actor.getSlottedObject('ghost') + #friendsListMessage = ChatOnGetFriendsList(ghost) + #actor.getClient().getSession().write(friendsListMessage.serialize()) return \ No newline at end of file diff --git a/scripts/commands/lfg.py b/scripts/commands/lfg.py index 3477098f..dc0033c5 100644 --- a/scripts/commands/lfg.py +++ b/scripts/commands/lfg.py @@ -6,6 +6,5 @@ def setup(): def run(core, actor, target, commandString): ghost = actor.getSlottedObject('ghost') - print ('Command recieved!') ghost.toggleFlag(PlayerFlags.LFG) return \ No newline at end of file diff --git a/scripts/commands/waypoint.py b/scripts/commands/waypoint.py index e0d3827c..b646ff14 100644 --- a/scripts/commands/waypoint.py +++ b/scripts/commands/waypoint.py @@ -22,7 +22,7 @@ def run(core, actor, target, commandString): planet = core.terrainService.getPlanetByName(commandArgs[0]) waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', planet, float(commandArgs[1]), float(commandArgs[2]), float(commandArgs[3])) waypoint.setActive(True) - waypoint.setColor(colorCheck(core, actor, target, commandString, commandArgs[4])) + waypoint.setColor(colorCheck(commandArgs[4])) name = commandString.split(" ", 5) waypoint.setName(name[5]) waypoint.setPlanetCRC(crc.StringtoCRC(planet.getName())) @@ -89,7 +89,10 @@ def run(core, actor, target, commandString): waypoint = core.objectService.createObject('object/waypoint/shared_waypoint.iff', actor.getPlanet(), actor.getWorldPosition().x, actor.getWorldPosition().z, actor.getWorldPosition().y) waypoint.setActive(True) waypoint.setColor(WaypointObject.BLUE) - waypoint.setName(commandString) + if commandString == '': + waypoint.setName(actor.getPlanet().name.capitalize()) + else: + waypoint.setName(commandString) waypoint.setPlanetCRC(crc.StringtoCRC(actor.getPlanet().getName())) waypoint.setStringAttribute('', '') # This simply allows the attributes to display (nothing else has to be done) actorPlayer.waypointAdd(waypoint) @@ -98,7 +101,7 @@ def run(core, actor, target, commandString): return -def colorCheck(core, actor, target, commandString, validcolors): +def colorCheck(validcolors): if validcolors == "blue": return WaypointObject.BLUE if validcolors == "green": diff --git a/src/protocol/swg/ChatFriendsListUpdate.java b/src/protocol/swg/ChatFriendsListUpdate.java index b804c17b..bd6debb0 100644 --- a/src/protocol/swg/ChatFriendsListUpdate.java +++ b/src/protocol/swg/ChatFriendsListUpdate.java @@ -29,12 +29,8 @@ public class ChatFriendsListUpdate extends SWGMessage { @Override public IoBuffer serialize() { - Config config = new Config(); - config.setFilePath("nge.cfg"); - if (!(config.loadConfigFile())) { - config = DefaultConfig.getConfig(); - } - String serverName = config.getString("GALAXY_NAME"); + + String serverName = NGECore.getInstance().getConfig().getString("GALAXY_NAME"); IoBuffer result = IoBuffer.allocate(50 + friendName.length()).order(ByteOrder.LITTLE_ENDIAN); result.putShort((short) 3); diff --git a/src/protocol/swg/ChatOnGetFriendsList.java b/src/protocol/swg/ChatOnGetFriendsList.java index ae0d52df..3e497bf1 100644 --- a/src/protocol/swg/ChatOnGetFriendsList.java +++ b/src/protocol/swg/ChatOnGetFriendsList.java @@ -9,6 +9,7 @@ import org.apache.mina.core.buffer.IoBuffer; import resources.objects.player.PlayerObject; +// This is possibly unused public class ChatOnGetFriendsList extends SWGMessage { private List friendList; @@ -24,8 +25,7 @@ public class ChatOnGetFriendsList extends SWGMessage { } @Override public void deserialize(IoBuffer data) { - // XXX Auto-generated method stub - + } @Override @@ -51,7 +51,6 @@ public class ChatOnGetFriendsList extends SWGMessage { int size = buffer.position(); buffer = IoBuffer.allocate(size).put(buffer.array(), 0, size); buffer.flip(); - //System.out.println("ChatOnGetFriendsList: " + buffer.getHexDump()); return buffer; } diff --git a/src/resources/objects/player/PlayerMessageBuilder.java b/src/resources/objects/player/PlayerMessageBuilder.java index e727df21..86ab67d3 100644 --- a/src/resources/objects/player/PlayerMessageBuilder.java +++ b/src/resources/objects/player/PlayerMessageBuilder.java @@ -22,12 +22,12 @@ package resources.objects.player; import java.nio.ByteOrder; +import java.util.List; import java.util.Map.Entry; import org.apache.mina.core.buffer.IoBuffer; import engine.resources.common.CRC; - import resources.objects.ObjectMessageBuilder; import resources.objects.waypoint.WaypointObject; @@ -251,7 +251,7 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { if(player.getFriendList().isEmpty()) { buffer.putInt(0); - buffer.putInt(0); + buffer.putInt(0); } else { buffer.putInt(player.getFriendList().size()); buffer.putInt(player.getFriendListUpdateCounter()); @@ -261,7 +261,6 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { for(String friend : player.getFriendList()) { buffer.put(getAsciiString(friend)); } - } } @@ -515,60 +514,70 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { } - public IoBuffer buildFriendAddDelta(String friend) { + public IoBuffer buildFriendAddDelta(List friends) { + + IoBuffer buffer = bufferPool.allocate(13 + (friends.size() * 2), false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); - IoBuffer buffer = bufferPool.allocate(13 + friend.length(), false).order(ByteOrder.LITTLE_ENDIAN); PlayerObject player = (PlayerObject) object; buffer.putInt(1); buffer.putInt(player.getFriendListUpdateCounter()); - buffer.put((byte) 1); // updateType (SubType) + buffer.put((byte) 3); // updateType (SubType) - buffer.putShort((short) player.getFriendList().indexOf(friend)); - buffer.put(getAsciiString(friend)); + buffer.putShort((short) (player.getFriendList().size())); + for (String f : friends) { + buffer.put(getAsciiString(f)); + } int size = buffer.position(); buffer.flip(); buffer = createDelta("PLAY", (byte) 9, (short) 1, (short) 7, buffer, size + 4); - - return buffer; - - } - - public IoBuffer buildFriendRemoveDelta(String friend) { - - IoBuffer buffer = bufferPool.allocate(11, false).order(ByteOrder.LITTLE_ENDIAN); - PlayerObject player = (PlayerObject) object; - - buffer.putInt(1); - buffer.putInt(player.getFriendListUpdateCounter()); - buffer.put((byte) 0); // updateType (SubType) + return buffer; - buffer.putShort((short) player.getFriendList().indexOf(friend)); + } + + public IoBuffer buildFriendRemoveDelta(List friends) { + + IoBuffer buffer = bufferPool.allocate(13 + (friends.size() * 2), false).order(ByteOrder.LITTLE_ENDIAN); + PlayerObject player = (PlayerObject) object; + + buffer.putInt(1); + buffer.putInt(player.getFriendListUpdateCounter()); + + buffer.put((byte) 3); // updateType (SubType) + + buffer.putShort((short) friends.size()); + for (String f : friends) { + buffer.put(getAsciiString(f)); + } int size = buffer.position(); buffer.flip(); buffer = createDelta("PLAY", (byte) 9, (short) 1, (short) 7, buffer, size + 4); - + return buffer; - } + - public IoBuffer buildIgnoreAddDelta(String ignoreName) { - IoBuffer buffer = bufferPool.allocate(30, false).order(ByteOrder.LITTLE_ENDIAN); + public IoBuffer buildIgnoreAddDelta(List ignoreList) { + IoBuffer buffer = bufferPool.allocate(13 + (ignoreList.size() * 2) , false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); PlayerObject player = (PlayerObject) object; buffer.putInt(1); buffer.putInt(player.getIgnoreListUpdateCounter()); - buffer.put((byte) 1); // updateType (SubType) + buffer.put((byte) 3); // updateType (SubType) - buffer.putShort((short) player.getIgnoreList().indexOf(ignoreName)); - buffer.put(getAsciiString(ignoreName)); + buffer.putShort((short) ignoreList.size()); + for (String ignore : ignoreList) { + buffer.put(getAsciiString(ignore)); + } int size = buffer.position(); buffer.flip(); @@ -578,15 +587,20 @@ public class PlayerMessageBuilder extends ObjectMessageBuilder { return buffer; } - public IoBuffer buildIgnoreRemoveDelta(String removeName) { - IoBuffer buffer = bufferPool.allocate(30, false).order(ByteOrder.LITTLE_ENDIAN); + public IoBuffer buildIgnoreRemoveDelta(List ignoreList) { + IoBuffer buffer = bufferPool.allocate(13 + (ignoreList.size() * 2) , false).order(ByteOrder.LITTLE_ENDIAN); + buffer.setAutoExpand(true); PlayerObject player = (PlayerObject) object; buffer.putInt(1); buffer.putInt(player.getIgnoreListUpdateCounter()); - buffer.put((byte) 0); - buffer.putShort((short) player.getIgnoreList().indexOf(removeName)); + buffer.put((byte) 3); // updateType (SubType) + + buffer.putShort((short) ignoreList.size()); + for (String ignore : ignoreList) { + buffer.put(getAsciiString(ignore)); + } int size = buffer.position(); buffer.flip(); diff --git a/src/resources/objects/player/PlayerObject.java b/src/resources/objects/player/PlayerObject.java index f2b86ce9..7b493463 100644 --- a/src/resources/objects/player/PlayerObject.java +++ b/src/resources/objects/player/PlayerObject.java @@ -427,7 +427,7 @@ public class PlayerObject extends IntangibleObject { synchronized(objectMutex) { setFriendListUpdateCounter(getFriendListUpdateCounter() + 1); friendList.add(friend); - getContainer().getClient().getSession().write(messageBuilder.buildFriendAddDelta(friend)); + getContainer().getClient().getSession().write(messageBuilder.buildFriendAddDelta(getFriendList())); } } @@ -435,7 +435,7 @@ public class PlayerObject extends IntangibleObject { synchronized(objectMutex) { setFriendListUpdateCounter(getFriendListUpdateCounter() + 1); friendList.remove(friend); - getContainer().getClient().getSession().write(messageBuilder.buildFriendRemoveDelta(friend)); + getContainer().getClient().getSession().write(messageBuilder.buildFriendRemoveDelta(getFriendList())); } } @@ -452,16 +452,16 @@ public class PlayerObject extends IntangibleObject { public void ignoreAdd(String ignoreName) { synchronized(objectMutex) { setIgnoreListUpdateCounter(getIgnoreListUpdateCounter() + 1); - getContainer().getClient().getSession().write(messageBuilder.buildIgnoreAddDelta(ignoreName)); ignoreList.add(ignoreName); + getContainer().getClient().getSession().write(messageBuilder.buildIgnoreAddDelta(getIgnoreList())); } } public void ignoreRemove(String removeName) { synchronized(objectMutex) { setIgnoreListUpdateCounter(getIgnoreListUpdateCounter() + 1); - getContainer().getClient().getSession().write(messageBuilder.buildIgnoreRemoveDelta(removeName)); ignoreList.remove(removeName); + getContainer().getClient().getSession().write(messageBuilder.buildIgnoreRemoveDelta(getIgnoreList())); } } diff --git a/src/services/CharacterService.java b/src/services/CharacterService.java index c9fc5897..75f8e663 100644 --- a/src/services/CharacterService.java +++ b/src/services/CharacterService.java @@ -461,5 +461,34 @@ public class CharacterService implements INetworkDispatch { } return characters; } + + /** + * Checks the database for if the name of the player exists. The name is + * formated automatically in the method for checking the database, so no conversion is required. + * @param name Name to check for in the database + * @return Returns True if the player exists + */ + public boolean playerExists(String name) { + if (!name.equals("")) { + if (name.contains(" ")) { + name = name.split(" ")[0]; + } + name = name.replace("'", "''"); + name = name.toLowerCase(); + try { + PreparedStatement ps = databaseConnection.preparedStatement("SELECT id FROM characters WHERE LOWER(\"firstName\")=?"); + ps.setString(1, name); + ResultSet resultSet = ps.executeQuery(); + + boolean isDuplicate = resultSet.next(); + resultSet.getStatement().close(); + if (isDuplicate) { return true; } + else { return false; } + } + + catch (SQLException e) { e.printStackTrace(); } + } + return false; + } } diff --git a/src/services/chat/ChatService.java b/src/services/chat/ChatService.java index fd941cd3..0a68ab4c 100644 --- a/src/services/chat/ChatService.java +++ b/src/services/chat/ChatService.java @@ -339,8 +339,7 @@ public class ChatService implements INetworkDispatch { ConcurrentHashMap clients = core.getActiveConnectionsMap(); for(Client client : clients.values()) { - - + if(client.getParent() == null) continue; @@ -360,128 +359,113 @@ public class ChatService implements INetworkDispatch { } public void removeFriend(PlayerObject actor, String friendName) { + CreatureObject creature = (CreatureObject) actor.getContainer(); + friendName = friendName.split(" ")[0].toLowerCase(); - friendName = friendName.toLowerCase(); - - //SWGObject friendObject = getObjectByFirstName(friendName); - - if (actor == null || actor.getContainer() == null) + if (actor == null || creature == null || friendName.equals("")) return; - List friendList = actor.getFriendList(); - - if(friendList.contains(friendName)) { - - actor.friendRemove(friendName); - - ChatOnChangeFriendStatus removeMessage = new ChatOnChangeFriendStatus(actor.getContainer().getObjectID(), friendName, 0); - actor.getContainer().getClient().getSession().write(removeMessage.serialize()); - - ChatOnGetFriendsList sendFriendsList = new ChatOnGetFriendsList(actor); - actor.getContainer().getClient().getSession().write(sendFriendsList.serialize()); - + if(actor.getFriendList().contains(friendName)) { + ChatOnChangeFriendStatus removeMessage = new ChatOnChangeFriendStatus(actor.getContainer().getObjectID(), friendName, 0); + creature.getClient().getSession().write(removeMessage.serialize()); + + actor.friendRemove(friendName); + } else { + creature.sendSystemMessage(friendName + " is not a valid friend name.", (byte) 0); } } - public void addFriend(PlayerObject actor, String friendName, boolean notify) { - // ChatOnAddFriend, ChatOnChangeFriendStatus, ChatFriendsListUpdate, ChatSystemMessage, ChatOnGetFriendsList - SWGObject friendObject = getObjectByFirstName(friendName); + public void addFriend(PlayerObject actor, String friend) { + CreatureObject creature = (CreatureObject) actor.getContainer(); - PlayerObject friend = (PlayerObject) friendObject.getSlottedObject("ghost"); - CreatureObject friendCreature = (CreatureObject) friend.getContainer(); - List friendList = actor.getFriendList(); - - if (actor == null || friendObject.getSlottedObject("ghost") == null) + if (actor == null || creature == null || friend.equals("")) return; - CreatureObject actorCreature = (CreatureObject) actor.getContainer(); - if (actorCreature == null) - return; + friend = friend.toLowerCase(); - boolean friendIsOnline = friendObject.isInQuadtree(); - - String friendShortName = friendCreature.getCustomName().toLowerCase(); - - if (friendCreature.getCustomName().contains(" ")) { - String[] splitName = friendCreature.getCustomName().toLowerCase().split(" "); - friendShortName = splitName[0]; + if (friend.contains(" ")) { + friend = friend.split(" ")[0]; } - if (friendList.contains(friendShortName)) { - actorCreature.sendSystemMessage(friendShortName + " is already on your friends list.", (byte) 0); - return; - } - - - - if (notify) { - ChatOnAddFriend init = new ChatOnAddFriend(); - actorCreature.getClient().getSession().write(init.serialize()); + if(core.characterService.playerExists(friend)) { - ChatOnChangeFriendStatus addMessage = new ChatOnChangeFriendStatus(actorCreature.getObjectID(), friendShortName, 1); - actorCreature.getClient().getSession().write(addMessage.serialize()); - - if(friendIsOnline) { - ChatFriendsListUpdate updateStatus = new ChatFriendsListUpdate(friendShortName, (byte)1); - actorCreature.getClient().getSession().write(updateStatus.serialize()); + if(actor.getIgnoreList().contains(friend)) { + creature.sendSystemMessage(friend + " is being ignored, unable to put in your friends list.", (byte) 0); } - } + + SWGObject friendObj = getObjectByFirstName(friend); + boolean isOnline = false; + + if (friendObj != null && friendObj.isInQuadtree()) + isOnline = true; + + ChatOnAddFriend init = new ChatOnAddFriend(); + creature.getClient().getSession().write(init.serialize()); - actor.friendAdd(friendShortName); - - if (actor.getFriendList().size() != 0) { - ChatOnGetFriendsList sendFriendsList = new ChatOnGetFriendsList(actor); - actorCreature.getClient().getSession().write(sendFriendsList.serialize()); + ChatOnChangeFriendStatus addFriend = new ChatOnChangeFriendStatus(creature.getObjectId(), friend, 1); + creature.getClient().getSession().write(addFriend.serialize()); + + if (isOnline) { + ChatFriendsListUpdate onlineUpdate = new ChatFriendsListUpdate(friend, (byte) 1); + creature.getClient().getSession().write(onlineUpdate.serialize()); + } + + actor.friendAdd(friend); + creature.sendSystemMessage(friend + " is now your friend.", (byte) 0); + + } else { + creature.sendSystemMessage(friend + " is not a valid friend name.", (byte) 0); } - - actorCreature.sendSystemMessage(friendShortName + " has been added to your friends list.", (byte) 0); - - } public void addToIgnoreList(SWGObject actor, String ignoreName) { + ignoreName = ignoreName.split(" ")[0].toLowerCase(); + if (actor == null) + return; + PlayerObject ghost = (PlayerObject) actor.getSlottedObject("ghost"); CreatureObject creature = (CreatureObject) actor; - List ignoreList = ghost.getIgnoreList(); - if (ignoreList.contains(ignoreName.toLowerCase())) { + if(ghost == null) + return; + + if (ghost.getIgnoreList().contains(ignoreName)) { creature.sendSystemMessage(ignoreName + " is already in your ignore list.", (byte) 0); return; - } else { - // TODO: Do check for valid names to ignore - - AddIgnoreMessage addIgnore = new AddIgnoreMessage(actor, ignoreName.toLowerCase(), true); - actor.getClient().getSession().write(addIgnore.serialize()); - Console.println("Sent the add ignore message!"); - ghost.ignoreAdd(ignoreName.toLowerCase()); - Console.println("Sent the add ignore delta!"); - creature.sendSystemMessage(ignoreName + " is now ignored.", (byte) 0); } + + if(!core.characterService.playerExists(ignoreName)) { + creature.sendSystemMessage(ignoreName + " is not a valid ignore name.", (byte) 0); + return; + } + + AddIgnoreMessage addIgnore = new AddIgnoreMessage(actor, ignoreName, true); + actor.getClient().getSession().write(addIgnore.serialize()); + ghost.ignoreAdd(ignoreName); + + creature.sendSystemMessage(ignoreName + " is now ignored.", (byte) 0); } public void removeFromIgnoreList(SWGObject actor, String ignoreName) { + if (actor == null) + return; + PlayerObject ghost = (PlayerObject) actor.getSlottedObject("ghost"); CreatureObject creature = (CreatureObject) actor; - List ignoreList = ghost.getIgnoreList(); - if (ignoreList.contains(ignoreName.toLowerCase())) { - for (String name : ignoreList) { - if(name.equalsIgnoreCase(ignoreName)) { - //Console.println("Name found!"); - AddIgnoreMessage removeIgnore = new AddIgnoreMessage(actor, ignoreName.toLowerCase(), false); - actor.getClient().getSession().write(removeIgnore.serialize()); - //Console.println("Sent AddIgnoreMessage to remove friend!"); - ghost.ignoreRemove(ignoreName.toLowerCase()); - //Console.println("Sent ignoreRemove delta!"); - creature.sendSystemMessage(ignoreName + " is no longer ignored.", (byte) 0); - - // TODO: Find out why player must click on name twice in list for name to be removed. - break; - } - } - } else { return; } + if (ghost == null || creature == null) + return; + + if (ghost.getIgnoreList().contains(ignoreName)) { + AddIgnoreMessage message = new AddIgnoreMessage(actor, ignoreName, false); + creature.getClient().getSession().write(message.serialize()); + + ghost.ignoreRemove(ignoreName); + + creature.sendSystemMessage(ignoreName + " is no longer ignored.", (byte) 0); + } } public void sendPersistentMessageHeader(Client client, Mail mail) { diff --git a/src/services/object/ObjectService.java b/src/services/object/ObjectService.java index 6b2c608c..c52fbd3b 100644 --- a/src/services/object/ObjectService.java +++ b/src/services/object/ObjectService.java @@ -612,8 +612,8 @@ public class ObjectService implements INetworkDispatch { PlayerObject ghost = (PlayerObject) creature.getSlottedObject("ghost"); - ChatOnGetFriendsList friendsListMessage = new ChatOnGetFriendsList(ghost); - client.getSession().write(friendsListMessage.serialize()); + //ChatOnGetFriendsList friendsListMessage = new ChatOnGetFriendsList(ghost); + //client.getSession().write(friendsListMessage.serialize()); if (ghost != null) { ghost.clearFlagBitmask(PlayerFlags.LD); @@ -626,19 +626,19 @@ public class ObjectService implements INetworkDispatch { core.chatService.playerStatusChange(objectShortName, (byte) 1); - if (ghost.getFriendList().isEmpty() == false) { + if (!ghost.getFriendList().isEmpty()) { + // Find out what friends are online/offline for (String friend : ghost.getFriendList()) { - SWGObject friendObject = (SWGObject) core.chatService.getObjectByFirstName(friend); - if (friendObject == null) - continue; - if(friendObject.isInQuadtree() == true) { + SWGObject friendObject = core.chatService.getObjectByFirstName(friend); + + if(friendObject != null && friendObject.isInQuadtree()) { ChatFriendsListUpdate onlineNotifyStatus = new ChatFriendsListUpdate(friend, (byte) 1); client.getSession().write(onlineNotifyStatus.serialize()); } else { - ChatOnChangeFriendStatus changeStatus = new ChatOnChangeFriendStatus(creature.getObjectID(), friend, 0); - client.getSession().write(changeStatus.serialize()); + ChatFriendsListUpdate onlineNotifyStatus = new ChatFriendsListUpdate(friend, (byte) 0); + client.getSession().write(onlineNotifyStatus.serialize()); } } } From dcab49cc05f7cb637f4d064e00fd9cf8739cb6cf Mon Sep 17 00:00:00 2001 From: Waverunner Date: Wed, 18 Dec 2013 17:56:48 -0500 Subject: [PATCH 02/35] Randomized spawning position for using travel points, no longer able to mediate unless you completed collection --- scripts/commands/meditate.py | 3 +++ src/services/travel/TravelService.java | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/commands/meditate.py b/scripts/commands/meditate.py index 2bc74a69..9c02f74f 100644 --- a/scripts/commands/meditate.py +++ b/scripts/commands/meditate.py @@ -6,6 +6,9 @@ def setup(): def run(core, actor, target, commandString): ##To do make it reset moodanimations when meditation is cancled. + if core.collectionService.isComplete(actor, 'inv_holocron_collection_02') is False: + return + if actor.getPosture() != 0x08: actor.sendSystemMessage('You need to sit',0) actor.setMoodAnimation('neutral') diff --git a/src/services/travel/TravelService.java b/src/services/travel/TravelService.java index 5165e79c..488ae1e7 100644 --- a/src/services/travel/TravelService.java +++ b/src/services/travel/TravelService.java @@ -25,6 +25,7 @@ import java.nio.ByteOrder; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Random; import java.util.Vector; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; @@ -42,6 +43,8 @@ import engine.clients.Client; import engine.resources.container.Traverser; import engine.resources.objects.SWGObject; import engine.resources.scene.Planet; +import engine.resources.scene.Point3D; +import engine.resources.scene.Quaternion; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; import main.NGECore; @@ -319,7 +322,23 @@ public class TravelService implements INetworkDispatch { public void doTransport(SWGObject actor, TravelPoint tp) { Planet planet = core.terrainService.getPlanetByName(tp.getPlanetName()); - core.simulationService.transferToPlanet(actor, planet, tp.getSpawnLocation().getPosition(), tp.getSpawnLocation().getOrientation(), null); + + Random ran = new Random(); + + float oY = tp.getShuttle().getOrientation().y; + float dirDg = (float) ((Math.acos(oY) * 180 / Math.PI) * 2); + + ran.setSeed(32); + dirDg = dirDg - 18 + ran.nextFloat(); + float dirRadian = (float) (dirDg * Math.PI / 180); + ran.setSeed(3); + float distance = 13 + ran.nextFloat(); + + float x = (float) (tp.getSpawnLocation().getPosition().x + Math.sin(dirRadian) * distance); + float y = (float) (tp.getSpawnLocation().getPosition().y + Math.cos(dirRadian) * distance); + + Point3D spawnPoint = new Point3D(x, y, tp.getSpawnLocation().getPosition().z); + core.simulationService.transferToPlanet(actor, planet, spawnPoint, new Quaternion(0, 0, 0, 0), null); } From 566014d74f85051ae1745f84baf0520ceef38081 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 14:43:16 +0100 Subject: [PATCH 03/35] Medic - Evasion chance is now removed upon buff expiration --- scripts/buffs/me_evasion_1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/buffs/me_evasion_1.py b/scripts/buffs/me_evasion_1.py index 81115a7b..59984429 100644 --- a/scripts/buffs/me_evasion_1.py +++ b/scripts/buffs/me_evasion_1.py @@ -2,13 +2,13 @@ import sys def setup(core, actor, buff): core.skillModService.addSkillMod(actor, 'expertise_dodge', 35) - core.skillModService.addSkillMod(actor, 'expertise_evasion_chance', 50) + core.skillModService.addSkillMod(actor, 'display_only_evasion', 5000) core.skillModService.addSkillMod(actor, 'combat_evasion_value', 50) return def removeBuff(core, actor, buff): core.skillModService.deductSkillMod(actor, 'expertise_dodge', 35) - core.skillModService.deductSkillMod(actor, 'expertise_evasion_chance', 50) + core.skillModService.deductSkillMod(actor, 'display_only_evasion', 5000) core.skillModService.deductSkillMod(actor, 'combat_evasion_value', 50) return \ No newline at end of file From 833a4cc3a83ac443ada43f4f655aad19463e0335 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 15:45:14 +0100 Subject: [PATCH 04/35] Combat - Critical Chance calculation takes more skillmods into account Also added the opponent *defensive modifier* reduction skillmods. --- src/services/EquipmentService.java | 62 +++++++++++++++++++++++--- src/services/combat/CombatService.java | 24 +++++++--- 2 files changed, 75 insertions(+), 11 deletions(-) diff --git a/src/services/EquipmentService.java b/src/services/EquipmentService.java index 9055579b..975125ce 100644 --- a/src/services/EquipmentService.java +++ b/src/services/EquipmentService.java @@ -24,8 +24,10 @@ package services; import java.util.Map; import java.util.Map.Entry; import java.util.TreeMap; + import org.python.core.Py; import org.python.core.PyObject; + import resources.objects.creature.CreatureObject; import main.NGECore; import engine.resources.objects.SWGObject; @@ -50,18 +52,65 @@ public class EquipmentService implements INetworkDispatch { } + public void weaponCriticalToDisplay(CreatureObject actor, SWGObject item, boolean add) { + + if (add == true) { + + switch(item.getStringAttribute("cat_wpn_damage.wpn_category")) { + + case "Rifle": actor.addSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_rifle") * 100); // rifle + case "Carbine": actor.addSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_carbine") * 100); // carbine + case "Pistol": actor.addSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_pistol") * 100); // pistol + case "One-Handed Melee": actor.addSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_1h") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // one-handed + case "Two-Handed Melee": actor.addSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_2h") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // two-handed + case "Unarmed": actor.addSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_unarmed") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // unarmed + case "Polearm": actor.addSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_polearm") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // polearm + case "Free Targeting Heavy Weapon": actor.addSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_heavy") * 100); // Heavy + + + } + + } + + if (add == false) { + + switch(item.getStringAttribute("cat_wpn_damage.wpn_category")) { + + case "Rifle": actor.deductSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_rifle") * 100); // rifle + case "Carbine": actor.deductSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_carbine") * 100); // carbine + case "Pistol": actor.deductSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_pistol") * 100); // pistol + case "One-Handed Melee": actor.deductSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_1h") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // one-handed + case "Two-Handed Melee": actor.deductSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_2h") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // two-handed + case "Unarmed": actor.deductSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_unarmed") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // unarmed + case "Polearm": actor.deductSkillMod("display_only_critical", ((actor.getSkillModBase("expertise_critical_polearm") + actor.getSkillModBase("expertise_critical_melee")) * 100)); // polearm + case "Free Targeting Heavy Weapon": actor.deductSkillMod("display_only_critical", actor.getSkillModBase("expertise_critical_heavy") * 100); // Heavy + } + } + } + public void equip(CreatureObject actor, SWGObject item) { //if(replacedItem != null) // unequip(actor, replacedItem); - String template = item.getTemplate(); + String template = ((item.getAttachment("customServerTemplate") == null) ? item.getTemplate() : (item.getTemplate().split("shared_")[0] + "shared_" + ((String) item.getAttachment("customServerTemplate")) + ".iff")); String serverTemplate = template.replace(".iff", ""); PyObject func = core.scriptService.getMethod("scripts/" + serverTemplate.split("shared_" , 2)[0].replace("shared_", ""), serverTemplate.split("shared_" , 2)[1], "equip"); if(func != null) func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item)); - // TODO: add health/action bonus from crafted weapon with augmentations + // TODO: add health/action bonus from crafted weapon with augmentations (also seen with cybernetics) + // TODO: faction restrictions + // TODO: Species restrictions? + // TODO: Gender restrictions? + // TODO: crit enhancement from crafted weapons + // TODO: Jedi robes Force Protection Intensity + // TODO: check for armor category in order to add resistance to certain DoT types + // TODO: if weapon, add the weapon specific crit to display_only_critical + // TODO: bio-link + + if (actor.getSlotNameForObject(item).contentEquals("hold_r") == true) + weaponCriticalToDisplay(actor, item, true); Map attributes = new TreeMap(item.getAttributes()); @@ -69,7 +118,7 @@ public class EquipmentService implements INetworkDispatch { if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) { core.skillModService.addSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); - } + } } @@ -80,13 +129,14 @@ public class EquipmentService implements INetworkDispatch { public void unequip(CreatureObject actor, SWGObject item) { - String template = item.getTemplate(); + String template = ((item.getAttachment("customServerTemplate") == null) ? item.getTemplate() : (item.getTemplate().split("shared_")[0] + "shared_" + ((String) item.getAttachment("customServerTemplate")) + ".iff")); String serverTemplate = template.replace(".iff", ""); PyObject func = core.scriptService.getMethod("scripts/" + serverTemplate.split("shared_" , 2)[0].replace("shared_", ""), serverTemplate.split("shared_" , 2)[1], "unequip"); if(func != null) func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item)); - // TODO: remove health/action bonus from crafted weapon with augmentations + if (actor.getSlotNameForObject(item).contentEquals("hold_r") == true) + weaponCriticalToDisplay(actor, item, false); Map attributes = new TreeMap(item.getAttributes()); @@ -94,7 +144,7 @@ public class EquipmentService implements INetworkDispatch { if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) { core.skillModService.deductSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); - } + } } diff --git a/src/services/combat/CombatService.java b/src/services/combat/CombatService.java index b36e9bcc..9e4d2ba2 100644 --- a/src/services/combat/CombatService.java +++ b/src/services/combat/CombatService.java @@ -673,7 +673,7 @@ public class CombatService implements INetworkDispatch { if(r <= missChance) return HitType.MISS; } - float dodgeChance = (float) target.getSkillModBase("display_only_dodge") / 10000; + float dodgeChance = (float) (target.getSkillModBase("display_only_dodge") - attacker.getSkillModBase("display_only_opp_dodge_reduction")) / 10000; r = random.nextFloat(); if(r <= dodgeChance) @@ -683,7 +683,7 @@ public class CombatService implements INetworkDispatch { WeaponObject weapon2 = (WeaponObject) core.objectService.getObject(((CreatureObject) target).getWeaponId()); if(weapon2 != null && weapon2.isMelee()) { - float parryChance = (float) target.getSkillModBase("display_only_parry") / 10000; + float parryChance = (float) (target.getSkillModBase("display_only_parry") - attacker.getSkillModBase("display_only_parry_reduction"))/ 10000; r = random.nextFloat(); if(r <= parryChance) @@ -699,9 +699,23 @@ public class CombatService implements INetworkDispatch { } - float critChance = (float) (attacker.getSkillModBase("display_only_critical") - target.getSkillModBase("display_only_expertise_critical_hit_reduction")) / 10000; + float critChance = 0; + + critChance += (command.getCriticalChance()); + + critChance += ((float) attacker.getSkillModBase("display_only_critical") / 100); + + critChance -= ((float) target.getSkillModBase("display_only_expertise_critical_hit_reduction") / 100); + + critChance += ((float) target.getSkillModBase("critical_hit_vulnerable") / 100); + + if(target.isPlayer()) + critChance += attacker.getSkillModBase("expertise_critical_niche_pvp"); + critChance -= ((float) target.getSkillModBase("display_only_expertise_critical_hit_pvp_reduction") / 100); + r = random.nextFloat(); - if(r <= critChance) + + if(r <= ((float) critChance / 100)) return HitType.CRITICAL; // TODO: Punishing blow once AI is implemented @@ -715,7 +729,7 @@ public class CombatService implements INetworkDispatch { float r; Random random = new Random(); - float blockChance = (float) target.getSkillModBase("display_only_block") / 10000; + float blockChance = (float) (target.getSkillModBase("display_only_block") - attacker.getSkillModBase("display_only_opp_block_reduction"))/ 10000; r = random.nextFloat(); if(r <= blockChance) From 9c23fef67f9209417298573d259c5a199483797c Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 16:02:01 +0100 Subject: [PATCH 05/35] Added criticalChance to CombatCommand --- src/services/command/CombatCommand.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/services/command/CombatCommand.java b/src/services/command/CombatCommand.java index 444d0895..a1559418 100644 --- a/src/services/command/CombatCommand.java +++ b/src/services/command/CombatCommand.java @@ -78,6 +78,7 @@ public class CombatCommand extends BaseSWGCommand { private float executeTime; private float warmupTime; private float vigorCost; // for commando kill meter and bm specials + private float criticalChance; public CombatCommand(String commandName) { super(commandName); @@ -705,6 +706,14 @@ public class CombatCommand extends BaseSWGCommand { public void setVigorCost(float vigorCost) { this.vigorCost = vigorCost; } + + public float getCriticalChance() { + return criticalChance; + } + + public void setCriticalChance(float criticalChance) { + this.criticalChance = criticalChance; + } From 63b4076a32f1709c2112529c4b05f69688aa758a Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 17:20:41 +0100 Subject: [PATCH 06/35] Jedi - Fixed Strike Damage modifier --- scripts/commands/combat/fs_dm_1.py | 9 +++++++++ scripts/commands/combat/fs_dm_2.py | 9 +++++++++ scripts/commands/combat/fs_dm_3.py | 9 +++++++++ scripts/commands/combat/fs_dm_4.py | 9 +++++++++ scripts/commands/combat/fs_dm_5.py | 9 +++++++++ scripts/commands/combat/fs_dm_6.py | 9 +++++++++ scripts/commands/combat/fs_dm_7.py | 9 +++++++++ 7 files changed, 63 insertions(+) create mode 100644 scripts/commands/combat/fs_dm_1.py create mode 100644 scripts/commands/combat/fs_dm_2.py create mode 100644 scripts/commands/combat/fs_dm_3.py create mode 100644 scripts/commands/combat/fs_dm_4.py create mode 100644 scripts/commands/combat/fs_dm_5.py create mode 100644 scripts/commands/combat/fs_dm_6.py create mode 100644 scripts/commands/combat/fs_dm_7.py diff --git a/scripts/commands/combat/fs_dm_1.py b/scripts/commands/combat/fs_dm_1.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_1.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_2.py b/scripts/commands/combat/fs_dm_2.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_2.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_3.py b/scripts/commands/combat/fs_dm_3.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_3.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_4.py b/scripts/commands/combat/fs_dm_4.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_4.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_5.py b/scripts/commands/combat/fs_dm_5.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_5.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_6.py b/scripts/commands/combat/fs_dm_6.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_6.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_7.py b/scripts/commands/combat/fs_dm_7.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_dm_7.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file From aa585f038c3df67fb2754fa01c5c21e970c0a425 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 17:22:29 +0100 Subject: [PATCH 07/35] Jedi - Strike Damage for Flurry --- scripts/commands/combat/fs_flurry_1.py | 9 +++++++++ scripts/commands/combat/fs_flurry_2.py | 9 +++++++++ scripts/commands/combat/fs_flurry_3.py | 9 +++++++++ scripts/commands/combat/fs_flurry_4.py | 9 +++++++++ scripts/commands/combat/fs_flurry_5.py | 9 +++++++++ scripts/commands/combat/fs_flurry_6.py | 9 +++++++++ scripts/commands/combat/fs_flurry_7.py | 9 +++++++++ 7 files changed, 63 insertions(+) create mode 100644 scripts/commands/combat/fs_flurry_1.py create mode 100644 scripts/commands/combat/fs_flurry_2.py create mode 100644 scripts/commands/combat/fs_flurry_3.py create mode 100644 scripts/commands/combat/fs_flurry_4.py create mode 100644 scripts/commands/combat/fs_flurry_5.py create mode 100644 scripts/commands/combat/fs_flurry_6.py create mode 100644 scripts/commands/combat/fs_flurry_7.py diff --git a/scripts/commands/combat/fs_flurry_1.py b/scripts/commands/combat/fs_flurry_1.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_flurry_1.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_2.py b/scripts/commands/combat/fs_flurry_2.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_flurry_2.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_3.py b/scripts/commands/combat/fs_flurry_3.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_flurry_3.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_4.py b/scripts/commands/combat/fs_flurry_4.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_flurry_4.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_5.py b/scripts/commands/combat/fs_flurry_5.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_flurry_5.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_6.py b/scripts/commands/combat/fs_flurry_6.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_flurry_6.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_7.py b/scripts/commands/combat/fs_flurry_7.py new file mode 100644 index 00000000..47e927c5 --- /dev/null +++ b/scripts/commands/combat/fs_flurry_7.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file From 38263b72894c966295ab756a954b04f7a5e39e03 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 20:41:51 +0100 Subject: [PATCH 08/35] Jedi - Added Strike Critical Chance --- scripts/commands/combat/fs_dm_1.py | 3 +++ scripts/commands/combat/fs_dm_2.py | 3 +++ scripts/commands/combat/fs_dm_3.py | 3 +++ scripts/commands/combat/fs_dm_4.py | 3 +++ scripts/commands/combat/fs_dm_5.py | 3 +++ scripts/commands/combat/fs_dm_6.py | 3 +++ scripts/commands/combat/fs_dm_7.py | 3 +++ 7 files changed, 21 insertions(+) diff --git a/scripts/commands/combat/fs_dm_1.py b/scripts/commands/combat/fs_dm_1.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_dm_1.py +++ b/scripts/commands/combat/fs_dm_1.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_2.py b/scripts/commands/combat/fs_dm_2.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_dm_2.py +++ b/scripts/commands/combat/fs_dm_2.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_3.py b/scripts/commands/combat/fs_dm_3.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_dm_3.py +++ b/scripts/commands/combat/fs_dm_3.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_4.py b/scripts/commands/combat/fs_dm_4.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_dm_4.py +++ b/scripts/commands/combat/fs_dm_4.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_5.py b/scripts/commands/combat/fs_dm_5.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_dm_5.py +++ b/scripts/commands/combat/fs_dm_5.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_6.py b/scripts/commands/combat/fs_dm_6.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_dm_6.py +++ b/scripts/commands/combat/fs_dm_6.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_7.py b/scripts/commands/combat/fs_dm_7.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_dm_7.py +++ b/scripts/commands/combat/fs_dm_7.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file From c7ae8f12b3950941e975a711a87e440ddf4507ee Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 20:42:54 +0100 Subject: [PATCH 09/35] Jedi - Strike Critical for Flurry --- scripts/commands/combat/fs_flurry_1.py | 3 +++ scripts/commands/combat/fs_flurry_2.py | 3 +++ scripts/commands/combat/fs_flurry_3.py | 3 +++ scripts/commands/combat/fs_flurry_4.py | 3 +++ scripts/commands/combat/fs_flurry_5.py | 3 +++ scripts/commands/combat/fs_flurry_6.py | 3 +++ scripts/commands/combat/fs_flurry_7.py | 3 +++ 7 files changed, 21 insertions(+) diff --git a/scripts/commands/combat/fs_flurry_1.py b/scripts/commands/combat/fs_flurry_1.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_flurry_1.py +++ b/scripts/commands/combat/fs_flurry_1.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_2.py b/scripts/commands/combat/fs_flurry_2.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_flurry_2.py +++ b/scripts/commands/combat/fs_flurry_2.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_3.py b/scripts/commands/combat/fs_flurry_3.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_flurry_3.py +++ b/scripts/commands/combat/fs_flurry_3.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_4.py b/scripts/commands/combat/fs_flurry_4.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_flurry_4.py +++ b/scripts/commands/combat/fs_flurry_4.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_5.py b/scripts/commands/combat/fs_flurry_5.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_flurry_5.py +++ b/scripts/commands/combat/fs_flurry_5.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_6.py b/scripts/commands/combat/fs_flurry_6.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_flurry_6.py +++ b/scripts/commands/combat/fs_flurry_6.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_7.py b/scripts/commands/combat/fs_flurry_7.py index 47e927c5..fc780307 100644 --- a/scripts/commands/combat/fs_flurry_7.py +++ b/scripts/commands/combat/fs_flurry_7.py @@ -4,6 +4,9 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) + if actor.getSkillMod('expertise_critical_line_fs_dm'): + command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + return def run(core, actor, target, commandString): return \ No newline at end of file From 0a9df0a35af5815f9689e4d972f061a232ea6fa0 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 20:57:03 +0100 Subject: [PATCH 10/35] Jedi - Added Sweep Damage --- scripts/commands/combat/fs_sweep_1.py | 9 +++++++++ scripts/commands/combat/fs_sweep_2.py | 9 +++++++++ scripts/commands/combat/fs_sweep_3.py | 9 +++++++++ scripts/commands/combat/fs_sweep_4.py | 9 +++++++++ scripts/commands/combat/fs_sweep_5.py | 9 +++++++++ scripts/commands/combat/fs_sweep_6.py | 9 +++++++++ scripts/commands/combat/fs_sweep_7.py | 9 +++++++++ 7 files changed, 63 insertions(+) create mode 100644 scripts/commands/combat/fs_sweep_1.py create mode 100644 scripts/commands/combat/fs_sweep_2.py create mode 100644 scripts/commands/combat/fs_sweep_3.py create mode 100644 scripts/commands/combat/fs_sweep_4.py create mode 100644 scripts/commands/combat/fs_sweep_5.py create mode 100644 scripts/commands/combat/fs_sweep_6.py create mode 100644 scripts/commands/combat/fs_sweep_7.py diff --git a/scripts/commands/combat/fs_sweep_1.py b/scripts/commands/combat/fs_sweep_1.py new file mode 100644 index 00000000..b312443d --- /dev/null +++ b/scripts/commands/combat/fs_sweep_1.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_2.py b/scripts/commands/combat/fs_sweep_2.py new file mode 100644 index 00000000..b312443d --- /dev/null +++ b/scripts/commands/combat/fs_sweep_2.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_3.py b/scripts/commands/combat/fs_sweep_3.py new file mode 100644 index 00000000..b312443d --- /dev/null +++ b/scripts/commands/combat/fs_sweep_3.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_4.py b/scripts/commands/combat/fs_sweep_4.py new file mode 100644 index 00000000..b312443d --- /dev/null +++ b/scripts/commands/combat/fs_sweep_4.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_5.py b/scripts/commands/combat/fs_sweep_5.py new file mode 100644 index 00000000..b312443d --- /dev/null +++ b/scripts/commands/combat/fs_sweep_5.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_6.py b/scripts/commands/combat/fs_sweep_6.py new file mode 100644 index 00000000..b312443d --- /dev/null +++ b/scripts/commands/combat/fs_sweep_6.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_7.py b/scripts/commands/combat/fs_sweep_7.py new file mode 100644 index 00000000..b312443d --- /dev/null +++ b/scripts/commands/combat/fs_sweep_7.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.getSkillMod('expertise_damage_line_fs_sweep'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file From 7a108a9c022bc9dc14fddd8fbe1ae371f010af43 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 21:39:43 +0100 Subject: [PATCH 11/35] Jedi - Soothing Aura now handled in scripts --- scripts/commands/combat/fs_sh_0.py | 9 +++++++++ scripts/commands/combat/fs_sh_1.py | 9 +++++++++ scripts/commands/combat/fs_sh_2.py | 9 +++++++++ scripts/commands/combat/fs_sh_3.py | 9 +++++++++ src/services/combat/CombatService.java | 4 +--- 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 scripts/commands/combat/fs_sh_0.py create mode 100644 scripts/commands/combat/fs_sh_1.py create mode 100644 scripts/commands/combat/fs_sh_2.py create mode 100644 scripts/commands/combat/fs_sh_3.py diff --git a/scripts/commands/combat/fs_sh_0.py b/scripts/commands/combat/fs_sh_0.py new file mode 100644 index 00000000..84134341 --- /dev/null +++ b/scripts/commands/combat/fs_sh_0.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.hasBuff('fs_buff_def_1_1') and actor.getSkillMod('expertise_stance_healing_line_fs_heal'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_stance_healing_line_fs_heal').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sh_1.py b/scripts/commands/combat/fs_sh_1.py new file mode 100644 index 00000000..84134341 --- /dev/null +++ b/scripts/commands/combat/fs_sh_1.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.hasBuff('fs_buff_def_1_1') and actor.getSkillMod('expertise_stance_healing_line_fs_heal'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_stance_healing_line_fs_heal').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sh_2.py b/scripts/commands/combat/fs_sh_2.py new file mode 100644 index 00000000..84134341 --- /dev/null +++ b/scripts/commands/combat/fs_sh_2.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.hasBuff('fs_buff_def_1_1') and actor.getSkillMod('expertise_stance_healing_line_fs_heal'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_stance_healing_line_fs_heal').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sh_3.py b/scripts/commands/combat/fs_sh_3.py new file mode 100644 index 00000000..84134341 --- /dev/null +++ b/scripts/commands/combat/fs_sh_3.py @@ -0,0 +1,9 @@ +import sys + +def setup(core, actor, target, command): + if actor.hasBuff('fs_buff_def_1_1') and actor.getSkillMod('expertise_stance_healing_line_fs_heal'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_stance_healing_line_fs_heal').getBase())/100)) + + return +def run(core, actor, target, commandString): + return \ No newline at end of file diff --git a/src/services/combat/CombatService.java b/src/services/combat/CombatService.java index 9e4d2ba2..bd2565ed 100644 --- a/src/services/combat/CombatService.java +++ b/src/services/combat/CombatService.java @@ -900,9 +900,7 @@ public class CombatService implements INetworkDispatch { healPotency += healer.getSkillMod("expertise_healing_line_sm_heal").getBase(); if(healer.getSkillMod("expertise_healing_line_sp_heal") != null) healPotency += healer.getSkillMod("expertise_healing_line_sp_heal").getBase(); - if(healer.hasBuff("fs_buff_def_1_1")) - if(healer.getSkillMod("expertise_stance_healing_line_fs_heal") != null) - healPotency += healer.getSkillMod("expertise_stance_healing_line_fs_heal").getBase(); + if(healPotency > 0) healAmount += ((healAmount * healPotency) / 100); if(target.getSkillMod("expertise_healing_reduction") != null) From 17f040cf1201984f8d19794bee1e4bbe7e8273d3 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 22:39:36 +0100 Subject: [PATCH 12/35] Jedi - Added Strike Action Cost Reduction --- scripts/commands/combat/fs_dm_1.py | 4 ++++ scripts/commands/combat/fs_dm_2.py | 4 ++++ scripts/commands/combat/fs_dm_3.py | 4 ++++ scripts/commands/combat/fs_dm_4.py | 4 ++++ scripts/commands/combat/fs_dm_5.py | 4 ++++ scripts/commands/combat/fs_dm_6.py | 4 ++++ scripts/commands/combat/fs_dm_7.py | 4 ++++ scripts/commands/combat/fs_flurry_1.py | 4 ++++ scripts/commands/combat/fs_flurry_2.py | 4 ++++ scripts/commands/combat/fs_flurry_3.py | 4 ++++ scripts/commands/combat/fs_flurry_4.py | 4 ++++ scripts/commands/combat/fs_flurry_5.py | 4 ++++ scripts/commands/combat/fs_flurry_6.py | 4 ++++ scripts/commands/combat/fs_flurry_7.py | 4 ++++ 14 files changed, 56 insertions(+) diff --git a/scripts/commands/combat/fs_dm_1.py b/scripts/commands/combat/fs_dm_1.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_dm_1.py +++ b/scripts/commands/combat/fs_dm_1.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_2.py b/scripts/commands/combat/fs_dm_2.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_dm_2.py +++ b/scripts/commands/combat/fs_dm_2.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_3.py b/scripts/commands/combat/fs_dm_3.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_dm_3.py +++ b/scripts/commands/combat/fs_dm_3.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_4.py b/scripts/commands/combat/fs_dm_4.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_dm_4.py +++ b/scripts/commands/combat/fs_dm_4.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_5.py b/scripts/commands/combat/fs_dm_5.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_dm_5.py +++ b/scripts/commands/combat/fs_dm_5.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_6.py b/scripts/commands/combat/fs_dm_6.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_dm_6.py +++ b/scripts/commands/combat/fs_dm_6.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_dm_7.py b/scripts/commands/combat/fs_dm_7.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_dm_7.py +++ b/scripts/commands/combat/fs_dm_7.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_1.py b/scripts/commands/combat/fs_flurry_1.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_flurry_1.py +++ b/scripts/commands/combat/fs_flurry_1.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_2.py b/scripts/commands/combat/fs_flurry_2.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_flurry_2.py +++ b/scripts/commands/combat/fs_flurry_2.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_3.py b/scripts/commands/combat/fs_flurry_3.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_flurry_3.py +++ b/scripts/commands/combat/fs_flurry_3.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_4.py b/scripts/commands/combat/fs_flurry_4.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_flurry_4.py +++ b/scripts/commands/combat/fs_flurry_4.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_5.py b/scripts/commands/combat/fs_flurry_5.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_flurry_5.py +++ b/scripts/commands/combat/fs_flurry_5.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_6.py b/scripts/commands/combat/fs_flurry_6.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_flurry_6.py +++ b/scripts/commands/combat/fs_flurry_6.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/fs_flurry_7.py b/scripts/commands/combat/fs_flurry_7.py index fc780307..1d6cd02c 100644 --- a/scripts/commands/combat/fs_flurry_7.py +++ b/scripts/commands/combat/fs_flurry_7.py @@ -7,6 +7,10 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_critical_line_fs_dm'): command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase()) + if actor.getSkillMod('expertise_action_line_fs_dm'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100)) + return + def run(core, actor, target, commandString): return \ No newline at end of file From af18a56e058e4b44a4eeb8fc961382a74b3c5548 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Fri, 20 Dec 2013 22:49:43 +0100 Subject: [PATCH 13/35] Jedi - Action Cost Reduction for Sweep --- scripts/commands/combat/fs_sweep_1.py | 7 ++++++- scripts/commands/combat/fs_sweep_2.py | 7 ++++++- scripts/commands/combat/fs_sweep_3.py | 7 ++++++- scripts/commands/combat/fs_sweep_4.py | 7 ++++++- scripts/commands/combat/fs_sweep_5.py | 7 ++++++- scripts/commands/combat/fs_sweep_6.py | 7 ++++++- scripts/commands/combat/fs_sweep_7.py | 7 ++++++- 7 files changed, 42 insertions(+), 7 deletions(-) diff --git a/scripts/commands/combat/fs_sweep_1.py b/scripts/commands/combat/fs_sweep_1.py index b312443d..3151d83b 100644 --- a/scripts/commands/combat/fs_sweep_1.py +++ b/scripts/commands/combat/fs_sweep_1.py @@ -4,6 +4,11 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_sweep'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + return + def run(core, actor, target, commandString): - return \ No newline at end of file + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_2.py b/scripts/commands/combat/fs_sweep_2.py index b312443d..3151d83b 100644 --- a/scripts/commands/combat/fs_sweep_2.py +++ b/scripts/commands/combat/fs_sweep_2.py @@ -4,6 +4,11 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_sweep'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + return + def run(core, actor, target, commandString): - return \ No newline at end of file + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_3.py b/scripts/commands/combat/fs_sweep_3.py index b312443d..3151d83b 100644 --- a/scripts/commands/combat/fs_sweep_3.py +++ b/scripts/commands/combat/fs_sweep_3.py @@ -4,6 +4,11 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_sweep'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + return + def run(core, actor, target, commandString): - return \ No newline at end of file + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_4.py b/scripts/commands/combat/fs_sweep_4.py index b312443d..3151d83b 100644 --- a/scripts/commands/combat/fs_sweep_4.py +++ b/scripts/commands/combat/fs_sweep_4.py @@ -4,6 +4,11 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_sweep'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + return + def run(core, actor, target, commandString): - return \ No newline at end of file + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_5.py b/scripts/commands/combat/fs_sweep_5.py index b312443d..3151d83b 100644 --- a/scripts/commands/combat/fs_sweep_5.py +++ b/scripts/commands/combat/fs_sweep_5.py @@ -4,6 +4,11 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_sweep'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + return + def run(core, actor, target, commandString): - return \ No newline at end of file + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_6.py b/scripts/commands/combat/fs_sweep_6.py index b312443d..3151d83b 100644 --- a/scripts/commands/combat/fs_sweep_6.py +++ b/scripts/commands/combat/fs_sweep_6.py @@ -4,6 +4,11 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_sweep'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + return + def run(core, actor, target, commandString): - return \ No newline at end of file + return + \ No newline at end of file diff --git a/scripts/commands/combat/fs_sweep_7.py b/scripts/commands/combat/fs_sweep_7.py index b312443d..3151d83b 100644 --- a/scripts/commands/combat/fs_sweep_7.py +++ b/scripts/commands/combat/fs_sweep_7.py @@ -4,6 +4,11 @@ def setup(core, actor, target, command): if actor.getSkillMod('expertise_damage_line_fs_sweep'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + if actor.getSkillMod('expertise_action_line_fs_sweep'): + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + return + def run(core, actor, target, commandString): - return \ No newline at end of file + return + \ No newline at end of file From 0775adb2d8fe765ed12b4957e49da180292222f6 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sat, 21 Dec 2013 01:31:00 +0100 Subject: [PATCH 14/35] Jedi - Added Strike cooldown reduction modifier --- scripts/commands/combat/fs_dm_1.py | 4 ++++ scripts/commands/combat/fs_dm_2.py | 4 ++++ scripts/commands/combat/fs_dm_3.py | 4 ++++ scripts/commands/combat/fs_dm_4.py | 4 ++++ scripts/commands/combat/fs_dm_5.py | 4 ++++ scripts/commands/combat/fs_dm_6.py | 4 ++++ scripts/commands/combat/fs_dm_7.py | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/scripts/commands/combat/fs_dm_1.py b/scripts/commands/combat/fs_dm_1.py index 1d6cd02c..825798d5 100644 --- a/scripts/commands/combat/fs_dm_1.py +++ b/scripts/commands/combat/fs_dm_1.py @@ -1,6 +1,10 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) diff --git a/scripts/commands/combat/fs_dm_2.py b/scripts/commands/combat/fs_dm_2.py index 1d6cd02c..825798d5 100644 --- a/scripts/commands/combat/fs_dm_2.py +++ b/scripts/commands/combat/fs_dm_2.py @@ -1,6 +1,10 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) diff --git a/scripts/commands/combat/fs_dm_3.py b/scripts/commands/combat/fs_dm_3.py index 1d6cd02c..825798d5 100644 --- a/scripts/commands/combat/fs_dm_3.py +++ b/scripts/commands/combat/fs_dm_3.py @@ -1,6 +1,10 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) diff --git a/scripts/commands/combat/fs_dm_4.py b/scripts/commands/combat/fs_dm_4.py index 1d6cd02c..825798d5 100644 --- a/scripts/commands/combat/fs_dm_4.py +++ b/scripts/commands/combat/fs_dm_4.py @@ -1,6 +1,10 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) diff --git a/scripts/commands/combat/fs_dm_5.py b/scripts/commands/combat/fs_dm_5.py index 1d6cd02c..825798d5 100644 --- a/scripts/commands/combat/fs_dm_5.py +++ b/scripts/commands/combat/fs_dm_5.py @@ -1,6 +1,10 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) diff --git a/scripts/commands/combat/fs_dm_6.py b/scripts/commands/combat/fs_dm_6.py index 1d6cd02c..825798d5 100644 --- a/scripts/commands/combat/fs_dm_6.py +++ b/scripts/commands/combat/fs_dm_6.py @@ -1,6 +1,10 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) diff --git a/scripts/commands/combat/fs_dm_7.py b/scripts/commands/combat/fs_dm_7.py index 1d6cd02c..825798d5 100644 --- a/scripts/commands/combat/fs_dm_7.py +++ b/scripts/commands/combat/fs_dm_7.py @@ -1,6 +1,10 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_dm'): + command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10)) + if actor.getSkillMod('expertise_damage_line_fs_dm'): command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100)) From 9b87d4b91cf8c01eed1bdb3a1d5e2b1b594e2a31 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sat, 21 Dec 2013 01:35:12 +0100 Subject: [PATCH 15/35] Jedi - Added Sweep Cooldown Reduction modifiers --- scripts/commands/combat/fs_sweep_1.py | 8 ++++++-- scripts/commands/combat/fs_sweep_2.py | 8 ++++++-- scripts/commands/combat/fs_sweep_3.py | 8 ++++++-- scripts/commands/combat/fs_sweep_4.py | 8 ++++++-- scripts/commands/combat/fs_sweep_5.py | 8 ++++++-- scripts/commands/combat/fs_sweep_6.py | 8 ++++++-- scripts/commands/combat/fs_sweep_7.py | 8 ++++++-- 7 files changed, 42 insertions(+), 14 deletions(-) diff --git a/scripts/commands/combat/fs_sweep_1.py b/scripts/commands/combat/fs_sweep_1.py index 3151d83b..6671e0ad 100644 --- a/scripts/commands/combat/fs_sweep_1.py +++ b/scripts/commands/combat/fs_sweep_1.py @@ -1,11 +1,15 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + if actor.getSkillMod('expertise_damage_line_fs_sweep'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) if actor.getSkillMod('expertise_action_line_fs_sweep'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) return diff --git a/scripts/commands/combat/fs_sweep_2.py b/scripts/commands/combat/fs_sweep_2.py index 3151d83b..6671e0ad 100644 --- a/scripts/commands/combat/fs_sweep_2.py +++ b/scripts/commands/combat/fs_sweep_2.py @@ -1,11 +1,15 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + if actor.getSkillMod('expertise_damage_line_fs_sweep'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) if actor.getSkillMod('expertise_action_line_fs_sweep'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) return diff --git a/scripts/commands/combat/fs_sweep_3.py b/scripts/commands/combat/fs_sweep_3.py index 3151d83b..6671e0ad 100644 --- a/scripts/commands/combat/fs_sweep_3.py +++ b/scripts/commands/combat/fs_sweep_3.py @@ -1,11 +1,15 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + if actor.getSkillMod('expertise_damage_line_fs_sweep'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) if actor.getSkillMod('expertise_action_line_fs_sweep'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) return diff --git a/scripts/commands/combat/fs_sweep_4.py b/scripts/commands/combat/fs_sweep_4.py index 3151d83b..6671e0ad 100644 --- a/scripts/commands/combat/fs_sweep_4.py +++ b/scripts/commands/combat/fs_sweep_4.py @@ -1,11 +1,15 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + if actor.getSkillMod('expertise_damage_line_fs_sweep'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) if actor.getSkillMod('expertise_action_line_fs_sweep'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) return diff --git a/scripts/commands/combat/fs_sweep_5.py b/scripts/commands/combat/fs_sweep_5.py index 3151d83b..6671e0ad 100644 --- a/scripts/commands/combat/fs_sweep_5.py +++ b/scripts/commands/combat/fs_sweep_5.py @@ -1,11 +1,15 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + if actor.getSkillMod('expertise_damage_line_fs_sweep'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) if actor.getSkillMod('expertise_action_line_fs_sweep'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) return diff --git a/scripts/commands/combat/fs_sweep_6.py b/scripts/commands/combat/fs_sweep_6.py index 3151d83b..6671e0ad 100644 --- a/scripts/commands/combat/fs_sweep_6.py +++ b/scripts/commands/combat/fs_sweep_6.py @@ -1,11 +1,15 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + if actor.getSkillMod('expertise_damage_line_fs_sweep'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) if actor.getSkillMod('expertise_action_line_fs_sweep'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) return diff --git a/scripts/commands/combat/fs_sweep_7.py b/scripts/commands/combat/fs_sweep_7.py index 3151d83b..6671e0ad 100644 --- a/scripts/commands/combat/fs_sweep_7.py +++ b/scripts/commands/combat/fs_sweep_7.py @@ -1,11 +1,15 @@ import sys def setup(core, actor, target, command): + + if actor.getSkillMod('expertise_cooldown_line_fs_sweep'): + command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10)) + if actor.getSkillMod('expertise_damage_line_fs_sweep'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_sweep').getBase())/100)) + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100)) if actor.getSkillMod('expertise_action_line_fs_sweep'): - command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_sweep').getBase())/100)) + command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100)) return From 0786a6ae0890bba6f2257b845e53eec0a4eb0f06 Mon Sep 17 00:00:00 2001 From: Treeku Date: Sat, 21 Dec 2013 11:54:35 +0000 Subject: [PATCH 16/35] No longer "forever in an old group" after logoff --- src/services/ConnectionService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/ConnectionService.java b/src/services/ConnectionService.java index 18ac17e1..a09272b1 100644 --- a/src/services/ConnectionService.java +++ b/src/services/ConnectionService.java @@ -189,6 +189,7 @@ public class ConnectionService implements INetworkDispatch { object.setInviteCounter(0); object.setInviteSenderId(0); object.setInviteSenderName(""); + core.groupService.handleGroupDisband(object); object.setClient(null); PlayerObject ghost = (PlayerObject) object.getSlottedObject("ghost"); From fb0de037f0791aed2d549abced27845f08dcbc85 Mon Sep 17 00:00:00 2001 From: Treeku Date: Sun, 22 Dec 2013 23:01:23 +0000 Subject: [PATCH 17/35] GetOption() --- src/resources/objects/tangible/TangibleObject.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/resources/objects/tangible/TangibleObject.java b/src/resources/objects/tangible/TangibleObject.java index 2b89cd36..d624557f 100644 --- a/src/resources/objects/tangible/TangibleObject.java +++ b/src/resources/objects/tangible/TangibleObject.java @@ -147,6 +147,12 @@ public class TangibleObject extends SWGObject { } } + public boolean getOption(int option) { + synchronized(objectMutex) { + return ((optionsBitmask & option) == option); + } + } + public void addOption(int option) { setOptionsBitmask(getOptionsBitmask() | option); } From b26374faf7196c9c8b627d0139996c6e65e00a3b Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Tue, 24 Dec 2013 00:23:17 +0100 Subject: [PATCH 18/35] Items - Profession restrictions --- scripts/commands/transferitemarmor.py | 3 ++ scripts/commands/transferitemmisc.py | 3 ++ scripts/commands/transferitemweapon.py | 3 ++ src/services/EquipmentService.java | 53 +++++++++++++++++++++----- 4 files changed, 53 insertions(+), 9 deletions(-) diff --git a/scripts/commands/transferitemarmor.py b/scripts/commands/transferitemarmor.py index b5090996..2b890936 100644 --- a/scripts/commands/transferitemarmor.py +++ b/scripts/commands/transferitemarmor.py @@ -4,6 +4,9 @@ def setup(): return def run(core, actor, target, commandString): + if core.equipmentService.canEquip(actor, target) is False: + return + parsedMsg = commandString.split(' ', 3) objService = core.objectService containerID = long(parsedMsg[1]) diff --git a/scripts/commands/transferitemmisc.py b/scripts/commands/transferitemmisc.py index 7a3f5199..79ef9455 100644 --- a/scripts/commands/transferitemmisc.py +++ b/scripts/commands/transferitemmisc.py @@ -4,6 +4,9 @@ def setup(): return def run(core, actor, target, commandString): + if core.equipmentService.canEquip(actor, target) is False: + return + parsedMsg = commandString.split(' ', 3) objService = core.objectService containerID = long(parsedMsg[1]) diff --git a/scripts/commands/transferitemweapon.py b/scripts/commands/transferitemweapon.py index 8c54e57a..9b403eaf 100644 --- a/scripts/commands/transferitemweapon.py +++ b/scripts/commands/transferitemweapon.py @@ -4,6 +4,9 @@ def setup(): return def run(core, actor, target, commandString): + if core.equipmentService.canEquip(actor, target) is False: + return + parsedMsg = commandString.split(' ', 3) objService = core.objectService containerID = long(parsedMsg[1]) diff --git a/src/services/EquipmentService.java b/src/services/EquipmentService.java index 975125ce..417bf093 100644 --- a/src/services/EquipmentService.java +++ b/src/services/EquipmentService.java @@ -33,6 +33,7 @@ import main.NGECore; import engine.resources.objects.SWGObject; import engine.resources.service.INetworkDispatch; import engine.resources.service.INetworkRemoteEvent; +import resources.objects.player.PlayerObject; public class EquipmentService implements INetworkDispatch { @@ -88,11 +89,42 @@ public class EquipmentService implements INetworkDispatch { } } + public String getFormalProfessionName(String stfName) { + String formalName = ""; + + switch (stfName) { + case "force_sensitive_1a": formalName = "Jedi"; break; + case "bounty_hunter_1a": formalName = "Bounty Hunter"; break; + case "officer_1a": formalName = "Officer"; break; + case "smuggler_1a": formalName = "Smuggler"; break; + case "entertainer_1a": formalName = "Entertainer"; break; + case "spy_1a": formalName = "Spy"; break; + case "medic_1a": formalName = "Medic"; break; + case "commando_1a": formalName = "Commando"; break; + + default: formalName = "Trader"; break; // Ziggy: Trader profession names are a bit irregular, so this is used. + + } + return formalName; + } + + public boolean canEquip(CreatureObject actor, SWGObject item) { + boolean result = true; + + if (item.getStringAttribute("class_required") != null) { + String profession = ((PlayerObject) actor.getSlottedObject("ghost")).getProfession(); + if (item.getStringAttribute("class_required").contentEquals(getFormalProfessionName(profession))) { + result = true; + } else{ + return false; + } + } + + return result; + } + public void equip(CreatureObject actor, SWGObject item) { - //if(replacedItem != null) - // unequip(actor, replacedItem); - String template = ((item.getAttachment("customServerTemplate") == null) ? item.getTemplate() : (item.getTemplate().split("shared_")[0] + "shared_" + ((String) item.getAttachment("customServerTemplate")) + ".iff")); String serverTemplate = template.replace(".iff", ""); PyObject func = core.scriptService.getMethod("scripts/" + serverTemplate.split("shared_" , 2)[0].replace("shared_", ""), serverTemplate.split("shared_" , 2)[1], "equip"); @@ -100,14 +132,18 @@ public class EquipmentService implements INetworkDispatch { func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item)); // TODO: add health/action bonus from crafted weapon with augmentations (also seen with cybernetics) - // TODO: faction restrictions - // TODO: Species restrictions? - // TODO: Gender restrictions? + // TODO: faction restrictions - You had to be a Combatant as minimum in order to EQUIP an item. + // TODO: Species restrictions + // TODO: Gender restrictions // TODO: crit enhancement from crafted weapons // TODO: Jedi robes Force Protection Intensity // TODO: check for armor category in order to add resistance to certain DoT types - // TODO: if weapon, add the weapon specific crit to display_only_critical - // TODO: bio-link + // TODO: Calculate actual armor values (REMINDER: Check if the player is wearing a jedi robe/cloak (look for force protection intensity). If they are, they shouldn't receive any additional protection from other items with armour.) + // TODO: bio-link (assign it by objectID with setAttachment and then just display it as a character name). + // TODO: item level requirement. if actorLevel >= itemLevel + // TODO: refactor equipable items that grant buffs. use setAttachment("itemBuff", "buffname") - example: object.setAttachment("itemBuff", "fs_buff_def_1_1") + // if(item.getAttachment("itemBuff") != null ) + // core.buffService.addBuffToCreature(actor, item.getAttachment("itemBuff")); if (actor.getSlotNameForObject(item).contentEquals("hold_r") == true) weaponCriticalToDisplay(actor, item, true); @@ -115,7 +151,6 @@ public class EquipmentService implements INetworkDispatch { Map attributes = new TreeMap(item.getAttributes()); for(Entry e : attributes.entrySet()) { - if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) { core.skillModService.addSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); } From 08d1e68df84676bc163432dd8e091525b19d2b03 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Tue, 24 Dec 2013 18:02:50 +0100 Subject: [PATCH 19/35] Revert "Jedi - Soothing Aura now handled in scripts" This reverts commit 7a108a9c022bc9dc14fddd8fbe1ae371f010af43. --- scripts/commands/combat/fs_sh_0.py | 9 --------- scripts/commands/combat/fs_sh_1.py | 9 --------- scripts/commands/combat/fs_sh_2.py | 9 --------- scripts/commands/combat/fs_sh_3.py | 9 --------- src/services/combat/CombatService.java | 4 +++- 5 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 scripts/commands/combat/fs_sh_0.py delete mode 100644 scripts/commands/combat/fs_sh_1.py delete mode 100644 scripts/commands/combat/fs_sh_2.py delete mode 100644 scripts/commands/combat/fs_sh_3.py diff --git a/scripts/commands/combat/fs_sh_0.py b/scripts/commands/combat/fs_sh_0.py deleted file mode 100644 index 84134341..00000000 --- a/scripts/commands/combat/fs_sh_0.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys - -def setup(core, actor, target, command): - if actor.hasBuff('fs_buff_def_1_1') and actor.getSkillMod('expertise_stance_healing_line_fs_heal'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_stance_healing_line_fs_heal').getBase())/100)) - - return -def run(core, actor, target, commandString): - return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sh_1.py b/scripts/commands/combat/fs_sh_1.py deleted file mode 100644 index 84134341..00000000 --- a/scripts/commands/combat/fs_sh_1.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys - -def setup(core, actor, target, command): - if actor.hasBuff('fs_buff_def_1_1') and actor.getSkillMod('expertise_stance_healing_line_fs_heal'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_stance_healing_line_fs_heal').getBase())/100)) - - return -def run(core, actor, target, commandString): - return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sh_2.py b/scripts/commands/combat/fs_sh_2.py deleted file mode 100644 index 84134341..00000000 --- a/scripts/commands/combat/fs_sh_2.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys - -def setup(core, actor, target, command): - if actor.hasBuff('fs_buff_def_1_1') and actor.getSkillMod('expertise_stance_healing_line_fs_heal'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_stance_healing_line_fs_heal').getBase())/100)) - - return -def run(core, actor, target, commandString): - return \ No newline at end of file diff --git a/scripts/commands/combat/fs_sh_3.py b/scripts/commands/combat/fs_sh_3.py deleted file mode 100644 index 84134341..00000000 --- a/scripts/commands/combat/fs_sh_3.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys - -def setup(core, actor, target, command): - if actor.hasBuff('fs_buff_def_1_1') and actor.getSkillMod('expertise_stance_healing_line_fs_heal'): - command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_stance_healing_line_fs_heal').getBase())/100)) - - return -def run(core, actor, target, commandString): - return \ No newline at end of file diff --git a/src/services/combat/CombatService.java b/src/services/combat/CombatService.java index bd2565ed..9e4d2ba2 100644 --- a/src/services/combat/CombatService.java +++ b/src/services/combat/CombatService.java @@ -900,7 +900,9 @@ public class CombatService implements INetworkDispatch { healPotency += healer.getSkillMod("expertise_healing_line_sm_heal").getBase(); if(healer.getSkillMod("expertise_healing_line_sp_heal") != null) healPotency += healer.getSkillMod("expertise_healing_line_sp_heal").getBase(); - + if(healer.hasBuff("fs_buff_def_1_1")) + if(healer.getSkillMod("expertise_stance_healing_line_fs_heal") != null) + healPotency += healer.getSkillMod("expertise_stance_healing_line_fs_heal").getBase(); if(healPotency > 0) healAmount += ((healAmount * healPotency) / 100); if(target.getSkillMod("expertise_healing_reduction") != null) From a115c62887bf8e09fc4a7225d910ff79e5755dc2 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Wed, 25 Dec 2013 05:15:53 +0100 Subject: [PATCH 20/35] Items - Action and Health attributes --- src/services/EquipmentService.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/services/EquipmentService.java b/src/services/EquipmentService.java index 417bf093..f96e0e2c 100644 --- a/src/services/EquipmentService.java +++ b/src/services/EquipmentService.java @@ -141,9 +141,7 @@ public class EquipmentService implements INetworkDispatch { // TODO: Calculate actual armor values (REMINDER: Check if the player is wearing a jedi robe/cloak (look for force protection intensity). If they are, they shouldn't receive any additional protection from other items with armour.) // TODO: bio-link (assign it by objectID with setAttachment and then just display it as a character name). // TODO: item level requirement. if actorLevel >= itemLevel - // TODO: refactor equipable items that grant buffs. use setAttachment("itemBuff", "buffname") - example: object.setAttachment("itemBuff", "fs_buff_def_1_1") - // if(item.getAttachment("itemBuff") != null ) - // core.buffService.addBuffToCreature(actor, item.getAttachment("itemBuff")); + // TODO: refactor equipable items that grant buffs. use setAttachment("itemBuff", "buffname") if (actor.getSlotNameForObject(item).contentEquals("hold_r") == true) weaponCriticalToDisplay(actor, item, true); @@ -153,7 +151,13 @@ public class EquipmentService implements INetworkDispatch { for(Entry e : attributes.entrySet()) { if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) { core.skillModService.addSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); - } + } + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_health")) { + actor.setMaxHealth(actor.getMaxHealth() + Integer.parseInt((String) e.getValue())); + } + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) { + actor.setMaxAction(actor.getMaxAction() + Integer.parseInt((String) e.getValue())); + } } @@ -179,6 +183,12 @@ public class EquipmentService implements INetworkDispatch { if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) { core.skillModService.deductSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue())); + } + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_health")) { + actor.setMaxHealth(actor.getMaxHealth() - Integer.parseInt((String) e.getValue())); + } + if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) { + actor.setMaxAction(actor.getMaxAction() - Integer.parseInt((String) e.getValue())); } } From 2f8d36ea576d38253a43d41e9b1561c7bd5c9dd6 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Thu, 26 Dec 2013 07:27:14 +0100 Subject: [PATCH 21/35] Trading - Fixed an issue with No Trade labeled items --- src/services/trade/TradeService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/services/trade/TradeService.java b/src/services/trade/TradeService.java index d1bd7b26..e425d282 100644 --- a/src/services/trade/TradeService.java +++ b/src/services/trade/TradeService.java @@ -202,8 +202,7 @@ public class TradeService implements INetworkDispatch{ } else { - - if (objectToTrade.getIntAttribute("no_trade") == 1) { + if(objectToTrade.getAttributes().toString().contains("no_trade")) { return; } From 11f100239dbd7bce308f2c47536a7489cf656592 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Thu, 26 Dec 2013 19:32:51 +0100 Subject: [PATCH 22/35] Roadmap - Added some rewards --- .../wearables/robe/item_npe_fs_robe_02_02.py | 13 +++++++++++++ .../weapon_roadmap_lightsaber_02_02.py | 12 ++++++++++++ scripts/roadmap/roadmap_rewards.py | 7 ++++++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py create mode 100644 scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py diff --git a/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py new file mode 100644 index 00000000..faf7ac17 --- /dev/null +++ b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_02.py @@ -0,0 +1,13 @@ +import sys + +def setup(core, object): + + object.setStfFilename('static_item_n') + object.setStfName('item_npe_fs_robe_02_02') + object.setDetailFilename('static_item_d') + object.setDetailName('item_npe_fs_robe_02_02') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 21) + object.setStringAttribute('protection_level', 'Faint') + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 20) + return diff --git a/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py b/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py new file mode 100644 index 00000000..aa616f3d --- /dev/null +++ b/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py @@ -0,0 +1,12 @@ +import sys + +def setup(core, object): + object.setCustomName('First Generation Lightsaber') + + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 1) + object.setStringAttribute('class_required', 'Jedi') + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '200-400') + object.setStringAttribute('cat_wpn_damage.elemental_value', '200-400') + object.setIntAttribute('cap_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file diff --git a/scripts/roadmap/roadmap_rewards.py b/scripts/roadmap/roadmap_rewards.py index 2f11d77e..b1071bbc 100644 --- a/scripts/roadmap/roadmap_rewards.py +++ b/scripts/roadmap/roadmap_rewards.py @@ -1,4 +1,9 @@ import sys def get(name): - return "" + + if name == 'item_npe_fs_robe_02_02': + return "object/tangible/wearables/robe/shared_robe_jedi_padawan.iff" + + if name == 'weapon_roadmap_lightsaber_02_02': + return "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s1.iff" \ No newline at end of file From 4ff7a7cf10dac051d08fd8c687cdf46e7983cbd4 Mon Sep 17 00:00:00 2001 From: Levarrishawk Date: Fri, 27 Dec 2013 23:25:35 -0500 Subject: [PATCH 23/35] Preliminary spawning of Mos Eisley Background NPCs INCOMPLETE: uninteractible NPCs within Mos Eisley cantina. --- scripts/static_spawns/tatooine.py | 104 ++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/scripts/static_spawns/tatooine.py b/scripts/static_spawns/tatooine.py index 2a84eb1f..e56377a2 100644 --- a/scripts/static_spawns/tatooine.py +++ b/scripts/static_spawns/tatooine.py @@ -3,6 +3,7 @@ import sys def addPlanetSpawns(core, planet): stcSvc = core.staticService +# Wayfar Life Day, by Wefi stcSvc.spawnObject('object/mobile/shared_lifeday_saun_dann.iff', 'tatooine', long(0), float(-5037.00), float(75), float(-6561), float(-0.75), float(0)) # Life Day stcSvc.spawnObject('object/tangible/holiday/life_day/shared_main_lifeday_tree.iff', 'tatooine', long(0), float(-5043.00), float(75), float(-6541.00), float(0.999132931232), float(-0.0416347384453)) # Lifeday Tree @@ -17,6 +18,109 @@ def addPlanetSpawns(core, planet): bandtat4.setCustomName2('Sunil Eide') stcSvc.spawnObject('object/tangible/instrument/shared_nalargon.iff', 'tatooine', long(0), float(-5045.00), float(75), float(-6555), float(0.999132931232), float(-0.0416347384453)) # Drums stcSvc.spawnObject('object/tangible/instrument/shared_ommni_box.iff', 'tatooine', long(0), float(-5043.00), float(75), float(-6559), float(0.999132931232), float(-0.0416347384453)) # Box + +# Mos Eisley Spawns: WORK IN PROGRESS by Levarris + + #Cantina Interior + wuher = stcSvc.spawnObject('object/mobile/shared_wuher.iff', 'tatooine', long(1082877), float(8.6), float(-0.9), float(0.4), float(0.71), float(0.71)) + wuher.setCustomName2('Wuher') + + chadraFanFemale = stcSvc.spawnObject('object/mobile/shared_chadra_fan_female.iff', 'tatooine', long(1082877), float(10.6), float(-0.9), float(-1.5), float(0.42), float(0.90)) + chadraFanFemale.setCustomName2('a Chadra Fan Female') + + chadraFanMale = stcSvc.spawnObject('object/mobile/shared_chadra_fan_male.iff', 'tatooine', long(1082877), float(10.7), float(-0.9), float(-0.3), float(0.64), float(0.77)) + chadraFanMale.setCustomName2('a Chadra Fan Male') + + muftak = stcSvc.spawnObject('object/mobile/shared_muftak.iff', 'tatooine', long(1082877), float(20.3), float(-0.9), float(4.9), float(0.82), float(0.57)) + muftak.setCustomName2('Muftak') + + chissMale1 = stcSvc.spawnObject('object/mobile/ep3/shared_ep3_etyyy_chiss_poacher_01.iff', 'tatooine', long(1082877), float(1.7), float(-0.9), float(-5.0), float(0.71), float(0.71)) + chissMale1.setCustomName2('a Chiss Male') + + chissMale2 = stcSvc.spawnObject('object/mobile/ep3/shared_ep3_etyyy_chiss_poacher_02.iff', 'tatooine', long(1082877), float(3.4), float(-0.9), float(-4.8), float(0), float(0)) + chissMale2.setCustomName2('a Chiss Male') + + cantinaStorm = stcSvc.spawnObject('object/mobile/shared_stormtrooper.iff', 'tatooine', long(1082877), float(2.9), float(-0.9), float(-6.5), float(0.71), float(0.71)) + cantinaStorm.setCustomName2('a Stormtrooper') + + cantinaStormL = stcSvc.spawnObject('object/mobile/shared_stormtrooper_groupleader.iff', 'tatooine', long(1082877), float(3.6), float(-0.9), float(-7.9), float(0.71), float(0.71)) + cantinaStormL.setCustomName2('a Stormtrooper Squad Leader') + + figrinDan = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(3.7), float(-0.9), float(-14.4), float(0.42), float(0.91)) + figrinDan.setCustomName2('Figrin Dan') + + techMor = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(4.0), float(-0.9), float(-17.0), float(0.42), float(0.91)) + techMor.setCustomName2('Tech M\'or') + + doikkNats = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(2.2), float(-0.9), float(-16.4), float(0.42), float(0.91)) + doikkNats.setCustomName2('Doikk Na\'ts') + + tednDahai = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(1.3), float(-0.9), float(-15.2), float(0.42), float(0.91)) + tednDahai.setCustomName2('Tedn Dahai') + + nalanCheel = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_figrin_dan.iff', 'tatooine', long(1082880), float(0.5), float(-0.9), float(-17.1), float(0.42), float(0.91)) + nalanCheel.setCustomName2('Nalan Cheel') + + businessman1 = stcSvc.spawnObject('object/mobile/shared_dressed_businessman_human_male_01.iff', 'tatooine', long(1082877), float(10.7), float(-0.9), float(1.9), float(0.42), float(0.91)) + businessman1.setCustomName2('a Businessman') + + commoner1 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_aqualish_male_01.iff', 'tatooine', long(1082877), float(10.3), float(-0.9), float(2.7), float(0.42), float(0.91)) + commoner1.setCustomName2('a Commoner') + + entertainer1 = stcSvc.spawnObject('object/mobile/shared_dressed_entertainer_trainer_twk_female_01.iff', 'tatooine', long(1082877), float(9.4), float(-0.9), float(3.9), float(0.42), float(0.91)) + entertainer1.setCustomName2('an Entertainer') + + noble1 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_trandoshan_male_01.iff', 'tatooine', long(1082877), float(8.6), float(-0.9), float(4.8), float(0.42), float(0.91)) + noble1.setCustomName2('a Noble') + + commoner2 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_trandoshan_female_01.iff', 'tatooine', long(1082877), float(4.1), float(-0.9), float(5.7), float(0.42), float(0.91)) + commoner2.setCustomName2('a Commoner') + + commoner3 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_bothan_female_01.iff', 'tatooine', long(1082877), float(3.1), float(-0.9), float(5.9), float(0.42), float(0.91)) + commoner3.setCustomName2('a Commoner') + + commoner4 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_fat_twilek_male_01.iff', 'tatooine', long(1082877), float(1.7), float(-0.9), float(6.0), float(0.42), float(0.91)) + commoner4.setCustomName2('a Commoner') + + commoner5 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_bothan_male_01.iff', 'tatooine', long(1082877), float(-0.4), float(-0.9), float(5.9), float(0.42), float(0.91)) + commoner5.setCustomName2('a Commoner') + + commoner6 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_05.iff', 'tatooine', long(1082877), float(16.0), float(-0.9), float(4.1), float(0.42), float(0.91)) + commoner6.setCustomName2('a Commoner') + + commoner7 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_fat_zabrak_male_01.iff', 'tatooine', long(1082877), float(8.8), float(-0.9), float(-6.0), float(0.42), float(0.91)) + commoner7.setCustomName2('a Patron') + + commoner2 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_08.iff', 'tatooine', long(1082877), float(6.8), float(-0.9), float(-6.5), float(0.42), float(0.91)) + commoner2.setCustomName2('a Commoner') + + #Starport Interior + + #City Hall Interior + + #Lucky Despot Interior + + #Medical Center Interior + + #Theater Interior + + #Miscellaneous Building Interiors + + #Outside + +# Mos Espa NPC Spawns +# Mos Entha NPC Spawns + +# Bestine NPC Spawns + +# Anchorhead NPC Spawns + +# Mos Taike NPC Spawns + +# Wayfar NPC Spawns + +# Jabba's Palace Theme Park Spawns + return \ No newline at end of file From 82af3605d615fa04c60d44a753da480f6466cb83 Mon Sep 17 00:00:00 2001 From: Levarrishawk Date: Sat, 28 Dec 2013 00:44:57 -0500 Subject: [PATCH 24/35] Added more NPCs to tatooine. Additional NPCs added, in need of proper rotational values and state bitmasks on select objects. --- scripts/static_spawns/tatooine.py | 62 ++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/scripts/static_spawns/tatooine.py b/scripts/static_spawns/tatooine.py index e56377a2..3ed56b07 100644 --- a/scripts/static_spawns/tatooine.py +++ b/scripts/static_spawns/tatooine.py @@ -91,8 +91,14 @@ def addPlanetSpawns(core, planet): commoner7 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_fat_zabrak_male_01.iff', 'tatooine', long(1082877), float(8.8), float(-0.9), float(-6.0), float(0.42), float(0.91)) commoner7.setCustomName2('a Patron') - commoner2 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_08.iff', 'tatooine', long(1082877), float(6.8), float(-0.9), float(-6.5), float(0.42), float(0.91)) - commoner2.setCustomName2('a Commoner') + commoner8 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_08.iff', 'tatooine', long(1082877), float(6.8), float(-0.9), float(-6.5), float(0.42), float(0.91)) + commoner8.setCustomName2('a Patron') + + commoner9 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_aqualish_male_09.iff', 'tatooine', long(1082877), float(1.1), float(-0.9), float(-7.7), float(0.42), float(0.91)) + commoner9.setCustomName2('a Commoner') + + commoner10 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_nikto_male_04.iff', 'tatooine', long(1082877), float(2.1), float(-0.9), float(-8.4), float(0.42), float(0.91)) + commoner10.setCustomName2('a Commoner') #Starport Interior @@ -107,7 +113,59 @@ def addPlanetSpawns(core, planet): #Miscellaneous Building Interiors #Outside + businessman2 = stcSvc.spawnObject('object/mobile/shared_dressed_businessman_human_male_01.iff', 'tatooine', long(0), float(3532.7), float(5.0), float(-4788.1), float(0), float(0)) + businessman2.setCustomName2('a Businessman') + noble2 = stcSvc.spawnObject('object/mobile/shared_dressed_noble_human_female_01.iff', 'tatooine', long(0), float(3542.3), float(5.0), float(-4826.0), float(0.42), float(0.91)) + noble2.setCustomName2('a Noble') + + commoner11 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_human_male_06.iff', 'tatooine', long(0), float(3529.1), float(5.0), float(-4900.4), float(0.42), float(0.91)) + commoner11.setCustomName2('a Commoner') + + businessman3 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_trandoshan_male_02.iff', 'tatooine', long(0), float(3532.7), float(5.0), float(-4788.1), float(0), float(0)) + businessman3.setCustomName2('a Businessman') + + jawa1 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3663.3), float(5.0), float(-4858.6), float(0), float(0)) + jawa1.setCustomName2('a Jawa') + + commoner12 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_moncal_male_01.iff', 'tatooine', long(0), float(3532.7), float(5.0), float(-4788.1), float(0), float(0)) + commoner12.setCustomName2('a Scientist') + + commoner13 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_naboo_zabrak_female_02.iff', 'tatooine', long(0), float(3559.7), float(5.0), float(-4725.9), float(0), float(0)) + commoner13.setCustomName2('a Commoner') + + commoner14 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_devaronian_male_01.iff', 'tatooine', long(0), float(3527.7), float(5.0), float(-4721.1), float(0), float(0)) + commoner14.setCustomName2('a Commoner') + + commoner15 = stcSvc.spawnObject('object/mobile/shared_dressed_commoner_tatooine_aqualish_female_01.iff', 'tatooine', long(0), float(3513.7), float(5.0), float(-4740.4), float(0), float(0)) + commoner15.setCustomName2('a Commoner') + + ltHarburik = stcSvc.spawnObject('object/mobile/tatooine_npc/shared_lt_harburik.iff', 'tatooine', long(0), float(3485.4), float(5.0), float(-4788.1), float(0), float(0)) + ltHarburik.setCustomName2('Lieutenant Harburik') + + jawa2 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3475.4), float(5.0), float(-4852.7), float(0), float(0)) + jawa2.setCustomName2('a Jawa') + + jawa3 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3469.3), float(5.0), float(-4861.5), float(0), float(0)) + jawa3.setCustomName2('a Jawa') + + jawa4 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3486.1), float(5.0), float(-4884.7), float(0), float(0)) + jawa4.setCustomName2('a Jawa') + + jawa5 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3487.1), float(5.0), float(-4886.0), float(0), float(0)) + jawa5.setCustomName2('a Jawa') + + jawa6 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3488.8), float(5.0), float(-4884.4), float(0), float(0)) + jawa6.setCustomName2('a Jawa') + + jawa7 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3472.2), float(5.0), float(-4918.4), float(0), float(0)) + jawa7.setCustomName2('a Jawa') + + jawa8 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3471.4), float(5.0), float(-4919.5), float(0), float(0)) + jawa8.setCustomName2('a Jawa') + + jawa9 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3470.3), float(5.0), float(-4918.7), float(0), float(0)) + jawa9.setCustomName2('a Jawa') # Mos Espa NPC Spawns # Mos Entha NPC Spawns From 9c96c6f95b9a5fdad20106a011d12dd24f2c7af0 Mon Sep 17 00:00:00 2001 From: Fingies Date: Fri, 27 Dec 2013 22:36:36 -0800 Subject: [PATCH 25/35] Added Bib Fortuna --- scripts/static_spawns/tatooine.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/static_spawns/tatooine.py b/scripts/static_spawns/tatooine.py index 3ed56b07..9778e3d4 100644 --- a/scripts/static_spawns/tatooine.py +++ b/scripts/static_spawns/tatooine.py @@ -166,6 +166,10 @@ def addPlanetSpawns(core, planet): jawa9 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3470.3), float(5.0), float(-4918.7), float(0), float(0)) jawa9.setCustomName2('a Jawa') + + bib = stcSvc.spawnObject('object/mobile/shared_bib_fortuna.iff', 'tatooine', long(0), float(3552.4), float(5.0), float(-4933.2), float(0), float(0)) + bib.setCustomName2('Bib Fortuna') + # Mos Espa NPC Spawns # Mos Entha NPC Spawns From 2e05a0575d6604d3710284c6febf74c63ad7a806 Mon Sep 17 00:00:00 2001 From: Fingies Date: Fri, 27 Dec 2013 23:20:45 -0800 Subject: [PATCH 26/35] Revert "Added Bib Fortuna" This reverts commit 9c96c6f95b9a5fdad20106a011d12dd24f2c7af0. --- scripts/static_spawns/tatooine.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/static_spawns/tatooine.py b/scripts/static_spawns/tatooine.py index 9778e3d4..3ed56b07 100644 --- a/scripts/static_spawns/tatooine.py +++ b/scripts/static_spawns/tatooine.py @@ -166,10 +166,6 @@ def addPlanetSpawns(core, planet): jawa9 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3470.3), float(5.0), float(-4918.7), float(0), float(0)) jawa9.setCustomName2('a Jawa') - - bib = stcSvc.spawnObject('object/mobile/shared_bib_fortuna.iff', 'tatooine', long(0), float(3552.4), float(5.0), float(-4933.2), float(0), float(0)) - bib.setCustomName2('Bib Fortuna') - # Mos Espa NPC Spawns # Mos Entha NPC Spawns From fa7ece0fdc8fdda2185bf2653b9b99ffd3a11c42 Mon Sep 17 00:00:00 2001 From: Fingies Date: Fri, 27 Dec 2013 23:22:02 -0800 Subject: [PATCH 27/35] Revert "Revert "Added Bib Fortuna"" This reverts commit 2e05a0575d6604d3710284c6febf74c63ad7a806. --- scripts/static_spawns/tatooine.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/static_spawns/tatooine.py b/scripts/static_spawns/tatooine.py index 3ed56b07..9778e3d4 100644 --- a/scripts/static_spawns/tatooine.py +++ b/scripts/static_spawns/tatooine.py @@ -166,6 +166,10 @@ def addPlanetSpawns(core, planet): jawa9 = stcSvc.spawnObject('object/mobile/shared_jawa.iff', 'tatooine', long(0), float(3470.3), float(5.0), float(-4918.7), float(0), float(0)) jawa9.setCustomName2('a Jawa') + + bib = stcSvc.spawnObject('object/mobile/shared_bib_fortuna.iff', 'tatooine', long(0), float(3552.4), float(5.0), float(-4933.2), float(0), float(0)) + bib.setCustomName2('Bib Fortuna') + # Mos Espa NPC Spawns # Mos Entha NPC Spawns From dc9b66e40f5477a46706fcae32ed1b66b82a54c9 Mon Sep 17 00:00:00 2001 From: Fingies Date: Sat, 28 Dec 2013 02:14:05 -0800 Subject: [PATCH 28/35] Added Static NPC Spawns for Lok --- scripts/static_spawns/lok.py | 49 +++++++++++++++++++++++++++++++++ src/services/StaticService.java | 1 + 2 files changed, 50 insertions(+) create mode 100644 scripts/static_spawns/lok.py diff --git a/scripts/static_spawns/lok.py b/scripts/static_spawns/lok.py new file mode 100644 index 00000000..acb0f8a6 --- /dev/null +++ b/scripts/static_spawns/lok.py @@ -0,0 +1,49 @@ + +import sys + +def addPlanetSpawns(core, planet): + + stcSvc = core.staticService +#Nym's Stronghold -Fingies + + #Outside + + nymtech = stcSvc.spawnObject('object/mobile/shared_dressed_nym_technician_2.iff', 'lok', long(0), float(372.87), float(11.99), float(4984.83), float(0.97), float(-0.21)) + nymtech.setCustomName2('Nym\'s Fuel Technician') + disgrunt1 = stcSvc.spawnObject('object/mobile/shared_nym_themepark_d_townsperson_lead.iff', 'lok', long(0), float(473.28), float(23.00), float(4945.03), float(0.043), float(0.99)) + disgrunt1.setCustomName2('a disgruntled townsperson') + guard1 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_nikto_m.iff', 'lok', long(0), float(472.82), float(22.57), float(4920.00), float(0), float(0)) + guard1.setCustomName2('Nym\'s Guard') + guard2 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_hum_m.iff', 'lok', long(0), float(480.74), float(22.64), float(4920.02), float(0), float(0)) + guard2.setCustomName2('Nym\'s Guard') + + #Nym's Palace - Interior + + brawl1 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_brawler_hum_f.iff', 'lok', long(6595511), float(5.7), float(1.3), float(-6.1), float(0.90), float(-0.42)) + brawl1.setCustomName2('Nym\'s Brawler') + surv1 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_surveyer_rod_m.iff', 'lok', long(6595511), float(4.5), float(1.3), float(-4.1), float(0.078), float(-0.99)) + surv1.setCustomName2('Nym\'s Surveyor') + bodyg1 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_bodyguard_hum_m.iff', 'lok', long(6595511), float(7.8), float(1.3), float(-6.8), float(0.782), float(0.622)) + bodyg1.setCustomName2('Nym\'s Bodyguard') + mako = stcSvc.spawnObject('object/mobile/shared_nym_themepark_mako_ghast.iff', 'lok', long(6595511), float(5.5), float(4.1), float(-13.9), float(0.309), float(0.951)) + mako.setCustomName2('Mako Ghast') + bodyg2 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_bodyguard_rod_m.iff', 'lok', long(6595511), float(0.3), float(1.3), float(3.2), float(0.707), float(0.707)) + bodyg2.setCustomName2('Nym\'s Bodyguard') + bodyg3 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_bodyguard_rod_m.iff', 'lok', long(6595511), float(-1.6), float(1.3), float(3.0), float(0.707), float(-0.707)) + bodyg3.setCustomName2('Nym\'s Bodyguard') + surv2 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_surveyer_rod_m.iff', 'lok', long(6595511), float(-9.1), float(1.3), float(-5.9), float(1), float(0)) + surv2.setCustomName2('Nym\'s Surveyor') + brawl2 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_brawler_tran_m.iff', 'lok', long(6595511), float(-9.1), float(1.3), float(-3.1), float(0.0087), float(0.999)) + brawl2.setCustomName2('Nym\'s Brawler') + guard3 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_hum_m.iff', 'lok', long(6595511), float(-19.7), float(2.3), float(-17.6), float(0.999), float(0.0087)) + guard3.setCustomName2('Nym\'s Guard') + creep1 = stcSvc.spawnObject('object/mobile/shared_slicer_kelson_sharphorn.iff', 'lok', long(6595511), float(-4.2), float(2.3), float(7.6), float(0.0174), float(0.9998)) + creep1.setCustomName2('Kelson Sharphorn') + guard4 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_hum_m.iff', 'lok', long(6595511), float(24.8), float(2.3), float(7.9), float(0.0174), float(0.9998)) + guard4.setCustomName2('Nym\'s Guard') + guard5 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_hum_m.iff', 'lok', long(6595511), float(3.7), float(4.1), float(-9.5), float(0.9998), float(0.0174)) + guard5.setCustomName2('Nym\'s Guard') + guard6 = stcSvc.spawnObject('object/mobile/shared_dressed_nym_guard_weak_rod_m.iff', 'lok', long(6595511), float(-3.7), float(4.1), float(-9.5), float(1), float(0)) + guard6.setCustomName2('Nym\'s Guard') + + diff --git a/src/services/StaticService.java b/src/services/StaticService.java index e8e72860..a0447d0a 100644 --- a/src/services/StaticService.java +++ b/src/services/StaticService.java @@ -55,6 +55,7 @@ public class StaticService implements INetworkDispatch { spawnPlanetStaticObjs("rori"); spawnPlanetStaticObjs("naboo"); spawnPlanetStaticObjs("tatooine"); + spawnPlanetStaticObjs("lok"); } @Override From 9fdce3b6250a939fa4ea02ef9b9e02de125364a0 Mon Sep 17 00:00:00 2001 From: Levarrishawk Date: Sat, 28 Dec 2013 06:23:55 -0500 Subject: [PATCH 29/35] Added Option & State Masks --- scripts/static_spawns/tatooine.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/static_spawns/tatooine.py b/scripts/static_spawns/tatooine.py index 9778e3d4..9817b21c 100644 --- a/scripts/static_spawns/tatooine.py +++ b/scripts/static_spawns/tatooine.py @@ -1,4 +1,6 @@ import sys +from resources.datatables import Options +from resources.datatables import StateStatus def addPlanetSpawns(core, planet): @@ -24,6 +26,8 @@ def addPlanetSpawns(core, planet): #Cantina Interior wuher = stcSvc.spawnObject('object/mobile/shared_wuher.iff', 'tatooine', long(1082877), float(8.6), float(-0.9), float(0.4), float(0.71), float(0.71)) wuher.setCustomName2('Wuher') + wuher.addOption(Options.INVULNERABLE) + wuher.setStateBitmask(StateStatus.SittingOnChair) chadraFanFemale = stcSvc.spawnObject('object/mobile/shared_chadra_fan_female.iff', 'tatooine', long(1082877), float(10.6), float(-0.9), float(-1.5), float(0.42), float(0.90)) chadraFanFemale.setCustomName2('a Chadra Fan Female') From 491ef2c4bd32d8bb2214bbf6ac39633550041046 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sat, 28 Dec 2013 15:18:22 +0100 Subject: [PATCH 30/35] Roadmap - Jedi lightsaber --- .../sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py b/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py index aa616f3d..38a9f07e 100644 --- a/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py +++ b/scripts/object/weapon/melee/sword/crafted_saber/weapon_roadmap_lightsaber_02_02.py @@ -7,6 +7,6 @@ def setup(core, object): object.setStringAttribute('class_required', 'Jedi') object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') object.setStringAttribute('cat_wpn_damage.damage', '200-400') - object.setStringAttribute('cat_wpn_damage.elemental_value', '200-400') - object.setIntAttribute('cap_wpn_damage.dps', object.getDamagePerSecond()) + + ## finish this ## return \ No newline at end of file From 9afcd4fb28df5fc6b6088ecf97789aa5c7ea790b Mon Sep 17 00:00:00 2001 From: Treeku Date: Sat, 28 Dec 2013 16:14:52 +0000 Subject: [PATCH 31/35] Fixed toggleawayfromkeyboard --- scripts/commands/toggleawayfromkeyboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/commands/toggleawayfromkeyboard.py b/scripts/commands/toggleawayfromkeyboard.py index 18dece5b..21fddc02 100644 --- a/scripts/commands/toggleawayfromkeyboard.py +++ b/scripts/commands/toggleawayfromkeyboard.py @@ -1,4 +1,4 @@ -from resources.common import PlayerFlags +from resources.datatables import PlayerFlags import sys def setup(): @@ -7,4 +7,4 @@ def setup(): def run(core, actor, target, commandString): ghost = actor.getSlottedObject('ghost') ghost.toggleFlag(PlayerFlags.AFK) - return \ No newline at end of file + return From f9eb50b02ad609d9d24b6b62f62fded609c86192 Mon Sep 17 00:00:00 2001 From: Treeku Date: Sat, 28 Dec 2013 16:16:11 +0000 Subject: [PATCH 32/35] Fixed toggledisplayingfactionrank --- scripts/commands/toggledisplayingfactionrank.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/commands/toggledisplayingfactionrank.py b/scripts/commands/toggledisplayingfactionrank.py index bf4ae34f..e39aad18 100644 --- a/scripts/commands/toggledisplayingfactionrank.py +++ b/scripts/commands/toggledisplayingfactionrank.py @@ -1,4 +1,4 @@ -from resources.common import PlayerFlags +from resources.datatables import PlayerFlags import sys def setup(): @@ -7,4 +7,4 @@ def setup(): def run(core, actor, target, commandString): ghost = actor.getSlottedObject('ghost') ghost.toggleFlag(PlayerFlags.FACTIONRANK) - return \ No newline at end of file + return From 7c53454d8ae585ccd5b7ee2569869ed7f6149ebe Mon Sep 17 00:00:00 2001 From: Treeku Date: Sat, 28 Dec 2013 17:08:24 +0000 Subject: [PATCH 33/35] Delete char now logs it out & removes it from game - Incase they are logged onto the character with another client when it's deleted. - Ensures removal from the quadtree. --- src/services/LoginService.java | 51 ++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/src/services/LoginService.java b/src/services/LoginService.java index 7f6ad1c7..bd464fc2 100644 --- a/src/services/LoginService.java +++ b/src/services/LoginService.java @@ -55,8 +55,10 @@ import protocol.swg.LoginEnumCluster; import protocol.swg.ServerNowEpochTime; import protocol.swg.StationIdHasJediSlot; import resources.common.*; +import resources.datatables.PlayerFlags; import resources.objects.creature.CreatureObject; +import resources.objects.player.PlayerObject; @SuppressWarnings("unused") @@ -181,21 +183,40 @@ public class LoginService implements INetworkDispatch{ packet.deserialize(data); Client client = core.getClient(session); - PreparedStatement preparedStatement; - - preparedStatement = databaseConnection1.preparedStatement("DELETE FROM characters WHERE \"id\"=? AND \"galaxyId\"=? AND \"accountId\"=?"); - preparedStatement.setLong(1, packet.getcharId()); - preparedStatement.setInt(2, packet.getgalaxyId()); - preparedStatement.setInt(3, (int) client.getAccountId()); - boolean resultSet = preparedStatement.execute(); - //TODO: send deletecharacter failed - if(!resultSet) { - core.getCreatureODB().delete(new Long(packet.getcharId()), Long.class, CreatureObject.class); - DeleteCharacterReplyMessage reply = new DeleteCharacterReplyMessage(0); - session.write(reply.serialize()); - } - preparedStatement.close(); - + PreparedStatement preparedStatement; + + preparedStatement = databaseConnection1.preparedStatement("DELETE FROM characters WHERE \"id\"=? AND \"galaxyId\"=? AND \"accountId\"=?"); + preparedStatement.setLong(1, packet.getcharId()); + preparedStatement.setInt(2, packet.getgalaxyId()); + preparedStatement.setInt(3, (int) client.getAccountId()); + boolean resultSet = preparedStatement.execute(); + + //TODO: send deletecharacter failed + if(!resultSet) { + CreatureObject object = core.objectService.getObject(packet.getcharId()); + + if (object != null) { + PlayerObject player = object.getSlottedObject("ghost"); + + + if (player != null && !player.isSet(PlayerFlags.LD) && object.getClient()) { + core.connectionService.disconnect(object.getClient().getSession()); + } + + if (object.isInQuadtree()) { + core.simulationService.remove(object, object.getPosition().x, object.getPosition().z, true); + } + + destroyObject(object); + } + + core.getCreatureODB().delete(new Long(packet.getcharId()), Long.class, CreatureObject.class); + DeleteCharacterReplyMessage reply = new DeleteCharacterReplyMessage(0); + session.write(reply.serialize()); + } + + preparedStatement.close(); + } }); From eec07f95cf3fe667b063c0bb9a7982cd8254bcbd Mon Sep 17 00:00:00 2001 From: Treeku Date: Sat, 28 Dec 2013 17:28:30 +0000 Subject: [PATCH 34/35] Few alterations --- src/services/LoginService.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/services/LoginService.java b/src/services/LoginService.java index bd464fc2..54af0cbc 100644 --- a/src/services/LoginService.java +++ b/src/services/LoginService.java @@ -58,7 +58,6 @@ import resources.common.*; import resources.datatables.PlayerFlags; import resources.objects.creature.CreatureObject; -import resources.objects.player.PlayerObject; @SuppressWarnings("unused") @@ -178,7 +177,7 @@ public class LoginService implements INetworkDispatch{ data = data.order(ByteOrder.LITTLE_ENDIAN); data.position(0); - + DeleteCharacterMessage packet = new DeleteCharacterMessage(); packet.deserialize(data); Client client = core.getClient(session); @@ -196,12 +195,9 @@ public class LoginService implements INetworkDispatch{ CreatureObject object = core.objectService.getObject(packet.getcharId()); if (object != null) { - PlayerObject player = object.getSlottedObject("ghost"); - - - if (player != null && !player.isSet(PlayerFlags.LD) && object.getClient()) { + if (object.isInQuadtree() && object.getClient() != null) { core.connectionService.disconnect(object.getClient().getSession()); - } + } if (object.isInQuadtree()) { core.simulationService.remove(object, object.getPosition().x, object.getPosition().z, true); From 0ea690dc808e3e95207b7c3b07dd54a4773c9800 Mon Sep 17 00:00:00 2001 From: Treeku Date: Sat, 28 Dec 2013 17:37:04 +0000 Subject: [PATCH 35/35] Fixed minor error --- src/services/LoginService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/LoginService.java b/src/services/LoginService.java index 54af0cbc..d3713213 100644 --- a/src/services/LoginService.java +++ b/src/services/LoginService.java @@ -203,7 +203,7 @@ public class LoginService implements INetworkDispatch{ core.simulationService.remove(object, object.getPosition().x, object.getPosition().z, true); } - destroyObject(object); + core.objectService.destroyObject(object); } core.getCreatureODB().delete(new Long(packet.getcharId()), Long.class, CreatureObject.class);