From a3e7b10372df293badf06a129c2900653bf7edd5 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 02:46:47 +0100 Subject: [PATCH 01/23] Buffs - Permanent duration buffs now correctly replace non-permanent version --- src/services/BuffService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/services/BuffService.java b/src/services/BuffService.java index 662dea25..4c1811bc 100644 --- a/src/services/BuffService.java +++ b/src/services/BuffService.java @@ -97,10 +97,9 @@ public class BuffService implements INetworkDispatch { } else { buff.setStacks(buff.getMaxStacks()); } - - if (otherBuff.getRemainingDuration() > buff.getDuration() && otherBuff.getStacks() >= otherBuff.getMaxStacks()) { - return null; - } + if (buff.getDuration() != -1.0) + if (otherBuff.getRemainingDuration() > buff.getDuration() && otherBuff.getStacks() >= otherBuff.getMaxStacks()) + return null; } removeBuffFromCreature(creature, otherBuff); From ac7136edc70b638456ebaab033bb75604e4e90fc Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 02:59:25 +0100 Subject: [PATCH 02/23] Officer - Fixed buff duration and errors --- scripts/buffs/of_buff_def_1.py | 4 ++++ scripts/buffs/of_charge_1.py | 2 ++ scripts/buffs/of_deb_def_1.py | 3 +++ scripts/buffs/of_deb_def_2.py | 3 +++ scripts/buffs/of_deb_def_3.py | 3 +++ scripts/buffs/of_deb_def_4.py | 3 +++ scripts/buffs/of_deb_def_5.py | 3 +++ scripts/buffs/of_deb_def_6.py | 3 +++ scripts/buffs/of_deb_def_7.py | 3 +++ scripts/buffs/of_deb_def_8.py | 3 +++ scripts/buffs/of_drillmaster_1.py | 3 +++ scripts/buffs/of_focus_fire_1.py | 3 +++ scripts/buffs/of_focus_fire_2.py | 3 +++ scripts/buffs/of_focus_fire_3.py | 3 +++ scripts/buffs/of_focus_fire_4.py | 3 +++ scripts/buffs/of_focus_fire_5.py | 3 +++ scripts/buffs/of_focus_fire_6.py | 3 +++ scripts/buffs/of_scatter_1.py | 2 ++ scripts/commands/of_buff_def_1.py | 5 +---- scripts/commands/of_buff_def_2.py | 5 +---- scripts/commands/of_buff_def_3.py | 5 +---- scripts/commands/of_buff_def_4.py | 5 +---- scripts/commands/of_buff_def_5.py | 5 +---- scripts/commands/of_buff_def_6.py | 5 +---- scripts/commands/of_buff_def_7.py | 5 +---- scripts/commands/of_buff_def_8.py | 5 +---- scripts/commands/of_buff_def_9.py | 5 +---- scripts/commands/of_charge_1.py | 2 +- scripts/commands/of_focus_fire_1.py | 7 +------ scripts/commands/of_focus_fire_2.py | 7 +------ scripts/commands/of_focus_fire_3.py | 7 +------ scripts/commands/of_focus_fire_4.py | 5 +++-- scripts/commands/of_focus_fire_5.py | 5 +++-- scripts/commands/of_focus_fire_6.py | 5 +++-- 34 files changed, 75 insertions(+), 61 deletions(-) diff --git a/scripts/buffs/of_buff_def_1.py b/scripts/buffs/of_buff_def_1.py index 68455f5b..f1e27d04 100644 --- a/scripts/buffs/of_buff_def_1.py +++ b/scripts/buffs/of_buff_def_1.py @@ -1,6 +1,10 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return + return def add(core, actor, buff): diff --git a/scripts/buffs/of_charge_1.py b/scripts/buffs/of_charge_1.py index db0d0aa7..104612e7 100644 --- a/scripts/buffs/of_charge_1.py +++ b/scripts/buffs/of_charge_1.py @@ -1,6 +1,8 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_buff_duration_line_of_group_buff'): + buff.setDuration(buff.getDuration() + actor.getSkillModBase('expertise_buff_duration_line_of_group_buff')) return def add(core, actor, buff): diff --git a/scripts/buffs/of_deb_def_1.py b/scripts/buffs/of_deb_def_1.py index 793bdf94..13cdab58 100644 --- a/scripts/buffs/of_deb_def_1.py +++ b/scripts/buffs/of_deb_def_1.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_deb_def_2.py b/scripts/buffs/of_deb_def_2.py index b8489de2..097ffe2b 100644 --- a/scripts/buffs/of_deb_def_2.py +++ b/scripts/buffs/of_deb_def_2.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_deb_def_3.py b/scripts/buffs/of_deb_def_3.py index 9ca704a3..c3b28b0b 100644 --- a/scripts/buffs/of_deb_def_3.py +++ b/scripts/buffs/of_deb_def_3.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_deb_def_4.py b/scripts/buffs/of_deb_def_4.py index 62a832dd..e93dde70 100644 --- a/scripts/buffs/of_deb_def_4.py +++ b/scripts/buffs/of_deb_def_4.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_deb_def_5.py b/scripts/buffs/of_deb_def_5.py index 4c8e28fa..233ec4dd 100644 --- a/scripts/buffs/of_deb_def_5.py +++ b/scripts/buffs/of_deb_def_5.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_deb_def_6.py b/scripts/buffs/of_deb_def_6.py index eb41e77b..cdb29995 100644 --- a/scripts/buffs/of_deb_def_6.py +++ b/scripts/buffs/of_deb_def_6.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_deb_def_7.py b/scripts/buffs/of_deb_def_7.py index c1e5dd6e..9e9fedf5 100644 --- a/scripts/buffs/of_deb_def_7.py +++ b/scripts/buffs/of_deb_def_7.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_deb_def_8.py b/scripts/buffs/of_deb_def_8.py index 1ad5b201..6016ba0d 100644 --- a/scripts/buffs/of_deb_def_8.py +++ b/scripts/buffs/of_deb_def_8.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 0: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_drillmaster_1.py b/scripts/buffs/of_drillmaster_1.py index dcb74846..233744a6 100644 --- a/scripts/buffs/of_drillmaster_1.py +++ b/scripts/buffs/of_drillmaster_1.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 2: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_focus_fire_1.py b/scripts/buffs/of_focus_fire_1.py index e2afcef8..4e191992 100644 --- a/scripts/buffs/of_focus_fire_1.py +++ b/scripts/buffs/of_focus_fire_1.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_focus_fire_2.py b/scripts/buffs/of_focus_fire_2.py index 0db33d9d..60404f53 100644 --- a/scripts/buffs/of_focus_fire_2.py +++ b/scripts/buffs/of_focus_fire_2.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_focus_fire_3.py b/scripts/buffs/of_focus_fire_3.py index b78066de..3420c94c 100644 --- a/scripts/buffs/of_focus_fire_3.py +++ b/scripts/buffs/of_focus_fire_3.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_focus_fire_4.py b/scripts/buffs/of_focus_fire_4.py index d028d699..a95fb77f 100644 --- a/scripts/buffs/of_focus_fire_4.py +++ b/scripts/buffs/of_focus_fire_4.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_focus_fire_5.py b/scripts/buffs/of_focus_fire_5.py index 0b5c3e3f..4d084789 100644 --- a/scripts/buffs/of_focus_fire_5.py +++ b/scripts/buffs/of_focus_fire_5.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_focus_fire_6.py b/scripts/buffs/of_focus_fire_6.py index 4cbaafe1..e091b13f 100644 --- a/scripts/buffs/of_focus_fire_6.py +++ b/scripts/buffs/of_focus_fire_6.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + if actor.getSkillModBase('expertise_aura_maintain') > 1: + buff.setDuration(-1) return def add(core, actor, buff): diff --git a/scripts/buffs/of_scatter_1.py b/scripts/buffs/of_scatter_1.py index 7d7e729d..8309302a 100644 --- a/scripts/buffs/of_scatter_1.py +++ b/scripts/buffs/of_scatter_1.py @@ -1,6 +1,8 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_buff_duration_line_of_group_buff'): + buff.setDuration(buff.getDuration() + actor.getSkillModBase('expertise_buff_duration_line_of_group_buff')) return def add(core, actor, buff): diff --git a/scripts/commands/of_buff_def_1.py b/scripts/commands/of_buff_def_1.py index d7403af1..90af7887 100644 --- a/scripts/commands/of_buff_def_1.py +++ b/scripts/commands/of_buff_def_1.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_1') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_1') + core.buffService.addGroupBuff(actor, 'of_buff_def_1') return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_2.py b/scripts/commands/of_buff_def_2.py index cd5fd42d..1627ed3c 100644 --- a/scripts/commands/of_buff_def_2.py +++ b/scripts/commands/of_buff_def_2.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_2') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_2') + core.buffService.addGroupBuff(actor, 'of_buff_def_2') return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_3.py b/scripts/commands/of_buff_def_3.py index 85b34c54..1936f539 100644 --- a/scripts/commands/of_buff_def_3.py +++ b/scripts/commands/of_buff_def_3.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_3') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_3') + core.buffService.addGroupBuff(actor, 'of_buff_def_3') return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_4.py b/scripts/commands/of_buff_def_4.py index 0831b80f..0d047c07 100644 --- a/scripts/commands/of_buff_def_4.py +++ b/scripts/commands/of_buff_def_4.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_4') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_4') + core.buffService.addGroupBuff(actor, 'of_buff_def_4') return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_5.py b/scripts/commands/of_buff_def_5.py index f3577253..2e21de66 100644 --- a/scripts/commands/of_buff_def_5.py +++ b/scripts/commands/of_buff_def_5.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_5') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_5') + core.buffService.addGroupBuff(actor, 'of_buff_def_5') return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_6.py b/scripts/commands/of_buff_def_6.py index 890aea37..80517962 100644 --- a/scripts/commands/of_buff_def_6.py +++ b/scripts/commands/of_buff_def_6.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_6') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_6') + core.buffService.addGroupBuff(actor, 'of_buff_def_6') return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_7.py b/scripts/commands/of_buff_def_7.py index 7235a9a0..4d0fe8ba 100644 --- a/scripts/commands/of_buff_def_7.py +++ b/scripts/commands/of_buff_def_7.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_7') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_7') + core.buffService.addGroupBuff(actor, 'of_buff_def_7') return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_8.py b/scripts/commands/of_buff_def_8.py index 3ef2ec72..b5d13337 100644 --- a/scripts/commands/of_buff_def_8.py +++ b/scripts/commands/of_buff_def_8.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_8') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_8') + core.buffService.addGroupBuff(actor, 'of_buff_def_8') return \ No newline at end of file diff --git a/scripts/commands/of_buff_def_9.py b/scripts/commands/of_buff_def_9.py index ecf3917c..1b09914e 100644 --- a/scripts/commands/of_buff_def_9.py +++ b/scripts/commands/of_buff_def_9.py @@ -4,9 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_buff_def_9') - group = core.objectService.getObject(actor.getGroupId()) - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_buff_def_9') + core.buffService.addGroupBuff(actor, 'of_buff_def_9') return \ No newline at end of file diff --git a/scripts/commands/of_charge_1.py b/scripts/commands/of_charge_1.py index 8a1c683d..b2a3524e 100644 --- a/scripts/commands/of_charge_1.py +++ b/scripts/commands/of_charge_1.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_charge_1') + core.buffService.addGroupBuff(actor, 'of_charge_1') return \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_1.py b/scripts/commands/of_focus_fire_1.py index d3a2cfb8..dbd564ec 100644 --- a/scripts/commands/of_focus_fire_1.py +++ b/scripts/commands/of_focus_fire_1.py @@ -4,11 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_1') - group = core.objectService.getObject(actor.getGroupId()) - if group is not None: - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_focus_fire_1') - return + core.buffService.addGroupBuff(actor, 'of_focus_fire_1') return \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_2.py b/scripts/commands/of_focus_fire_2.py index cafae5bd..406fb584 100644 --- a/scripts/commands/of_focus_fire_2.py +++ b/scripts/commands/of_focus_fire_2.py @@ -4,11 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_2') - group = core.objectService.getObject(actor.getGroupId()) - if group is not None: - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_focus_fire_2') - return + core.buffService.addGroupBuff(actor, 'of_focus_fire_2') return \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_3.py b/scripts/commands/of_focus_fire_3.py index 75129446..ea194a77 100644 --- a/scripts/commands/of_focus_fire_3.py +++ b/scripts/commands/of_focus_fire_3.py @@ -4,11 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_3') - group = core.objectService.getObject(actor.getGroupId()) - if group is not None: - for creature in group.getMemberList(): - core.buffService.addBuffToCreature(creature, 'of_focus_fire_3') - return + core.buffService.addGroupBuff(actor, 'of_focus_fire_3') return \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_4.py b/scripts/commands/of_focus_fire_4.py index a5fa51f9..d4645925 100644 --- a/scripts/commands/of_focus_fire_4.py +++ b/scripts/commands/of_focus_fire_4.py @@ -4,5 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_1') - return \ No newline at end of file + core.buffService.addGroupBuff(actor, 'of_focus_fire_4') + return + \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_5.py b/scripts/commands/of_focus_fire_5.py index a5fa51f9..1ff3a903 100644 --- a/scripts/commands/of_focus_fire_5.py +++ b/scripts/commands/of_focus_fire_5.py @@ -4,5 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_1') - return \ No newline at end of file + core.buffService.addGroupBuff(actor, 'of_focus_fire_5') + return + \ No newline at end of file diff --git a/scripts/commands/of_focus_fire_6.py b/scripts/commands/of_focus_fire_6.py index a5fa51f9..834a0d25 100644 --- a/scripts/commands/of_focus_fire_6.py +++ b/scripts/commands/of_focus_fire_6.py @@ -4,5 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_focus_fire_1') - return \ No newline at end of file + core.buffService.addGroupBuff(actor, 'of_focus_fire_6') + return + \ No newline at end of file From 993f9b657e0ceecb67655deb641ec6bb72735418 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 03:06:57 +0100 Subject: [PATCH 03/23] Officer - Scatter is now added to the group --- scripts/commands/of_scatter_1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/commands/of_scatter_1.py b/scripts/commands/of_scatter_1.py index 8ee17071..e4f86354 100644 --- a/scripts/commands/of_scatter_1.py +++ b/scripts/commands/of_scatter_1.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_scatter_1') + core.buffService.addGroupBuff(actor, 'of_scatter_1') return \ No newline at end of file From b6f89c1139948d437dacd1f149cf79f9cd3933cc Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 03:09:47 +0100 Subject: [PATCH 04/23] Officer - Inspiration and Drillmaster are now added to the group --- scripts/commands/of_drillmaster_1.py | 2 +- scripts/commands/of_inspiration_1.py | 2 +- scripts/commands/of_inspiration_2.py | 2 +- scripts/commands/of_inspiration_3.py | 2 +- scripts/commands/of_inspiration_4.py | 2 +- scripts/commands/of_inspiration_5.py | 2 +- scripts/commands/of_inspiration_6.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/commands/of_drillmaster_1.py b/scripts/commands/of_drillmaster_1.py index 0b448c2b..00c17c70 100644 --- a/scripts/commands/of_drillmaster_1.py +++ b/scripts/commands/of_drillmaster_1.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_drillmaster_1') + core.buffService.addGroupBuff(actor, 'of_drillmaster_1') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_1.py b/scripts/commands/of_inspiration_1.py index 001b0e69..9f0c3a20 100644 --- a/scripts/commands/of_inspiration_1.py +++ b/scripts/commands/of_inspiration_1.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_1') + core.buffService.addGroupBuff(actor, 'of_inspiration_1') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_2.py b/scripts/commands/of_inspiration_2.py index 01dbef43..c7ffcb5e 100644 --- a/scripts/commands/of_inspiration_2.py +++ b/scripts/commands/of_inspiration_2.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_2') + core.buffService.addGroupBuff(actor, 'of_inspiration_2') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_3.py b/scripts/commands/of_inspiration_3.py index a1d2296f..fd2e8b80 100644 --- a/scripts/commands/of_inspiration_3.py +++ b/scripts/commands/of_inspiration_3.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_3') + core.buffService.addGroupBuff(actor, 'of_inspiration_3') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_4.py b/scripts/commands/of_inspiration_4.py index d1954310..35bae1ab 100644 --- a/scripts/commands/of_inspiration_4.py +++ b/scripts/commands/of_inspiration_4.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_4') + core.buffService.addGroupBuff(actor, 'of_inspiration_4') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_5.py b/scripts/commands/of_inspiration_5.py index e2d35933..f9c9ba48 100644 --- a/scripts/commands/of_inspiration_5.py +++ b/scripts/commands/of_inspiration_5.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_5') + core.buffService.addGroupBuff(actor, 'of_inspiration_5') return \ No newline at end of file diff --git a/scripts/commands/of_inspiration_6.py b/scripts/commands/of_inspiration_6.py index c73a2000..ca05422d 100644 --- a/scripts/commands/of_inspiration_6.py +++ b/scripts/commands/of_inspiration_6.py @@ -4,6 +4,6 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addBuffToCreature(actor, 'of_inspiration_6') + core.buffService.addGroupBuff(actor, 'of_inspiration_6') return \ No newline at end of file From 984ddf3acb3c7357a241293c2bc9c7e98f5d9c32 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 04:57:43 +0100 Subject: [PATCH 05/23] Items - Issued Pistol --- .../weapon/ranged/pistol/weapon_pistol_02_02.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/object/weapon/ranged/pistol/weapon_pistol_02_02.py diff --git a/scripts/object/weapon/ranged/pistol/weapon_pistol_02_02.py b/scripts/object/weapon/ranged/pistol/weapon_pistol_02_02.py new file mode 100644 index 00000000..055d033d --- /dev/null +++ b/scripts/object/weapon/ranged/pistol/weapon_pistol_02_02.py @@ -0,0 +1,15 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_pistol_02_02') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_pistol_02_02') + object.setIntAttribute('required_combat_level', 1) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.4) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '10-26') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Pistol') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file From f351fee4086f64878181860fa24af9d322a03697 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 04:58:18 +0100 Subject: [PATCH 06/23] Items - Commando Carbine --- .../carbine/weapon_npe_commando_carbine_03_01.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/object/weapon/ranged/carbine/weapon_npe_commando_carbine_03_01.py diff --git a/scripts/object/weapon/ranged/carbine/weapon_npe_commando_carbine_03_01.py b/scripts/object/weapon/ranged/carbine/weapon_npe_commando_carbine_03_01.py new file mode 100644 index 00000000..681e8699 --- /dev/null +++ b/scripts/object/weapon/ranged/carbine/weapon_npe_commando_carbine_03_01.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_npe_commando_carbine_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_npe_commando_carbine_03_01') + object.setStringAttribute('class_required', 'Commando') + object.setIntAttribute('required_combat_level', 1) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.6) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '20-40') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Carbine') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file From d6e62341ae3dc8b487fcdcd309357784c7c3d161 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 04:59:38 +0100 Subject: [PATCH 07/23] Items - Officer's Sidearm --- .../ranged/pistol/item_npe_officer_sidearm.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/object/weapon/ranged/pistol/item_npe_officer_sidearm.py diff --git a/scripts/object/weapon/ranged/pistol/item_npe_officer_sidearm.py b/scripts/object/weapon/ranged/pistol/item_npe_officer_sidearm.py new file mode 100644 index 00000000..3600d8b4 --- /dev/null +++ b/scripts/object/weapon/ranged/pistol/item_npe_officer_sidearm.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_npe_officer_sidearm') + object.setDetailFilename('static_item_d') + object.setDetailName('item_npe_officer_sidearm') + object.setStringAttribute('class_required', 'Officer') + object.setIntAttribute('required_combat_level', 1) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.4) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '15-25') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Pistol') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file From 3c8886b937ad814f83372fb4222dd29332f54463 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 05:02:24 +0100 Subject: [PATCH 08/23] Items - Jedi Training Polearm --- .../weapon/melee/polearm/weapon_polearm_02_03.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/object/weapon/melee/polearm/weapon_polearm_02_03.py diff --git a/scripts/object/weapon/melee/polearm/weapon_polearm_02_03.py b/scripts/object/weapon/melee/polearm/weapon_polearm_02_03.py new file mode 100644 index 00000000..c8e1804c --- /dev/null +++ b/scripts/object/weapon/melee/polearm/weapon_polearm_02_03.py @@ -0,0 +1,15 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_polearm_02_03') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_polearm_02_03') + object.setIntAttribute('required_combat_level', 1) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 1) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Kinetic') + object.setStringAttribute('cat_wpn_damage.damage', '43-75') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-5m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Polearm') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file From a720e3c465f9026ed6b3077d28dea7a116d3484f Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 05:03:11 +0100 Subject: [PATCH 09/23] Items - Spy Carbine --- .../carbine/weapon_npe_carbine_spy_03_01.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/object/weapon/ranged/carbine/weapon_npe_carbine_spy_03_01.py diff --git a/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_spy_03_01.py b/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_spy_03_01.py new file mode 100644 index 00000000..53149824 --- /dev/null +++ b/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_spy_03_01.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_npe_carbine_spy_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_npe_carbine_spy_03_01') + object.setStringAttribute('class_required', 'Spy') + object.setIntAttribute('required_combat_level', 1) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.6) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '17-43') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Carbine') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file From 8f7e47bec4370031a03d1134abffd748d74fcb94 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 05:05:23 +0100 Subject: [PATCH 10/23] Items - Bounty Hunter Carbine --- .../carbine/weapon_npe_carbine_bh_03_01.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/object/weapon/ranged/carbine/weapon_npe_carbine_bh_03_01.py diff --git a/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_bh_03_01.py b/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_bh_03_01.py new file mode 100644 index 00000000..21afc76b --- /dev/null +++ b/scripts/object/weapon/ranged/carbine/weapon_npe_carbine_bh_03_01.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_npe_carbine_bh_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_npe_carbine_bh_03_01') + object.setStringAttribute('class_required', 'Bounty Hunter') + object.setIntAttribute('required_combat_level', 1) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.6) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '17-43') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Carbine') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file From 1acefc8c387075f732902abda488b53d7f77ff93 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 05:09:22 +0100 Subject: [PATCH 11/23] Medic - Buffs are now applied correctly --- scripts/commands/me_buff_health_1.py | 15 +++++++++++++-- scripts/commands/me_buff_health_2.py | 15 +++++++++++++-- scripts/commands/me_buff_health_3.py | 15 +++++++++++++-- scripts/commands/me_enhance_action_1.py | 12 +++++++++++- scripts/commands/me_enhance_action_2.py | 12 +++++++++++- scripts/commands/me_enhance_action_3.py | 12 +++++++++++- scripts/commands/me_enhance_agility_1.py | 12 +++++++++++- scripts/commands/me_enhance_agility_2.py | 14 ++++++++++++-- scripts/commands/me_enhance_agility_3.py | 15 +++++++++++++-- scripts/commands/me_enhance_block_1.py | 15 +++++++++++++-- scripts/commands/me_enhance_dodge_1.py | 15 +++++++++++++-- scripts/commands/me_enhance_precision_1.py | 15 +++++++++++++-- scripts/commands/me_enhance_precision_2.py | 15 +++++++++++++-- scripts/commands/me_enhance_precision_3.py | 15 +++++++++++++-- scripts/commands/me_enhance_strength_1.py | 15 +++++++++++++-- scripts/commands/me_enhance_strength_2.py | 15 +++++++++++++-- scripts/commands/me_enhance_strength_3.py | 15 +++++++++++++-- 17 files changed, 212 insertions(+), 30 deletions(-) diff --git a/scripts/commands/me_buff_health_1.py b/scripts/commands/me_buff_health_1.py index 1bbefb27..1e41c9ae 100644 --- a/scripts/commands/me_buff_health_1.py +++ b/scripts/commands/me_buff_health_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_health') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_health') + else: + core.buffService.addBuffToCreature(target, 'me_buff_health') + else: + core.buffService.addGroupBuff(actor, 'me_buff_health') + + return + \ No newline at end of file diff --git a/scripts/commands/me_buff_health_2.py b/scripts/commands/me_buff_health_2.py index dad03f73..117444bb 100644 --- a/scripts/commands/me_buff_health_2.py +++ b/scripts/commands/me_buff_health_2.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_health_2') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_health_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_health_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_health_2') + + return + \ No newline at end of file diff --git a/scripts/commands/me_buff_health_3.py b/scripts/commands/me_buff_health_3.py index 7dce8f50..29a22740 100644 --- a/scripts/commands/me_buff_health_3.py +++ b/scripts/commands/me_buff_health_3.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_health_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_health_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_health_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_health_3') + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_action_1.py b/scripts/commands/me_enhance_action_1.py index db09845c..0b065ab5 100644 --- a/scripts/commands/me_enhance_action_1.py +++ b/scripts/commands/me_enhance_action_1.py @@ -4,6 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_action_1') + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_action_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_action_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_action_1') + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_action_2.py b/scripts/commands/me_enhance_action_2.py index cc476e94..a076dfdd 100644 --- a/scripts/commands/me_enhance_action_2.py +++ b/scripts/commands/me_enhance_action_2.py @@ -4,6 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_action_2') + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_action_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_action_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_action_2') + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_action_3.py b/scripts/commands/me_enhance_action_3.py index e945d92c..1108c400 100644 --- a/scripts/commands/me_enhance_action_3.py +++ b/scripts/commands/me_enhance_action_3.py @@ -4,6 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_action_3') + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_action_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_action_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_action_3') + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_agility_1.py b/scripts/commands/me_enhance_agility_1.py index 5f489803..24e2c05b 100644 --- a/scripts/commands/me_enhance_agility_1.py +++ b/scripts/commands/me_enhance_agility_1.py @@ -4,6 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_agility_1') + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_agility_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_agility_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_agility_1') + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_agility_2.py b/scripts/commands/me_enhance_agility_2.py index f3935dcb..63474e3f 100644 --- a/scripts/commands/me_enhance_agility_2.py +++ b/scripts/commands/me_enhance_agility_2.py @@ -1,9 +1,19 @@ import sys def setup(core, actor, buff): - return + return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_agility_2') + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_agility_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_agility_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_agility_2') + return \ No newline at end of file diff --git a/scripts/commands/me_enhance_agility_3.py b/scripts/commands/me_enhance_agility_3.py index e1dfd7fd..4d665fc3 100644 --- a/scripts/commands/me_enhance_agility_3.py +++ b/scripts/commands/me_enhance_agility_3.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_agility_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_agility_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_agility_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_agility_3') + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_block_1.py b/scripts/commands/me_enhance_block_1.py index c2758143..d4ef98b6 100644 --- a/scripts/commands/me_enhance_block_1.py +++ b/scripts/commands/me_enhance_block_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_melee_gb_1') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_melee_gb_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_melee_gb_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_melee_gb_1') + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_dodge_1.py b/scripts/commands/me_enhance_dodge_1.py index bb1a034e..537d2875 100644 --- a/scripts/commands/me_enhance_dodge_1.py +++ b/scripts/commands/me_enhance_dodge_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_ranged_gb_1') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_ranged_gb_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_ranged_gb_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_ranged_gb_1') + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_precision_1.py b/scripts/commands/me_enhance_precision_1.py index 398e39fa..d20c423a 100644 --- a/scripts/commands/me_enhance_precision_1.py +++ b/scripts/commands/me_enhance_precision_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_precision_1') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_precision_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_precision_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_precision_1') + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_precision_2.py b/scripts/commands/me_enhance_precision_2.py index a9bba8a5..a7b808ed 100644 --- a/scripts/commands/me_enhance_precision_2.py +++ b/scripts/commands/me_enhance_precision_2.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_precision_2') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_precision_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_precision_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_precision_2') + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_precision_3.py b/scripts/commands/me_enhance_precision_3.py index 8f218b1c..76594fce 100644 --- a/scripts/commands/me_enhance_precision_3.py +++ b/scripts/commands/me_enhance_precision_3.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_precision_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_precision_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_precision_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_precision_3') + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_strength_1.py b/scripts/commands/me_enhance_strength_1.py index 6ed252e5..1ab00983 100644 --- a/scripts/commands/me_enhance_strength_1.py +++ b/scripts/commands/me_enhance_strength_1.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_strength_1') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_strength_1') + else: + core.buffService.addBuffToCreature(target, 'me_buff_strength_1') + else: + core.buffService.addGroupBuff(actor, 'me_buff_strength_1') + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_strength_2.py b/scripts/commands/me_enhance_strength_2.py index b56331fe..e8b21cd0 100644 --- a/scripts/commands/me_enhance_strength_2.py +++ b/scripts/commands/me_enhance_strength_2.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_strength_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_strength_2') + else: + core.buffService.addBuffToCreature(target, 'me_buff_strength_2') + else: + core.buffService.addGroupBuff(actor, 'me_buff_strength_2') + + return + \ No newline at end of file diff --git a/scripts/commands/me_enhance_strength_3.py b/scripts/commands/me_enhance_strength_3.py index b56331fe..e51c7bbc 100644 --- a/scripts/commands/me_enhance_strength_3.py +++ b/scripts/commands/me_enhance_strength_3.py @@ -4,5 +4,16 @@ def setup(core, actor, buff): return def run(core, actor, target, commandString): - core.buffService.addGroupBuff(actor, 'me_buff_strength_3') - return \ No newline at end of file + + group = core.objectService.getObject(actor.getGroupId()) + + if target: + if group and target in group.getMemberList(): + core.buffService.addGroupBuff(actor, 'me_buff_strength_3') + else: + core.buffService.addBuffToCreature(target, 'me_buff_strength_3') + else: + core.buffService.addGroupBuff(actor, 'me_buff_strength_3') + + return + \ No newline at end of file From 109a80810860595df0065400b1169f7786b4b9aa Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 05:13:29 +0100 Subject: [PATCH 12/23] Items - Modified DL-44 --- .../pistol/item_npe_smuggler_han_solo_gun.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/object/weapon/ranged/pistol/item_npe_smuggler_han_solo_gun.py diff --git a/scripts/object/weapon/ranged/pistol/item_npe_smuggler_han_solo_gun.py b/scripts/object/weapon/ranged/pistol/item_npe_smuggler_han_solo_gun.py new file mode 100644 index 00000000..4f615807 --- /dev/null +++ b/scripts/object/weapon/ranged/pistol/item_npe_smuggler_han_solo_gun.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_npe_smuggler_han_solo_gun') + object.setDetailFilename('static_item_d') + object.setDetailName('item_npe_smuggler_han_solo_gun') + object.setStringAttribute('class_required', 'Smuggler') + object.setIntAttribute('required_combat_level', 1) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.4) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '13-27') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Pistol') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file From 312dcd28f642b97fbab2d9e4693a31e2aa3dbbc9 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 05:15:01 +0100 Subject: [PATCH 13/23] Items - Medic Pistol --- .../pistol/weapon_npe_medic_pistol_03_01.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/object/weapon/ranged/pistol/weapon_npe_medic_pistol_03_01.py diff --git a/scripts/object/weapon/ranged/pistol/weapon_npe_medic_pistol_03_01.py b/scripts/object/weapon/ranged/pistol/weapon_npe_medic_pistol_03_01.py new file mode 100644 index 00000000..4a68c9af --- /dev/null +++ b/scripts/object/weapon/ranged/pistol/weapon_npe_medic_pistol_03_01.py @@ -0,0 +1,16 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('weapon_npe_medic_pistol_03_01') + object.setDetailFilename('static_item_d') + object.setDetailName('weapon_npe_medic_pistol_03_01') + object.setStringAttribute('class_required', 'Medic') + object.setIntAttribute('required_combat_level', 1) + object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 0.4) + object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy') + object.setStringAttribute('cat_wpn_damage.damage', '13-27') + object.setStringAttribute('cat_wpn_damage.wpn_range', '0-35m') + object.setStringAttribute('cat_wpn_damage.wpn_category', 'Pistol') + object.setIntAttribute('cat_wpn_damage.dps', object.getDamagePerSecond()) + return \ No newline at end of file From a87bc2c202efa4fade90c7b9523f1a5989aff828 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 05:30:42 +0100 Subject: [PATCH 14/23] Items - Initiate Robe --- .../tangible/wearables/robe/item_npe_fs_robe_02_01.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_01.py diff --git a/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_01.py b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_01.py new file mode 100644 index 00000000..afb64a4b --- /dev/null +++ b/scripts/object/tangible/wearables/robe/item_npe_fs_robe_02_01.py @@ -0,0 +1,11 @@ +import sys + +def setup(core, object): + object.setStfFilename('static_item_n') + object.setStfName('item_npe_fs_robe_02_01') + object.setDetailFilename('static_item_d') + object.setDetailName('item_npe_fs_robe_02_01') + object.setIntAttribute('cat_stat_mod_bonus.@stat_n:agility_modified', 10) + object.setStringAttribute('class_required', 'Jedi') + object.setIntAttribute('required_combat_level', 1) + return From b36fc0eb9514ccd1a07a00b6bbbcf40f36e19d65 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 06:26:32 +0100 Subject: [PATCH 15/23] Scripts - Roadmap rewards are now located in profession roadmap scripts --- scripts/roadmap/bounty_hunter_1a.py | 94 ++++++++++++++++++++ scripts/roadmap/commando_1a.py | 3 + scripts/roadmap/entertainer_1a.py | 3 + scripts/roadmap/force_sensitive_1a.py | 25 ++++++ scripts/roadmap/medic_1a.py | 3 + scripts/roadmap/officer_1a.py | 3 + scripts/roadmap/roadmap_rewards.py | 122 -------------------------- scripts/roadmap/smuggler_1a.py | 3 + scripts/roadmap/spy_1a.py | 3 + scripts/roadmap/trader_0a.py | 3 + scripts/roadmap/trader_0b.py | 3 + scripts/roadmap/trader_0c.py | 3 + scripts/roadmap/trader_0d.py | 3 + src/services/PlayerService.java | 2 +- 14 files changed, 150 insertions(+), 123 deletions(-) delete mode 100644 scripts/roadmap/roadmap_rewards.py diff --git a/scripts/roadmap/bounty_hunter_1a.py b/scripts/roadmap/bounty_hunter_1a.py index 7bb425e3..0c708fec 100644 --- a/scripts/roadmap/bounty_hunter_1a.py +++ b/scripts/roadmap/bounty_hunter_1a.py @@ -23,3 +23,97 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + if name == 'item_bounty_hunter_backpack_01_02': + return "object/tangible/wearables/backpack/shared_backpack_s05.iff" + + if name == 'armor_bounty_hunter_roadmap_bicep_l_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bicep_l.iff" + + if name == 'armor_bounty_hunter_roadmap_bicep_r_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bicep_r.iff" + + if name == 'armor_bounty_hunter_roadmap_bracer_l_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bracer_l.iff" + + if name == 'armor_bounty_hunter_roadmap_bracer_r_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_bracer_r.iff" + + if name == 'armor_bounty_hunter_roadmap_boots_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_boots.iff" + + if name == 'armor_bounty_hunter_roadmap_chest_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_chest_plate.iff" + + if name == 'armor_bounty_hunter_roadmap_gloves_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_gloves.iff" + + if name == 'armor_bounty_hunter_roadmap_helmet_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_helmet.iff" + + if name == 'armor_bounty_hunter_roadmap_leggings_02_01': + return "object/tangible/wearables/armor/composite/shared_armor_composite_leggings.iff" + + if name == 'armor_wookiee_roadmap_chest_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_chestplate.iff" + + if name == 'armor_wookiee_roadmap_leggings_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_leggings.iff" + + if name == 'armor_wookiee_roadmap_bicep_l_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_l.iff" + + if name == 'armor_wookiee_roadmap_bicep_r_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_r.iff" + + if name == 'armor_wookiee_roadmap_bracer_l_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_l.iff" + + if name == 'armor_wookiee_roadmap_bracer_r_02_03': + return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_r.iff" + + if name == 'armor_ithorian_roadmap_chest_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_chest_plate.iff" + + if name == 'armor_ithorian_roadmap_leggings_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_leggings.iff" + + if name == 'armor_ithorian_roadmap_helmet_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_helmet.iff" + + if name == 'armor_ithorian_roadmap_bicep_l_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_l.iff" + + if name == 'armor_ithorian_roadmap_bicep_r_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_r.iff" + + if name == 'armor_ithorian_roadmap_bracer_l_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_l.iff" + + if name == 'armor_ithorian_roadmap_bracer_r_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_r.iff" + + if name == 'armor_ithorian_roadmap_boots_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_boots.iff" + + if name == 'armor_ithorian_roadmap_gloves_02_03': + return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_gloves.iff" + + if name == 'weapon_carbine_bh_roadmap_01_02': + return "object/weapon/ranged/carbine/shared_carbine_ee3.iff" + + if name == 'item_bounty_hunter_ring_01_02': + return "object/tangible/wearables/ring/shared_ring_s02.iff" + + if name == 'weapon_rifle_bh_roadmap_01_02': + return "object/weapon/ranged/rifle/shared_rifle_lightning.iff" + + if name == 'item_bounty_hunter_pendant_01_02': + return "object/tangible/wearables/necklace/shared_necklace_s02.iff" + + if name == 'item_bounty_hunter_clicky_01_02': + return "object/tangible/loot/generic_usable/shared_survey_pad_adv_generic.iff" + + if name == 'item_roadmap_belt_bounty_hunter_01_02': + return "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_belt.iff" \ No newline at end of file diff --git a/scripts/roadmap/commando_1a.py b/scripts/roadmap/commando_1a.py index 8d9253ae..67cdb14b 100644 --- a/scripts/roadmap/commando_1a.py +++ b/scripts/roadmap/commando_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/entertainer_1a.py b/scripts/roadmap/entertainer_1a.py index 0541cc93..efe33465 100644 --- a/scripts/roadmap/entertainer_1a.py +++ b/scripts/roadmap/entertainer_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/force_sensitive_1a.py b/scripts/roadmap/force_sensitive_1a.py index 2d9241b0..9fd5ca69 100644 --- a/scripts/roadmap/force_sensitive_1a.py +++ b/scripts/roadmap/force_sensitive_1a.py @@ -23,3 +23,28 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + if name == 'item_force_sensitive_ring_02_01': + return "object/tangible/wearables/ring/shared_ring_s02.iff" + + 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" + + if name == 'item_force_sensitive_ring_01_02': + return "object/tangible/wearables/ring/shared_ring_s01.iff" + + if name == 'item_krayt_pearl_04_01': + return "object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff" + + if name == 'item_force_sensitive_pendant_01_02': + return "object/tangible/wearables/necklace/shared_necklace_s12.iff" + + if name == 'item_force_sensitive_clicky_01_02': + return "object/tangible/loot/generic_usable/shared_generic_crystal.iff" + + if name == 'item_roadmap_belt_force_sensitive_01_02': + return "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_belt.iff" \ No newline at end of file diff --git a/scripts/roadmap/medic_1a.py b/scripts/roadmap/medic_1a.py index 6b84327b..e6f67dfb 100644 --- a/scripts/roadmap/medic_1a.py +++ b/scripts/roadmap/medic_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/officer_1a.py b/scripts/roadmap/officer_1a.py index 25e7254f..83bca56f 100644 --- a/scripts/roadmap/officer_1a.py +++ b/scripts/roadmap/officer_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/roadmap_rewards.py b/scripts/roadmap/roadmap_rewards.py deleted file mode 100644 index a764248f..00000000 --- a/scripts/roadmap/roadmap_rewards.py +++ /dev/null @@ -1,122 +0,0 @@ -import sys - -def get(name): - # Jedi # - if name == 'item_force_sensitive_ring_02_01': - return "object/tangible/wearables/ring/shared_ring_s02.iff" - - 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" - - if name == 'item_force_sensitive_ring_01_02': - return "object/tangible/wearables/ring/shared_ring_s01.iff" - - if name == 'item_krayt_pearl_04_01': - return "object/tangible/component/weapon/lightsaber/shared_lightsaber_module_krayt_dragon_pearl.iff" - - if name == 'item_force_sensitive_pendant_01_02': - return "object/tangible/wearables/necklace/shared_necklace_s12.iff" - - if name == 'item_force_sensitive_clicky_01_02': - return "object/tangible/loot/generic_usable/shared_generic_crystal.iff" - - if name == 'item_roadmap_belt_force_sensitive_01_02': - return "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_belt.iff" - - # Bounty Hunter # - - if name == 'item_bounty_hunter_backpack_01_02': - return "object/tangible/wearables/backpack/shared_backpack_s05.iff" - - if name == 'armor_bounty_hunter_roadmap_bicep_l_02_01': - return "object/tangible/wearables/armor/composite/shared_armor_composite_bicep_l.iff" - - if name == 'armor_bounty_hunter_roadmap_bicep_r_02_01': - return "object/tangible/wearables/armor/composite/shared_armor_composite_bicep_r.iff" - - if name == 'armor_bounty_hunter_roadmap_bracer_l_02_01': - return "object/tangible/wearables/armor/composite/shared_armor_composite_bracer_l.iff" - - if name == 'armor_bounty_hunter_roadmap_bracer_r_02_01': - return "object/tangible/wearables/armor/composite/shared_armor_composite_bracer_r.iff" - - if name == 'armor_bounty_hunter_roadmap_boots_02_01': - return "object/tangible/wearables/armor/composite/shared_armor_composite_boots.iff" - - if name == 'armor_bounty_hunter_roadmap_chest_02_01': - return "object/tangible/wearables/armor/composite/shared_armor_composite_chest_plate.iff" - - if name == 'armor_bounty_hunter_roadmap_gloves_02_01': - return "object/tangible/wearables/armor/composite/shared_armor_composite_gloves.iff" - - if name == 'armor_bounty_hunter_roadmap_helmet_02_01': - return "object/tangible/wearables/armor/composite/shared_armor_composite_helmet.iff" - - if name == 'armor_bounty_hunter_roadmap_leggings_02_01': - return "object/tangible/wearables/armor/composite/shared_armor_composite_leggings.iff" - - if name == 'armor_wookiee_roadmap_chest_02_03': - return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_chestplate.iff" - - if name == 'armor_wookiee_roadmap_leggings_02_03': - return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_leggings.iff" - - if name == 'armor_wookiee_roadmap_bicep_l_02_03': - return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_l.iff" - - if name == 'armor_wookiee_roadmap_bicep_r_02_03': - return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_r.iff" - - if name == 'armor_wookiee_roadmap_bracer_l_02_03': - return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_l.iff" - - if name == 'armor_wookiee_roadmap_bracer_r_02_03': - return "object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bracer_r.iff" - - if name == 'armor_ithorian_roadmap_chest_02_03': - return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_chest_plate.iff" - - if name == 'armor_ithorian_roadmap_leggings_02_03': - return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_leggings.iff" - - if name == 'armor_ithorian_roadmap_helmet_02_03': - return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_helmet.iff" - - if name == 'armor_ithorian_roadmap_bicep_l_02_03': - return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_l.iff" - - if name == 'armor_ithorian_roadmap_bicep_r_02_03': - return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bicep_r.iff" - - if name == 'armor_ithorian_roadmap_bracer_l_02_03': - return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_l.iff" - - if name == 'armor_ithorian_roadmap_bracer_r_02_03': - return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_bracer_r.iff" - - if name == 'armor_ithorian_roadmap_boots_02_03': - return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_boots.iff" - - if name == 'armor_ithorian_roadmap_gloves_02_03': - return "object/tangible/wearables/armor/ithorian_sentinel/shared_ith_armor_s03_gloves.iff" - - if name == 'weapon_carbine_bh_roadmap_01_02': - return "object/weapon/ranged/carbine/shared_carbine_ee3.iff" - - if name == 'item_bounty_hunter_ring_01_02': - return "object/tangible/wearables/ring/shared_ring_s02.iff" - - if name == 'weapon_rifle_bh_roadmap_01_02': - return "object/weapon/ranged/rifle/shared_rifle_lightning.iff" - - if name == 'item_bounty_hunter_pendant_01_02': - return "object/tangible/wearables/necklace/shared_necklace_s02.iff" - - if name == 'item_bounty_hunter_clicky_01_02': - return "object/tangible/loot/generic_usable/shared_survey_pad_adv_generic.iff" - - if name == 'item_roadmap_belt_bounty_hunter_01_02': - return "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_belt.iff" \ No newline at end of file diff --git a/scripts/roadmap/smuggler_1a.py b/scripts/roadmap/smuggler_1a.py index 8084fcd2..2b41cce4 100644 --- a/scripts/roadmap/smuggler_1a.py +++ b/scripts/roadmap/smuggler_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/spy_1a.py b/scripts/roadmap/spy_1a.py index 6fe7c37a..079de728 100644 --- a/scripts/roadmap/spy_1a.py +++ b/scripts/roadmap/spy_1a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/trader_0a.py b/scripts/roadmap/trader_0a.py index 2846dee7..203b6ad9 100644 --- a/scripts/roadmap/trader_0a.py +++ b/scripts/roadmap/trader_0a.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/trader_0b.py b/scripts/roadmap/trader_0b.py index 2846dee7..203b6ad9 100644 --- a/scripts/roadmap/trader_0b.py +++ b/scripts/roadmap/trader_0b.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/trader_0c.py b/scripts/roadmap/trader_0c.py index 2846dee7..203b6ad9 100644 --- a/scripts/roadmap/trader_0c.py +++ b/scripts/roadmap/trader_0c.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/scripts/roadmap/trader_0d.py b/scripts/roadmap/trader_0d.py index 2846dee7..203b6ad9 100644 --- a/scripts/roadmap/trader_0d.py +++ b/scripts/roadmap/trader_0d.py @@ -23,3 +23,6 @@ def getHealth(): def getAction(): return 75 + +def getRewards(name): + return \ No newline at end of file diff --git a/src/services/PlayerService.java b/src/services/PlayerService.java index 5c3eaf9c..ec4c9e7d 100644 --- a/src/services/PlayerService.java +++ b/src/services/PlayerService.java @@ -715,7 +715,7 @@ public class PlayerService implements INetworkDispatch { item = (item.substring(0, (item.lastIndexOf("/") + 1)) + "shared_" + item.substring((item.lastIndexOf("/") + 1))); } else { customServerTemplate = item; - item = core.scriptService.callScript("scripts/roadmap/", "roadmap_rewards", "get", item).asString(); + item = core.scriptService.callScript("scripts/roadmap/", player.getProfession(), "getRewards", item).asString(); } if (item != null && item != "") { From 9a82b2cd465f4a8f1931c6d01d6191bbb59ff01a Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 06:38:41 +0100 Subject: [PATCH 16/23] Bounty Hunter - Added Assault Damage --- scripts/commands/combat/bh_dm_1.py | 6 +++++- scripts/commands/combat/bh_dm_2.py | 6 +++++- scripts/commands/combat/bh_dm_3.py | 6 +++++- scripts/commands/combat/bh_dm_4.py | 6 +++++- scripts/commands/combat/bh_dm_5.py | 6 +++++- scripts/commands/combat/bh_dm_6.py | 6 +++++- scripts/commands/combat/bh_dm_7.py | 6 +++++- scripts/commands/combat/bh_dm_8.py | 6 +++++- 8 files changed, 40 insertions(+), 8 deletions(-) diff --git a/scripts/commands/combat/bh_dm_1.py b/scripts/commands/combat/bh_dm_1.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_1.py +++ b/scripts/commands/combat/bh_dm_1.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_2.py b/scripts/commands/combat/bh_dm_2.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_2.py +++ b/scripts/commands/combat/bh_dm_2.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_3.py b/scripts/commands/combat/bh_dm_3.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_3.py +++ b/scripts/commands/combat/bh_dm_3.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_4.py b/scripts/commands/combat/bh_dm_4.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_4.py +++ b/scripts/commands/combat/bh_dm_4.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_5.py b/scripts/commands/combat/bh_dm_5.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_5.py +++ b/scripts/commands/combat/bh_dm_5.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_6.py b/scripts/commands/combat/bh_dm_6.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_6.py +++ b/scripts/commands/combat/bh_dm_6.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_7.py b/scripts/commands/combat/bh_dm_7.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_7.py +++ b/scripts/commands/combat/bh_dm_7.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_8.py b/scripts/commands/combat/bh_dm_8.py index 707a2c00..0506c54f 100644 --- a/scripts/commands/combat/bh_dm_8.py +++ b/scripts/commands/combat/bh_dm_8.py @@ -2,7 +2,11 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm')/10)) + + if actor.getSkillMod('expertise_damage_line_dm'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm'))/100)) + return def run(core, actor, target, commandString): return \ No newline at end of file From edd91900e6becf32b458687155bd4391de166707 Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 06:53:06 +0100 Subject: [PATCH 17/23] Bounty Hunter - Added Ambush Damage/Critical/Action cost --- scripts/commands/combat/bh_dm_crit_1.py | 12 +++++++++++- scripts/commands/combat/bh_dm_crit_2.py | 12 +++++++++++- scripts/commands/combat/bh_dm_crit_3.py | 14 ++++++++++++-- scripts/commands/combat/bh_dm_crit_4.py | 14 ++++++++++++-- scripts/commands/combat/bh_dm_crit_5.py | 14 ++++++++++++-- scripts/commands/combat/bh_dm_crit_6.py | 14 ++++++++++++-- scripts/commands/combat/bh_dm_crit_7.py | 14 ++++++++++++-- scripts/commands/combat/bh_dm_crit_8.py | 14 ++++++++++++-- 8 files changed, 94 insertions(+), 14 deletions(-) diff --git a/scripts/commands/combat/bh_dm_crit_1.py b/scripts/commands/combat/bh_dm_crit_1.py index 94292ffd..aec51439 100644 --- a/scripts/commands/combat/bh_dm_crit_1.py +++ b/scripts/commands/combat/bh_dm_crit_1.py @@ -2,7 +2,17 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit') + return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/bh_dm_crit_2.py b/scripts/commands/combat/bh_dm_crit_2.py index 94292ffd..aec51439 100644 --- a/scripts/commands/combat/bh_dm_crit_2.py +++ b/scripts/commands/combat/bh_dm_crit_2.py @@ -2,7 +2,17 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit') + return def run(core, actor, target, commandString): diff --git a/scripts/commands/combat/bh_dm_crit_3.py b/scripts/commands/combat/bh_dm_crit_3.py index 94b54628..aec51439 100644 --- a/scripts/commands/combat/bh_dm_crit_3.py +++ b/scripts/commands/combat/bh_dm_crit_3.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit') + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_4.py b/scripts/commands/combat/bh_dm_crit_4.py index 94b54628..aec51439 100644 --- a/scripts/commands/combat/bh_dm_crit_4.py +++ b/scripts/commands/combat/bh_dm_crit_4.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit') + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_5.py b/scripts/commands/combat/bh_dm_crit_5.py index 94b54628..aec51439 100644 --- a/scripts/commands/combat/bh_dm_crit_5.py +++ b/scripts/commands/combat/bh_dm_crit_5.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit') + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_6.py b/scripts/commands/combat/bh_dm_crit_6.py index 94b54628..aec51439 100644 --- a/scripts/commands/combat/bh_dm_crit_6.py +++ b/scripts/commands/combat/bh_dm_crit_6.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit') + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_7.py b/scripts/commands/combat/bh_dm_crit_7.py index 94b54628..aec51439 100644 --- a/scripts/commands/combat/bh_dm_crit_7.py +++ b/scripts/commands/combat/bh_dm_crit_7.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit') + return - + def run(core, actor, target, commandString): return \ No newline at end of file diff --git a/scripts/commands/combat/bh_dm_crit_8.py b/scripts/commands/combat/bh_dm_crit_8.py index 94b54628..aec51439 100644 --- a/scripts/commands/combat/bh_dm_crit_8.py +++ b/scripts/commands/combat/bh_dm_crit_8.py @@ -2,8 +2,18 @@ import sys def setup(core, actor, target, command): if actor.getSkillMod('expertise_cooldown_line_dm_crit'): - command.setCooldown(command.getCooldown() - (actor.getSkillMod('expertise_cooldown_line_dm_crit').getBase()/10)) + command.setCooldown(command.getCooldown() - (actor.getSkillModBase('expertise_cooldown_line_dm_crit')/10)) + + if actor.getSkillMod('expertise_damage_line_dm_crit'): + command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage()*actor.getSkillModBase('expertise_damage_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_action_line_dm_crit'): + command.setActionCost(command.getActionCost() - ((command.getActionCost()*actor.getSkillModBase('expertise_action_line_dm_crit'))/100)) + + if actor.getSkillMod('expertise_critical_line_dm_crit'): + command.setCriticalChance(command.getCriticalChance + actor.getSkillModBase('expertise_critical_line_dm_crit') + return - + def run(core, actor, target, commandString): return \ No newline at end of file From a024ea8feee4c6b274ce70e4394031ac3624c86c Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 06:54:42 +0100 Subject: [PATCH 18/23] Jedi - Jedi Strike ACR was incorrectly affecting 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 deletions(-) diff --git a/scripts/commands/combat/fs_flurry_1.py b/scripts/commands/combat/fs_flurry_1.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_1.py +++ b/scripts/commands/combat/fs_flurry_1.py @@ -7,9 +7,6 @@ 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): diff --git a/scripts/commands/combat/fs_flurry_2.py b/scripts/commands/combat/fs_flurry_2.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_2.py +++ b/scripts/commands/combat/fs_flurry_2.py @@ -7,9 +7,6 @@ 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): diff --git a/scripts/commands/combat/fs_flurry_3.py b/scripts/commands/combat/fs_flurry_3.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_3.py +++ b/scripts/commands/combat/fs_flurry_3.py @@ -7,9 +7,6 @@ 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): diff --git a/scripts/commands/combat/fs_flurry_4.py b/scripts/commands/combat/fs_flurry_4.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_4.py +++ b/scripts/commands/combat/fs_flurry_4.py @@ -7,9 +7,6 @@ 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): diff --git a/scripts/commands/combat/fs_flurry_5.py b/scripts/commands/combat/fs_flurry_5.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_5.py +++ b/scripts/commands/combat/fs_flurry_5.py @@ -7,9 +7,6 @@ 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): diff --git a/scripts/commands/combat/fs_flurry_6.py b/scripts/commands/combat/fs_flurry_6.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_6.py +++ b/scripts/commands/combat/fs_flurry_6.py @@ -7,9 +7,6 @@ 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): diff --git a/scripts/commands/combat/fs_flurry_7.py b/scripts/commands/combat/fs_flurry_7.py index 1d6cd02c..5e5c429e 100644 --- a/scripts/commands/combat/fs_flurry_7.py +++ b/scripts/commands/combat/fs_flurry_7.py @@ -7,9 +7,6 @@ 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): From 7f5c7dc03a1c4da615d8f7895a24e39192bbdfcd Mon Sep 17 00:00:00 2001 From: Ziggeh Date: Sun, 23 Mar 2014 07:07:27 +0100 Subject: [PATCH 19/23] Officer - Fixed Tactics Duration --- scripts/buffs/of_buff_def_1.py | 1 - scripts/buffs/of_buff_def_2.py | 3 +++ scripts/buffs/of_buff_def_3.py | 3 +++ scripts/buffs/of_buff_def_4.py | 3 +++ scripts/buffs/of_buff_def_5.py | 3 +++ scripts/buffs/of_buff_def_6.py | 3 +++ scripts/buffs/of_buff_def_7.py | 3 +++ scripts/buffs/of_buff_def_8.py | 3 +++ scripts/buffs/of_buff_def_9.py | 3 +++ 9 files changed, 24 insertions(+), 1 deletion(-) diff --git a/scripts/buffs/of_buff_def_1.py b/scripts/buffs/of_buff_def_1.py index f1e27d04..01f17ada 100644 --- a/scripts/buffs/of_buff_def_1.py +++ b/scripts/buffs/of_buff_def_1.py @@ -3,7 +3,6 @@ import sys def setup(core, actor, buff): if actor.getSkillMod('expertise_aura_maintain'): buff.setDuration(-1) - return return diff --git a/scripts/buffs/of_buff_def_2.py b/scripts/buffs/of_buff_def_2.py index c1cb56b4..7536841f 100644 --- a/scripts/buffs/of_buff_def_2.py +++ b/scripts/buffs/of_buff_def_2.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_3.py b/scripts/buffs/of_buff_def_3.py index 952b1963..dd577237 100644 --- a/scripts/buffs/of_buff_def_3.py +++ b/scripts/buffs/of_buff_def_3.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_4.py b/scripts/buffs/of_buff_def_4.py index 3360e4e4..6a650b41 100644 --- a/scripts/buffs/of_buff_def_4.py +++ b/scripts/buffs/of_buff_def_4.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_5.py b/scripts/buffs/of_buff_def_5.py index 5e0f8e8d..0dfd361a 100644 --- a/scripts/buffs/of_buff_def_5.py +++ b/scripts/buffs/of_buff_def_5.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_6.py b/scripts/buffs/of_buff_def_6.py index 46293f6b..06dac062 100644 --- a/scripts/buffs/of_buff_def_6.py +++ b/scripts/buffs/of_buff_def_6.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_7.py b/scripts/buffs/of_buff_def_7.py index a063f2fd..b18cd574 100644 --- a/scripts/buffs/of_buff_def_7.py +++ b/scripts/buffs/of_buff_def_7.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_8.py b/scripts/buffs/of_buff_def_8.py index 4136a39d..1b16cad6 100644 --- a/scripts/buffs/of_buff_def_8.py +++ b/scripts/buffs/of_buff_def_8.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): diff --git a/scripts/buffs/of_buff_def_9.py b/scripts/buffs/of_buff_def_9.py index 2651fc29..ac342f70 100644 --- a/scripts/buffs/of_buff_def_9.py +++ b/scripts/buffs/of_buff_def_9.py @@ -1,6 +1,9 @@ import sys def setup(core, actor, buff): + if actor.getSkillMod('expertise_aura_maintain'): + buff.setDuration(-1) + return def add(core, actor, buff): From efdb69ff576f93faa672cefd2b012c7e60c31ebd Mon Sep 17 00:00:00 2001 From: Treeku Date: Sun, 23 Mar 2014 15:08:46 +0000 Subject: [PATCH 20/23] Fixed major counter-type collection bugs --- src/resources/common/Stf.java | 14 +++++++++ .../collections/CollectionService.java | 31 ++++++++++--------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/resources/common/Stf.java b/src/resources/common/Stf.java index 1ebfc72a..468960f6 100644 --- a/src/resources/common/Stf.java +++ b/src/resources/common/Stf.java @@ -80,6 +80,20 @@ public class Stf extends Delta { } } + public String getString() { + synchronized(objectMutex) { + return ("@" + stfFilename + ":" + stfName); + } + } + + public void setString(String stf) { + synchronized(objectMutex) { + stf = stf.replace("@", ""); + stfFilename.set(stf.split(":")[0]); + stfName.set(stf.split(":")[1]); + } + } + public byte[] getBytes() { synchronized(objectMutex) { int size = stfFilename.getBytes().length + 4 + stfName.getBytes().length; diff --git a/src/services/collections/CollectionService.java b/src/services/collections/CollectionService.java index 15567a6b..c74e3993 100644 --- a/src/services/collections/CollectionService.java +++ b/src/services/collections/CollectionService.java @@ -222,11 +222,8 @@ public class CollectionService implements INetworkDispatch { BitSet bitValue = new BitSet(64); bitValue.set(64-bits, 64); - BitSet maxValue = new BitSet(64); - maxValue.set(64-maxSlotValue, 64); - - if (bitValue.toLongArray()[0] < maxValue.toLongArray()[0]) { - System.out.println(slotName + ", row " + c + ": counter-type slot uses " + bits + " bits, which can only hold a max value of " + bitValue.toLongArray()[0] + ", which is less than the specified max value of " + maxValue.toLongArray()[0]); + if (bitValue.toLongArray()[0] < maxSlotValue) { + System.out.println(slotName + ", row " + c + ": counter-type slot uses " + bits + " bits, which can only hold a max value of " + bitValue.toLongArray()[0] + ", which is less than the specified max value of " + maxSlotValue); throw new Exception(); } } @@ -293,14 +290,20 @@ public class CollectionService implements INetworkDispatch { } } - if (bits > 1) { + if (maxSlotValue > -1) { + BitSet value = BitSet.valueOf(new long[] { collections.get(beginSlotId, (endSlotId + 1)).toLongArray()[0]++ }); + + for (int i = beginSlotId; i <= endSlotId; i++) { + collections.set(i, value.get((i - beginSlotId))); + } + } else if (bits > 1) { int nextBit = collections.get(beginSlotId, (endSlotId + 1)).previousClearBit(endSlotId); if (nextBit == -1) { return false; } - collections.set((beginSlotId + nextBit)); + collections.set(nextBit); } else { collections.set(beginSlotId); } @@ -439,7 +442,6 @@ public class CollectionService implements INetworkDispatch { String bookName = ""; String pageName = ""; String collectionName = ""; - boolean collectionComplete = false; collections = BitSet.valueOf(player.getCollections()); @@ -595,14 +597,15 @@ public class CollectionService implements INetworkDispatch { BitSet bitValue = new BitSet(64); bitValue.set(64-bits, 64); - BitSet maxValue = new BitSet(64); - maxValue.set(64-maxSlotValue, 64); - - if (bitValue.toLongArray()[0] < maxValue.toLongArray()[0]) { - System.out.println(slotName + ", row " + c + ": counter-type slot uses " + bits + " bits, which can only hold a max value of " + bitValue.toLongArray()[0] + ", which is less than the specified max value of " + maxValue.toLongArray()[0]); + if (bitValue.toLongArray()[0] < maxSlotValue) { + System.out.println(slotName + ", row " + c + ": counter-type slot uses " + bits + " bits, which can only hold a max value of " + bitValue.toLongArray()[0] + ", which is less than the specified max value of " + maxSlotValue); throw new Exception(); } - + } + + if (maxSlotValue > 0) { + return (int) collections.get(beginSlotId, (endSlotId + 1)).toLongArray()[0]; + } else { return collections.get(beginSlotId, (endSlotId + 1)).cardinality(); } } else { From d00aa83050cbcd34fc9c1f9cd4d1752c27d4a207 Mon Sep 17 00:00:00 2001 From: Seefo Date: Sun, 23 Mar 2014 12:27:42 -0400 Subject: [PATCH 21/23] Fixed a few exploits. See extended. Skills obtained through the expertise system are now validated to make sure they are legitimate expertise skills. Player expertise points are also now factored in instead of letting the client do all the calculations. Command "setcurrentskilltitle" now checks if the player has obtained the skill title to prevent abuse of the command. --- scripts/commands/setcurrentskilltitle.py | 3 ++- src/services/SkillService.java | 29 +++++++++++++++++++----- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/scripts/commands/setcurrentskilltitle.py b/scripts/commands/setcurrentskilltitle.py index 43e9e5f4..160c9091 100644 --- a/scripts/commands/setcurrentskilltitle.py +++ b/scripts/commands/setcurrentskilltitle.py @@ -11,5 +11,6 @@ def run(core, actor, target, commandString): if playerObject is None: return - playerObject.setTitle(str(commandString)) + if str(commandString) in playerObject.getTitleList() or str(commandString) == "citizenship" or str(commandString) == "": playerObject.setTitle(str(commandString)) + return \ No newline at end of file diff --git a/src/services/SkillService.java b/src/services/SkillService.java index de024d6d..c3926f7b 100644 --- a/src/services/SkillService.java +++ b/src/services/SkillService.java @@ -271,16 +271,33 @@ public class SkillService implements INetworkDispatch { return; for(String expertiseName : expertise.getExpertiseSkills()) { - addSkill(creature, expertiseName); - if(!FileUtilities.doesFileExist("scripts/expertise/" + expertiseName + ".py")) - continue; - core.scriptService.callScript("scripts/expertise/", expertiseName, "addAbilities", core, creature, player); - } - + if(expertiseName.startsWith("expertise_") && ((caluclateExpertisePoints(creature) - 1) > 0)) // Prevent possible glitches/exploits + { + addSkill(creature, expertiseName); + if(!FileUtilities.doesFileExist("scripts/expertise/" + expertiseName + ".py")) + continue; + core.scriptService.callScript("scripts/expertise/", expertiseName, "addAbilities", core, creature, player); + } + } } }); } + + public int caluclateExpertisePoints(CreatureObject creature) + { + int expertisePoints = 0; + + try + { + DatatableVisitor table = ClientFileManager.loadFile("datatables/player/player_level.iff", DatatableVisitor.class); + for (int i = 0; i <= creature.getLevel(); i++) expertisePoints += (int) table.getObject(i, 5); + } + catch (Exception e) { e.printStackTrace(); } + + System.out.println("Player should have " + expertisePoints + " expertise points."); + return expertisePoints; + } @Override public void shutdown() { From 7d8725d60ba0a463255dd4f36df60845a8be7e19 Mon Sep 17 00:00:00 2001 From: Treeku Date: Sun, 23 Mar 2014 16:49:59 +0000 Subject: [PATCH 22/23] Added buffer to buff funcs, added buff checks --- src/services/BuffService.java | 76 +++++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/src/services/BuffService.java b/src/services/BuffService.java index 4c1811bc..f8a6bcb3 100644 --- a/src/services/BuffService.java +++ b/src/services/BuffService.java @@ -60,30 +60,50 @@ public class BuffService implements INetworkDispatch { } - public void addBuffToCreature(final CreatureObject creature, String buffName) { + public void addBuffToCreature(CreatureObject creature, String buffName) { + try { + throw new Exception(); + } catch (Exception e) { + // New system becoming necessary. Target can be the buffer for abilities that can't buff others. + System.out.println("WARNING: New AddBuff Format: target, buffName, buffer"); + e.printStackTrace(); + } + + addBuffToCreature(creature, buffName, creature); + } + + public void addBuffToCreature(CreatureObject target, String buffName, CreatureObject buffer) { /*if(!FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) { //System.out.println("Buff script doesnt exist for: " + buffName); return; }*/ - final Buff buff = new Buff(buffName, creature.getObjectID()); + final Buff buff = new Buff(buffName, buffer.getObjectID()); if(buff.isGroupBuff()) { - addGroupBuff(creature, buffName); + addGroupBuff(buffer, buffName, buffer); } else { - doAddBuff(creature, buffName, null); + doAddBuff(target, buffName, buffer); } } - public Buff doAddBuff(final CreatureObject creature, String buffName, CreatureObject buffer) { + public Buff doAddBuff(final CreatureObject target, String buffName, CreatureObject buffer) { - final Buff buff = new Buff(buffName, creature.getObjectID()); - buff.setTotalPlayTime(((PlayerObject) creature.getSlottedObject("ghost")).getTotalPlayTime()); + if (target.getPosition().getDistance(buffer.getPosition()) > 20) { + return null; + } + + if (!core.simulationService.checkLineOfSight(buffer, target)) { + return null; + } + + final Buff buff = new Buff(buffName, target.getObjectID()); + buff.setTotalPlayTime(((PlayerObject) target.getSlottedObject("ghost")).getTotalPlayTime()); if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) - core.scriptService.callScript("scripts/buffs/", buffName, "setup", core, ((buffer == null) ? creature : buffer), buff); + core.scriptService.callScript("scripts/buffs/", buffName, "setup", core, buffer, buff); - for (final Buff otherBuff : creature.getBuffList()) { + for (final Buff otherBuff : target.getBuffList()) { if (buff.getGroup1().equals(otherBuff.getGroup1())) if (buff.getPriority() >= otherBuff.getPriority()) { if (buff.getBuffName().equals(otherBuff.getBuffName())) { @@ -91,8 +111,8 @@ public class BuffService implements INetworkDispatch { if(otherBuff.getStacks() < otherBuff.getMaxStacks()) { buff.setStacks(otherBuff.getStacks() + 1); - if(creature.getDotByBuff(otherBuff) != null) // reset duration when theres a dot stack - creature.getDotByBuff(otherBuff).setStartTime(buff.getStartTime()); + if(target.getDotByBuff(otherBuff) != null) // reset duration when theres a dot stack + target.getDotByBuff(otherBuff).setStartTime(buff.getStartTime()); } else { buff.setStacks(buff.getMaxStacks()); @@ -102,7 +122,7 @@ public class BuffService implements INetworkDispatch { return null; } - removeBuffFromCreature(creature, otherBuff); + removeBuffFromCreature(target, otherBuff); break; } else { System.out.println("buff not added:" + buffName); @@ -111,9 +131,9 @@ public class BuffService implements INetworkDispatch { } if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) - core.scriptService.callScript("scripts/buffs/", buffName, "add", core, creature, buff); + core.scriptService.callScript("scripts/buffs/", buffName, "add", core, target, buff); - creature.addBuff(buff); + target.addBuff(buff); if(buff.getDuration() > 0) { @@ -122,7 +142,7 @@ public class BuffService implements INetworkDispatch { @Override public void run() { - removeBuffFromCreature(creature, buff); + removeBuffFromCreature(target, buff); } @@ -134,7 +154,7 @@ public class BuffService implements INetworkDispatch { } for (String effect : buff.getParticleEffect().split(",")) { - creature.playEffectObject(effect, buff.getBuffName()); + target.playEffectObject(effect, buff.getBuffName()); } if (!buff.getCallback().equals("")) { @@ -146,7 +166,7 @@ public class BuffService implements INetworkDispatch { PyObject method = core.scriptService.getMethod("scripts/buffs/", buff.getBuffName(), buff.getCallback()); if (method != null && method.isCallable()) { - method.__call__(Py.java2py(core), Py.java2py(creature), Py.java2py(buff)); + method.__call__(Py.java2py(core), Py.java2py(target), Py.java2py(buff)); } } @@ -154,7 +174,7 @@ public class BuffService implements INetworkDispatch { } } - if (buffer != null && creature.getGroupId() != 0 && creature.getGroupId() == buffer.getGroupId()) { + if (buffer != null && target.getGroupId() != 0 && target.getGroupId() == buffer.getGroupId()) { buff.setGroupBufferId(buffer.getObjectID()); } @@ -217,22 +237,34 @@ public class BuffService implements INetworkDispatch { } - public void addGroupBuff(final CreatureObject buffer, String buffName) { + public void addGroupBuff(CreatureObject buffer, String buffName) { + try { + throw new Exception(); + } catch (Exception e) { + // New system becoming necessary. Target can be the buffer for abilities that can't buff others. + System.out.println("WARNING: New GroupAddBuff Format: target, buffName, buffer"); + e.printStackTrace(); + } + + addGroupBuff(buffer, buffName, buffer); + } + + public void addGroupBuff(CreatureObject target, String buffName, CreatureObject buffer) { if(buffer.getGroupId() == 0) { - doAddBuff(buffer, buffName, null); + doAddBuff(target, buffName, buffer); return; } GroupObject group = (GroupObject) core.objectService.getObject(buffer.getGroupId()); if(group == null) { - doAddBuff(buffer, buffName, null); + doAddBuff(target, buffName, buffer); return; } for(SWGObject member : group.getMemberList()) { - Buff buff = doAddBuff((CreatureObject) member, buffName, buffer); + doAddBuff((CreatureObject) member, buffName, buffer); } } From e2a09f12d4f7c12c8fe46f2fcd301cb757cd92a9 Mon Sep 17 00:00:00 2001 From: Waverunner Date: Sun, 23 Mar 2014 14:04:21 -0400 Subject: [PATCH 23/23] Roadmap Rewards use giveItem, roadmap rewards call script based on profession --- src/services/PlayerService.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/services/PlayerService.java b/src/services/PlayerService.java index 5c3eaf9c..fb203434 100644 --- a/src/services/PlayerService.java +++ b/src/services/PlayerService.java @@ -691,6 +691,8 @@ public class PlayerService implements INetworkDispatch { try { roadmap = ClientFileManager.loadFile("datatables/roadmap/item_rewards.iff", DatatableVisitor.class); + Vector rewards = new Vector(); + for (int s = 0; s < roadmap.getRowCount(); s++) { if (roadmap.getObject(s, 0) != null) { if (((String) roadmap.getObject(s, 1)).equals(roadmapSkillName)) { @@ -715,11 +717,12 @@ public class PlayerService implements INetworkDispatch { item = (item.substring(0, (item.lastIndexOf("/") + 1)) + "shared_" + item.substring((item.lastIndexOf("/") + 1))); } else { customServerTemplate = item; - item = core.scriptService.callScript("scripts/roadmap/", "roadmap_rewards", "get", item).asString(); + item = core.scriptService.callScript("scripts/roadmap/", player.getProfession(), "getRewards", item).asString(); } if (item != null && item != "") { - creature.getSlottedObject("inventory").add(core.objectService.createObject(item, 0, creature.getPlanet(), new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), customServerTemplate)); + SWGObject itemObj = core.objectService.createObject(item, 0, creature.getPlanet(), new Point3D(0, 0, 0), new Quaternion(1, 0, 0, 0), customServerTemplate); + rewards.add(itemObj); } else { //System.out.println("Can't find template: " + item); } @@ -731,6 +734,11 @@ public class PlayerService implements INetworkDispatch { } } } + + if (rewards != null && !rewards.isEmpty()) { + giveItems(creature, (SWGObject[]) rewards.toArray()); + } + } catch (InstantiationException | IllegalAccessException e) { e.printStackTrace(); }