コード例 #1
0
    public static PortalPointEffect Create(PortalObject portal_object, Coop_Model_EnemyDefeat model)
    {
        //IL_0055: Unknown result type (might be due to invalid IL or missing references)
        if (model == null)
        {
            return(null);
        }
        string effect_name = MonoBehaviourSingleton <InGameSettingsManager> .I.portal.pointEffect.normalEffectName;

        if (model.ppt > 1)
        {
            effect_name = MonoBehaviourSingleton <InGameSettingsManager> .I.portal.pointEffect.largeEffectName;
        }
        Transform effect = EffectManager.GetEffect(effect_name, null);

        if (effect == null)
        {
            return(null);
        }
        PortalPointEffect portalPointEffect = effect.get_gameObject().AddComponent <PortalPointEffect>();

        if (portalPointEffect != null)
        {
            portalPointEffect.Drop(portal_object, model);
        }
        return(portalPointEffect);
    }
コード例 #2
0
        public Reward(Coop_Model_EnemyDefeat model, bool isTreasure)
        {
            if (isTreasure)
            {
                rewardId = model.rewardId;
            }
            else
            {
                rewardId = model.rewardId2;
            }
            enemyId = model.eid;
            int i = 0;

            for (int count = model.dropIds.Count; i < count; i++)
            {
                FieldDropModel.RequestSendForm.DropSignatureInfo.DropData item = new FieldDropModel.RequestSendForm.DropSignatureInfo.DropData
                {
                    dropId  = model.dropIds[i],
                    type    = model.dropTypes[i],
                    itemId  = model.dropItemIds[i],
                    num     = model.dropNums[i],
                    param_0 = model.dropParam_0s[i]
                };
                sigInfo.drops.Add(item);
            }
            sigInfo.deliver.bit        = model.deliver;
            sigInfo.deliver.boostBit   = model.boostBit;
            sigInfo.deliver.boostNum   = model.boostNum;
            sigInfo.deliver.isTreasure = isTreasure;
        }
コード例 #3
0
    public static FieldDropObject CreateTreasureBox(Coop_Model_EnemyDefeat model, List <InGameManager.DropDeliveryInfo> deliveryList, List <InGameManager.DropItemInfo> itemList, UIDropAnnounce.COLOR color)
    {
        //IL_004a: Unknown result type (might be due to invalid IL or missing references)
        //IL_004f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0138: Unknown result type (might be due to invalid IL or missing references)
        //IL_013a: Unknown result type (might be due to invalid IL or missing references)
        //IL_013b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0140: Unknown result type (might be due to invalid IL or missing references)
        //IL_014b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0151: Unknown result type (might be due to invalid IL or missing references)
        //IL_0153: Unknown result type (might be due to invalid IL or missing references)
        //IL_016b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0170: Unknown result type (might be due to invalid IL or missing references)
        //IL_0182: Unknown result type (might be due to invalid IL or missing references)
        //IL_0187: Unknown result type (might be due to invalid IL or missing references)
        //IL_0196: Unknown result type (might be due to invalid IL or missing references)
        //IL_0198: Unknown result type (might be due to invalid IL or missing references)
        GameObject val = MonoBehaviourSingleton <InGameManager> .I.CreateTreasureBox(color);

        FieldDropObject fieldDropObject = val.GetComponent <FieldDropObject>();

        if (fieldDropObject == null)
        {
            fieldDropObject = val.AddComponent <FieldDropObject>();
        }
        fieldDropObject.itemInfo     = itemList;
        fieldDropObject.deliveryInfo = deliveryList;
        fieldDropObject.rewardId     = model.rewardId;
        fieldDropObject.isRare       = (color == UIDropAnnounce.COLOR.RARE);
        Vector3 zero = Vector3.get_zero();

        if (MonoBehaviourSingleton <InGameSettingsManager> .IsValid())
        {
            InGameSettingsManager.FieldDropItem fieldDrop = MonoBehaviourSingleton <InGameSettingsManager> .I.fieldDrop;
            float value  = Random.get_value();
            float value2 = Random.get_value();
            float value3 = Random.get_value();
            float num    = (!(Random.get_value() > 0.5f)) ? 1f : (-1f);
            float num2   = (!(Random.get_value() > 0.5f)) ? 1f : (-1f);
            zero._002Ector(Mathf.Lerp(fieldDrop.offsetMin.x, fieldDrop.offsetMax.x, value) * num, Mathf.Lerp(fieldDrop.offsetMin.y, fieldDrop.offsetMax.y, value2), Mathf.Lerp(fieldDrop.offsetMin.z, fieldDrop.offsetMax.z, value3) * num2);
        }
        Vector3 val2 = default(Vector3);

        val2._002Ector((float)model.x, 0f, (float)model.z);
        Vector3    target       = val2 + zero;
        int        obstacleMask = AIUtility.GetObstacleMask();
        RaycastHit hit          = default(RaycastHit);

        if (AIUtility.RaycastForTargetPos(val2, target, obstacleMask, out hit))
        {
            Vector3 point  = hit.get_point();
            float   x      = point.x;
            float   y      = target.y;
            Vector3 point2 = hit.get_point();
            target._002Ector(x, y, point2.z);
        }
        fieldDropObject.Drop(val2, target);
        return(fieldDropObject);
    }
コード例 #4
0
    }    //IL_002d: Unknown result type (might be due to invalid IL or missing references)

    //IL_0032: Unknown result type (might be due to invalid IL or missing references)


    public static FieldDropObject Create(Coop_Model_EnemyDefeat model, List <InGameManager.DropDeliveryInfo> deliveryList, List <InGameManager.DropItemInfo> itemList)
    {
        if (itemList.Count <= 0 && deliveryList.Count <= 0)
        {
            return(null);
        }
        UIDropAnnounce.COLOR color = GetColor(model, deliveryList);
        return(CreateTreasureBox(model, deliveryList, itemList, color));
    }
コード例 #5
0
 public void AddEnemyDefeat(Coop_Model_EnemyDefeat model, bool IsDefeatFieldDelivery)
 {
     defeatList.Add(new DefeatEnemy(model));
     rewardList.Add(new Reward(model, true));
     if (IsDefeatFieldDelivery)
     {
         rewardList.Add(new Reward(model, false));
     }
     Save();
 }
コード例 #6
0
 public DefeatEnemy(Coop_Model_EnemyDefeat model)
 {
     enemyId             = model.eid;
     sigInfo.defeatKeyId = model.defeatKeyId;
     sigInfo.signature   = model.sig;
     sigInfo.sid         = model.sid;
     sigInfo.exp         = model.exp;
     sigInfo.money       = model.money;
     sigInfo.ppt         = model.ppt;
 }
コード例 #7
0
    public void CreateDropInfoList(Coop_Model_EnemyDefeat model, out List <DropDeliveryInfo> deliveryList, out List <DropItemInfo> itemList)
    {
        itemList     = new List <DropItemInfo>();
        deliveryList = new List <DropDeliveryInfo>();
        int i = 0;

        for (int count = model.dropIds.Count; i < count; i++)
        {
            itemList.Add(new DropItemInfo((REWARD_TYPE)model.dropTypes[i], (uint)model.dropItemIds[i], model.dropNums[i]));
        }
        int mapId = MonoBehaviourSingleton <FieldManager> .I.GetMapId();

        Delivery[] deliveryList2 = MonoBehaviourSingleton <DeliveryManager> .I.GetDeliveryList(false);

        int j = 0;

        for (int num = deliveryList2.Length; j < num; j++)
        {
            DeliveryTable.DeliveryData deliveryTableData = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)deliveryList2[j].dId);

            if (deliveryTableData != null)
            {
                int k = 0;
                for (int num2 = deliveryTableData.needs.Length; k < num2; k++)
                {
                    uint num3 = (uint)k;
                    if (deliveryTableData.IsNeedTarget(num3, (uint)model.eid, (uint)mapId) && (model.deliver & (1 << (int)deliveryTableData.GetRateType(num3))) > 0)
                    {
                        int have = 0;
                        int need = 0;
                        MonoBehaviourSingleton <DeliveryManager> .I.GetProgressDelivery(deliveryList2[j].dId, out have, out need, num3);

                        if (have < need)
                        {
                            int num4 = 1;
                            if ((model.boostBit & (1 << (int)deliveryTableData.GetRateType(num3))) > 0)
                            {
                                num4 += model.boostNum;
                            }
                            deliveryList.Add(new DropDeliveryInfo(deliveryList2[j].dId, (int)num3, deliveryTableData.name, deliveryTableData.GetNeedItemName(num3), num4, new List <DELIVERY_CONDITION_TYPE>
                            {
                                deliveryTableData.GetConditionType(0u),
                                deliveryTableData.GetConditionType(1u),
                                deliveryTableData.GetConditionType(2u),
                                deliveryTableData.GetConditionType(3u),
                                deliveryTableData.GetConditionType(4u)
                            }));
                        }
                    }
                }
            }
        }
    }
コード例 #8
0
    public void CreateDropObject(Coop_Model_EnemyDefeat model, List <DropDeliveryInfo> deliveryList, List <DropItemInfo> itemList)
    {
        FieldDropObject fieldDropObject = FieldDropObject.Create(model, deliveryList, itemList);

        if (fieldDropObject != null)
        {
            dropList.Add(fieldDropObject);
            if (MonoBehaviourSingleton <InGameProgress> .IsValid() && MonoBehaviourSingleton <InGameProgress> .I.isHappenQuestDirection)
            {
                OpenAllDropObject();
            }
        }
    }
コード例 #9
0
    public void Drop(PortalObject portal_object, Coop_Model_EnemyDefeat model)
    {
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_005b: Unknown result type (might be due to invalid IL or missing references)
        //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
        targetPortal = portal_object;
        defeatModel  = model;
        this.get_gameObject().SetActive(true);
        parameter = MonoBehaviourSingleton <InGameSettingsManager> .I.portal.pointEffect;
        Vector3 position = default(Vector3);

        position._002Ector((float)model.x, 0f, (float)model.z);
        _rigidbody.set_useGravity(false);
        _transform.set_position(position);
        anim.Set(parameter.popHeightAnimTime, 0f, parameter.popHeight, parameter.popHeightAnim, 0f, null);
        anim.Play();
        anim.Update(0f);
        position.y = anim.Get();
        _transform.set_position(position);
        animStep = 0;
    }
コード例 #10
0
    private static UIDropAnnounce.COLOR GetColor(Coop_Model_EnemyDefeat model, List <InGameManager.DropDeliveryInfo> deliveryList)
    {
        UIDropAnnounce.COLOR cOLOR = UIDropAnnounce.COLOR.NORMAL;
        if (!model.dropLoungeShare)
        {
            switch (model.boxType)
            {
            case 1:
                return(UIDropAnnounce.COLOR.SP_N);

            case 2:
                return(UIDropAnnounce.COLOR.SP_HN);

            case 3:
                return(UIDropAnnounce.COLOR.SP_R);

            case 4:
                return(UIDropAnnounce.COLOR.HALLOWEEN);

            default:
            {
                int i = 0;
                for (int count = model.dropIds.Count; i < count; i++)
                {
                    if (cOLOR == UIDropAnnounce.COLOR.NORMAL)
                    {
                        switch (model.dropTypes[i])
                        {
                        case 5:
                            cOLOR = UIDropAnnounce.COLOR.RARE;
                            break;

                        case 4:
                        {
                            EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)model.dropItemIds[i]);

                            if (equipItemData != null && GameDefine.IsRare(equipItemData.rarity))
                            {
                                cOLOR = UIDropAnnounce.COLOR.RARE;
                            }
                            break;
                        }

                        default:
                        {
                            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)model.dropItemIds[i]);

                            if (itemData != null && GameDefine.IsRare(itemData.rarity))
                            {
                                cOLOR = UIDropAnnounce.COLOR.RARE;
                            }
                            break;
                        }
                        }
                    }
                }
                if (deliveryList.Count > 0 && cOLOR == UIDropAnnounce.COLOR.NORMAL)
                {
                    cOLOR = UIDropAnnounce.COLOR.DELIVERY;
                }
                return(cOLOR);
            }
            }
        }
        return(UIDropAnnounce.COLOR.LOUNGE);
    }
コード例 #11
0
    protected override bool HandleCoopEvent(CoopPacket packet)
    {
        bool result = false;

        switch (packet.packetType)
        {
        case PACKET_TYPE.ROOM_JOINED:
        {
            Coop_Model_RoomJoined model5 = packet.GetModel <Coop_Model_RoomJoined>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopRoom.OnRecvRoomJoined(model5);

            break;
        }

        case PACKET_TYPE.ROOM_LEAVED:
        {
            Coop_Model_RoomLeaved model14 = packet.GetModel <Coop_Model_RoomLeaved>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopRoom.OnRecvRoomLeaved(model14);

            break;
        }

        case PACKET_TYPE.ROOM_STAGE_CHANGED:
        {
            Coop_Model_RoomStageChanged model13 = packet.GetModel <Coop_Model_RoomStageChanged>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopRoom.OnRecvRoomStageChanged(model13);

            break;
        }

        case PACKET_TYPE.ROOM_STAGE_REQUESTED:
        {
            Coop_Model_RoomStageRequested model12 = packet.GetModel <Coop_Model_RoomStageRequested>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopRoom.OnRecvRoomStageRequested(model12);

            break;
        }

        case PACKET_TYPE.ROOM_STAGE_HOST_CHANGED:
        {
            Coop_Model_RoomStageHostChanged model11 = packet.GetModel <Coop_Model_RoomStageHostChanged>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopRoom.OnRecvRoomStageHostChanged(model11);

            break;
        }

        case PACKET_TYPE.ENEMY_POP:
        {
            Coop_Model_EnemyPop model10 = packet.GetModel <Coop_Model_EnemyPop>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopStage.OnRecvEnemyPop(model10);

            break;
        }

        case PACKET_TYPE.ENEMY_DEFEAT:
        {
            Coop_Model_EnemyDefeat model9 = packet.GetModel <Coop_Model_EnemyDefeat>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopStage.OnRecvEnemyDefeat(model9);

            break;
        }

        case PACKET_TYPE.REWARD_PICKUP:
        {
            Coop_Model_RewardPickup model8 = packet.GetModel <Coop_Model_RewardPickup>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopStage.OnRecvRewardPickup(model8);

            break;
        }

        case PACKET_TYPE.ENEMY_EXTERMINATION:
        {
            Coop_Model_EnemyExtermination model7 = packet.GetModel <Coop_Model_EnemyExtermination>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopStage.OnRecvEnemyExtermination(model7);

            break;
        }

        case PACKET_TYPE.EVENT_HAPPEN_QUEST:
        {
            Coop_Model_EventHappenQuest model6 = packet.GetModel <Coop_Model_EventHappenQuest>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopStage.OnRecvEventHappenQuest(model6);

            break;
        }

        case PACKET_TYPE.UPDATE_BOOST_COMPLETE:
        {
            Coop_Model_UpdateBoostComplete model4 = packet.GetModel <Coop_Model_UpdateBoostComplete>();
            result = true;
            if (!model4.success)
            {
                MonoBehaviourSingleton <KtbWebSocket> .I.Close(1000, "Bye!");
            }
            break;
        }

        case PACKET_TYPE.ROOM_TIME_UPDATE:
        {
            Coop_Model_RoomTimeUpdate model3 = packet.GetModel <Coop_Model_RoomTimeUpdate>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopRoom.OnRecvRoomTimeUpdate(model3);

            break;
        }

        case PACKET_TYPE.ENEMY_BOSS_POP:
        {
            Coop_Model_EnemyBossPop model2 = packet.GetModel <Coop_Model_EnemyBossPop>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopStage.OnRecvEnemyBossPop(model2);

            break;
        }

        case PACKET_TYPE.WAVEMATCH_INFO:
        {
            Coop_Model_WaveMatchInfo model = packet.GetModel <Coop_Model_WaveMatchInfo>();
            result = MonoBehaviourSingleton <CoopManager> .I.coopStage.OnRecvWaveMatchInfo(model);

            break;
        }
        }
        return(result);
    }