void C2S_WORLD_PRE_LOGIN_ACK(NetworkPacket packet) { /*var status = */ packet.ReadInt32(); if (ActiveClientMap == MapIDs.CHARACTER_SELECTION) { var charDB = ServiceContainer.GetService <IDatabase>().Characters; var chars = charDB.GetCharacters(Account.UID); var outMsg = GameHeader.S2C_CS_LOGIN.CreatePacket(); outMsg.WriteInt32(chars.Count); for (var i = 0; i < chars.Count; i++) { outMsg.Write(chars[i].Character); outMsg.Write(chars[i].Sheet); var items = charDB.GetItems(chars[i].Character.Id); outMsg.Write(items); } outMsg.WriteInt32(chars.Count); for (int i = 0; i < chars.Count; i++) { outMsg.WriteInt32(chars[i].Character.Id); outMsg.WriteInt32(SBDBSync.GetFameLevelByPoints((int)chars[i].Sheet.FamePoints)); } Connection.SendMessage(outMsg); } else { if (ActiveController == null) { Connection.Disconnect();//character must exist return; } S2C_WORLD_LOGIN(); } }
public override void Initialize(Actor outer) { base.Initialize(outer); var pawn = outer as Game_Pawn; var controller = pawn.Controller as Game_Controller; SetCharacterClass((Content_API.EContentClass)(controller.DBCharacterSheet.ClassId + 1)); mFamePoints = (int)controller.DBCharacterSheet.FamePoints; mPePPoints = (int)controller.DBCharacterSheet.PepPoints; mHealth = controller.DBCharacterSheet.Health; mRecord.CopyHealth = mHealth; mRecord.FameLevel = SBDBSync.GetFameLevelByPoints(mFamePoints); mRecord.PePRank = SBDBSync.GetPepRankByPoints(mPePPoints); mExtraBodyPoints = controller.DBCharacterSheet.ExtraBodyPoints; mExtraMindPoints = controller.DBCharacterSheet.ExtraMindPoints; mExtraFocusPoints = controller.DBCharacterSheet.ExtraFocusPoints; }