Exemplo n.º 1
0
 public boolean isLaw(MOB mob) {
   if (mob == null) return false;
   if (affected instanceof Room) {
     LegalBehavior law = CMLib.law().getLegalBehavior((Room) affected);
     if (law != null) {
       Area A = CMLib.law().getLegalObject((Room) affected);
       if (law.isAnyOfficer(A, mob) || law.isJudge(A, mob)) return true;
     }
   }
   return false;
 }
Exemplo n.º 2
0
 public boolean isLawHere(Room R) {
   if (R != null) {
     LegalBehavior law = CMLib.law().getLegalBehavior(R);
     if (law != null) {
       Area A = CMLib.law().getLegalObject(R);
       MOB M = null;
       for (int r = 0; r < R.numInhabitants(); r++) {
         M = R.fetchInhabitant(r);
         if ((M != null) && (law.isAnyOfficer(A, M) || law.isJudge(A, M))) return true;
       }
     }
   }
   return false;
 }