Exemple #1
0
        // ugly hack
        public static ObjectTypeId GetTypeId(WowGuidType type)
        {
            switch (type)
            {
            case WowGuidType.Corpse:
                return(ObjectTypeId.Corpse);

            case WowGuidType.DynamicObject:
                return(ObjectTypeId.DynamicObject);

            case WowGuidType.TransportMo:
            case WowGuidType.Transport:
            case WowGuidType.GameObject:
                return(ObjectTypeId.GameObject);

            case WowGuidType.Item:
                return(ObjectTypeId.Item);

            case WowGuidType.Player:
                return(ObjectTypeId.Player);

            case WowGuidType.Pet:
            case WowGuidType.Creature:
            case WowGuidType.Vehicle:
                return(ObjectTypeId.Unit);

            default:
                return(ObjectTypeId.Object);
            }
        }
Exemple #2
0
 public HighInfo(WowGuidType type, WowGuidKind kind,
                 int mask, int value, int defaultValue)
 {
     this.Type         = type;
     this.Kind         = kind;
     this.Mask         = mask;
     this.Value        = value;
     this.DefaultValue = defaultValue;
 }
Exemple #3
0
        public WowGuid(WowGuidType type, uint entry, ulong counter)
        {
            m_raw = 0;

            var info = s_typeValuePairs.FirstOrDefault(_ => _.Type == type);

            if (info == null)
            {
                throw new ArgumentException("type");
            }

            this.High    = info.DefaultValue;
            this.Entry   = entry;
            this.Counter = counter;
        }
Exemple #4
0
 // ugly hack
 public static ObjectTypeId GetTypeId(WowGuidType type)
 {
     switch (type)
     {
         case WowGuidType.Corpse:
             return ObjectTypeId.Corpse;
         case WowGuidType.DynamicObject:
             return ObjectTypeId.DynamicObject;
         case WowGuidType.TransportMo:
         case WowGuidType.Transport:
         case WowGuidType.GameObject:
             return ObjectTypeId.GameObject;
         case WowGuidType.Item:
             return ObjectTypeId.Item;
         case WowGuidType.Player:
             return ObjectTypeId.Player;
         case WowGuidType.Pet:
         case WowGuidType.Creature:
         case WowGuidType.Vehicle:
             return ObjectTypeId.Unit;
         default:
             return ObjectTypeId.Object;
     }
 }
Exemple #5
0
 public WowGuid(WowGuidType type, ulong counter)
     : this(type, 0, counter)
 {
 }