123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366 |
- using System;
- using CommonAI.Zone;
- using CommonLang.IO;
- using CommonLang.IO.Attribute;
- using System.Collections.Generic;
- namespace XmdsCommonServer.Message
- {
- public interface MessagePlayerEventB2R
- {
- string eventName { get; set; }
- string playerId { get; set; }
- }
- public interface MessageZoneEventB2R
- {
- string eventName { get; set; }
- string instanceId { get; set; }
- }
- public interface MessageMapEventB2R
- {
- string eventName { get; set; }
- }
-
-
-
- [MessageType(0xF000009)]
- public class ConsumeItemEventB2R : PlayerEvent, MessagePlayerEventB2R
- {
- public string eventName { get; set; }
- public string playerId { get; set; }
- public string Type = null;
- public int Qty = 0;
- public string Reason = null;
- public ConsumeItemEventB2R() { }
- public ConsumeItemEventB2R(string p, string t, int q, string r)
- {
- playerId = p;
- Type = t;
- Qty = q;
- Reason = r;
- }
- override public void WriteExternal(IOutputStream output)
- {
- base.WriteExternal(output);
- output.PutUTF(playerId);
- output.PutUTF(Type);
- output.PutS32(Qty);
- output.PutUTF(Reason);
- }
- override public void ReadExternal(IInputStream input)
- {
- base.ReadExternal(input);
- playerId = input.GetUTF();
- Type = input.GetUTF();
- Qty = input.GetS32();
- Reason = input.GetUTF();
- }
- }
-
-
-
- [MessageType((0xF000017))]
- public class TransUnitEventB2R : PlayerEvent, MessagePlayerEventB2R
- {
- public string eventName { get; set; }
- public string playerId { get; set; }
- public int SceneID = 0;
- public int TargetX = 0;
- public int TargetY = 0;
- public TransUnitEventB2R() { }
- public override void ReadExternal(IInputStream input)
- {
- base.ReadExternal(input);
- playerId = input.GetUTF();
- SceneID = input.GetS32();
- TargetX = input.GetS32();
- TargetY = input.GetS32();
- }
- public override void WriteExternal(IOutputStream output)
- {
- base.WriteExternal(output);
- output.PutUTF(playerId);
- output.PutS32(SceneID);
- output.PutS32(TargetX);
- output.PutS32(TargetY);
- }
- }
-
-
-
- [MessageType((0xF000018))]
- public class SummonMountEventB2R : PlayerEvent, MessagePlayerEventB2R
- {
- public string eventName { get; set; }
-
-
-
- public string playerId { get; set; }
-
-
-
- public bool IsSummonMount = false;
- public override void ReadExternal(IInputStream input)
- {
- base.ReadExternal(input);
- playerId = input.GetUTF();
- IsSummonMount = input.GetBool();
- }
- public override void WriteExternal(IOutputStream output)
- {
- base.WriteExternal(output);
- output.PutUTF(playerId);
- output.PutBool(IsSummonMount);
- }
- }
-
-
-
- [MessageType((0xF000021))]
- public class ShowRebirthDialogueB2R : PlayerEvent, MessagePlayerEventB2R
- {
- public string eventName { get; set; }
-
-
-
- public string playerId { get; set; }
-
-
-
- public string DeadUnitUUID = null;
-
-
-
- public string SaverName = null;
-
-
-
- public string SaverUUID = null;
-
-
-
- public int HP = 0;
-
-
-
- public int MP = 0;
- public override void WriteExternal(IOutputStream output)
- {
- base.WriteExternal(output);
- output.PutUTF(DeadUnitUUID);
- output.PutUTF(SaverName);
- output.PutUTF(SaverUUID);
- output.PutS32(HP);
- output.PutS32(MP);
- }
- public override void ReadExternal(IInputStream input)
- {
- base.ReadExternal(input);
- DeadUnitUUID = input.GetUTF();
- SaverName = input.GetUTF();
- SaverUUID = input.GetUTF();
- HP = input.GetS32();
- MP = input.GetS32();
- }
- }
-
-
-
- [MessageType((0xFFF0001))]
- public class TriggerSceneEventB2R : PlayerEvent, MessagePlayerEventB2R
- {
- public string EventID = null;
- public string playerId { get; set; }
- public string eventName { get; set; }
- public TriggerSceneEventB2R() { }
- public override void ReadExternal(IInputStream input)
- {
- base.ReadExternal(input);
- EventID = input.GetUTF();
- playerId = input.GetUTF();
- }
- public override void WriteExternal(IOutputStream output)
- {
- base.WriteExternal(output);
- output.PutUTF(EventID);
- output.PutUTF(playerId);
- }
- }
-
-
-
- [MessageType((0xFFF0002))]
- public class BattleReportEventB2R : ZoneEvent, MessageZoneEventB2R
- {
- public string eventName { get; set; }
-
-
-
- public string instanceId { get; set; }
- public List<UnitBattleReportDetail> data = null;
- public override void ReadExternal(IInputStream input)
- {
- instanceId = input.GetUTF();
- this.data = input.GetList<UnitBattleReportDetail>(input.GetExt<UnitBattleReportDetail>);
- }
- public override void WriteExternal(IOutputStream output)
- {
- output.PutUTF(instanceId);
- output.PutList(this.data, output.PutExt);
- }
- }
-
-
-
- [MessageType((0xFFF0003))]
- public class UnitBattleReportDetail : IExternalizable
- {
- public uint ID = 0;
-
-
-
- public string PlayerUUID = null;
-
-
-
- public int TemplateID = 0;
-
-
-
- public int Force = 0;
-
-
-
- public long TotalDamage = 0;
-
-
-
- public long TotalHealing = 0;
- public void ReadExternal(IInputStream input)
- {
- ID = input.GetU32();
- PlayerUUID = input.GetUTF();
- TemplateID = input.GetS32();
- Force = input.GetS32();
- TotalDamage = input.GetS64();
- TotalHealing = input.GetS64();
- }
- public void WriteExternal(IOutputStream output)
- {
- output.PutU32(ID);
- output.PutUTF(PlayerUUID);
- output.PutS32(TemplateID);
- output.PutS32(Force);
- output.PutS64(TotalDamage);
- output.PutS64(TotalHealing);
- }
- }
-
-
-
- [MessageType((0xFFF0004))]
- public class KillBossEventB2R : ZoneEvent, MessageZoneEventB2R
- {
- public string eventName { get; set; }
-
-
-
- public string instanceId { get; set; }
- public string PlayerUUID = null;
- public override void ReadExternal(IInputStream input)
- {
- PlayerUUID = input.GetUTF();
- instanceId = input.GetUTF();
- }
- public override void WriteExternal(IOutputStream output)
- {
- output.PutUTF(PlayerUUID);
- output.PutUTF(instanceId);
- }
- }
-
-
-
- [MessageType((0xFFF0005))]
- public class PlayerExceptionEventB2R : PlayerEvent, MessagePlayerEventB2R
- {
- public string playerId { get; set; }
-
-
-
- public string instanceId { get; set; }
- public string eventName { get; set; }
- public string reason { get; set; }
- }
-
-
-
- [MessageType((0xFFF0006))]
- public class MountainKingHelpEventB2R : ZoneEvent, MessageMapEventB2R
- {
- public string eventName { get; set; }
- public int mapId;
-
-
-
- public int monsterId;
- public uint monsterObjectId;
- public List<string> players = new List<string>();
- public override void ReadExternal(IInputStream input)
- {
- throw new NotImplementedException();
- }
- public override void WriteExternal(IOutputStream output)
- {
- throw new NotImplementedException();
- }
- }
- }
|