Ejemplo n.º 1
0
    /// <summary>
    /// 移除执行目标
    /// </summary>
    public void removeRunningTask(TaskData data)
    {
        _runningTaskDic.remove(data.instanceID);

        TaskTypeConfig tConfig;

        IntObjectMap <TaskData> dic;

        //双键
        if ((tConfig = TaskTypeConfig.get(data.config.type)).needSecondKey)
        {
            if ((dic = _runningTaskTypeTwoDic.get((long)data.config.type << 32 | data.config.args[1])) != null)
            {
                dic.remove(data.instanceID);
            }

            if (tConfig.needSecondKey2)
            {
                if ((dic = _runningTaskTypeTwoDic2.get((long)data.config.type << 32 | data.config.args[2])) != null)
                {
                    dic.remove(data.instanceID);
                }
            }
        }
        //单键
        else
        {
            if ((dic = _runningTaskTypeOneDic.get(data.config.type)) != null)
            {
                dic.remove(data.instanceID);
            }
        }
    }
Ejemplo n.º 2
0
    /** 获取角色逻辑 */
    public CharacterUseLogic getCharacterLogic(long playerID)
    {
        CharacterUseLogic logic;

        if (_logicDic != null && (logic = _logicDic.get(playerID)) != null)
        {
            return(logic);
        }

        if (playerID == GameC.player.role.playerID)
        {
            return(GameC.player.character.getCurrentCharacterUseLogic());
        }

        return(null);
    }
Ejemplo n.º 3
0
        private bool ReEnter(LongObjectMap <LockResource> localLocks, long resourceId)
        {
            LockResource resource = localLocks.get(resourceId);

            if (resource != null)
            {
                resource.AcquireReference();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 4
0
    /// <summary>
    /// 添加角色社交数据
    /// </summary>
    public RoleSocialData addPlayerRoleSocial(long playerID, RoleSocialData data)
    {
        RoleSocialData oldData;

        if ((oldData = _roleSocialDic.get(playerID)) != null)
        {
            oldData.copy(data);
            return(oldData);
        }
        else
        {
            _roleSocialDic.put(playerID, data);
            return(data);
        }
    }
Ejemplo n.º 5
0
    private CachePageData getCachePageData(int subsectionIndex, int subsectionSubIndex)
    {
        long cacheKey = getCacheKey(subsectionIndex, subsectionSubIndex);

        CachePageData cachePageData;

        if (!_cachePageDataMap.contains(cacheKey))
        {
            _cachePageDataMap.put(cacheKey, cachePageData = new CachePageData());
            cachePageData.subsectionIndex    = subsectionIndex;
            cachePageData.subsectionSubIndex = subsectionSubIndex;
        }
        else
        {
            cachePageData = _cachePageDataMap.get(cacheKey);
        }

        return(cachePageData);
    }
Ejemplo n.º 6
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        PlayerRoleGroupExData mData = (PlayerRoleGroupExData)data;

        if (this.groupID != mData.groupID)
        {
            return(false);
        }

        if (this.exp != mData.exp)
        {
            return(false);
        }

        if (mData.members != null)
        {
            if (this.members == null)
            {
                return(false);
            }
            if (this.members.size() != mData.members.size())
            {
                return(false);
            }
            LongObjectMap <PlayerRoleGroupMemberData> membersR = mData.members;
            if (!this.members.isEmpty())
            {
                long   membersKFreeValue = this.members.getFreeValue();
                long[] membersKKeys      = this.members.getKeys();
                PlayerRoleGroupMemberData[] membersVValues = this.members.getValues();
                for (int membersKI = membersKKeys.Length - 1; membersKI >= 0; --membersKI)
                {
                    long membersK = membersKKeys[membersKI];
                    if (membersK != membersKFreeValue)
                    {
                        PlayerRoleGroupMemberData membersV = membersVValues[membersKI];
                        PlayerRoleGroupMemberData membersU = membersR.get(membersK);
                        if (membersU != null)
                        {
                            if (membersV == null)
                            {
                                return(false);
                            }
                            if (!membersV.dataEquals(membersU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (membersV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.members != null)
            {
                return(false);
            }
        }

        return(true);
    }
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        if (!base.toDataEquals(data))
        {
            return(false);
        }

        PlayerRoleGroupClientToolData mData = (PlayerRoleGroupClientToolData)data;

        if (mData.groups != null)
        {
            if (this.groups == null)
            {
                return(false);
            }
            if (this.groups.size() != mData.groups.size())
            {
                return(false);
            }
            LongObjectMap <PlayerRoleGroupData> groupsR = mData.groups;
            if (!this.groups.isEmpty())
            {
                long   groupsKFreeValue             = this.groups.getFreeValue();
                long[] groupsKKeys                  = this.groups.getKeys();
                PlayerRoleGroupData[] groupsVValues = this.groups.getValues();
                for (int groupsKI = groupsKKeys.Length - 1; groupsKI >= 0; --groupsKI)
                {
                    long groupsK = groupsKKeys[groupsKI];
                    if (groupsK != groupsKFreeValue)
                    {
                        PlayerRoleGroupData groupsV = groupsVValues[groupsKI];
                        PlayerRoleGroupData groupsU = groupsR.get(groupsK);
                        if (groupsU != null)
                        {
                            if (groupsV == null)
                            {
                                return(false);
                            }
                            if (!groupsV.dataEquals(groupsU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (groupsV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.groups != null)
            {
                return(false);
            }
        }

        if (mData.applyDic != null)
        {
            if (this.applyDic == null)
            {
                return(false);
            }
            if (this.applyDic.size() != mData.applyDic.size())
            {
                return(false);
            }
            LongObjectMap <PlayerApplyRoleGroupSelfData> applyDicR = mData.applyDic;
            if (!this.applyDic.isEmpty())
            {
                long   applyDicKFreeValue = this.applyDic.getFreeValue();
                long[] applyDicKKeys      = this.applyDic.getKeys();
                PlayerApplyRoleGroupSelfData[] applyDicVValues = this.applyDic.getValues();
                for (int applyDicKI = applyDicKKeys.Length - 1; applyDicKI >= 0; --applyDicKI)
                {
                    long applyDicK = applyDicKKeys[applyDicKI];
                    if (applyDicK != applyDicKFreeValue)
                    {
                        PlayerApplyRoleGroupSelfData applyDicV = applyDicVValues[applyDicKI];
                        PlayerApplyRoleGroupSelfData applyDicU = applyDicR.get(applyDicK);
                        if (applyDicU != null)
                        {
                            if (applyDicV == null)
                            {
                                return(false);
                            }
                            if (!applyDicV.dataEquals(applyDicU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (applyDicV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.applyDic != null)
            {
                return(false);
            }
        }

        if (this.canInviteInAbs != mData.canInviteInAbs)
        {
            return(false);
        }

        if (mData.inviteList != null)
        {
            if (this.inviteList == null)
            {
                return(false);
            }
            if (this.inviteList.size() != mData.inviteList.size())
            {
                return(false);
            }
            SList <InviteRoleGroupReceiveData> inviteListT = this.inviteList;
            SList <InviteRoleGroupReceiveData> inviteListR = mData.inviteList;
            int inviteListLen = inviteListT.size();
            for (int inviteListI = 0; inviteListI < inviteListLen; ++inviteListI)
            {
                InviteRoleGroupReceiveData inviteListU = inviteListT.get(inviteListI);
                InviteRoleGroupReceiveData inviteListV = inviteListR.get(inviteListI);
                if (inviteListV != null)
                {
                    if (inviteListU == null)
                    {
                        return(false);
                    }
                    if (!inviteListU.dataEquals(inviteListV))
                    {
                        return(false);
                    }
                }
                else
                {
                    if (inviteListU != null)
                    {
                        return(false);
                    }
                }
            }
        }
        else
        {
            if (this.inviteList != null)
            {
                return(false);
            }
        }

        return(true);
    }
Ejemplo n.º 8
0
 /// <summary>
 /// 获取
 /// </summary>
 public static ScenePlaceElementConfig get(int sceneID, int instanceID)
 {
     return(_dic.get((long)sceneID << 32 | (long)instanceID));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 获取
 /// </summary>
 public static AvatarPartConfig get(int type, int id)
 {
     return(_dic.get((long)type << 32 | (long)id));
 }
Ejemplo n.º 10
0
 /** 获取指定角色的单位信息 */
 public RoleShowData getSignedPlayer(long playerID)
 {
     return(_signedPlayers.get(playerID));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 获取
 /// </summary>
 public static SkillStepConfig get(int id, int step)
 {
     return(_dic.get((long)id << 8 | (long)step));
 }
Ejemplo n.º 12
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        if (!base.toDataEquals(data))
        {
            return(false);
        }

        RoleSocialPoolToolData mData = (RoleSocialPoolToolData)data;

        if (mData.dic != null)
        {
            if (this.dic == null)
            {
                return(false);
            }
            if (this.dic.size() != mData.dic.size())
            {
                return(false);
            }
            LongObjectMap <RoleSocialPoolData> dicR = mData.dic;
            if (!this.dic.isEmpty())
            {
                long   dicKFreeValue            = this.dic.getFreeValue();
                long[] dicKKeys                 = this.dic.getKeys();
                RoleSocialPoolData[] dicVValues = this.dic.getValues();
                for (int dicKI = dicKKeys.Length - 1; dicKI >= 0; --dicKI)
                {
                    long dicK = dicKKeys[dicKI];
                    if (dicK != dicKFreeValue)
                    {
                        RoleSocialPoolData dicV = dicVValues[dicKI];
                        RoleSocialPoolData dicU = dicR.get(dicK);
                        if (dicU != null)
                        {
                            if (dicV == null)
                            {
                                return(false);
                            }
                            if (!dicV.dataEquals(dicU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (dicV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.dic != null)
            {
                return(false);
            }
        }

        if (this.nextCutTime != mData.nextCutTime)
        {
            return(false);
        }

        return(true);
    }
Ejemplo n.º 13
0
 /// <summary>
 /// 获取
 /// </summary>
 public static ModelMotionConfig get(int id, int motionID)
 {
     return(_dic.get((long)id << 32 | (long)motionID));
 }
Ejemplo n.º 14
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        FriendPartData mData = (FriendPartData)data;

        if (mData.friends != null)
        {
            if (this.friends == null)
            {
                return(false);
            }
            if (this.friends.size() != mData.friends.size())
            {
                return(false);
            }
            LongObjectMap <FriendData> friendsR = mData.friends;
            if (!this.friends.isEmpty())
            {
                long         friendsKFreeValue = this.friends.getFreeValue();
                long[]       friendsKKeys      = this.friends.getKeys();
                FriendData[] friendsVValues    = this.friends.getValues();
                for (int friendsKI = friendsKKeys.Length - 1; friendsKI >= 0; --friendsKI)
                {
                    long friendsK = friendsKKeys[friendsKI];
                    if (friendsK != friendsKFreeValue)
                    {
                        FriendData friendsV = friendsVValues[friendsKI];
                        FriendData friendsU = friendsR.get(friendsK);
                        if (friendsU != null)
                        {
                            if (friendsV == null)
                            {
                                return(false);
                            }
                            if (!friendsV.dataEquals(friendsU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (friendsV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.friends != null)
            {
                return(false);
            }
        }

        if (mData.blackList != null)
        {
            if (this.blackList == null)
            {
                return(false);
            }
            if (this.blackList.size() != mData.blackList.size())
            {
                return(false);
            }
            LongObjectMap <ContactData> blackListR = mData.blackList;
            if (!this.blackList.isEmpty())
            {
                long          blackListKFreeValue = this.blackList.getFreeValue();
                long[]        blackListKKeys      = this.blackList.getKeys();
                ContactData[] blackListVValues    = this.blackList.getValues();
                for (int blackListKI = blackListKKeys.Length - 1; blackListKI >= 0; --blackListKI)
                {
                    long blackListK = blackListKKeys[blackListKI];
                    if (blackListK != blackListKFreeValue)
                    {
                        ContactData blackListV = blackListVValues[blackListKI];
                        ContactData blackListU = blackListR.get(blackListK);
                        if (blackListU != null)
                        {
                            if (blackListV == null)
                            {
                                return(false);
                            }
                            if (!blackListV.dataEquals(blackListU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (blackListV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.blackList != null)
            {
                return(false);
            }
        }

        if (mData.applyDic != null)
        {
            if (this.applyDic == null)
            {
                return(false);
            }
            if (this.applyDic.size() != mData.applyDic.size())
            {
                return(false);
            }
            LongObjectMap <ApplyAddFriendData> applyDicR = mData.applyDic;
            if (!this.applyDic.isEmpty())
            {
                long   applyDicKFreeValue            = this.applyDic.getFreeValue();
                long[] applyDicKKeys                 = this.applyDic.getKeys();
                ApplyAddFriendData[] applyDicVValues = this.applyDic.getValues();
                for (int applyDicKI = applyDicKKeys.Length - 1; applyDicKI >= 0; --applyDicKI)
                {
                    long applyDicK = applyDicKKeys[applyDicKI];
                    if (applyDicK != applyDicKFreeValue)
                    {
                        ApplyAddFriendData applyDicV = applyDicVValues[applyDicKI];
                        ApplyAddFriendData applyDicU = applyDicR.get(applyDicK);
                        if (applyDicU != null)
                        {
                            if (applyDicV == null)
                            {
                                return(false);
                            }
                            if (!applyDicV.dataEquals(applyDicU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (applyDicV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.applyDic != null)
            {
                return(false);
            }
        }

        return(true);
    }
Ejemplo n.º 15
0
 /// <summary>
 /// 获取
 /// </summary>
 public static RoleGroupLevelConfig get(int id, int level)
 {
     return(_dic.get((long)id << 32 | (long)level));
 }
Ejemplo n.º 16
0
 /// <summary>
 /// 获取
 /// </summary>
 public static BuildingLevelConfig get(int id, int level)
 {
     return(_dic.get((long)id << 16 | (long)level));
 }
Ejemplo n.º 17
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        if (!base.toDataEquals(data))
        {
            return(false);
        }

        RoleGroupToolData mData = (RoleGroupToolData)data;

        if (mData.simpleDatas != null)
        {
            if (this.simpleDatas == null)
            {
                return(false);
            }
            if (this.simpleDatas.size() != mData.simpleDatas.size())
            {
                return(false);
            }
            LongObjectMap <RoleGroupSimpleData> simpleDatasR = mData.simpleDatas;
            if (!this.simpleDatas.isEmpty())
            {
                long   simpleDatasKFreeValue             = this.simpleDatas.getFreeValue();
                long[] simpleDatasKKeys                  = this.simpleDatas.getKeys();
                RoleGroupSimpleData[] simpleDatasVValues = this.simpleDatas.getValues();
                for (int simpleDatasKI = simpleDatasKKeys.Length - 1; simpleDatasKI >= 0; --simpleDatasKI)
                {
                    long simpleDatasK = simpleDatasKKeys[simpleDatasKI];
                    if (simpleDatasK != simpleDatasKFreeValue)
                    {
                        RoleGroupSimpleData simpleDatasV = simpleDatasVValues[simpleDatasKI];
                        RoleGroupSimpleData simpleDatasU = simpleDatasR.get(simpleDatasK);
                        if (simpleDatasU != null)
                        {
                            if (simpleDatasV == null)
                            {
                                return(false);
                            }
                            if (!simpleDatasV.dataEquals(simpleDatasU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (simpleDatasV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.simpleDatas != null)
            {
                return(false);
            }
        }

        return(true);
    }
Ejemplo n.º 18
0
 /// <summary>
 /// 获取
 /// </summary>
 public static FightUnitLevelConfig get(int id, int level)
 {
     return(_dic.get((long)id << 16 | (long)level));
 }
Ejemplo n.º 19
0
 /// <summary>
 /// 获取
 /// </summary>
 public static MonsterLevelConfig get(int id, int level)
 {
     return(_dic.get((long)id << 32 | (long)level));
 }
Ejemplo n.º 20
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        if (!base.toDataEquals(data))
        {
            return(false);
        }

        CenterRoleGroupToolData mData = (CenterRoleGroupToolData)data;

        if (mData.roleGroupSimpleDataDic != null)
        {
            if (this.roleGroupSimpleDataDic == null)
            {
                return(false);
            }
            if (this.roleGroupSimpleDataDic.size() != mData.roleGroupSimpleDataDic.size())
            {
                return(false);
            }
            LongObjectMap <RoleGroupSimpleData> roleGroupSimpleDataDicR = mData.roleGroupSimpleDataDic;
            if (!this.roleGroupSimpleDataDic.isEmpty())
            {
                long   roleGroupSimpleDataDicKFreeValue             = this.roleGroupSimpleDataDic.getFreeValue();
                long[] roleGroupSimpleDataDicKKeys                  = this.roleGroupSimpleDataDic.getKeys();
                RoleGroupSimpleData[] roleGroupSimpleDataDicVValues = this.roleGroupSimpleDataDic.getValues();
                for (int roleGroupSimpleDataDicKI = roleGroupSimpleDataDicKKeys.Length - 1; roleGroupSimpleDataDicKI >= 0; --roleGroupSimpleDataDicKI)
                {
                    long roleGroupSimpleDataDicK = roleGroupSimpleDataDicKKeys[roleGroupSimpleDataDicKI];
                    if (roleGroupSimpleDataDicK != roleGroupSimpleDataDicKFreeValue)
                    {
                        RoleGroupSimpleData roleGroupSimpleDataDicV = roleGroupSimpleDataDicVValues[roleGroupSimpleDataDicKI];
                        RoleGroupSimpleData roleGroupSimpleDataDicU = roleGroupSimpleDataDicR.get(roleGroupSimpleDataDicK);
                        if (roleGroupSimpleDataDicU != null)
                        {
                            if (roleGroupSimpleDataDicV == null)
                            {
                                return(false);
                            }
                            if (!roleGroupSimpleDataDicV.dataEquals(roleGroupSimpleDataDicU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (roleGroupSimpleDataDicV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.roleGroupSimpleDataDic != null)
            {
                return(false);
            }
        }

        return(true);
    }
Ejemplo n.º 21
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        SocialPartData mData = (SocialPartData)data;

        if (mData.singleChannels != null)
        {
            if (this.singleChannels == null)
            {
                return(false);
            }
            if (this.singleChannels.size() != mData.singleChannels.size())
            {
                return(false);
            }
            IntObjectMap <ChatChannelData> singleChannelsR = mData.singleChannels;
            if (!this.singleChannels.isEmpty())
            {
                int               singleChannelsKFreeValue = this.singleChannels.getFreeValue();
                int[]             singleChannelsKKeys      = this.singleChannels.getKeys();
                ChatChannelData[] singleChannelsVValues    = this.singleChannels.getValues();
                for (int singleChannelsKI = singleChannelsKKeys.Length - 1; singleChannelsKI >= 0; --singleChannelsKI)
                {
                    int singleChannelsK = singleChannelsKKeys[singleChannelsKI];
                    if (singleChannelsK != singleChannelsKFreeValue)
                    {
                        ChatChannelData singleChannelsV = singleChannelsVValues[singleChannelsKI];
                        ChatChannelData singleChannelsU = singleChannelsR.get(singleChannelsK);
                        if (singleChannelsU != null)
                        {
                            if (singleChannelsV == null)
                            {
                                return(false);
                            }
                            if (!singleChannelsV.dataEquals(singleChannelsU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (singleChannelsV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.singleChannels != null)
            {
                return(false);
            }
        }

        if (mData.multiChannels != null)
        {
            if (this.multiChannels == null)
            {
                return(false);
            }
            if (this.multiChannels.size() != mData.multiChannels.size())
            {
                return(false);
            }
            IntObjectMap <LongObjectMap <ChatChannelData> > multiChannelsR = mData.multiChannels;
            if (!this.multiChannels.isEmpty())
            {
                int   multiChannelsKFreeValue = this.multiChannels.getFreeValue();
                int[] multiChannelsKKeys      = this.multiChannels.getKeys();
                LongObjectMap <ChatChannelData>[] multiChannelsVValues = this.multiChannels.getValues();
                for (int multiChannelsKI = multiChannelsKKeys.Length - 1; multiChannelsKI >= 0; --multiChannelsKI)
                {
                    int multiChannelsK = multiChannelsKKeys[multiChannelsKI];
                    if (multiChannelsK != multiChannelsKFreeValue)
                    {
                        LongObjectMap <ChatChannelData> multiChannelsV = multiChannelsVValues[multiChannelsKI];
                        LongObjectMap <ChatChannelData> multiChannelsU = multiChannelsR.get(multiChannelsK);
                        if (multiChannelsU != null)
                        {
                            if (multiChannelsV == null)
                            {
                                return(false);
                            }
                            if (multiChannelsV.size() != multiChannelsU.size())
                            {
                                return(false);
                            }
                            LongObjectMap <ChatChannelData> multiChannelsVR = multiChannelsU;
                            if (!multiChannelsV.isEmpty())
                            {
                                long              multiChannelsVKFreeValue = multiChannelsV.getFreeValue();
                                long[]            multiChannelsVKKeys      = multiChannelsV.getKeys();
                                ChatChannelData[] multiChannelsVVValues    = multiChannelsV.getValues();
                                for (int multiChannelsVKI = multiChannelsVKKeys.Length - 1; multiChannelsVKI >= 0; --multiChannelsVKI)
                                {
                                    long multiChannelsVK = multiChannelsVKKeys[multiChannelsVKI];
                                    if (multiChannelsVK != multiChannelsVKFreeValue)
                                    {
                                        ChatChannelData multiChannelsVV = multiChannelsVVValues[multiChannelsVKI];
                                        ChatChannelData multiChannelsVU = multiChannelsVR.get(multiChannelsVK);
                                        if (multiChannelsVU != null)
                                        {
                                            if (multiChannelsVV == null)
                                            {
                                                return(false);
                                            }
                                            if (!multiChannelsVV.dataEquals(multiChannelsVU))
                                            {
                                                return(false);
                                            }
                                        }
                                        else
                                        {
                                            if (multiChannelsVV != null)
                                            {
                                                return(false);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            if (multiChannelsV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.multiChannels != null)
            {
                return(false);
            }
        }

        if (this.chatSendIndex != mData.chatSendIndex)
        {
            return(false);
        }

        return(true);
    }
Ejemplo n.º 22
0
 /** 通过plyaerID获取角色 */
 public Unit getCharacterByPlayerID(long playerID)
 {
     return(_characters.get(playerID));
 }
Ejemplo n.º 23
0
 /** 获取角色自身玩家群逻辑 */
 public PlayerRoleGroup getRoleGroup(long groupID)
 {
     return(_roleGroupDic.get(groupID));
 }
Ejemplo n.º 24
0
 /// <summary>
 /// 获取
 /// </summary>
 public static AttackLevelConfig get(int id, int level)
 {
     return(_dic.get((long)id << 16 | (long)level));
 }
Ejemplo n.º 25
0
 /** 获取角色对象 */
 public Role getRole(long playerID)
 {
     return(_roleDic.get(playerID));
 }
Ejemplo n.º 26
0
 /// <summary>
 /// 获取
 /// </summary>
 public static SkillStepLevelConfig get(int id, int step, int level)
 {
     return(_dic.get((long)id << 24 | (long)step << 16 | (long)level));
 }
Ejemplo n.º 27
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        SceneEnterData mData = (SceneEnterData)data;

        if (mData.hero != null)
        {
            if (this.hero == null)
            {
                return(false);
            }
            if (!this.hero.dataEquals(mData.hero))
            {
                return(false);
            }
        }
        else
        {
            if (this.hero != null)
            {
                return(false);
            }
        }

        if (mData.units != null)
        {
            if (this.units == null)
            {
                return(false);
            }
            if (this.units.size() != mData.units.size())
            {
                return(false);
            }
            SList <UnitData> unitsT = this.units;
            SList <UnitData> unitsR = mData.units;
            int unitsLen            = unitsT.size();
            for (int unitsI = 0; unitsI < unitsLen; ++unitsI)
            {
                UnitData unitsU = unitsT.get(unitsI);
                UnitData unitsV = unitsR.get(unitsI);
                if (unitsV != null)
                {
                    if (unitsU == null)
                    {
                        return(false);
                    }
                    if (!unitsU.dataEquals(unitsV))
                    {
                        return(false);
                    }
                }
                else
                {
                    if (unitsU != null)
                    {
                        return(false);
                    }
                }
            }
        }
        else
        {
            if (this.units != null)
            {
                return(false);
            }
        }

        if (mData.roles != null)
        {
            if (this.roles == null)
            {
                return(false);
            }
            if (this.roles.size() != mData.roles.size())
            {
                return(false);
            }
            LongObjectMap <SceneRoleData> rolesR = mData.roles;
            if (!this.roles.isEmpty())
            {
                long            rolesKFreeValue = this.roles.getFreeValue();
                long[]          rolesKKeys      = this.roles.getKeys();
                SceneRoleData[] rolesVValues    = this.roles.getValues();
                for (int rolesKI = rolesKKeys.Length - 1; rolesKI >= 0; --rolesKI)
                {
                    long rolesK = rolesKKeys[rolesKI];
                    if (rolesK != rolesKFreeValue)
                    {
                        SceneRoleData rolesV = rolesVValues[rolesKI];
                        SceneRoleData rolesU = rolesR.get(rolesK);
                        if (rolesU != null)
                        {
                            if (rolesV == null)
                            {
                                return(false);
                            }
                            if (!rolesV.dataEquals(rolesU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (rolesV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.roles != null)
            {
                return(false);
            }
        }

        if (mData.selfBindFieldItemBags != null)
        {
            if (this.selfBindFieldItemBags == null)
            {
                return(false);
            }
            if (this.selfBindFieldItemBags.size() != mData.selfBindFieldItemBags.size())
            {
                return(false);
            }
            IntObjectMap <FieldItemBagBindData> selfBindFieldItemBagsR = mData.selfBindFieldItemBags;
            if (!this.selfBindFieldItemBags.isEmpty())
            {
                int   selfBindFieldItemBagsKFreeValue = this.selfBindFieldItemBags.getFreeValue();
                int[] selfBindFieldItemBagsKKeys      = this.selfBindFieldItemBags.getKeys();
                FieldItemBagBindData[] selfBindFieldItemBagsVValues = this.selfBindFieldItemBags.getValues();
                for (int selfBindFieldItemBagsKI = selfBindFieldItemBagsKKeys.Length - 1; selfBindFieldItemBagsKI >= 0; --selfBindFieldItemBagsKI)
                {
                    int selfBindFieldItemBagsK = selfBindFieldItemBagsKKeys[selfBindFieldItemBagsKI];
                    if (selfBindFieldItemBagsK != selfBindFieldItemBagsKFreeValue)
                    {
                        FieldItemBagBindData selfBindFieldItemBagsV = selfBindFieldItemBagsVValues[selfBindFieldItemBagsKI];
                        FieldItemBagBindData selfBindFieldItemBagsU = selfBindFieldItemBagsR.get(selfBindFieldItemBagsK);
                        if (selfBindFieldItemBagsU != null)
                        {
                            if (selfBindFieldItemBagsV == null)
                            {
                                return(false);
                            }
                            if (!selfBindFieldItemBagsV.dataEquals(selfBindFieldItemBagsU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (selfBindFieldItemBagsV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.selfBindFieldItemBags != null)
            {
                return(false);
            }
        }

        if (mData.bindVisionUnits != null)
        {
            if (this.bindVisionUnits == null)
            {
                return(false);
            }
            if (this.bindVisionUnits.size() != mData.bindVisionUnits.size())
            {
                return(false);
            }
            IntObjectMap <UnitSimpleData> bindVisionUnitsR = mData.bindVisionUnits;
            if (!this.bindVisionUnits.isEmpty())
            {
                int              bindVisionUnitsKFreeValue = this.bindVisionUnits.getFreeValue();
                int[]            bindVisionUnitsKKeys      = this.bindVisionUnits.getKeys();
                UnitSimpleData[] bindVisionUnitsVValues    = this.bindVisionUnits.getValues();
                for (int bindVisionUnitsKI = bindVisionUnitsKKeys.Length - 1; bindVisionUnitsKI >= 0; --bindVisionUnitsKI)
                {
                    int bindVisionUnitsK = bindVisionUnitsKKeys[bindVisionUnitsKI];
                    if (bindVisionUnitsK != bindVisionUnitsKFreeValue)
                    {
                        UnitSimpleData bindVisionUnitsV = bindVisionUnitsVValues[bindVisionUnitsKI];
                        UnitSimpleData bindVisionUnitsU = bindVisionUnitsR.get(bindVisionUnitsK);
                        if (bindVisionUnitsU != null)
                        {
                            if (bindVisionUnitsV == null)
                            {
                                return(false);
                            }
                            if (!bindVisionUnitsV.dataEquals(bindVisionUnitsU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (bindVisionUnitsV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.bindVisionUnits != null)
            {
                return(false);
            }
        }

        if (mData.battleData != null)
        {
            if (this.battleData == null)
            {
                return(false);
            }
            if (!this.battleData.dataEquals(mData.battleData))
            {
                return(false);
            }
        }
        else
        {
            if (this.battleData != null)
            {
                return(false);
            }
        }

        return(true);
    }
Ejemplo n.º 28
0
 /** 通过序号获取角色 */
 public Unit getCharacterByIndex(int index)
 {
     return(_charactersByIndex.get(index));
 }
Ejemplo n.º 29
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        if (!base.toDataEquals(data))
        {
            return(false);
        }

        PlayerAuctionToolData mData = (PlayerAuctionToolData)data;

        if (mData.sellItems != null)
        {
            if (this.sellItems == null)
            {
                return(false);
            }
            if (this.sellItems.size() != mData.sellItems.size())
            {
                return(false);
            }
            LongObjectMap <AuctionItemData> sellItemsR = mData.sellItems;
            if (!this.sellItems.isEmpty())
            {
                long              sellItemsKFreeValue = this.sellItems.getFreeValue();
                long[]            sellItemsKKeys      = this.sellItems.getKeys();
                AuctionItemData[] sellItemsVValues    = this.sellItems.getValues();
                for (int sellItemsKI = sellItemsKKeys.Length - 1; sellItemsKI >= 0; --sellItemsKI)
                {
                    long sellItemsK = sellItemsKKeys[sellItemsKI];
                    if (sellItemsK != sellItemsKFreeValue)
                    {
                        AuctionItemData sellItemsV = sellItemsVValues[sellItemsKI];
                        AuctionItemData sellItemsU = sellItemsR.get(sellItemsK);
                        if (sellItemsU != null)
                        {
                            if (sellItemsV == null)
                            {
                                return(false);
                            }
                            if (!sellItemsV.dataEquals(sellItemsU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (sellItemsV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.sellItems != null)
            {
                return(false);
            }
        }

        if (mData.preSellItems != null)
        {
            if (this.preSellItems == null)
            {
                return(false);
            }
            if (this.preSellItems.size() != mData.preSellItems.size())
            {
                return(false);
            }
            LongObjectMap <AuctionItemData> preSellItemsR = mData.preSellItems;
            if (!this.preSellItems.isEmpty())
            {
                long              preSellItemsKFreeValue = this.preSellItems.getFreeValue();
                long[]            preSellItemsKKeys      = this.preSellItems.getKeys();
                AuctionItemData[] preSellItemsVValues    = this.preSellItems.getValues();
                for (int preSellItemsKI = preSellItemsKKeys.Length - 1; preSellItemsKI >= 0; --preSellItemsKI)
                {
                    long preSellItemsK = preSellItemsKKeys[preSellItemsKI];
                    if (preSellItemsK != preSellItemsKFreeValue)
                    {
                        AuctionItemData preSellItemsV = preSellItemsVValues[preSellItemsKI];
                        AuctionItemData preSellItemsU = preSellItemsR.get(preSellItemsK);
                        if (preSellItemsU != null)
                        {
                            if (preSellItemsV == null)
                            {
                                return(false);
                            }
                            if (!preSellItemsV.dataEquals(preSellItemsU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (preSellItemsV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.preSellItems != null)
            {
                return(false);
            }
        }

        if (mData.preBuyItems != null)
        {
            if (this.preBuyItems == null)
            {
                return(false);
            }
            if (this.preBuyItems.size() != mData.preBuyItems.size())
            {
                return(false);
            }
            LongObjectMap <AuctionBuyItemData> preBuyItemsR = mData.preBuyItems;
            if (!this.preBuyItems.isEmpty())
            {
                long   preBuyItemsKFreeValue            = this.preBuyItems.getFreeValue();
                long[] preBuyItemsKKeys                 = this.preBuyItems.getKeys();
                AuctionBuyItemData[] preBuyItemsVValues = this.preBuyItems.getValues();
                for (int preBuyItemsKI = preBuyItemsKKeys.Length - 1; preBuyItemsKI >= 0; --preBuyItemsKI)
                {
                    long preBuyItemsK = preBuyItemsKKeys[preBuyItemsKI];
                    if (preBuyItemsK != preBuyItemsKFreeValue)
                    {
                        AuctionBuyItemData preBuyItemsV = preBuyItemsVValues[preBuyItemsKI];
                        AuctionBuyItemData preBuyItemsU = preBuyItemsR.get(preBuyItemsK);
                        if (preBuyItemsU != null)
                        {
                            if (preBuyItemsV == null)
                            {
                                return(false);
                            }
                            if (!preBuyItemsV.dataEquals(preBuyItemsU))
                            {
                                return(false);
                            }
                        }
                        else
                        {
                            if (preBuyItemsV != null)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            if (this.preBuyItems != null)
            {
                return(false);
            }
        }

        return(true);
    }