package packet

// Packet types
const (
	PacketType_Unknown0      = iota //
	PacketType_ResetSequence        //
	PacketType_Unknown2             //
	PacketType_Crypto               //
	PacketType_Normal               //
)

// Login / Control packet types
const (
	CPOpcode_HandleGamePacket   = iota // a whoopsi case: not actually a control packet but a game packet
	CPOpcode_ClientStart               // first packet ever sent during client connection
	CPOpcode_ServerStart               // second packet sent in response to ClientStart
	CPOpcode_MultiPacket               // used to send multiple packets with one UDP message (subpackets limited to <= 255)
	CPOpcode_Unknown4                  //
	CPOpcode_TeardownConnection        //
	CPOpcode_Unknown6                  //
	CPOpcode_ControlSync               // sent to the server from the client
	CPOpcode_ControlSyncResp           // the response generated by the server
	CPOpcode_SlottedMetaPacket0        //
	CPOpcode_SlottedMetaPacket1        //
	CPOpcode_SlottedMetaPacket2        //
	CPOpcode_SlottedMetaPacket3        //
	CPOpcode_SlottedMetaPacket4        //
	CPOpcode_SlottedMetaPacket5        //
	CPOpcode_SlottedMetaPacket6        //
	CPOpcode_SlottedMetaPacket7        //
	CPOpcode_RelatedA0                 //
	CPOpcode_RelatedA1                 //
	CPOpcode_RelatedA2                 //
	CPOpcode_RelatedA3                 //
	CPOpcode_RelatedB0                 //
	CPOpcode_RelatedB1                 //
	CPOpcode_RelatedB2                 //
	CPOpcode_RelatedB3                 //
	CPOpcode_MultiPacketEx             // same as MultiPacket but with the ability to send extended length packets
	CPOpcode_Unknown26                 //
	CPOpcode_Unknown27                 //
	CPOpcode_Unknown28                 //
	CPOpcode_ConnectionClose           //
	CPOpcode_Unknown30                 // Probably a more lightweight variant of ClientStart containing only the client nonce
)

const (
	GamePacketOpcode_Unknown0                                  = iota // PPT_NULL in beta client
	GamePacketOpcode_LoginMessage                                     //
	GamePacketOpcode_LoginRespMessage                                 //
	GamePacketOpcode_ConnectToWorldRequestMessage                     // found by searching for 83 F8 03 89 in IDA
	GamePacketOpcode_ConnectToWorldMessage                            //
	GamePacketOpcode_VNLWorldStatusMessage                            //
	GamePacketOpcode_UnknownMessage6                                  // PPT_TRANSFERTOWORLDREQUEST
	GamePacketOpcode_UnknownMessage7                                  // PPT_TRANSFERTOWORLDRESPONSE
	GamePacketOpcode_PlayerStateMessage                               //
	GamePacketOpcode_HitMessage                                       //
	GamePacketOpcode_HitHint                                          //
	GamePacketOpcode_DamageMessage                                    //
	GamePacketOpcode_DestroyMessage                                   //
	GamePacketOpcode_ReloadMessage                                    //
	GamePacketOpcode_MountVehicleMsg                                  //
	GamePacketOpcode_DismountVehicleMsg                               //
	GamePacketOpcode_UseItemMessage                                   //
	GamePacketOpcode_MoveItemMessage                                  //
	GamePacketOpcode_ChatMsg                                          //
	GamePacketOpcode_CharacterNoRecordMessage                         //
	GamePacketOpcode_CharacterInfoMessage                             //
	GamePacketOpcode_UnknownMessage21                                 // PPT_DISCONNECT
	GamePacketOpcode_BindPlayerMessage                                //
	GamePacketOpcode_ObjectCreateMessage_Duplicate                    // PPT_OBJECTCREATE
	GamePacketOpcode_ObjectCreateMessage                              // PPT_OBJECTCREATEDETAILED
	GamePacketOpcode_ObjectDeleteMessage                              //
	GamePacketOpcode_PingMsg                                          //
	GamePacketOpcode_VehicleStateMessage                              //
	GamePacketOpcode_FrameVehicleStateMessage                         //
	GamePacketOpcode_GenericObjectStateMsg                            //
	GamePacketOpcode_ChildObjectStateMessage                          //
	GamePacketOpcode_ActionResultMessage                              //
	GamePacketOpcode_UnknownMessage32                                 // PPT_ACTIONBEGIN
	GamePacketOpcode_ActionProgressMessage                            //
	GamePacketOpcode_ActionCancelMessage                              //
	GamePacketOpcode_ActionCancelAcknowledgeMessage                   //
	GamePacketOpcode_SetEmpireMessage                                 //
	GamePacketOpcode_EmoteMsg                                         //
	GamePacketOpcode_UnuseItemMessage                                 //
	GamePacketOpcode_ObjectDetachMessage                              //
	GamePacketOpcode_CreateShortcutMessage                            //
	GamePacketOpcode_ChangeShortcutBankMessage                        //
	GamePacketOpcode_ObjectAttachMessage                              //
	GamePacketOpcode_UnknownMessage43                                 // PPT_OBJECTEMPTY
	GamePacketOpcode_PlanetsideAttributeMessage                       //
	GamePacketOpcode_RequestDestroyMessage                            //
	GamePacketOpcode_UnknownMessage46                                 // PPT_EQUIPITEM
	GamePacketOpcode_CharacterCreateRequestMessage                    //
	GamePacketOpcode_CharacterRequestMessage                          //
	GamePacketOpcode_LoadMapMessage                                   //
	GamePacketOpcode_SetCurrentAvatarMessage                          //
	GamePacketOpcode_ObjectHeldMessage                                //
	GamePacketOpcode_WeaponFireMessage                                //
	GamePacketOpcode_AvatarJumpMessage                                //
	GamePacketOpcode_PickupItemMessage                                //
	GamePacketOpcode_DropItemMessage                                  //
	GamePacketOpcode_InventoryStateMessage                            //
	GamePacketOpcode_ChangeFireStateMessage_Start                     //
	GamePacketOpcode_ChangeFireStateMessage_Stop                      //
	GamePacketOpcode_UnknownMessage59                                 //
	GamePacketOpcode_GenericCollisionMsg                              //
	GamePacketOpcode_QuantityUpdateMessage                            //
	GamePacketOpcode_ArmorChangedMessage                              //
	GamePacketOpcode_ProjectileStateMessage                           //
	GamePacketOpcode_MountVehicleCargoMsg                             //
	GamePacketOpcode_DismountVehicleCargoMsg                          //
	GamePacketOpcode_CargoMountPointStatusMessage                     //
	GamePacketOpcode_BeginZoningMessage                               //
	GamePacketOpcode_ItemTransactionMessage                           //
	GamePacketOpcode_ItemTransactionResultMessage                     //
	GamePacketOpcode_ChangeFireModeMessage                            //
	GamePacketOpcode_ChangeAmmoMessage                                //
	GamePacketOpcode_TimeOfDayMessage                                 //
	GamePacketOpcode_UnknownMessage73                                 // PPT_PROJECTILE_EVENT_BLOCK
	GamePacketOpcode_SpawnRequestMessage                              //
	GamePacketOpcode_DeployRequestMessage                             //
	GamePacketOpcode_UnknownMessage76                                 // PPT_BUILDINGSTATECHANGED
	GamePacketOpcode_RepairMessage                                    //
	GamePacketOpcode_ServerVehicleOverrideMsg                         //
	GamePacketOpcode_LashMessage                                      //
	GamePacketOpcode_TargetingInfoMessage                             //
	GamePacketOpcode_TriggerEffectMessage                             //
	GamePacketOpcode_WeaponDryFireMessage                             //
	GamePacketOpcode_DroppodLaunchRequestMessage                      //
	GamePacketOpcode_HackMessage                                      //
	GamePacketOpcode_DroppodLaunchResponseMessage                     //
	GamePacketOpcode_GenericObjectActionMessage                       //
	GamePacketOpcode_AvatarVehicleTimerMessage                        //
	GamePacketOpcode_AvatarImplantMessage                             //
	GamePacketOpcode_UnknownMessage89                                 // PPT_SEARCHMESSAGE
	GamePacketOpcode_DelayedPathMountMsg                              //
	GamePacketOpcode_OrbitalShuttleTimeMsg                            //
	GamePacketOpcode_AIDamage                                         //
	GamePacketOpcode_DeployObjectMessage                              //
	GamePacketOpcode_FavoritesRequest                                 //
	GamePacketOpcode_FavoritesResponse                                //
	GamePacketOpcode_FavoritesMessage                                 //
	GamePacketOpcode_ObjectDetectedMessage                            //
	GamePacketOpcode_SplashHitMessage                                 //
	GamePacketOpcode_SetChatFilterMessage                             //
	GamePacketOpcode_AvatarSearchCriteriaMessage                      //
	GamePacketOpcode_AvatarSearchResponse                             //
	GamePacketOpcode_WeaponJammedMessage                              //
	GamePacketOpcode_LinkDeadAwarenessMsg                             //
	GamePacketOpcode_DroppodFreefallingMessage                        //
	GamePacketOpcode_AvatarFirstTimeEventMessage                      //
	GamePacketOpcode_AggravatedDamageMessage                          //
	GamePacketOpcode_TriggerSoundMessage                              //
	GamePacketOpcode_LootItemMessage                                  //
	GamePacketOpcode_VehicleSubStateMessage                           //
	GamePacketOpcode_SquadMembershipRequest                           //
	GamePacketOpcode_SquadMembershipResponse                          //
	GamePacketOpcode_SquadMemberEvent                                 //
	GamePacketOpcode_PlatoonEvent                                     //
	GamePacketOpcode_FriendsRequest                                   //
	GamePacketOpcode_FriendsResponse                                  //
	GamePacketOpcode_TriggerEnvironmentalDamageMessage                //
	GamePacketOpcode_TrainingZoneMessage                              //
	GamePacketOpcode_DeployableObjectsInfoMessage                     //
	GamePacketOpcode_SquadState                                       //
	GamePacketOpcode_OxygenStateMessage                               //
	GamePacketOpcode_TradeMessage                                     //
	GamePacketOpcode_UnknownMessage122                                //
	GamePacketOpcode_DamageFeedbackMessage                            //
	GamePacketOpcode_DismountBuildingMsg                              //
	GamePacketOpcode_UnknownMessage125                                // PPT_MOUNTBUILDING
	GamePacketOpcode_UnknownMessage126                                // PPT_INTENDEDDROPZONE
	GamePacketOpcode_AvatarStatisticsMessage                          //
	GamePacketOpcode_GenericObjectAction2Message                      //
	GamePacketOpcode_DestroyDisplayMessage                            //
	GamePacketOpcode_TriggerBotAction                                 //
	GamePacketOpcode_SquadWaypointRequest                             //
	GamePacketOpcode_SquadWaypointEvent                               //
	GamePacketOpcode_OffshoreVehicleMessage                           //
	GamePacketOpcode_ObjectDeployedMessage                            //
	GamePacketOpcode_ObjectDeployedCountMessage                       //
	GamePacketOpcode_WeaponDelayFireMessage                           //
	GamePacketOpcode_BugReportMessage                                 //
	GamePacketOpcode_PlayerStasisMessage                              //
	GamePacketOpcode_UnknownMessage139                                //
	GamePacketOpcode_OutfitMembershipRequest                          //
	GamePacketOpcode_OutfitMembershipResponse                         //
	GamePacketOpcode_OutfitRequest                                    //
	GamePacketOpcode_OutfitEvent                                      //
	GamePacketOpcode_OutfitMemberEvent                                //
	GamePacketOpcode_OutfitMemberUpdate                               //
	GamePacketOpcode_PlanetsideStringAttributeMessage                 //
	GamePacketOpcode_DataChallengeMessage                             //
	GamePacketOpcode_DataChallengeMessageResp                         //
	GamePacketOpcode_WeatherMessage                                   //
	GamePacketOpcode_SimDataChallenge                                 //
	GamePacketOpcode_SimDataChallengeResp                             //
	GamePacketOpcode_OutfitListEvent                                  //
	GamePacketOpcode_EmpireIncentivesMessage                          //
	GamePacketOpcode_InvalidTerrainMessage                            //
	GamePacketOpcode_SyncMessage                                      //
	GamePacketOpcode_DebugDrawMessage                                 //
	GamePacketOpcode_SoulMarkMessage                                  //
	GamePacketOpcode_UplinkPositionEvent                              //
	GamePacketOpcode_HotSpotUpdateMessage                             //
	GamePacketOpcode_BuildingInfoUpdateMessage                        //
	GamePacketOpcode_FireHintMessage                                  //
	GamePacketOpcode_UplinkRequest                                    //
	GamePacketOpcode_UplinkResponse                                   //
	GamePacketOpcode_WarpgateRequest                                  //
	GamePacketOpcode_WarpgateResponse                                 //
	GamePacketOpcode_DamageWithPositionMessage                        //
	GamePacketOpcode_GenericActionMessage                             //
	GamePacketOpcode_ContinentalLockUpdateMessage                     //
	GamePacketOpcode_AvatarGrenadeStateMessage                        //
	GamePacketOpcode_UnknownMessage170                                //
	GamePacketOpcode_UnknownMessage171                                //
	GamePacketOpcode_ReleaseAvatarRequestMessage                      //
	GamePacketOpcode_AvatarDeadStateMessage                           //
	GamePacketOpcode_CSAssistMessage                                  //
	GamePacketOpcode_CSAssistCommentMessage                           //
	GamePacketOpcode_VoiceHostRequest                                 //
	GamePacketOpcode_VoiceHostKill                                    //
	GamePacketOpcode_VoiceHostInfo                                    //
	GamePacketOpcode_BattleplanMessage                                //
	GamePacketOpcode_BattleExperienceMessage                          //
	GamePacketOpcode_TargetingImplantRequest                          //
	GamePacketOpcode_ZonePopulationUpdateMessage                      //
	GamePacketOpcode_DisconnectMessage                                //
	GamePacketOpcode_ExperienceAddedMessage                           //
	GamePacketOpcode_OrbitalStrikeWaypointMessage                     //
	GamePacketOpcode_KeepAliveMessage                                 //
	GamePacketOpcode_MapObjectStateBlockMessage                       //
	GamePacketOpcode_SnoopMsg                                         //
	GamePacketOpcode_PlayerStateMessageUpstream                       //
	GamePacketOpcode_PlayerStateShiftMessage                          //
	GamePacketOpcode_ZipLineMessage                                   //
	GamePacketOpcode_CaptureFlagUpdateMessage                         //
	GamePacketOpcode_VanuModuleUpdateMessage                          //
	GamePacketOpcode_FacilityBenefitShieldChargeRequestMessage        //
	GamePacketOpcode_ProximityTerminalUseMessage                      //
	GamePacketOpcode_QuantityDeltaUpdateMessage                       //
	GamePacketOpcode_ChainLashMessage                                 //
	GamePacketOpcode_ZoneInfoMessage                                  //
	GamePacketOpcode_LongRangeProjectileInfoMessage                   //
	GamePacketOpcode_WeaponLazeTargetPositionMessage                  //
	GamePacketOpcode_ModuleLimitsMessage                              //
	GamePacketOpcode_OutfitBenefitMessage                             //
	GamePacketOpcode_EmpireChangeTimeMessage                          //
	GamePacketOpcode_ClockCalibrationMessage                          //
	GamePacketOpcode_DensityLevelUpdateMessage                        //
	GamePacketOpcode_ActOfGodMessage                                  //
	GamePacketOpcode_AvatarAwardMessage                               //
	GamePacketOpcode_UnknownMessage208                                //
	GamePacketOpcode_DisplayedAwardMessage                            //
	GamePacketOpcode_RespawnAMSInfoMessage                            //
	GamePacketOpcode_ComponentDamageMessage                           //
	GamePacketOpcode_GenericObjectActionAtPositionMessage             //
	GamePacketOpcode_PropertyOverrideMessage                          //
	GamePacketOpcode_WarpgateLinkOverrideMessage                      //
	GamePacketOpcode_EmpireBenefitsMessage                            //
	GamePacketOpcode_ForceEmpireMessage                               //
	GamePacketOpcode_BroadcastWarpgateUpdateMessage                   //
	GamePacketOpcode_UnknownMessage218                                //
	GamePacketOpcode_SquadMainTerminalMessage                         //
	GamePacketOpcode_SquadMainTerminalResponseMessage                 //
	GamePacketOpcode_SquadOrderMessage                                //
	GamePacketOpcode_SquadOrderResponse                               //
	GamePacketOpcode_ZoneLockInfoMessage                              //
	GamePacketOpcode_SquadBindInfoMessage                             //
	GamePacketOpcode_AudioSequenceMessage                             //
	GamePacketOpcode_SquadFacilityBindInfoMessage                     //
	GamePacketOpcode_ZoneForcedCavernConnectionsMessage               //
	GamePacketOpcode_MissionActionMessage                             //
	GamePacketOpcode_MissionKillTriggerMessage                        //
	GamePacketOpcode_ReplicationStreamMessage                         //
	GamePacketOpcode_SquadDefinitionActionMessage                     //
	GamePacketOpcode_SquadDetailDefinitionUpdateMessage               //
	GamePacketOpcode_TacticsMessage                                   //
	GamePacketOpcode_RabbitUpdateMessage                              //
	GamePacketOpcode_SquadInvitationRequestMessage                    //
	GamePacketOpcode_CharacterKnowledgeMessage                        //
	GamePacketOpcode_GameScoreUpdateMessage                           //
	GamePacketOpcode_UnknownMessage238                                //
	GamePacketOpcode_OrderTerminalBugMessage                          //
	GamePacketOpcode_QueueTimedHelpMessage                            //
	GamePacketOpcode_MailMessage                                      //
	GamePacketOpcode_GameVarUpdate                                    //
	GamePacketOpcode_ClientCheatedMessage                             // last known message type (243 0xf3)
)

const (
	CryptoPacketOpcode_Ignore              = iota //
	CryptoPacketOpcode_ClientChallengeXchg        //
	CryptoPacketOpcode_ServerChallengeXchg        //
	CryptoPacketOpcode_ClientFinished             //
	CryptoPacketOpcode_ServerFinished             //
)

const (
	ResetSequencePacketOpcode_ResetSequence = iota //
)
