| | |
| | | SFXController _itemDropEffect = null;
|
| | | private void CheckPlayEffect(int id)
|
| | | {
|
| | | if (GeneralConfig.Instance.DropItemEffectMapID.ContainsKey(id))
|
| | | if (GeneralDefine.DropItemEffectMapID.ContainsKey(id))
|
| | | {
|
| | | if (!GeneralConfig.Instance.DropItemEffectMapID[id].Contains(PlayerDatas.Instance.baseData.MapID))
|
| | | if (!GeneralDefine.DropItemEffectMapID[id].Contains(PlayerDatas.Instance.baseData.MapID))
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | if (hasAppearCount < GeneralConfig.Instance.maxItemDropEffectCount)
|
| | | if (hasAppearCount < GeneralDefine.maxItemDropEffectCount)
|
| | | {
|
| | | var _itemConfig = Config.Instance.Get<ItemConfig>(id);
|
| | |
|
| | |
| | |
|
| | | if (_itemConfig.Type == 108)
|
| | | {
|
| | | foreach (var _level in GeneralConfig.Instance.xllyDropEffect.Keys)
|
| | | foreach (var _level in GeneralDefine.xllyDropEffect.Keys)
|
| | | {
|
| | | if (_playerlevel < _level)
|
| | | {
|
| | | if (_itemConfig.LV >= GeneralConfig.Instance.xllyDropEffect[_level][0]
|
| | | && _itemConfig.ItemColor >= GeneralConfig.Instance.xllyDropEffect[_level][1]
|
| | | && _itemConfig.StarLevel >= GeneralConfig.Instance.xllyDropEffect[_level][2])
|
| | | if (_itemConfig.LV >= GeneralDefine.xllyDropEffect[_level][0]
|
| | | && _itemConfig.ItemColor >= GeneralDefine.xllyDropEffect[_level][1]
|
| | | && _itemConfig.StarLevel >= GeneralDefine.xllyDropEffect[_level][2])
|
| | | {
|
| | | _doPlay = true;
|
| | | break;
|
| | |
| | | }
|
| | | else if (_itemConfig.Type == 109)
|
| | | {
|
| | | foreach (var _level in GeneralConfig.Instance.xqryDropEffect.Keys)
|
| | | foreach (var _level in GeneralDefine.xqryDropEffect.Keys)
|
| | | {
|
| | | if (_playerlevel < _level)
|
| | | {
|
| | | if (_itemConfig.LV >= GeneralConfig.Instance.xqryDropEffect[_level][0]
|
| | | && _itemConfig.ItemColor >= GeneralConfig.Instance.xqryDropEffect[_level][1]
|
| | | && _itemConfig.StarLevel >= GeneralConfig.Instance.xqryDropEffect[_level][2])
|
| | | if (_itemConfig.LV >= GeneralDefine.xqryDropEffect[_level][0]
|
| | | && _itemConfig.ItemColor >= GeneralDefine.xqryDropEffect[_level][1]
|
| | | && _itemConfig.StarLevel >= GeneralDefine.xqryDropEffect[_level][2])
|
| | | {
|
| | | _doPlay = true;
|
| | | break;
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | foreach (var _level in GeneralConfig.Instance.itemDropEffect.Keys)
|
| | | foreach (var _level in GeneralDefine.itemDropEffect.Keys)
|
| | | {
|
| | | if (_playerlevel < _level)
|
| | | {
|
| | | if (_itemConfig.LV >= GeneralConfig.Instance.itemDropEffect[_level][0]
|
| | | && _itemConfig.ItemColor >= GeneralConfig.Instance.itemDropEffect[_level][1]
|
| | | && _itemConfig.StarLevel >= GeneralConfig.Instance.itemDropEffect[_level][2])
|
| | | if (_itemConfig.LV >= GeneralDefine.itemDropEffect[_level][0]
|
| | | && _itemConfig.ItemColor >= GeneralDefine.itemDropEffect[_level][1]
|
| | | && _itemConfig.StarLevel >= GeneralDefine.itemDropEffect[_level][2])
|
| | | {
|
| | | _doPlay = true;
|
| | | break;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | foreach (var _level in GeneralConfig.Instance.customDropEffect.Keys)
|
| | | foreach (var _level in GeneralDefine.customDropEffect.Keys)
|
| | | {
|
| | | if (_playerlevel < _level)
|
| | | {
|
| | | foreach (var _ids in GeneralConfig.Instance.customDropEffect[_level])
|
| | | foreach (var _ids in GeneralDefine.customDropEffect[_level])
|
| | | {
|
| | | if (_ids.Length == 1)
|
| | | {
|
| | |
| | | if (_doPlay)
|
| | | {
|
| | | int _effectID = 0;
|
| | | if (GeneralConfig.Instance.dropEffectQuality.TryGetValue(_itemConfig.ItemColor, out _effectID))
|
| | | if (GeneralDefine.dropEffectQuality.TryGetValue(_itemConfig.ItemColor, out _effectID))
|
| | | {
|
| | | _itemDropEffect = SFXPlayUtility.Instance.PlayBattleEffect(_effectID, transform);
|
| | | hasAppearCount += 1;
|