Created
October 30, 2012 16:41
-
-
Save volgar1x/3981410 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.shivas.data.converter; | |
import com.google.common.collect.Sets; | |
import junit.framework.TestCase; | |
import org.shivas.data.converter.loaders.AncestraLoader; | |
import org.shivas.data.converter.loaders.DataLoader; | |
import org.shivas.data.entity.SpellEffect; | |
import org.shivas.data.entity.SpellLevel; | |
import org.shivas.data.entity.SpellTemplate; | |
import java.util.Set; | |
import static org.shivas.common.collections.CollectionQuery.from; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: Blackrush | |
* Date: 30/10/12 | |
* Time: 17:34 | |
*/ | |
public class FuckingEffectDeMerde extends TestCase { | |
public void test1() throws Exception { | |
DataLoader loader = new AncestraLoader("localhost", "root", "", "ancestrar_static"); | |
Set<Short> missingEffects = Sets.newHashSet(); | |
for (SpellTemplate spell : loader.loadSpells().values()) { | |
if (spell == null) continue; | |
for (SpellLevel level : spell.getLevels()) { | |
if (level == null) continue; | |
for (SpellEffect effect : from(level.getEffects()).with(level.getCriticalEffects())) { | |
if (effect == null) continue; | |
if (effect.getType() == null) { | |
missingEffects.add(effect.getFirst()); | |
} | |
} | |
} | |
} | |
for (Short effectId : missingEffects) { | |
System.out.format("Unknown_%d(%d),\n", effectId, effectId); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment