public SingleCharacterMessage(CharacterSummary character, int loginPartyState) { this.Characters = new List <CharacterSummary>(); this.Characters.Add(character); this.LoginPartyState = new List <int>(); this.LoginPartyState.Add(loginPartyState); }
public void EnterChannel(Channel channel) { if (this.Player != null) { this.Leave(this.Player.Channel); } this.Player = new Player(this.ID, channel, channel.Tag as JobProcessor); CharacterSummary characterSummary = new CharacterSummary(this.ID, (int)(this.ID & (long)uint.MaxValue), string.Format("Mock{0}", this.ID), (int)(this.ID & (long)uint.MaxValue), (BaseCharacter)(this.ID % 5L), (int)(this.ID % 70L), 0, 0, 0, 0, new CostumeInfo(), 0, 0, 0, "", 0, "", 1, false, false, false, false, 0, false, 0, VocationEnum.None, 0, 0, 0, 0, 0, 0, null, false, "", 0, 0, 0, 0); ActionSync actionSync = default(ActionSync); this.Player.Enter(this.PartitionID, characterSummary, actionSync); this.RecentLook = characterSummary; this.RecentAction = actionSync; this.Player.SendMessage += delegate(object sender, EventArgs <Packet> args) { this.Parent.ReceivedPacketCount++; this.RecentSentPacket = args.Value; }; this.Player.ActionUpdate += delegate(object sender, EventArgs <ActionSync> args) { this.RecentAction = args.Value; }; this.Player.LookUpdate += delegate(object sender, EventArgs <CharacterSummary> args) { this.RecentLook = args.Value; }; }
public void InsertCharacterSummary(CharacterSummary c) { Console.WriteLine("inserting character {0}", c.CharacterID); charCollection.InsertOneAsync(new Character(c)); costCollection.InsertOneAsync(new CharacterCostume(c.Costume, c.CharacterID)); if (c.Pet != null) { petCollection.InsertOneAsync(new CharacterPet(c.Pet, c.CharacterID)); } }
public CharacterViewInfoMessage(long id, CharacterSummary summary, IDictionary <string, int> stat, QuickSlotInfo qslot, IDictionary <int, ColoredEquipment> equip, int silverCoin, int platinumCoin, IDictionary <int, DurabilityEquipment> durability) { this.QueryID = id; this.Summary = summary; this.Stat = stat; this.QuickSlotInfo = qslot; this.Equipment = equip; this.SilverCoin = silverCoin; this.PlatinumCoin = platinumCoin; this.Durability = durability; }
public void Enter(long pid, CharacterSummary look, ActionSync action) { if (this.boundThread != null && JobProcessor.Current != this.boundThread) { this.boundThread.Enqueue(Job.Create <long, CharacterSummary, ActionSync>(new Action <long, CharacterSummary, ActionSync>(this.Enter), pid, look, action)); return; } this.RecentLook = look; this.Channel.AddComponent(this.Channel.MakeLocation(this.ID, 1, pid)); this.Channel.AddComponent(new Look(this.ID, look)); this.Channel.AddComponent(new Kinetics(this.ID, action)); this.Channel.AddObserver(pid, this); }
public void UpdateLook(CharacterSummary summary) { if (this.boundThread != null && JobProcessor.Current != this.boundThread) { this.boundThread.Enqueue(Job.Create <CharacterSummary>(new Action <CharacterSummary>(this.UpdateLook), summary)); return; } this.Channel.ApplyModifier(new UpdateLook(this.ID, summary)); this.RecentLook = summary; if (this.LookUpdate != null) { this.LookUpdate(this, new EventArgs <CharacterSummary>(summary)); } }
public void Enter(Channel channel, long pid, ActionSync action, CharacterSummary look) { if (this.Player != null) { this.Leave(this.Player.Channel); } JobProcessor thread = channel.Tag as JobProcessor; this.Player = new Player(this.ID, channel, thread); this.Player.SendMessage += delegate(object sender, EventArgs <Packet> args) { this.client.Transmit(args.Value); }; this.Player.Enter(pid, look, action); }
public Character(CharacterSummary c) { this.CID = c.CID; this.NexonSN = c.NexonSN; this.CharacterID = c.CharacterID; this.CharacterSN = c.CharacterSN; this.BaseCharacter = c.BaseCharacter.ToString(); this.Level = c.Level; this.Exp = c.Exp; this.LevelUpExp = c.LevelUpExp; this.Title = c.Title; this.TitleCount = c.TitleCount; this.DailyMicroPlayCount = c.DailyMicroPlayCount; this.DailyFreePlayCount = c.DailyFreePlayCount; this.TotalUsedAP = c.TotalUsedAP; this.Quote = c.Quote; this.GuildId = c.GuildId; this.GuildName = c.GuildName; this.CafeType = c.CafeType; this.IsPremium = c.IsPremium; this.HasBonusEffect = c.HasBonusEffect; this.IsReturn = c.IsReturn; this.IsDeleting = c.IsDeleting; this.DeleteWaitLeftSec = c.DeleteWaitLeftSec; this.IsShouldNameChange = c.IsShouldNameChange; this.VIPCode = VIPCode; this.VocationClass = c.VocationClass.ToString(); this.VocationExp = c.VocationExp; this.VocationLevel = c.VocationLevel; this.VocationLevelUpExp = c.VocationLevelUpExp; this.VocationSkillPointAvailable = c.VocationSkillPointAvailable; this.FreeMatchWinCount = c.FreeMatchWinCount; this.FreeMatchLoseCount = c.FreeMatchLoseCount; this.IsEventJumping = c.IsEventJumping; this.FreeTitleName = c.FreeTitleName; this.Pattern = c.Pattern; this.ArenaWinCount = c.ArenaWinCount; this.ArenaLoseCount = c.ArenaLoseCount; this.ArenaSuccessiveWinCount = c.ArenaSuccessiveWinCount; this.Recorded = DateTime.UtcNow; }
public UpdateLook(long id, CharacterSummary data) { this.ID = id; this.data = data; }
public CharacterCommonInfoMessage(CharacterSummary info) { this.info = info; }