コード例 #1
0
ファイル: Token.java プロジェクト: fxmatthews/maptool
 public void removeOwnerOnlyAuras() {
   if (lightSourceList != null) {
     for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
       AttachedLightSource als = i.next();
       LightSource lightSource = MapTool.getCampaign().getLightSource(als.getLightSourceId());
       if (lightSource != null) {
         List<Light> lights = lightSource.getLightList();
         for (Light light : lights) {
           if (light.isOwnerOnly()) i.remove();
         }
       }
     }
   }
 }
コード例 #2
0
ファイル: Token.java プロジェクト: fxmatthews/maptool
 public boolean hasGMAuras() {
   if (lightSourceList != null) {
     for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
       AttachedLightSource als = i.next();
       LightSource lightSource = MapTool.getCampaign().getLightSource(als.getLightSourceId());
       if (lightSource != null) {
         List<Light> lights = lightSource.getLightList();
         for (Light light : lights) {
           if (light.isGM()) return true;
         }
       }
     }
   }
   return false;
 }