public static int GetOffsetByCategory(MODEventCategoryType category, MODEventType type)
 {
     switch (category)
     {
         case MODEventCategoryType.DropPacket:
             return (int)type - (int)MODDropPacketEventType.NotDropPacket;
         //TODO others
         default:
             return -1;
     }
 }
 public static int pow(MODEventType type)
 {
     return DSClass.pow((int)type);
 }
 public static int Conv(MODEventType type)
 {
     int t = (int)type;
     //....
     if (t > (int)MODDropPacketEventType.NotDropPacket)
         return t - (int)MODDropPacketEventType.NotDropPacket;
     return -1;
 }