public MailManager(SelectCharacterApplication application) { this.application = application; mPutTransactionPool = new Server2ServerTransactionPool <PUTInventoryItemTransactionStart, PUTInventoryItemTransactionEnd>(this); mGetTransactionPool = new Server2ServerTransactionPool <GETInventoryItemTransactionStart, GETInventoryItemTransactionEnd>(this); mGetItemsTransactionPool = new Server2ServerTransactionPool <GETInventoryItemsTransactionStart, GETInventoryItemsTransactionEnd>(this); }
public PlayerStoreService(SelectCharacterApplication application) { mApplication = application; mTransactionPool = new Server2ServerTransactionPool <GETInventoryItemTransactionStart, GETInventoryItemTransactionEnd>(this); mPutTransactionPool = new Server2ServerTransactionPool <PUTInventoryItemTransactionStart, PUTInventoryItemTransactionEnd>(this); mPlayerStoreCache = new ConcurrentDictionary <string, PlayerStore>(); }
public GuildService(SelectCharacterApplication application) { mApplication = application; mCache = new GuildCache(); mSearchCachedGuilds = new ConcurrentDictionary <int, Hashtable>(); mCreatinDate = DateTime.UtcNow; mLastUpdateSearchResultTime = time; }
public Hashtable GetInfo(SelectCharacterApplication app) { lock (syncRoot) { Hashtable result = new Hashtable(); foreach (var pFriend in friends) { result.Add(pFriend.Key, pFriend.Value.GetInfo(app)); } return(result); } }
public void Save(SelectCharacterApplication app) { foreach (var pFriends in mCachedFriends) { if (pFriends.Value.Changed) { app.DB.friends.Save(pFriends.Value.Data); pFriends.Value.Changed = false; } } }
private byte GetLeaderRace(SelectCharacterApplication app, NebulaCommon.Group.Group group) { var leader = group.leaderMember; if (leader != null) { var character = app.Players.GetCharacter(leader.gameRefID, leader.characterID); if (character != null) { return((byte)character.Race); } } return((byte)Race.None); }
public Hashtable GetInfo(SelectCharacterApplication app) { int currentTime = CommonUtils.SecondsFrom1970(); if (currentTime - lastCacheTime > 60 * 60) { lastCacheTime = currentTime; var player = app.Players.GetExistingPlayer(gameRefId); if (player != null) { var character = player.Data.GetCharacter(characterId); if (character != null) { exp = character.Exp; characterIcon = character.characterIcon; if (string.IsNullOrEmpty(characterName)) { characterName = character.Name; } } } } //if empty name force get name if (string.IsNullOrEmpty(characterName)) { var player = app.Players.GetExistingPlayer(gameRefId); if (player != null) { var character = player.Data.GetCharacter(characterId); if (character != null) { characterName = character.Name; } } } return(new Hashtable { { (int)SPC.Login, login }, { (int)SPC.GameRefId, gameRefId }, { (int)SPC.CharacterId, characterId }, { (int)SPC.Status, guildStatus }, { (int)SPC.Exp, exp }, { (int)SPC.CharacterName, characterName }, { (int)SPC.Icon, characterIcon }, { (int)SPC.DepositedCount, depositedCount } }); }
public Hashtable GetInfo(SelectCharacterApplication app) { if (description == null) { description = string.Empty; } if (dayPoster == null) { dayPoster = string.Empty; } if (transactions == null) { transactions = new List <Hashtable>(); } Hashtable hash = new Hashtable { { (int)SPC.Id, ownerCharacterId }, { (int)SPC.GuildRating, rating }, { (int)SPC.Race, guildRace }, { (int)SPC.Description, (description != null) ? description : string.Empty }, { (int)SPC.Name, (name != null) ? name : string.Empty }, { (int)SPC.Opened, opened }, { (int)SPC.ModerCount, moderatorCount }, { (int)SPC.MaxModerCount, MAX_NUMBER_OF_MODERATORS }, { (int)SPC.Credits, depositedCredits }, { (int)SPC.PvpPoints, depositedPvpPoints }, { (int)SPC.DayPoster, dayPoster }, { (int)SPC.Transactions, transactions.ToArray() } }; Hashtable membersHash = new Hashtable(); lock (syncRoot) { //mPage = Mathf.Clamp(mPage, 0, numPages - 1); //var newMembers = members.Skip(mPage * MAX_MEMBERS_ON_PAGE).Take(MAX_MEMBERS_ON_PAGE).ToDictionary(pk => pk.Key, pk => pk.Value); foreach (var member in members) { membersHash.Add(member.Key, member.Value.GetInfo(app)); } } hash.Add((int)SPC.Members, membersHash); return(hash); }
public Hashtable GetInfo(SelectCharacterApplication app) { var currentTime = CommonUtils.SecondsFrom1970(); if ((currentTime - lastCacheTime) > FRIEND_INFO_UPDATE_INTERVAL) { lastCacheTime = currentTime; var player = app.Players.GetExistingPlayer(gameRefID); if (player != null) { var character = player.Data.GetCharacter(player.Data.SelectedCharacterId); if (character != null) { exp = character.Exp; characterName = character.Name; worldID = character.WorldId; characterID = character.CharacterId; characterIcon = character.characterIcon; if (characterName == null) { characterName = string.Empty; } if (worldID == null) { worldID = string.Empty; } } } } return(new Hashtable { { (int)SPC.Login, login }, { (int)SPC.GameRefId, gameRefID }, { (int)SPC.Exp, exp }, { (int)SPC.CharacterName, characterName }, { (int)SPC.WorldId, worldID }, { (int)SPC.CharacterId, characterID }, { (int)SPC.Icon, characterIcon } }); }
public Hashtable SearchGroups(SelectCharacterApplication app, byte race) { var currentTime = CommonUtils.SecondsFrom1970(); if (currentTime - mLastGroupSerachUpdateTime > GROUP_SEARCH_UPDATE_INTERVAL) { mLastGroupSerachUpdateTime = currentTime; Hashtable raceGroups = null; if (mCacheFoundedGroups.TryGetValue(race, out raceGroups)) { raceGroups.Clear(); foreach (var pGroup in groups) { var group = pGroup.Value; if (group.allowNewMembers && group.opened) { if (GetLeaderRace(app, group) == race) { raceGroups.Add(group.groupID, group.GetSearchInfo()); } } } return(raceGroups); } else { return(new Hashtable()); } } Hashtable result = null; if (mCacheFoundedGroups.TryGetValue(race, out result)) { return(result); } return(new Hashtable()); }
public DeleteAuctionItemOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public SendPushToPlayersOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public PvpStoreManager(SelectCharacterApplication app) { application = app; mPutTransactionPool = new Server2ServerTransactionPool <PUTInventoryItemTransactionStart, PUTInventoryItemTransactionEnd>(this); }
public PlayerService(SelectCharacterApplication application) { mApplication = application; }
public MoveItemFromStationToBankOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public HandleNotificationOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public BuyPvpItemOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public ChatService(SelectCharacterApplication application) { mApplication = application; mCache = new ChatCache(); }
public CreateCharacterOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public SetNewPriceOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public FriendService(SelectCharacterApplication app) { application = app; }
public AuctionService(SelectCharacterApplication application) { mApplication = application; }
public GetPlayerStoreOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public ChangeGuildMemberStatusOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public GroupService(SelectCharacterApplication app) { mApplication = app; }
public NotificationService(SelectCharacterApplication application) { mApplication = application; mCache = new NotificationCache(); }
public InviteToGuildOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public BaseOperationHandler(SelectCharacterApplication application, SelectCharacterClientPeer peer) { this.application = application; this.peer = peer; }
public WriteMessageOperationHandler(SelectCharacterApplication app, SelectCharacterClientPeer peer) : base(app, peer) { }
public AchievmentCache(SelectCharacterApplication app) { m_App = app; m_Achievments = new ConcurrentDictionary <string, AchievmentCacheObject>(); }