コード例 #1
0
 public static BaseWorldMessage ReadMessage(IncomingMessage inMessage)
 {
     BaseWorldMessage rv;
     long oid = inMessage.ReadInt64();
     WorldMessageType messageType = inMessage.ReadMessageType();
     switch (messageType) {
         case WorldMessageType.LoginResponse:
             rv = new LoginResponseMessage();
             break;
         case WorldMessageType.Comm:
             rv = new CommMessage();
             break;
         case WorldMessageType.Direction:
             rv = new DirectionMessage();
             break;
         case WorldMessageType.Orientation:
             rv = new OrientationMessage();
             break;
         case WorldMessageType.TerrainConfig:
             rv = new TerrainConfigMessage();
             break;
         case WorldMessageType.SkyboxMaterial:
             rv = new SkyboxMaterialMessage();
             break;
         case WorldMessageType.NewObject:
             rv = new NewObjectMessage();
             break;
         case WorldMessageType.FreeObject:
             rv = new FreeObjectMessage();
             break;
         case WorldMessageType.AcquireResponse:
             rv = new AcquireResponseMessage();
             break;
         case WorldMessageType.EquipResponse:
             rv = new EquipResponseMessage();
             break;
         case WorldMessageType.UnequipResponse:
             rv = new UnequipResponseMessage();
             break;
         case WorldMessageType.Attach:
             rv = new AttachMessage();
             break;
         case WorldMessageType.Detach:
             rv = new DetachMessage();
             break;
         case WorldMessageType.StatUpdate:
             rv = new StatUpdateMessage();
             break;
         case WorldMessageType.Damage:
             rv = new DamageMessage();
             break;
         case WorldMessageType.Animation:
             rv = new AnimationMessage();
             break;
         case WorldMessageType.Sound:
             rv = new SoundMessage();
             break;
         case WorldMessageType.AmbientSound:
             rv = new AmbientSoundMessage();
             break;
         case WorldMessageType.FollowTerrain:
             rv = new FollowTerrainMessage();
             break;
         case WorldMessageType.Portal:
             rv = new PortalMessage();
             break;
         case WorldMessageType.AmbientLight:
             rv = new AmbientLightMessage();
             break;
         case WorldMessageType.NewLight:
             rv = new NewLightMessage();
             break;
         case WorldMessageType.TradeStartRequest:
             rv = new TradeStartRequestMessage();
             break;
         case WorldMessageType.TradeStart:
             rv = new TradeStartMessage();
             break;
         case WorldMessageType.TradeOfferRequest:
             rv = new TradeOfferRequestMessage();
             break;
         case WorldMessageType.TradeComplete:
             rv = new TradeCompleteMessage();
             break;
         case WorldMessageType.TradeOfferUpdate:
             rv = new TradeOfferUpdateMessage();
             break;
         case WorldMessageType.StateMessage:
             rv = new StateMessage();
             break;
         case WorldMessageType.QuestInfoRequest:
             rv = new QuestInfoRequestMessage();
             break;
         case WorldMessageType.QuestInfoResponse:
             rv = new QuestInfoResponseMessage();
             break;
         case WorldMessageType.QuestResponse:
             rv = new QuestResponseMessage();
             break;
         case WorldMessageType.RegionConfig:
             rv = new RegionConfigMessage();
             break;
         case WorldMessageType.InventoryUpdate:
             rv = new InventoryUpdateMessage();
             break;
         case WorldMessageType.QuestLogInfo:
             rv = new QuestLogInfoMessage();
             break;
         case WorldMessageType.QuestStateInfo:
             rv = new QuestStateInfoMessage();
             break;
         case WorldMessageType.RemoveQuestRequest:
             rv = new RemoveQuestRequestMessage();
             break;
         case WorldMessageType.RemoveQuestResponse:
             rv = new RemoveQuestResponseMessage();
             break;
         case WorldMessageType.GroupInfo:
             rv = new GroupInfoMessage();
             break;
         case WorldMessageType.UiTheme:
             rv = new UiThemeMessage();
             break;
         case WorldMessageType.LootAll:
             rv = new LootAllMessage();
             break;
         case WorldMessageType.OldModelInfo:
             rv = new OldModelInfoMessage();
             break;
         case WorldMessageType.FragmentMessage:
             rv = new FragmentMessage();
             break;
         case WorldMessageType.RoadInfo:
             rv = new RoadInfoMessage();
             break;
         case WorldMessageType.Fog:
             rv = new FogMessage();
             break;
         case WorldMessageType.AbilityInfo:
             rv = new AbilityInfoMessage();
             break;
         case WorldMessageType.AbilityUpdate:
             rv = new AbilityUpdateMessage();
             break;
         case WorldMessageType.OldObjectProperty:
             rv = new OldObjectPropertyMessage();
             break;
         case WorldMessageType.ObjectProperty:
             rv = new ObjectPropertyMessage();
             break;
         case WorldMessageType.AddParticleEffect:
             rv = new AddParticleEffectMessage();
             break;
         case WorldMessageType.RemoveParticleEffect:
             rv = new RemoveParticleEffectMessage();
             break;
         case WorldMessageType.TrackObjectInterpolation:
             rv = new TrackObjectInterpolationMessage();
             break;
         case WorldMessageType.TrackLocationInterpolation:
             rv = new TrackLocationInterpolationMessage();
             break;
         case WorldMessageType.OldExtension:
             rv = new OldExtensionMessage();
             break;
         case WorldMessageType.Extension:
             rv = new ExtensionMessage();
             break;
         case WorldMessageType.InvokeEffect:
             rv = new InvokeEffectMessage();
             break;
         case WorldMessageType.MobPath:
             rv = new MobPathMessage();
             break;
         case WorldMessageType.AggregatedRDP:
             rv = new AggregatedRDPMessage();
             break;
         case WorldMessageType.NewDecal:
             rv = new NewDecalMessage();
             break;
         case WorldMessageType.FreeDecal:
             rv = new FreeDecalMessage();
             break;
         case WorldMessageType.ModelInfo:
             rv = new ModelInfoMessage();
             break;
         case WorldMessageType.SoundControl:
             rv = new SoundControlMessage();
             break;
         case WorldMessageType.DirLocOrient:
             rv = new DirLocOrientMessage();
             break;
         case WorldMessageType.AuthorizedLogin:
             rv = new AuthorizedLoginMessage();
             break;
         case WorldMessageType.AuthorizedLoginResponse:
             rv = new AuthorizedLoginResponseMessage();
             break;
         case WorldMessageType.LoadingState:
             rv = new LoadingStateMessage();
             break;
         default:
             log.ErrorFormat("Unhandled world message type: {0}", messageType);
             return null;
     }
     rv.ParseWorldMessage(oid, inMessage);
     return rv;
 }
コード例 #2
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     base.ParseMessage(inMessage);
     accepted = inMessage.ReadBool();
     cancelled = inMessage.ReadBool();
     int numItems = inMessage.ReadInt32();
     for (int i = 0; i < numItems; ++i) {
         offer.Add(inMessage.ReadInt64());
     }
 }
コード例 #3
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     base.ParseMessage(inMessage);
     int numItems = inMessage.ReadInt32();
     for (int i = 0; i < numItems; ++i) {
         InvItemInfo info = new InvItemInfo();
         info.itemId = inMessage.ReadInt64();
         info.name = inMessage.ReadString();
         info.icon = inMessage.ReadString();
         offer1.Add(info);
     }
     accepted1 = inMessage.ReadBool();
     numItems = inMessage.ReadInt32();
     for (int i = 0; i < numItems; ++i) {
         InvItemInfo info = new InvItemInfo();
         info.itemId = inMessage.ReadInt64();
         info.name = inMessage.ReadString();
         info.icon = inMessage.ReadString();
         offer2.Add(info);
     }
     accepted2 = inMessage.ReadBool();
 }
コード例 #4
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     base.ParseMessage(inMessage);
     particleOid = inMessage.ReadInt64();
     timeToImpact = inMessage.ReadInt32();
     timestamp = inMessage.ReadTimestamp();
     location = inMessage.ReadIntVector();
 }
コード例 #5
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     base.ParseMessage(inMessage);
     particleOid = inMessage.ReadInt64();
     timeToImpact = inMessage.ReadInt32();
     timestamp = inMessage.ReadTimestamp();
     targetSocket = inMessage.ReadString();
 }
コード例 #6
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     questId = inMessage.ReadInt64();
     int numEntries = inMessage.ReadInt32();
     for (int i = 0; i < numEntries; ++i)
         objectives.Add(inMessage.ReadString());
 }
コード例 #7
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     objectId = inMessage.ReadInt64();
 }
コード例 #8
0
        protected override void ParseMessage(IncomingMessage inMessage)
        {
            questId = inMessage.ReadInt64();
            title = inMessage.ReadString();
            description = inMessage.ReadString();
            objective = inMessage.ReadString();
            int rewardCount = inMessage.ReadInt32();
            for (int i = 0; i < rewardCount; ++i) {
                ItemEntry entry = new ItemEntry();
                entry.name = inMessage.ReadString();
                entry.icon = inMessage.ReadString();
                entry.count = inMessage.ReadInt32();

                rewardItems.Add(entry);
            }
        }
コード例 #9
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     base.ParseMessage(inMessage);
     questId = inMessage.ReadInt64();
     accepted = inMessage.ReadBool();
 }
コード例 #10
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     worldId = inMessage.ReadString();
     characterId = inMessage.ReadInt64();
 }
コード例 #11
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     imageName = inMessage.ReadString();
     positionX = inMessage.ReadInt32();
     positionZ = inMessage.ReadInt32();
     sizeX = inMessage.ReadSingle();
     sizeZ = inMessage.ReadSingle();
     rotation = inMessage.ReadSingle();
     priority = inMessage.ReadInt32();
     expireTime = inMessage.ReadInt64();
 }
コード例 #12
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     int numEntries = inMessage.ReadInt32();
     for (int i = 0; i < numEntries; ++i) {
         InventoryUpdateEntry entry = new InventoryUpdateEntry();
         entry.itemId = inMessage.ReadInt64();
         entry.containerId = inMessage.ReadInt32();
         entry.slotId = inMessage.ReadInt32();
         entry.name = inMessage.ReadString();
         entry.icon = inMessage.ReadString();
         entries.Add(entry);
     }
 }
コード例 #13
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     groupId = inMessage.ReadInt64();
     leaderId = inMessage.ReadInt64();
     int numEntries = inMessage.ReadInt32();
     for (int i = 0; i < numEntries; ++i) {
         GroupInfoEntry entry = new GroupInfoEntry();
         entry.memberId = inMessage.ReadInt64();
         entry.memberName = inMessage.ReadString();
         memberList.Add(entry);
     }
 }
コード例 #14
0
 protected override void ParseMessage(IncomingMessage inMessage)
 {
     byte b = inMessage.ReadByte();
     if ((b & 1) != 0)
         targetOid = inMessage.ReadInt64();
     clientTargeted = (b & 2) != 0;
     propertyMap = new PropertyMap();
     propertyMap.ParseMessage(inMessage);
 }