public void Send(int peerID, DELIVERY_TYPE d_type, StreamBuffer sb)
 {
     if (this.m_peerMap.ContainsKey(peerID))
     {
         m_peerMap[peerID].Send(d_type, sb);
     }
 }
Beispiel #2
0
 static void SerializeIngradiente(string name, string desc, DELIVERY_TYPE delType)
 {
     using (fout = new FileStream(ingradientsFolder + name + ".ing", FileMode.OpenOrCreate)) {
         ing = new Ingradient(delType, name, desc, 0, 10000);
         fs.Serialize(fout, ing);
     }
 }
Beispiel #3
0
    public int GetSortPriority(DELIVERY_TYPE type)
    {
        switch (type)
        {
        default:
            return(5);

        case DELIVERY_TYPE.WEEKLY:
            return(4);

        case DELIVERY_TYPE.ONCE:
            return(3);

        case DELIVERY_TYPE.DAILY:
        case DELIVERY_TYPE.MON:
        case DELIVERY_TYPE.TUE:
        case DELIVERY_TYPE.WED:
        case DELIVERY_TYPE.THU:
        case DELIVERY_TYPE.FRI:
        case DELIVERY_TYPE.SAT:
        case DELIVERY_TYPE.SUN:
        case DELIVERY_TYPE.SUB_EVENT:
        case DELIVERY_TYPE.DAY_OF_WEEK:
            return(2);

        case DELIVERY_TYPE.STORY:
            return(1);
        }
    }
Beispiel #4
0
 public static bool IsInvalidClearInGame(DELIVERY_TYPE type, DIFFICULTY_MODE fieldMode)
 {
     if (type == DELIVERY_TYPE.ONCE && fieldMode == DIFFICULTY_MODE.HARD)
     {
         return(true);
     }
     return(type != DELIVERY_TYPE.ONCE && type != DELIVERY_TYPE.SUB_EVENT);
 }
Beispiel #5
0
 public Ingradient(DELIVERY_TYPE _DeliveredBy, string _Name, string _Description, uint _MassGr, int BasicQuality)
 {
     DeliveredBy = _DeliveredBy;
     Name        = _Name;
     Description = _Description;
     MassGr      = _MassGr;
     Quality     = new Stat(BasicQuality, BasicQuality);
 }
Beispiel #6
0
 public DeliveryBasic(DELIVERY_TYPE DeliveryType, double QualityModifier, short SecondsToDeliver, double CostMod)
 {
     this.DeliveryType     = DeliveryType;
     this.QualityModifier  = QualityModifier;
     this.SecondsToDeliver = SecondsToDeliver;
     this.CostMod          = CostMod;
     this.EarnedMoney      = 0;
     this.toOrder          = new List <IngradientWithPrice>();
     this.toDeliver        = new List <IngradientOnCargo>();
 }
 public void Send(DELIVERY_TYPE dType, StreamBuffer sb)
 {
     if (dType == DELIVERY_TYPE.RELIABLE_ORDERED)
     {
         m_reliablBufferQueue.Enqueue(sb);
     }
     else
     {
         Send(sb);
     }
 }
Beispiel #8
0
        public void LoadFromBinary(BinaryTableReader reader, ref uint key)
        {
            id                = key;
            locationNumber    = reader.ReadString(string.Empty);
            deliveryNumber    = reader.ReadString(string.Empty);
            name              = reader.ReadString(string.Empty);
            type              = (DELIVERY_TYPE)reader.ReadUInt32(0u);
            subType           = (DELIVERY_SUB_TYPE)reader.ReadUInt32(0u);
            textType          = (DELIVERY_TYPE)reader.ReadUInt32(0u);
            eventID           = reader.ReadInt32(0);
            fieldMode         = (DIFFICULTY_MODE)reader.ReadUInt32(0u);
            difficulty        = (DIFFICULTY_MODE)reader.ReadUInt32(0u);
            npcID             = reader.ReadUInt32(0u);
            npcComment        = reader.ReadString(string.Empty);
            npcClearComment   = reader.ReadString(string.Empty);
            clearEventID      = reader.ReadUInt32(0u);
            clearEventTitle   = reader.ReadString(string.Empty);
            jumpType          = reader.ReadInt32(0);
            jumpMapID         = reader.ReadInt32(0);
            targetPortalID[0] = reader.ReadInt32(0);
            targetPortalID[1] = reader.ReadInt32(0);
            targetPortalID[2] = reader.ReadInt32(0);
            placeName         = reader.ReadString(string.Empty);
            enemyName         = reader.ReadString(string.Empty);
            appearQuestId     = reader.ReadUInt32(0u);
            appearDeliveryId  = reader.ReadUInt32(0u);
            List <NeedData> list = new List <NeedData>();
            int             i    = 0;

            for (int num = 5; i < num; i++)
            {
                DELIVERY_CONDITION_TYPE dELIVERY_CONDITION_TYPE = DELIVERY_CONDITION_TYPE.NONE;
                uint num2    = 0u;
                uint num3    = 0u;
                uint questId = 0u;
                DELIVERY_RATE_TYPE dELIVERY_RATE_TYPE = DELIVERY_RATE_TYPE.RATE_10000;
                string             empty = string.Empty;
                uint num4 = 0u;
                uint num5 = 0u;
                dELIVERY_CONDITION_TYPE = (DELIVERY_CONDITION_TYPE)reader.ReadUInt32(0u);
                num2 = reader.ReadUInt32(0u);
                num3 = reader.ReadUInt32(0u);
                if (i == 0)
                {
                    questId = reader.ReadUInt32(0u);
                }
                dELIVERY_RATE_TYPE = (DELIVERY_RATE_TYPE)reader.ReadUInt32(0u);
                empty = reader.ReadString(string.Empty);
                num4  = reader.ReadUInt32(0u);
                num5  = reader.ReadUInt32(0u);
                NeedData needData = new NeedData(dELIVERY_CONDITION_TYPE, num2, num3, questId, dELIVERY_RATE_TYPE, empty, num4, num5);
                if (needData.IsValid())
                {
                    list.Add(needData);
                }
            }
            needs = list.ToArray();
            if (string.IsNullOrEmpty(locationNumber))
            {
                locationNumber = (id / 100u % 1000u).ToString();
            }
            if (string.IsNullOrEmpty(deliveryNumber))
            {
                deliveryNumber = (id % 100u).ToString();
            }
        }