Beispiel #1
0
        static int SortById(TriggerSystemProtoObject x, TriggerSystemProtoObject y)
        {
            if (x.DbId != y.DbId)
            {
                return(x.DbId - y.DbId);
            }

            return(x.Version - y.Version);
        }
Beispiel #2
0
 static uint GenerateHandle(TriggerSystemProtoObject dbo)
 {
     return(((uint)dbo.DbId << 8) | (uint)dbo.Version);
 }
Beispiel #3
0
 bool LookupTableContains <T>(T obj, out TriggerSystemProtoObject dbo)
     where T : TriggerScriptObject
 {
     return(LookupTable.TryGetValue(GenerateHandle(obj), out dbo));
 }
Beispiel #4
0
 static void TraceUpdate(BTriggerSystem ts, TriggerSystemProtoObject dbo)
 {
     Debug.Trace.Engine.TraceInformation(
         "TriggerProtoDbObject: {0} - Updated {1}/{2}",
         ts, dbo.DbId.ToString(), dbo.Name);
 }
Beispiel #5
0
 void LookupTableAdd(TriggerSystemProtoObject dbo)
 {
     mUsedIds[dbo.DbId] = true;
     LookupTable.Add(GenerateHandle(dbo), dbo);
 }