Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public uint ExAttr2; //扩展属性2,各项目专用
|
| | | public int dungeonLineId; // 副本线路id
|
| | | public uint ExAttr4; //扩展属性4,各项目专用
|
| | | public uint ExAttr5; //扩展属性5,各项目专用
|
| | | public uint CrossServerFlag; //跨服标识,大于2标识在跨服状态,值是跨服地图的datamapid
|
| | | public uint ExAttr6; //扩展属性6,各项目专用
|
| | | public uint ExAttr7; //扩展属性7,各项目专用
|
| | | public uint ExAttr8; //扩展属性8,各项目专用
|
| | |
| | | public uint bubbleId; //扩展属性10,各项目专用
|
| | | public uint ExAttr11; //预留的扩展属性字段,用来存放项目特定的属性
|
| | | public uint ExAttr12; //预留的扩展属性字段,用来存放项目特定的属性
|
| | | public uint ExAttr13; //预留的扩展属性字段,用来存放项目特定的属性
|
| | | public uint ServerGroupId; //服务器组ID
|
| | | public uint ExAttr14; //预留的扩展属性字段,用来存放项目特定的属性
|
| | | public uint HappyPoint;//现为脱机挂剩余时间 23
|
| | | public uint faction; //阵营 107
|
| | |
| | | ExAttr2 = _serverInfo.ExAttr2;
|
| | | dungeonLineId = (int)_serverInfo.ExAttr3;
|
| | | ExAttr4 = _serverInfo.ExAttr4;
|
| | | ExAttr5 = _serverInfo.ExAttr5;
|
| | | CrossServerFlag = _serverInfo.ExAttr5;
|
| | | realmLevel = _serverInfo.OfficialRank;
|
| | | VIPLv = _serverInfo.VIPLv;
|
| | | ExAttr6 = _serverInfo.ExAttr6;
|
| | |
| | | bubbleId = _serverInfo.ExAttr10;
|
| | | ExAttr11 = _serverInfo.ExAttr11;
|
| | | ExAttr12 = _serverInfo.ExAttr12;
|
| | | ExAttr13 = _serverInfo.ExAttr13;
|
| | | ServerGroupId = _serverInfo.ExAttr13;
|
| | | ExAttr14 = _serverInfo.ExAttr14;
|
| | | HappyPoint = _serverInfo.HappyPoint;
|
| | | faction = _serverInfo.Faction;
|
| | |
| | | ExAttr2 = serverInfo.ExAttr2;
|
| | | dungeonLineId = (int)serverInfo.ExAttr3;
|
| | | ExAttr4 = serverInfo.ExAttr4;
|
| | | ExAttr5 = serverInfo.ExAttr5;
|
| | | CrossServerFlag = serverInfo.ExAttr5;
|
| | | realmLevel = serverInfo.OfficialRank;
|
| | | VIPLv = serverInfo.VIPLv;
|
| | | ExAttr6 = serverInfo.ExAttr6;
|
| | |
| | | bubbleId = serverInfo.ExAttr10;
|
| | | ExAttr11 = serverInfo.ExAttr11;
|
| | | ExAttr12 = serverInfo.ExAttr12;
|
| | | ExAttr13 = serverInfo.ExAttr13;
|
| | | ServerGroupId = serverInfo.ExAttr13;
|
| | | ExAttr14 = serverInfo.ExAttr14;
|
| | | HappyPoint = serverInfo.HappyPoint;
|
| | | faction = serverInfo.Faction;
|
| | |
| | | baseData.ExAttr4 = value;
|
| | | break;
|
| | | case PlayerDataRefresh.ExAttr5:
|
| | | var oldExAttr5 = baseData.ExAttr5;
|
| | | baseData.ExAttr5 = value;
|
| | | var oldExAttr5 = baseData.CrossServerFlag;
|
| | | baseData.CrossServerFlag = value;
|
| | |
|
| | | if (oldExAttr5 > 2 && value <= 2)
|
| | | {
|
| | |
| | | baseData.ExAttr12 = value;
|
| | | break;
|
| | | case PlayerDataRefresh.ExAttr13:
|
| | | baseData.ExAttr13 = value;
|
| | | baseData.ServerGroupId = value;
|
| | | break;
|
| | | case PlayerDataRefresh.ExAttr14:
|
| | | baseData.ExAttr14 = value;
|
| | |
| | | H0704_tagRolePackRefresh vNetData = vNetPack as H0704_tagRolePackRefresh; |
| | | playerPack.SetItemModel(vNetData); |
| | | |
| | | var _equipInfo = new GActorPlayerBase.EquipInfo |
| | | if (vNetData.PackType == 1) |
| | | { |
| | | itemID = vNetData.ItemID, |
| | | place = vNetData.ItemPlace |
| | | }; |
| | | var _equipInfo = new GActorPlayerBase.EquipInfo |
| | | { |
| | | itemID = vNetData.ItemID, |
| | | place = vNetData.ItemPlace |
| | | }; |
| | | |
| | | var _hero = PlayerDatas.Instance.hero; |
| | | if (_hero != null) |
| | | { |
| | | _hero.ChangeEquip(_equipInfo); |
| | | var _hero = PlayerDatas.Instance.hero; |
| | | if (_hero != null) |
| | | { |
| | | _hero.ChangeEquip(_equipInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | |
| | | base.Done(vNetPack); |
| | | |
| | | H0709_tagClearItem vNetData = vNetPack as H0709_tagClearItem; |
| | | playerPack.ClearItemModel(vNetData); |
| | | |
| | | if (vNetData.PackType == 1) |
| | | { |
| | | var _equipInfo = new GActorPlayerBase.EquipInfo |
| | | { |
| | | itemID = 0, |
| | | place = vNetData.ItemIndex |
| | | }; |
| | | |
| | | var _hero = PlayerDatas.Instance.hero; |
| | | if (_hero != null) |
| | | { |
| | | _hero.ChangeEquip(_equipInfo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | {
|
| | | SwitchGodWeapon(4, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonSecondary(uint secondaryItemID, GameObject secondary)
|
| | | {
|
| | | Renderer _renderer = secondary.GetComponent<Renderer>();
|
| | | if (_renderer)
|
| | | {
|
| | | _renderer.gameObject.SetLayer(LayerUtility.Hero, false);
|
| | | m_SecondaryMaterial = _renderer.material;
|
| | | MaterialUtility.SwitchXrayShader(m_SecondaryMaterial, true);
|
| | | }
|
| | | GameObjectPoolManager.Instance.AddDontDestroyGoInstID(secondary.GetInstanceID());
|
| | |
|
| | | int _level = PlayerDatas.Instance.baseData.godWeaponLV_1;
|
| | | _level = PlayerDatas.Instance.baseData.godWeaponLV_1;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, 1, out _level))
|
| | | {
|
| | | SwitchGodWeapon(1, _level);
|
| | |
| | | else
|
| | | {
|
| | | SwitchGodWeapon(1, 0);
|
| | | }
|
| | |
|
| | | _level = PlayerDatas.Instance.baseData.godWeaponLV_2;
|
| | | _level = PlayerDatas.Instance.baseData.godWeaponLV_2;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, 2, out _level))
|
| | | {
|
| | | SwitchGodWeapon(2, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(2, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonSecondary(uint secondaryItemID, GameObject secondary)
|
| | | {
|
| | | if (secondary)
|
| | | {
|
| | | Renderer _renderer = secondary.GetComponent<Renderer>();
|
| | | if (_renderer)
|
| | | {
|
| | | _renderer.gameObject.SetLayer(LayerUtility.Hero, false);
|
| | | m_SecondaryMaterial = _renderer.material;
|
| | | MaterialUtility.SwitchXrayShader(m_SecondaryMaterial, true);
|
| | | }
|
| | | GameObjectPoolManager.Instance.AddDontDestroyGoInstID(secondary.GetInstanceID());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | MaterialUtility.SwitchXrayShader(m_WeaponMaterial, true);
|
| | | }
|
| | | GameObjectPoolManager.Instance.AddDontDestroyGoInstID(weapon.GetInstanceID());
|
| | |
|
| | | int _level = PlayerDatas.Instance.baseData.godWeaponLV_2;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, 2, out _level))
|
| | | {
|
| | | SwitchGodWeapon(2, _level);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(2, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonWing(uint wingItemID, GameObject wing)
|
| | |
| | | { |
| | | SwitchGodWeapon(4, m_ViewPlayerData.rolePlusData.GetGodWeaponLevel(4)); |
| | | } |
| | | } |
| | | |
| | | protected override void OnPutonSecondary(uint secondaryItemID, GameObject secondary) |
| | | { |
| | | Renderer _renderer = secondary.GetComponentInChildren<Renderer>(); |
| | | _renderer.gameObject.SetLayer(LayerUtility.Player, false); |
| | | |
| | | |
| | | if (m_ViewPlayerData != null) |
| | | { |
| | | SwitchGodWeapon(1, m_ViewPlayerData.rolePlusData.GetGodWeaponLevel(1)); |
| | | } |
| | | |
| | | if (m_ViewPlayerData != null) |
| | | { |
| | | SwitchGodWeapon(2, m_ViewPlayerData.rolePlusData.GetGodWeaponLevel(2)); |
| | | } |
| | | } |
| | | |
| | | protected override void OnPutonSecondary(uint secondaryItemID, GameObject secondary) |
| | | { |
| | | Renderer _renderer = secondary.GetComponentInChildren<Renderer>(); |
| | | _renderer.gameObject.SetLayer(LayerUtility.Player, false); |
| | | } |
| | | |
| | | protected override void OnPutonWeapon(uint weaponItemID, GameObject weapon) |
| | | { |
| | | Renderer _renderer = weapon.GetComponentInChildren<Renderer>(); |
| | | _renderer.gameObject.SetLayer(LayerUtility.Player, false); |
| | | if (m_ViewPlayerData != null) |
| | | { |
| | | SwitchGodWeapon(1, m_ViewPlayerData.rolePlusData.GetGodWeaponLevel(1)); |
| | | } |
| | | } |
| | | |
| | | protected override void OnPutonWing(uint wingItemID, GameObject wing) |
| | |
| | | {
|
| | | SwitchGodWeapon(4, 0);
|
| | | }
|
| | |
|
| | | _level = (int)m_H0434.ExAttr15;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 1, out _level))
|
| | | {
|
| | | SwitchGodWeapon(1, (int)m_H0434.ExAttr15);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(1, 0);
|
| | | }
|
| | |
|
| | | _level = (int)m_H0434.ExAttr16;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 2, out _level))
|
| | | {
|
| | | SwitchGodWeapon(2, (int)m_H0434.ExAttr16);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(2, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonSecondary(uint secondaryItemID, GameObject secondary)
|
| | |
| | | _renderer.gameObject.SetLayer(LayerUtility.Player, false);
|
| | | MaterialUtility.SwitchXrayShader(m_SecondaryMaterial, false);
|
| | | }
|
| | |
|
| | | int _level = (int)m_H0434.ExAttr15;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 1, out _level))
|
| | | {
|
| | | SwitchGodWeapon(1, (int)m_H0434.ExAttr15);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(1, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnPutonWeapon(uint weaponItemID, GameObject weapon)
|
| | |
| | | {
|
| | | _renderer.gameObject.SetLayer(LayerUtility.Player, false);
|
| | | MaterialUtility.SwitchXrayShader(m_WeaponMaterial, false);
|
| | | }
|
| | |
|
| | | int _level = (int)m_H0434.ExAttr16;
|
| | | if (EquipShowSwitch.IsGodWeaponEffectOn(m_H0434.EquipShowSwitch, 2, out _level))
|
| | | {
|
| | | SwitchGodWeapon(2, (int)m_H0434.ExAttr16);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchGodWeapon(2, 0);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | int _baseHandResID = ModelResConfig.GetHandByClothesID((int)ClothesItemID);
|
| | | int _resID = _baseHandResID;
|
| | |
|
| | |
| | | m_SecondaryModel.transform.localRotation = Quaternion.identity;
|
| | |
|
| | | OnPutonSecondary(SecondaryID, m_SecondaryModel);
|
| | | ShowSecondaryEffect();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | OnPutonSecondary(SecondaryID, m_HandModel);
|
| | | }
|
| | |
|
| | | ShowSecondaryEffect();
|
| | | SecondaryID = itemID;
|
| | | RequestShadow();
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | | var _itemConfig = Config.Instance.Get<ItemConfig>((int)SecondaryID);
|
| | | if (_itemConfig != null)
|
| | | if (_itemConfig == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | if (_showOrHide)
|
| | | {
|
| | | Transform _bindBone = null;
|
| | | switch (type)
|
| | |
|
| | | if (m_ClothesModel != null)
|
| | | {
|
| | | case 1:
|
| | | if (m_SecondaryModel != null)
|
| | | {
|
| | | switch (type)
|
| | | {
|
| | | case 1:
|
| | | _bindBone = m_ClothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[JobSetup.Job - 1]);
|
| | | }
|
| | | break;
|
| | | case 2:
|
| | | if (m_WeaponModel != null)
|
| | | {
|
| | | break;
|
| | | case 2:
|
| | | _bindBone = m_ClothesModel.transform.GetChildTransformDeeply(GAStaticDefine.WeaponBindBoneName);
|
| | | }
|
| | | break;
|
| | | case 4:
|
| | | if (m_ClothesModel != null)
|
| | | {
|
| | | break;
|
| | | case 4:
|
| | |
|
| | | _bindBone = m_ClothesModel.transform.GetChildTransformDeeply("Bip001 Neck");
|
| | | }
|
| | | break;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | if (_bindBone)
|
| | |
| | | |
| | | public static bool IsCrossServer() |
| | | { |
| | | return PlayerDatas.Instance.baseData.ExAttr5 > 2; |
| | | return PlayerDatas.Instance.baseData.CrossServerFlag > 2; |
| | | } |
| | | |
| | | public static bool IsCrossServerOneVsOne() |
| | | { |
| | | var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>(); |
| | | var dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID); |
| | | return PlayerDatas.Instance.baseData.ExAttr5 > 2 |
| | | return PlayerDatas.Instance.baseData.CrossServerFlag > 2 |
| | | && dataMapId == CrossServerOneVsOneModel.CrossServerDataMapId; |
| | | } |
| | | |
| | | public static bool IsCrossServerBoss() |
| | | { |
| | | return PlayerDatas.Instance.baseData.ExAttr5 > 2 |
| | | return PlayerDatas.Instance.baseData.CrossServerFlag > 2 |
| | | && PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID; |
| | | } |
| | | } |
| | |
| | | }
|
| | | else
|
| | | {
|
| | | sumAttrDict[attrId] = attrValue;
|
| | | sumAttrDict[attrId] += attrValue;
|
| | | }
|
| | | }
|
| | | }
|