From 82e380cd3d98b2702a1a8253effb3c0645438132 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Wed, 24 Apr 2013 18:22:52 +0200 Subject: [PATCH] these changes fixes a few startup errors related to non-attached factions lacking universe. --- capes/ally.png | Bin 574 -> 0 bytes capes/capes.psd | Bin 38116 -> 0 bytes capes/enemy.png | Bin 484 -> 0 bytes capes/member.png | Bin 588 -> 0 bytes capes/neutral.png | Bin 437 -> 0 bytes capes/peaceful.png | Bin 369 -> 0 bytes .../massivecraft/factions/entity/Faction.java | 38 ++++++++++-------- .../massivecraft/factions/entity/UPlayer.java | 18 ++------- 8 files changed, 25 insertions(+), 31 deletions(-) delete mode 100644 capes/ally.png delete mode 100644 capes/capes.psd delete mode 100644 capes/enemy.png delete mode 100644 capes/member.png delete mode 100644 capes/neutral.png delete mode 100644 capes/peaceful.png diff --git a/capes/ally.png b/capes/ally.png deleted file mode 100644 index 83deef32d76fb9a672b987cfb1407959ac6f0a6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 574 zcmV-E0>S->P)pg>*^@ z(?Ew#NmuX!yd@6?8&<%EOOrx~Lz|m#vc$2Rl&vMrk;bE=PrrX1srT2`4$o=S)^muz zG)h&`^S5wv1?>TZ5d;z{0BgaN5=9-mrR4M*gKac?0rQWRpas2Ccr=2jTZ4-oq<;k( z%b~K~f2L^KqV)|t9+%vH2uSatdm_qu)tLg_K(dng4kqsk_RCIl@LtqJX9?GYiVXF{^eV9=OLPz`yJ^XL1XvzL8zYs;>T*-AwHf^M%P zYdgs)@M#WQ$fh*S1dwp?dQ4uX6cQKHvG~4s>stGPofXGTi*GrTH$8^K0iA9elZC9r z|D!G5;6kjhhwaN7xvcAnR7Sw!Yh{719uf-t!MV;|d07nEJYjtwVziW7W*t(=Q}jhg z$IG*n7+X4cdS?$R0|yNV-Ry6LP6ekO*vJ8{h!5aENnJ}?HTx@;3NTjJaOqeHbpT6B zs3JG}D=xDGv{wC~*x8`vA8NRNxtSxl_V@v8m3&oJ$bTr~1^y?%0KFOfmxY?wA^-pY M07*qoM6N<$f_@ML_y7O^ diff --git a/capes/capes.psd b/capes/capes.psd deleted file mode 100644 index 7739624e36124020749d800255468774d08c4e99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38116 zcmeHQ2Ygh;)}On(+4LSlhb4rbvL&1Bh7hvZWRpNbLK3P4H@i27<7{Xm5xTV4`lf)1q$1*HemDkjXP(n!b00AL_MOs36!zeGMYUd>fP7k^8x|O?P zpD?c2JdDb+Q8s>d$@nh2-Y|!CNm|%8lXYCychA0l!3ln}d}UAr z5{I$1xUoX#O%SMYS?w;Dy*NL=v$Hd=Q;}zLwB^gxYIVL;o-dc@LWo@FJgZCJm1}hl z<&^MxDp;q%VY0hSHmd~n>RW7X*SM@KOvrb6OJ=eA60$n;XesjyHcNh&-kvYZlji$0 zL&Oq5rC94=^)8#E*=94Ba%FF5x4CT2cAH(IZBk06nXE=zr?VtKG_XH)zaF+i?_x{k zQkg7Qs)B#bQf0BCuvn?i1&>r3po9ww^3bp(VA)dBTs z)VuWOq$Mz{S5HYkLL2}&txrTNgnzcGFdBR{VRt*sw8D*seAdibSgXqkwIK_x4WpsB z)#kA1U8Q=v-E1=GvBL8^tVVA&+WC4Z$@d5SqjT*`#FzOXGxCYM8F{Nfs|w!vX*HJRB`XJb{lq^43^C{q^}=F0PAfocN6{n3R76R)f5x!`>J zu~_nZYIjaoWd}4#ZxauKjF0JTo@ZzC8(F8#?J%&F9bg3hcJ6JBb#=uxR;NpEHLx`m zrI4LGlgS7zNTE?dn<^~Q7FEK%Tq9Si3M;fSovu)>RI6yS3XU3pFfCMZh0WkbyYs3w zg4#-LL8U^eP*oIYWvEsotB`6cwUtt3p-x?)so>QHMD3=w-eH1%SZ@vpgSq}S>U&Vp zEtzVQ6Z)umd{g8)J=!3f*tx-6zNMN?w1L|74kwGqkIUkr59|UtO&EvPV6onSjjq&y zog!;2$q(ZCvlSZ6)Ve!oBjm&o%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4kL)v=3S&p|FUBJkOzY%3MHX0uSN=u6W4cE{SLX)(<5-!Oh;o>~sc|Dl=wdZM*l)i-nYp zz_gf(0|EhVg5P*|`~idhGjyFE1UQ!ah3-l;jtX3EQ+Jp?q&a41mtZ!-b@w?14eu6g!XK7Y~3)}4fziMu-iE0l1 aE5HEgISroUF<{^T0000Y+MpdOn5WI z`2YXmubBA4qM+c$cq&tl@u{1+NwGA|>7wd3(QdaJX0w_2sPB7e+tz1li#bP1O zIf|NO#u^wRXWd6+mSvgNo3dar#>U85DfnzumZfYq8?_wQWNsTK7|hFn2}(jU*>Sjn zrhe|mU@#yH{A@6@pII;%Om>9*8w^ZIh*4lH_6=6cykG{lZT|0!4g3io4YnG;f2zNw f_#XGsj{pMzuqqY%OwdD300000NkvXXu0mjfn)bn5 diff --git a/capes/peaceful.png b/capes/peaceful.png deleted file mode 100644 index b178813363598a2cce860390d7df7a777d7c0339..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 369 zcmV-%0gnEOP)qyh6-cDWm)u&Th>hAaU3O%W9j=|p@`b|T{kStQvXvF#b=ID z*LC*}TwT|7t?M{9M?roZH_I|<+x7;@^IVTV41-vwQk%DJo5FBbRh7*1tl~Eju#U`* z{YyAc(^Q?3Iavd?jO0rc{$+A*nnovt2xy>XeqX>IN*sRN5KuO;!oM{S0e=J{HsWpu z( implements EconomyParticipator @Override public Faction load(Faction that) { - this.tag = that.tag; + this.setTag(that.tag); this.setDescription(that.description); - this.home = that.home; + this.setHome(that.home); this.setPowerBoost(that.powerBoost); - this.open = that.open; + this.setOpen(that.open); this.setInvitedPlayerIds(that.invitedPlayerIds); this.setRelationWishes(that.relationWish); this.setFlags(that.flagOverrides); @@ -238,6 +238,7 @@ public class Faction extends Entity implements EconomyParticipator public void setHome(PS home) { this.home = home; + this.changed(); } // -------------------------------------------- // @@ -255,10 +256,7 @@ public class Faction extends Entity implements EconomyParticipator public void setPowerBoost(Double powerBoost) { - if (powerBoost == null || powerBoost == 0) - { - powerBoost = null; - } + if (powerBoost == null || powerBoost == 0) powerBoost = null; this.powerBoost = powerBoost; this.changed(); } @@ -470,13 +468,16 @@ public class Faction extends Entity implements EconomyParticipator target.putAll(flags); } - Iterator> iter = target.entrySet().iterator(); - while (iter.hasNext()) + if (this.attached() && Factions.get().isDatabaseInitialized()) { - Entry entry = iter.next(); - if (entry.getKey().getDefault(this) == entry.getValue()) + Iterator> iter = target.entrySet().iterator(); + while (iter.hasNext()) { - iter.remove(); + Entry entry = iter.next(); + if (entry.getKey().getDefault(this) == entry.getValue()) + { + iter.remove(); + } } } @@ -542,13 +543,16 @@ public class Faction extends Entity implements EconomyParticipator } } - Iterator>> iter = target.entrySet().iterator(); - while (iter.hasNext()) + if (this.attached() && Factions.get().isDatabaseInitialized()) { - Entry> entry = iter.next(); - if (entry.getKey().getDefault(this).equals(entry.getValue())) + Iterator>> iter = target.entrySet().iterator(); + while (iter.hasNext()) { - iter.remove(); + Entry> entry = iter.next(); + if (entry.getKey().getDefault(this).equals(entry.getValue())) + { + iter.remove(); + } } } diff --git a/src/com/massivecraft/factions/entity/UPlayer.java b/src/com/massivecraft/factions/entity/UPlayer.java index 917a5eb5..fb63f713 100644 --- a/src/com/massivecraft/factions/entity/UPlayer.java +++ b/src/com/massivecraft/factions/entity/UPlayer.java @@ -20,7 +20,6 @@ import com.massivecraft.mcore.mixin.Mixin; import com.massivecraft.mcore.ps.PS; import com.massivecraft.mcore.ps.PSFormatSlug; import com.massivecraft.mcore.store.SenderEntity; -import com.massivecraft.mcore.util.MUtil; import com.massivecraft.mcore.util.SenderUtil; @@ -186,24 +185,18 @@ public class UPlayer extends SenderEntity implements EconomyParticipato // This setter is so long because it search for default/null case and takes care of updating the faction member index public void setFactionId(String factionId) { - // Avoid null input - if (factionId == null) factionId = this.getDefaultFactionId(); - - // Get the old value - String oldFactionId = this.getFactionId(); - - // Ignore nochange - if (factionId.equals(oldFactionId)) return; + // Get the raw old value + String oldFactionId = this.factionId; // Apply change - if (factionId.equals(this.getDefaultFactionId())) factionId = null; this.factionId = factionId; // Next we must be attached and inited if (!this.attached()) return; - if (!this.getColl().inited()) return; if (!Factions.get().isDatabaseInitialized()) return; + if (oldFactionId == null) oldFactionId = this.getDefaultFactionId(); + // Update index Faction oldFaction = FactionColls.get().get(this).get(oldFactionId); Faction faction = FactionColls.get().get(this).get(factionId); @@ -237,7 +230,6 @@ public class UPlayer extends SenderEntity implements EconomyParticipato public void setRole(Rel role) { - if (role == null || MUtil.equals(role, this.getDefaultRole())) role = null; this.role = role; this.changed(); } @@ -328,8 +320,6 @@ public class UPlayer extends SenderEntity implements EconomyParticipato public void setPower(Double power) { - if (power == null || MUtil.equals(power, this.getDefaultPower())) power = null; - power = this.getLimitedPower(power); this.power = power; this.changed(); }