/// <summary> /// 读取字节流(简版) /// </summary> protected override void toReadBytesSimple(BytesReadStream stream) { base.toReadBytesSimple(stream); int roleGroupSimpleDataDicLen = stream.readLen(); if (this.roleGroupSimpleDataDic != null) { this.roleGroupSimpleDataDic.clear(); this.roleGroupSimpleDataDic.ensureCapacity(roleGroupSimpleDataDicLen); } else { this.roleGroupSimpleDataDic = new LongObjectMap <RoleGroupSimpleData>(roleGroupSimpleDataDicLen); } LongObjectMap <RoleGroupSimpleData> roleGroupSimpleDataDicT = this.roleGroupSimpleDataDic; for (int roleGroupSimpleDataDicI = roleGroupSimpleDataDicLen - 1; roleGroupSimpleDataDicI >= 0; --roleGroupSimpleDataDicI) { long roleGroupSimpleDataDicK; RoleGroupSimpleData roleGroupSimpleDataDicV; roleGroupSimpleDataDicK = stream.readLong(); roleGroupSimpleDataDicV = (RoleGroupSimpleData)stream.readDataSimpleNotNull(); roleGroupSimpleDataDicT.put(roleGroupSimpleDataDicK, roleGroupSimpleDataDicV); } }
/// <summary> /// 读取字节流(简版) /// </summary> protected override void toReadBytesSimple(BytesReadStream stream) { this.groupID = stream.readLong(); this.exp = stream.readLong(); int membersLen = stream.readLen(); if (this.members != null) { this.members.clear(); this.members.ensureCapacity(membersLen); } else { this.members = new LongObjectMap <PlayerRoleGroupMemberData>(membersLen); } LongObjectMap <PlayerRoleGroupMemberData> membersT = this.members; for (int membersI = membersLen - 1; membersI >= 0; --membersI) { PlayerRoleGroupMemberData membersV; membersV = (PlayerRoleGroupMemberData)stream.readDataSimpleNotNull(); membersT.put(membersV.playerID, membersV); } }
public override void dispose() { _robotPlayerIndex = 0; _signedUnits = null; _logicDic = null; }
/// <summary> /// 复制(深拷贝) /// </summary> protected override void toCopy(BaseData data) { base.toCopy(data); if (!(data is RoleGroupToolData)) { return; } RoleGroupToolData mData = (RoleGroupToolData)data; if (mData.simpleDatas != null) { if (this.simpleDatas != null) { this.simpleDatas.clear(); this.simpleDatas.ensureCapacity(mData.simpleDatas.size()); } else { this.simpleDatas = new LongObjectMap <RoleGroupSimpleData>(mData.simpleDatas.size()); } LongObjectMap <RoleGroupSimpleData> simpleDatasT = this.simpleDatas; if (!mData.simpleDatas.isEmpty()) { long simpleDatasKFreeValue = mData.simpleDatas.getFreeValue(); long[] simpleDatasKKeys = mData.simpleDatas.getKeys(); RoleGroupSimpleData[] simpleDatasVValues = mData.simpleDatas.getValues(); for (int simpleDatasKI = simpleDatasKKeys.Length - 1; simpleDatasKI >= 0; --simpleDatasKI) { long simpleDatasK = simpleDatasKKeys[simpleDatasKI]; if (simpleDatasK != simpleDatasKFreeValue) { RoleGroupSimpleData simpleDatasV = simpleDatasVValues[simpleDatasKI]; long simpleDatasW; RoleGroupSimpleData simpleDatasU; simpleDatasW = simpleDatasK; if (simpleDatasV != null) { simpleDatasU = (RoleGroupSimpleData)simpleDatasV.clone(); } else { simpleDatasU = null; nullObjError("simpleDatasU"); } simpleDatasT.put(simpleDatasW, simpleDatasU); } } } } else { this.simpleDatas = null; nullObjError("simpleDatas"); } }
/// <summary> /// 复制(深拷贝) /// </summary> protected override void toCopy(BaseData data) { base.toCopy(data); if (!(data is CenterRoleGroupToolData)) { return; } CenterRoleGroupToolData mData = (CenterRoleGroupToolData)data; if (mData.roleGroupSimpleDataDic != null) { if (this.roleGroupSimpleDataDic != null) { this.roleGroupSimpleDataDic.clear(); this.roleGroupSimpleDataDic.ensureCapacity(mData.roleGroupSimpleDataDic.size()); } else { this.roleGroupSimpleDataDic = new LongObjectMap <RoleGroupSimpleData>(mData.roleGroupSimpleDataDic.size()); } LongObjectMap <RoleGroupSimpleData> roleGroupSimpleDataDicT = this.roleGroupSimpleDataDic; if (!mData.roleGroupSimpleDataDic.isEmpty()) { long roleGroupSimpleDataDicKFreeValue = mData.roleGroupSimpleDataDic.getFreeValue(); long[] roleGroupSimpleDataDicKKeys = mData.roleGroupSimpleDataDic.getKeys(); RoleGroupSimpleData[] roleGroupSimpleDataDicVValues = mData.roleGroupSimpleDataDic.getValues(); for (int roleGroupSimpleDataDicKI = roleGroupSimpleDataDicKKeys.Length - 1; roleGroupSimpleDataDicKI >= 0; --roleGroupSimpleDataDicKI) { long roleGroupSimpleDataDicK = roleGroupSimpleDataDicKKeys[roleGroupSimpleDataDicKI]; if (roleGroupSimpleDataDicK != roleGroupSimpleDataDicKFreeValue) { RoleGroupSimpleData roleGroupSimpleDataDicV = roleGroupSimpleDataDicVValues[roleGroupSimpleDataDicKI]; long roleGroupSimpleDataDicW; RoleGroupSimpleData roleGroupSimpleDataDicU; roleGroupSimpleDataDicW = roleGroupSimpleDataDicK; if (roleGroupSimpleDataDicV != null) { roleGroupSimpleDataDicU = (RoleGroupSimpleData)roleGroupSimpleDataDicV.clone(); } else { roleGroupSimpleDataDicU = null; nullObjError("roleGroupSimpleDataDicU"); } roleGroupSimpleDataDicT.put(roleGroupSimpleDataDicW, roleGroupSimpleDataDicU); } } } } else { this.roleGroupSimpleDataDic = null; nullObjError("roleGroupSimpleDataDic"); } }
/// <summary> /// 读取字节流(简版) /// </summary> protected override void toReadBytesSimple(BytesReadStream stream) { base.toReadBytesSimple(stream); int simpleDatasLen = stream.readLen(); if (this.simpleDatas != null) { this.simpleDatas.clear(); this.simpleDatas.ensureCapacity(simpleDatasLen); } else { this.simpleDatas = new LongObjectMap <RoleGroupSimpleData>(simpleDatasLen); } LongObjectMap <RoleGroupSimpleData> simpleDatasT = this.simpleDatas; for (int simpleDatasI = simpleDatasLen - 1; simpleDatasI >= 0; --simpleDatasI) { long simpleDatasK; RoleGroupSimpleData simpleDatasV; simpleDatasK = stream.readLong(); simpleDatasV = (RoleGroupSimpleData)stream.readDataSimpleNotNull(); simpleDatasT.put(simpleDatasK, simpleDatasV); } }
/// <summary> /// 读取字节流(简版) /// </summary> protected override void toReadBytesSimple(BytesReadStream stream) { base.toReadBytesSimple(stream); int dicLen = stream.readLen(); if (this.dic != null) { this.dic.clear(); this.dic.ensureCapacity(dicLen); } else { this.dic = new LongObjectMap <RoleSocialData>(dicLen); } LongObjectMap <RoleSocialData> dicT = this.dic; for (int dicI = dicLen - 1; dicI >= 0; --dicI) { RoleSocialData dicV; dicV = (RoleSocialData)stream.readDataSimpleNotNull(); dicT.put(dicV.showData.playerID, dicV); } }
public override void onSecond(int delay) { base.onSecond(delay); LongObjectMap <PlayerApplyRoleGroupSelfData> applyDic = _d.applyDic; if (applyDic != null && !applyDic.isEmpty()) { long now = me.getTimeMillis(); foreach (PlayerApplyRoleGroupSelfData v in applyDic) { if (v.disableTime > 0 && now > v.disableTime) { applyDic.remove(v.data.groupID); } } } if (!_roleGroupDic.isEmpty()) { foreach (PlayerRoleGroup v in _roleGroupDic) { v.onSecond(delay); } } }
/// <summary> /// 获取聊天频道数据 /// </summary> public ChatChannelData getChatChannelData(int channel, long key) { ChatChannelConfig config = ChatChannelConfig.get(channel); ChatChannelData re; if (config.isMulti) { LongObjectMap <ChatChannelData> dic = _multiChannels.get(channel); if (dic == null) { _multiChannels.put(channel, dic = new LongObjectMap <ChatChannelData>()); } if ((re = dic.get(key)) == null) { dic.put(key, re = new ChatChannelData()); re.initDefault(); } } else { if ((re = _singleChannels.get(channel)) == null) { _singleChannels.put(channel, re = new ChatChannelData()); re.initDefault(); } } return(re); }
/// <summary> /// 回池 /// </summary> protected override void toRelease(DataPool pool) { base.toRelease(pool); this.dic = null; this.nextCutTime = 0L; }
/// <summary> /// 初始化初值 /// </summary> public override void initDefault() { base.initDefault(); this.groups = new LongObjectMap <PlayerRoleGroupData>(); this.applyDic = new LongObjectMap <PlayerApplyRoleGroupSelfData>(); this.inviteList = new SList <InviteRoleGroupReceiveData>(); }
/// <summary> /// 回池 /// </summary> protected override void toRelease(DataPool pool) { base.toRelease(pool); this.sellItems = null; this.preSellItems = null; this.preBuyItems = null; }
/// <summary> /// 初始化初值 /// </summary> public override void initDefault() { base.initDefault(); this.sellItems = new LongObjectMap <AuctionItemData>(); this.preSellItems = new LongObjectMap <AuctionItemData>(); this.preBuyItems = new LongObjectMap <AuctionBuyItemData>(); }
/// <summary> /// 回池 /// </summary> protected override void toRelease(DataPool pool) { this.hero = null; this.units = null; this.roles = null; this.selfBindFieldItemBags = null; this.bindVisionUnits = null; this.battleData = null; }
private static MutableObjectLongMap <SchemaDescriptor> IndexIdsByDescriptor(LongObjectMap <IndexProxy> indexesById) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.eclipse.collections.api.map.primitive.MutableObjectLongMap<org.neo4j.internal.kernel.api.schema.SchemaDescriptor> map = new org.eclipse.collections.impl.map.mutable.primitive.ObjectLongHashMap<>(indexesById.size()); MutableObjectLongMap <SchemaDescriptor> map = new ObjectLongHashMap <SchemaDescriptor>(indexesById.size()); indexesById.forEachKeyValue((id, indexProxy) => map.put(indexProxy.Descriptor.schema(), id)); return(map); }
/// <summary> /// 回池 /// </summary> protected override void toRelease(DataPool pool) { base.toRelease(pool); this.groups = null; this.applyDic = null; this.canInviteInAbs = false; this.inviteList = null; }
/// <summary> /// 复制(深拷贝) /// </summary> protected override void toCopy(BaseData data) { if (!(data is PlayerRoleGroupExData)) { return; } PlayerRoleGroupExData mData = (PlayerRoleGroupExData)data; this.groupID = mData.groupID; this.exp = mData.exp; if (mData.members != null) { if (this.members != null) { this.members.clear(); this.members.ensureCapacity(mData.members.size()); } else { this.members = new LongObjectMap <PlayerRoleGroupMemberData>(mData.members.size()); } LongObjectMap <PlayerRoleGroupMemberData> membersT = this.members; if (!mData.members.isEmpty()) { PlayerRoleGroupMemberData[] membersVValues = mData.members.getValues(); for (int membersVI = membersVValues.Length - 1; membersVI >= 0; --membersVI) { PlayerRoleGroupMemberData membersV = membersVValues[membersVI]; if (membersV != null) { PlayerRoleGroupMemberData membersU; if (membersV != null) { membersU = (PlayerRoleGroupMemberData)membersV.clone(); } else { membersU = null; nullObjError("membersU"); } membersT.put(membersU.playerID, membersU); } } } } else { this.members = null; nullObjError("members"); } }
/// <summary> /// 读取字节流(完整版) /// </summary> protected override void toReadBytesFull(BytesReadStream stream) { base.toReadBytesFull(stream); stream.startReadObj(); int dicLen = stream.readLen(); if (this.dic != null) { this.dic.clear(); this.dic.ensureCapacity(dicLen); } else { this.dic = new LongObjectMap <RoleSocialPoolData>(dicLen); } LongObjectMap <RoleSocialPoolData> dicT = this.dic; for (int dicI = dicLen - 1; dicI >= 0; --dicI) { long dicK; RoleSocialPoolData dicV; dicK = stream.readLong(); BaseData dicVT = stream.readDataFullNotNull(); if (dicVT != null) { if (dicVT is RoleSocialPoolData) { dicV = (RoleSocialPoolData)dicVT; } else { dicV = new RoleSocialPoolData(); if (!(dicVT.GetType().IsAssignableFrom(typeof(RoleSocialPoolData)))) { stream.throwTypeReadError(typeof(RoleSocialPoolData), dicVT.GetType()); } dicV.shadowCopy(dicVT); } } else { dicV = null; } dicT.put(dicK, dicV); } this.nextCutTime = stream.readLong(); stream.endReadObj(); }
/// <summary> /// 读取字节流(完整版) /// </summary> protected override void toReadBytesFull(BytesReadStream stream) { base.toReadBytesFull(stream); stream.startReadObj(); int roleGroupSimpleDataDicLen = stream.readLen(); if (this.roleGroupSimpleDataDic != null) { this.roleGroupSimpleDataDic.clear(); this.roleGroupSimpleDataDic.ensureCapacity(roleGroupSimpleDataDicLen); } else { this.roleGroupSimpleDataDic = new LongObjectMap <RoleGroupSimpleData>(roleGroupSimpleDataDicLen); } LongObjectMap <RoleGroupSimpleData> roleGroupSimpleDataDicT = this.roleGroupSimpleDataDic; for (int roleGroupSimpleDataDicI = roleGroupSimpleDataDicLen - 1; roleGroupSimpleDataDicI >= 0; --roleGroupSimpleDataDicI) { long roleGroupSimpleDataDicK; RoleGroupSimpleData roleGroupSimpleDataDicV; roleGroupSimpleDataDicK = stream.readLong(); BaseData roleGroupSimpleDataDicVT = stream.readDataFullNotNull(); if (roleGroupSimpleDataDicVT != null) { if (roleGroupSimpleDataDicVT is RoleGroupSimpleData) { roleGroupSimpleDataDicV = (RoleGroupSimpleData)roleGroupSimpleDataDicVT; } else { roleGroupSimpleDataDicV = new RoleGroupSimpleData(); if (!(roleGroupSimpleDataDicVT.GetType().IsAssignableFrom(typeof(RoleGroupSimpleData)))) { stream.throwTypeReadError(typeof(RoleGroupSimpleData), roleGroupSimpleDataDicVT.GetType()); } roleGroupSimpleDataDicV.shadowCopy(roleGroupSimpleDataDicVT); } } else { roleGroupSimpleDataDicV = null; } roleGroupSimpleDataDicT.put(roleGroupSimpleDataDicK, roleGroupSimpleDataDicV); } stream.endReadObj(); }
/// <summary> /// 读取字节流(完整版) /// </summary> protected override void toReadBytesFull(BytesReadStream stream) { base.toReadBytesFull(stream); stream.startReadObj(); int simpleDatasLen = stream.readLen(); if (this.simpleDatas != null) { this.simpleDatas.clear(); this.simpleDatas.ensureCapacity(simpleDatasLen); } else { this.simpleDatas = new LongObjectMap <RoleGroupSimpleData>(simpleDatasLen); } LongObjectMap <RoleGroupSimpleData> simpleDatasT = this.simpleDatas; for (int simpleDatasI = simpleDatasLen - 1; simpleDatasI >= 0; --simpleDatasI) { long simpleDatasK; RoleGroupSimpleData simpleDatasV; simpleDatasK = stream.readLong(); BaseData simpleDatasVT = stream.readDataFullNotNull(); if (simpleDatasVT != null) { if (simpleDatasVT is RoleGroupSimpleData) { simpleDatasV = (RoleGroupSimpleData)simpleDatasVT; } else { simpleDatasV = new RoleGroupSimpleData(); if (!(simpleDatasVT.GetType().IsAssignableFrom(typeof(RoleGroupSimpleData)))) { stream.throwTypeReadError(typeof(RoleGroupSimpleData), simpleDatasVT.GetType()); } simpleDatasV.shadowCopy(simpleDatasVT); } } else { simpleDatasV = null; } simpleDatasT.put(simpleDatasK, simpleDatasV); } stream.endReadObj(); }
/// <summary> /// 读取字节流(完整版) /// </summary> protected override void toReadBytesFull(BytesReadStream stream) { stream.startReadObj(); this.groupID = stream.readLong(); this.exp = stream.readLong(); int membersLen = stream.readLen(); if (this.members != null) { this.members.clear(); this.members.ensureCapacity(membersLen); } else { this.members = new LongObjectMap <PlayerRoleGroupMemberData>(membersLen); } LongObjectMap <PlayerRoleGroupMemberData> membersT = this.members; for (int membersI = membersLen - 1; membersI >= 0; --membersI) { PlayerRoleGroupMemberData membersV; BaseData membersVT = stream.readDataFullNotNull(); if (membersVT != null) { if (membersVT is PlayerRoleGroupMemberData) { membersV = (PlayerRoleGroupMemberData)membersVT; } else { membersV = new PlayerRoleGroupMemberData(); if (!(membersVT.GetType().IsAssignableFrom(typeof(PlayerRoleGroupMemberData)))) { stream.throwTypeReadError(typeof(PlayerRoleGroupMemberData), membersVT.GetType()); } membersV.shadowCopy(membersVT); } } else { membersV = null; } membersT.put(membersV.playerID, membersV); } stream.endReadObj(); }
/// <summary> /// 复制(潜拷贝) /// </summary> protected override void toShadowCopy(BaseData data) { base.toShadowCopy(data); if (!(data is RoleGroupToolData)) { return; } RoleGroupToolData mData = (RoleGroupToolData)data; this.simpleDatas = mData.simpleDatas; }
/// <summary> /// 复制(潜拷贝) /// </summary> protected override void toShadowCopy(BaseData data) { if (!(data is FriendPartData)) { return; } FriendPartData mData = (FriendPartData)data; this.friends = mData.friends; this.blackList = mData.blackList; this.applyDic = mData.applyDic; }
/// <summary> /// 复制(潜拷贝) /// </summary> protected override void toShadowCopy(BaseData data) { base.toShadowCopy(data); if (!(data is CenterRoleGroupToolData)) { return; } CenterRoleGroupToolData mData = (CenterRoleGroupToolData)data; this.roleGroupSimpleDataDic = mData.roleGroupSimpleDataDic; }
/// <summary> /// 复制(潜拷贝) /// </summary> protected override void toShadowCopy(BaseData data) { if (!(data is PlayerRoleGroupExData)) { return; } PlayerRoleGroupExData mData = (PlayerRoleGroupExData)data; this.groupID = mData.groupID; this.exp = mData.exp; this.members = mData.members; }
private bool ReEnter(LongObjectMap <LockResource> localLocks, long resourceId) { LockResource resource = localLocks.get(resourceId); if (resource != null) { resource.AcquireReference(); return(true); } else { return(false); } }
/// <summary> /// 复制(潜拷贝) /// </summary> protected override void toShadowCopy(BaseData data) { base.toShadowCopy(data); if (!(data is RoleSocialPoolToolData)) { return; } RoleSocialPoolToolData mData = (RoleSocialPoolToolData)data; this.dic = mData.dic; this.nextCutTime = mData.nextCutTime; }
/// <summary> /// 复制(潜拷贝) /// </summary> protected override void toShadowCopy(BaseData data) { base.toShadowCopy(data); if (!(data is PlayerAuctionToolData)) { return; } PlayerAuctionToolData mData = (PlayerAuctionToolData)data; this.sellItems = mData.sellItems; this.preSellItems = mData.preSellItems; this.preBuyItems = mData.preBuyItems; }
/// <summary> /// 复制(潜拷贝) /// </summary> protected override void toShadowCopy(BaseData data) { if (!(data is SceneEnterData)) { return; } SceneEnterData mData = (SceneEnterData)data; this.hero = mData.hero; this.units = mData.units; this.roles = mData.roles; this.selfBindFieldItemBags = mData.selfBindFieldItemBags; this.bindVisionUnits = mData.bindVisionUnits; this.battleData = mData.battleData; }
/// <summary> /// 复制(潜拷贝) /// </summary> protected override void toShadowCopy(BaseData data) { base.toShadowCopy(data); if (!(data is PlayerRoleGroupClientToolData)) { return; } PlayerRoleGroupClientToolData mData = (PlayerRoleGroupClientToolData)data; this.groups = mData.groups; this.applyDic = mData.applyDic; this.canInviteInAbs = mData.canInviteInAbs; this.inviteList = mData.inviteList; }