File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/jassinterpreter/providers Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,15 @@ else if(index.getVal() == 0)
101101
102102 public ILconstInt BlzGroupAddGroupFast (IlConstHandle group , IlConstHandle groupAdd ) {
103103 LinkedHashSet <IlConstHandle > groupList = (LinkedHashSet <IlConstHandle >) groupAdd .getObj ();
104- groupList .addAll ((LinkedHashSet <IlConstHandle >) group .getObj ());
105- return ILconstInt .create (groupList .size ());
104+ LinkedHashSet <IlConstHandle > addList = (LinkedHashSet <IlConstHandle >) group .getObj ();
105+ int addCount = 0 ;
106+ for (IlConstHandle unit : addList ) {
107+ if (!groupList .contains (unit )) {
108+ groupList .add (unit );
109+ addCount ++;
110+ }
111+ }
112+ return ILconstInt .create (addCount );
106113 }
107114
108115 public ILconstInt BlzGroupRemoveGroupFast (IlConstHandle group , IlConstHandle groupRm ) {
You can’t perform that action at this time.
0 commit comments