protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("ID"); writer.WriteUTF(m_fb.ID); writer.WriteKey("PlayerID"); writer.WriteUTF(m_fb.PlayerID); writer.WriteKey("CurSkill"); writer.WriteUTF(m_fb.CurSkill); writer.WriteKey("FightType"); writer.WriteInt((int)m_fb.FB); writer.WriteKey("RangePet"); writer.WriteUTF(m_fb.RangePet); writer.WriteKey("MPCost"); writer.WriteInt(m_fb.MPCost); writer.WriteKey("HPcost"); writer.WriteInt(m_fb.HPcost); writer.WriteKey("MoFa"); writer.WriteValue(m_fb.MoFa); writer.WriteKey("ShengMing"); writer.WriteValue(m_fb.ShengMing); //Console.WriteLine("Name:"+m_fb.Name+",FightType:" + (int)m_fb.FB + ",RangePet:" + m_fb.RangePet + ",HPcost:" + m_fb.HPcost + ",MPCost:" + m_fb.MPCost + ",MoFa:" + m_fb.MoFa.GetIntOrDefault("V") +",ShengMing:" + m_fb.ShengMing.GetIntOrDefault("V")); }
protected override void WriteAmf3(IExternalWriter writer) { m_player.WriteBase(writer); writer.WriteKey("WinCount"); writer.WriteInt(m_winCount); writer.WriteKey("FamilyName"); writer.WriteUTF(m_player.FamilyName); writer.WriteKey("FamilyJob"); writer.WriteUTF(m_player.FamilyJob); }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("ID"); writer.WriteUTF(m_pb.ID); writer.WriteKey("PartID"); writer.WriteUTF(m_pb.PartID); writer.WriteKey("PlayerID"); writer.WriteUTF(m_pb.PlayerID); writer.WriteKey("SubType"); writer.WriteUTF(m_pb.SubType); writer.WriteKey("Value"); writer.WriteValue(m_pb.Value); }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey(m_playerEx.Name); writer.WriteIDictionary(m_playerEx.Value); writer.WriteKey("ID"); writer.WriteUTF(m_playerEx.PlayerID); }
protected override void WriteAmf3(IExternalWriter writer) { if (m_style == 3 && m_keys != null) { foreach (string key in m_keys) { PlayerEx v = m_player.Value.GetValue<PlayerEx>(key); writer.WriteKey(key); writer.WriteIDictionary(v.Value); } writer.WriteKey("ID"); writer.WriteUTF(m_player.ID); return; } m_player.WriteBase(writer); m_player.WriteShape(writer); m_player.WritePet(writer); //组队时用 if (m_style == 0) { writer.WriteKey("TeamJob"); writer.WriteInt((int)(m_player.TeamJob)); writer.WriteKey("JingYan"); MVPair.WritePair(writer, m_player.MaxExp, m_player.Experience); writer.WriteKey("ShengMing"); MVPair.WritePair(writer, m_player.Life.ShengMing, m_player.HP); writer.WriteKey("MoFa"); MVPair.WritePair(writer, m_player.Life.MoFa, m_player.MP); } //取玩家详细信息 else if (m_style == 1) { if (m_player.Pet != null) { writer.WriteKey("PetID"); writer.WriteUTF(m_player.Pet.ID); } m_player.WriteFightProperty(writer); m_player.WriteOther(writer); writer.WriteKey("Equips"); writer.WriteIDictionary(m_player.Equips.Value); } //玩家登录成功时取自己的信息 else if (m_style == 2) { m_player.WriteScene(writer); m_player.WriteFinance(writer); m_player.WritePlayerEx(writer); m_player.WriteFightProperty(writer); m_player.WriteOther(writer); writer.WriteKey("PID"); writer.WriteInt(m_player.PID); } }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("ID"); writer.WriteUTF(m_box.ID); writer.WriteKey("Name"); writer.WriteUTF(m_box.Name); writer.WriteKey("GoodsID"); writer.WriteUTF(m_box.GoodsID); writer.WriteKey("OpenMS"); writer.WriteInt(m_box.OpenMS); writer.WriteKey("Skin"); writer.WriteUTF(m_box.Skin); writer.WriteKey("X"); writer.WriteInt(m_point.X); writer.WriteKey("Y"); writer.WriteInt(m_point.Y); }
protected override void WriteAmf3(IExternalWriter writer) { if (m_mounts == null) return; writer.WriteKey("ID"); writer.WriteUTF(m_mounts.ID); writer.WriteKey("Experience"); writer.WriteInt(m_mounts.Experience); writer.WriteKey("Level"); writer.WriteInt(m_mounts.Level); writer.WriteKey("Status"); writer.WriteInt(m_mounts.Status); writer.WriteKey("MountsID"); writer.WriteUTF(m_mounts.MountsID); writer.WriteKey("PlayerID"); writer.WriteUTF(m_mounts.PlayerID); writer.WriteKey("Rank"); writer.WriteInt(m_mounts.Rank); if (m_mounts.Value == null) return; Variant skill = m_mounts.Value.GetVariantOrDefault("Skill"); if (skill == null) return; writer.WriteKey("Skill"); writer.WriteValue(skill); writer.WriteKey("FailCount"); writer.WriteInt(m_mounts.FailCount); writer.WriteKey("FailTime"); writer.WriteDateTime(m_mounts.FailTime); writer.WriteKey("ZhuFu"); writer.WriteInt(m_mounts.ZhuFu); }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("Ranking"); writer.WriteInt(m_model.Ranking); writer.WriteKey("GroupName"); writer.WriteUTF(m_model.GroupName); writer.WriteKey("PlayerName"); writer.WriteUTF(m_model.PlayerName); writer.WriteKey("WinFight");//击杀获得战绩 writer.WriteInt(m_model.WinFight); writer.WriteKey("TotalWin");//击杀数 writer.WriteInt(m_model.TotalWin); writer.WriteKey("LossFight");//损失战绩 writer.WriteInt(m_model.LossFight); writer.WriteKey("TotalLoss");//被杀数 writer.WriteInt(m_model.TotalLoss); writer.WriteKey("OtherFight");//附加战绩 writer.WriteInt(m_model.OtherFight); writer.WriteKey("TotalFight");//总战绩值 writer.WriteInt(m_model.TotalFight); writer.WriteKey("ResultType");//输赢0输,1赢,2平 writer.WriteInt(m_model.ResultType); //Console.WriteLine( // "Ranking:" + m_model.Ranking + // ",GroupName:" + m_model.GroupName + // ",PlayerName:" + m_model.PlayerName + // ",WinFight:" + m_model.WinFight + // ",TotalWin:" + m_model.TotalWin + // ",TotalLoss:" + m_model.TotalLoss + // ",LossFight:" + m_model.LossFight + // ",OtherFight:" + m_model.OtherFight + // ",TotalFight:" + m_model.TotalFight + // ",ResultType:" + m_model.ResultType // ); }
protected override void WriteAmf3(IExternalWriter writer) { m_player.WriteBase(writer); if (m_style == 0) { writer.WriteKey("Coat"); writer.WriteUTF(m_player.Coat); writer.WriteKey("Weapon"); writer.WriteUTF(m_player.Weapon); writer.WriteKey("Body"); writer.WriteUTF(m_player.Body); writer.WriteKey("Mount"); writer.WriteUTF(m_player.Mount); writer.WriteKey("SceneID"); writer.WriteUTF(m_player.SceneID); writer.WriteKey("State"); writer.WriteInt(m_player.State); if (m_player.State == 2) { writer.WriteKey("DelTime"); writer.WriteDateTime(m_player.Modified.AddSeconds(GetRetainSecond(m_player.Level))); } return; } if (m_style == 2) { writer.WriteKey("Dian"); writer.WriteInt(m_player.Dian); } writer.WriteKey("FamilyName"); writer.WriteUTF(m_player.FamilyName); writer.WriteKey("FamilyJob"); writer.WriteUTF(m_player.FamilyJob); writer.WriteKey("Online"); writer.WriteBoolean(m_player.Online); }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("X"); writer.WriteInt(X); writer.WriteKey("Y"); writer.WriteInt(Y); writer.WriteKey("Say"); writer.WriteInt(Say); writer.WriteKey("Batch"); writer.WriteInt(Batch); writer.WriteKey("Name"); writer.WriteUTF(m_apc.Name); writer.WriteKey("Skin"); writer.WriteUTF(m_apc.Skin); writer.WriteKey("ID"); writer.WriteInt(ID); }
protected override void WriteAmf3(IExternalWriter writer) { if (m_pet == null) return; writer.WriteKey("ID"); writer.WriteUTF(m_pet.ID); if (m_style == 2) { WriteLife(writer); } else if (m_style == 3) { writer.WriteKey("Name"); writer.WriteUTF(m_pet.Name); writer.WriteKey("PetsID"); writer.WriteUTF(m_pet.Value.GetStringOrDefault("PetsID")); writer.WriteKey("PetsType"); writer.WriteUTF(m_pet.Value.GetStringOrDefault("PetsType")); writer.WriteKey("PetsRank"); writer.WriteUTF(m_pet.Value.GetStringOrDefault("PetsRank")); writer.WriteKey("PetsLevel"); writer.WriteInt(m_pet.Value.GetIntOrDefault("PetsLevel")); writer.WriteKey("Skin"); writer.WriteUTF(m_pet.Value.GetStringOrDefault("Skin")); writer.WriteKey("Skill"); writer.WriteValue(m_pet.Value.GetVariantOrDefault("Skill")); writer.WriteKey("ZiZhi"); writer.WriteInt(m_pet.Value.GetIntOrDefault("ZiZhi")); WriteLife(writer); } else //0,和1 { writer.WriteKey("Name"); writer.WriteUTF(m_pet.Name); writer.WriteKey("Total"); writer.WriteInt(m_pet.Value.GetVariantOrDefault("ChengChangDu").GetIntOrDefault("V")); writer.WriteKey("Level"); writer.WriteInt(m_pet.Value.GetIntOrDefault("PetsLevel")); writer.WriteKey("PetsType"); writer.WriteUTF(m_pet.Value.GetStringOrDefault("PetsType")); writer.WriteKey("PlayerName"); writer.WriteUTF(m_pet.Value.GetStringOrDefault("PlayerName")); } }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("ID"); writer.WriteUTF(ID); writer.WriteKey("Name"); writer.WriteUTF(Name); writer.WriteKey("Total"); writer.WriteInt(Total); writer.WriteKey("Level"); writer.WriteInt(Level); writer.WriteKey("PetsType"); writer.WriteUTF(PetsType); writer.WriteKey("PlayerName"); writer.WriteUTF(PlayerName); }
protected override void WriteAmf3(IExternalWriter writer) { base.WriteAmf3(writer); if (this.ActionType != ActionType.TaoPao) { writer.WriteKey("Target"); writer.WriteUTF(Target); writer.WriteKey("Parameter"); writer.WriteUTF(Parameter); writer.WriteKey("ActionID"); writer.WriteInt(ActionID); if (this.ActionType == 0) { writer.WriteKey("SkillLev"); writer.WriteInt(SkillLev); } if (Result != null) { writer.WriteKey("Result"); writer.WriteValue(Result); } } if (Say > 0) { writer.WriteKey("Say"); writer.WriteInt(Say); } writer.WriteKey("fType"); writer.WriteInt((int)(this.ActionType)); writer.WriteKey("ID"); writer.WriteUTF(Sender); }
protected override void WriteAmf3(IExternalWriter writer) { WriteBase(writer); WriteScene(writer); WriteShape(writer); WriteOther(writer); WritePet(writer); writer.WriteKey("ActionState"); writer.WriteInt((int)AState); //writer.WriteKey("ShiZhuangSkin"); //writer.WriteUTF(ShiZhuangSkin); //writer.WriteKey("SZSkin"); //writer.WriteUTF("SZSkin"); //writer.WriteKey("PID"); //writer.WriteInt(this.PID); if (m_teamJob != TeamJob.NoTeam) { if (m_team != null) { writer.WriteKey("TeamJob"); writer.WriteInt((int)m_teamJob); writer.WriteKey("TeamID"); writer.WriteUTF(m_team.TeamID); } } if (m_yellowTime > DateTime.UtcNow) { writer.WriteKey("Yellow"); writer.WriteDateTime(m_yellowTime); } if (m_redTime > DateTime.UtcNow) { writer.WriteKey("Red"); writer.WriteDateTime(m_redTime); } }
protected override void WriteAmf3(IExternalWriter writer) { if (m_activeApcs.Count > 0) { writer.WriteKey("ID"); writer.WriteUTF(ID); writer.WriteKey("Name"); writer.WriteUTF(Name); if (m_apc != null) { writer.WriteKey("Skin"); writer.WriteUTF(m_apc.Skin); } writer.WriteKey("Apcs"); writer.WriteValue(m_activeApcs.Values); } }
/// <summary> /// FamilyName/FamilyJob/Marriage /// </summary> /// <param name="writer"></param> public void WriteOther(IExternalWriter writer) { writer.WriteKey("FamilyName"); writer.WriteUTF(FamilyName); writer.WriteKey("FamilyJob"); writer.WriteUTF(FamilyJob); writer.WriteKey("Marriage"); writer.WriteUTF(Marriage); }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("Target"); writer.WriteUTF(Target); writer.WriteKey("ActionFlag"); writer.WriteInt((int)(this.ActionFlag)); base.WriteAmf3(writer); }
/// <summary> /// �ڳ����е���Ϣ: /// SceneID/Walk/X/Y/ActionState /// </summary> /// <param name="writer"></param> public void WriteScene(IExternalWriter writer) { writer.WriteKey("SceneID"); writer.WriteUTF(SceneID); writer.WriteKey("Walk"); writer.WriteDouble(Point); writer.WriteKey("X"); writer.WriteInt(X); writer.WriteKey("Y"); writer.WriteInt(Y); writer.WriteKey("ActionState"); writer.WriteInt((int)AState); }
/// <summary> /// ������Ϣ /// ID/RoleID/Name/Level/Sex /// </summary> /// <param name="writer"></param> public void WriteBase(IExternalWriter writer) { writer.WriteKey("ID"); writer.WriteUTF(ID); writer.WriteKey("UID"); writer.WriteUTF(m_userID); writer.WriteKey("Name"); writer.WriteUTF(Name); writer.WriteKey("RoleID"); writer.WriteUTF(RoleID); writer.WriteKey("Sex"); writer.WriteInt(Sex); writer.WriteKey("Level"); writer.WriteInt(Level); writer.WriteKey("VIP"); writer.WriteInt(VIP); writer.WriteKey("FightValue"); writer.WriteInt(FightValue); writer.WriteKey("Owe"); writer.WriteInt(Owe); writer.WriteKey("StarPower"); writer.WriteInt(StarPower); writer.WriteKey("ShowInfo"); writer.WriteInt(ShowInfo); writer.WriteKey("MLevel"); writer.WriteInt(MLevel); writer.WriteKey("CZD"); writer.WriteInt(CZD); }
protected override void WriteAmf3(IExternalWriter writer) { base.WriteAmf3(writer); writer.WriteKey("ID"); writer.WriteUTF(ID); writer.WriteKey("Name"); writer.WriteUTF(Name); writer.WriteKey("PlayerID"); writer.WriteUTF(PlayerID); }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("FType"); writer.WriteInt((int)FType); writer.WriteKey("P"); writer.WriteInt(P); writer.WriteKey("ID"); writer.WriteUTF(ID); writer.WriteKey("Name"); writer.WriteUTF(Name); writer.WriteKey("ShengMing"); MVPair.WritePair(writer, Life.ShengMing, m_hp); writer.WriteKey("MoFa"); MVPair.WritePair(writer, Life.MoFa, m_mp); writer.WriteKey("Skin"); writer.WriteUTF(Skin); writer.WriteKey("Level"); writer.WriteInt(this.Level); if (Talk > 0) { writer.WriteKey("Say"); writer.WriteInt(Talk); } }
/// <summary> /// 外形信息: /// Mount/Body/Weapon/Coat/IsCoat /// </summary> /// <param name="writer"></param> public void WriteShape(IExternalWriter writer) { writer.WriteKey("Nicename"); writer.WriteUTF(Nicename); writer.WriteKey("Mount"); writer.WriteUTF(Mount); writer.WriteKey("Body"); writer.WriteUTF(Body); writer.WriteKey("Weapon"); writer.WriteUTF(Weapon); writer.WriteKey("Coat"); writer.WriteUTF(Coat); writer.WriteKey("IsCoat"); writer.WriteBoolean(IsCoat); }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("ID"); writer.WriteUTF(m_id); var cap = m_members[0]; writer.WriteKey("Captain"); writer.WriteUTF(cap.ID); writer.WriteKey("Name"); writer.WriteUTF(cap.Name); writer.WriteKey("Level"); writer.WriteInt(cap.Level); writer.WriteKey("Num"); writer.WriteInt(Count); writer.WriteKey("Icon"); writer.WriteUTF(Icon); writer.WriteKey("Explain"); writer.WriteUTF(Explain); }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("ID"); writer.WriteUTF(m_part.ID); writer.WriteKey("Start"); writer.WriteDateTime(m_start); writer.WriteKey("End"); writer.WriteDateTime(m_end); }
protected override void WriteAmf3(IExternalWriter writer) { writer.WriteKey("ID"); writer.WriteUTF(this.ID); writer.WriteKey("Name"); writer.WriteUTF(this.Name); writer.WriteKey("GoodsID"); writer.WriteUTF(this.GoodsID); writer.WriteKey("OpenMS"); writer.WriteInt(this.OpenMS); writer.WriteKey("Skin"); writer.WriteUTF(this.Skin); }
protected override void WriteAmf3(IExternalWriter writer) { Variant v = m_pet.Value; writer.WriteKey("ID"); writer.WriteUTF(m_pet.ID); if (m_style != 2) { writer.WriteKey("PlayerID"); writer.WriteUTF(m_pet.PlayerID); } if (m_style == 0) { writer.WriteKey("PlayerName"); writer.WriteUTF(m_name); writer.WriteKey("CurSkill"); writer.WriteUTF(m_pet.CurSkill); writer.WriteKey("Name"); writer.WriteUTF(m_pet.Name); writer.WriteKey("Skin"); writer.WriteUTF(v.GetStringOrDefault("Skin")); writer.WriteKey("PetsID"); writer.WriteUTF(v.GetStringOrDefault("PetsID")); writer.WriteKey("IsWar"); writer.WriteBoolean(m_pet.IsWar); writer.WriteKey("X"); writer.WriteInt(m_pet.CurPoint.X); writer.WriteKey("Y"); writer.WriteInt(m_pet.CurPoint.Y); writer.WriteKey("PetsRank"); writer.WriteInt(v.GetIntOrDefault("PetsRank")); writer.WriteKey("PetsLevel"); writer.WriteInt(m_level); writer.WriteKey("MoFa"); writer.WriteValue(v.GetVariantOrDefault("MoFa")); writer.WriteKey("ShengMing"); writer.WriteValue(v.GetVariantOrDefault("ShengMing")); ; writer.WriteKey("SkillList"); writer.WriteValue(v.GetVariantOrDefault("Skill")); writer.WriteKey("GroupName"); writer.WriteUTF(m_pet.GroupName); writer.WriteKey("Fatigue"); writer.WriteValue(m_fatigue); writer.WriteKey("FightDeath"); writer.WriteInt(m_pet.FightDeath.Count); } if (m_style == 2) { writer.WriteKey("FightDeath"); writer.WriteInt(m_pet.FightDeath.Count); } }
protected override void WriteAmf3(IExternalWriter writer) { foreach (var v in m_buffer) { writer.WriteKey(v.Key); writer.WriteInt(v.Value); } writer.WriteKey("HP"); writer.WriteInt(HP); writer.WriteKey("MP"); writer.WriteInt(MP); writer.WriteKey("ID"); writer.WriteUTF(m_fighter.ID); }