Improved PacketStructure

To avoid creating a function on each new instance, and moved functions
inside loops, outside.

You might want to try and test if there is nothing breaking. 272 packets were changed.

- [x] PACKET.CA.LOGIN
- [x] PACKET.CH.ENTER
- [x] PACKET.CH.SELECT_CHAR
- [x] PACKET.CH.MAKE_CHAR
- [x] PACKET.CH.DELETE_CHAR
- [x] PACKET.CZ.ENTER
- [x] PACKET.CZ.NOTIFY_ACTORINIT
- [x] PACKET.CZ.REQUEST_TIME
- [x] PACKET.CZ.REQUEST_QUIT
- [x] PACKET.CZ.REQUEST_MOVE
- [x] PACKET.CZ.REQUEST_ACT
- [x] PACKET.CZ.REQUEST_CHAT
- [x] PACKET.CZ.CONTACTNPC
- [x] PACKET.CZ.REQNAME
- [x] PACKET.CZ.WHISPER
- [x] PACKET.CZ.BROADCAST
- [x] PACKET.CZ.CHANGE_DIRECTION
- [x] PACKET.CZ.ITEM_PICKUP
- [x] PACKET.CZ.ITEM_THROW
- [x] PACKET.CZ.USE_ITEM
- [x] PACKET.CZ.REQ_WEAR_EQUIP
- [x] PACKET.CZ.REQ_TAKEOFF_EQUIP
- [x] PACKET.CZ.RESTART
- [x] PACKET.CZ.CHOOSE_MENU
- [x] PACKET.CZ.REQ_NEXT_SCRIPT
- [x] PACKET.CZ.REQ_STATUS
- [x] PACKET.CZ.STATUS_CHANGE
- [x] PACKET.CZ.REQ_EMOTION
- [x] PACKET.CZ.REQ_USER_COUNT
- [x] PACKET.CZ.ACK_SELECT_DEALTYPE
- [x] PACKET.CZ.PC_PURCHASE_ITEMLIST
- [x] PACKET.CZ.PC_SELL_ITEMLIST
- [x] PACKET.CZ.DISCONNECT_CHARACTER
- [x] PACKET.CZ.DISCONNECT_ALL_CHARACTER
- [x] PACKET.CZ.SETTING_WHISPER_PC
- [x] PACKET.CZ.SETTING_WHISPER_STATE
- [x] PACKET.CZ.REQ_WHISPER_LIST
- [x] PACKET.CZ.CREATE_CHATROOM
- [x] PACKET.CZ.REQ_ENTER_ROOM
- [x] PACKET.CZ.CHANGE_CHATROOM
- [x] PACKET.CZ.REQ_ROLE_CHANGE
- [x] PACKET.CZ.REQ_EXPEL_MEMBER
- [x] PACKET.CZ.EXIT_ROOM
- [x] PACKET.CZ.REQ_EXCHANGE_ITEM
- [x] PACKET.CZ.ACK_EXCHANGE_ITEM
- [x] PACKET.CZ.ADD_EXCHANGE_ITEM
- [x] PACKET.CZ.CONCLUDE_EXCHANGE_ITEM
- [x] PACKET.CZ.CANCEL_EXCHANGE_ITEM
- [x] PACKET.CZ.EXEC_EXCHANGE_ITEM
- [x] PACKET.CZ.MOVE_ITEM_FROM_BODY_TO_STORE
- [x] PACKET.CZ.MOVE_ITEM_FROM_STORE_TO_BODY
- [x] PACKET.CZ.CLOSE_STORE
- [x] PACKET.CZ.MAKE_GROUP
- [x] PACKET.CZ.REQ_JOIN_GROUP
- [x] PACKET.CZ.JOIN_GROUP
- [x] PACKET.CZ.REQ_LEAVE_GROUP
- [x] PACKET.CZ.CHANGE_GROUPEXPOPTION
- [x] PACKET.CZ.REQ_EXPEL_GROUP_MEMBER
- [x] PACKET.CZ.REQUEST_CHAT_PARTY
- [x] PACKET.CZ.UPGRADE_SKILLLEVEL
- [x] PACKET.CZ.USE_SKILL
- [x] PACKET.CZ.USE_SKILL_TOGROUND
- [x] PACKET.CZ.CANCEL_LOCKON
- [x] PACKET.CZ.SELECT_WARPPOINT
- [x] PACKET.CZ.REMEMBER_WARPPOINT
- [x] PACKET.CZ.MOVE_ITEM_FROM_BODY_TO_CART
- [x] PACKET.CZ.MOVE_ITEM_FROM_CART_TO_BODY
- [x] PACKET.CZ.MOVE_ITEM_FROM_STORE_TO_CART
- [x] PACKET.CZ.MOVE_ITEM_FROM_CART_TO_STORE
- [x] PACKET.CZ.REQ_CARTOFF
- [x] PACKET.CZ.REQ_CLOSESTORE
- [x] PACKET.CZ.REQ_OPENSTORE
- [x] PACKET.CZ.REQ_BUY_FROMMC
- [x] PACKET.CZ.PC_PURCHASE_ITEMLIST_FROMMC
- [x] PACKET.CZ.PKMODE_CHANGE
- [x] PACKET.CZ.ITEM_CREATE
- [x] PACKET.CZ.MOVETO_MAP
- [x] PACKET.CZ.INPUT_EDITDLG
- [x] PACKET.CZ.CLOSE_DIALOG
- [x] PACKET.CZ.REQ_GIVE_MANNER_POINT
- [x] PACKET.CZ.REQ_GUILD_MENUINTERFACE
- [x] PACKET.CZ.REQ_GUILD_MENU
- [x] PACKET.CZ.REQ_GUILD_EMBLEM_IMG
- [x] PACKET.CZ.REGISTER_GUILD_EMBLEM_IMG
- [x] PACKET.CZ.REQ_CHANGE_MEMBERPOS
- [x] PACKET.CZ.REQ_OPEN_MEMBER_INFO
- [x] PACKET.CZ.REQ_LEAVE_GUILD
- [x] PACKET.CZ.REQ_BAN_GUILD
- [x] PACKET.CZ.REQ_DISORGANIZE_GUILD
- [x] PACKET.CZ.REG_CHANGE_GUILD_POSITIONINFO
- [x] PACKET.CZ.REQ_MAKE_GUILD
- [x] PACKET.CZ.REQ_JOIN_GUILD
- [x] PACKET.CZ.JOIN_GUILD
- [x] PACKET.CZ.GUILD_NOTICE
- [x] PACKET.CZ.REQ_ALLY_GUILD
- [x] PACKET.CZ.ALLY_GUILD
- [x] PACKET.CZ.REQ_GUILD_MEMBER_INFO
- [x] PACKET.CZ.REQ_ITEMIDENTIFY
- [x] PACKET.CZ.REQ_ITEMCOMPOSITION_LIST
- [x] PACKET.CZ.REQ_ITEMCOMPOSITION
- [x] PACKET.CZ.GUILD_CHAT
- [x] PACKET.CZ.REQ_HOSTILE_GUILD
- [x] PACKET.CZ.REQ_DELETE_RELATED_GUILD
- [x] PACKET.CZ.PING
- [x] PACKET.CZ.PING.size
- [x] PACKET.CZ.REQMAKINGITEM
- [x] PACKET.CZ.USE_SKILL_TOGROUNDMoreInfo
- [x] PACKET.CZ.REQNAME_BYGID
- [x] PACKET.CZ.RESET
- [x] PACKET.CZ.CHANGE_MAPTYPE
- [x] PACKET.CZ.LOCALBROADCAST
- [x] PACKET.CZ.CHANGE_EFFECTSTATE
- [x] PACKET.CZ.TRYCAPTURE_MONSTER
- [x] PACKET.CZ.COMMAND_PET
- [x] PACKET.CZ.RENAME_PET
- [x] PACKET.CZ.SELECT_PETEGG
- [x] PACKET.CZ.PETEGG_INFO
- [x] PACKET.CZ.PET_ACT
- [x] PACKET.CZ.REQ_MAKINGARROW
- [x] PACKET.CZ.REQ_CHANGECART
- [x] PACKET.CZ.REQ_OPENSTORE2
- [x] PACKET.CZ.GUILD_ZENY
- [x] PACKET.CZ.REMOVE_AID
- [x] PACKET.CZ.SHIFT
- [x] PACKET.CZ.RECALL
- [x] PACKET.CZ.RECALL_GID
- [x] PACKET.CA.REPLY_PNGAMEROOM
- [x] PACKET.CZ.REQ_REMAINTIME
- [x] PACKET.CS.REQ_ENCRYPTION
- [x] PACKET.CZ.REQMAKINGHOMUN
- [x] PACKET.CZ.MONSTER_TALK
- [x] PACKET.CZ.SELECTAUTOSPELL
- [x] PACKET.CZ.INPUT_EDITDLGSTR
- [x] PACKET.CA.REQ_HASH
- [x] PACKET.CA.LOGIN2
- [x] PACKET.CZ.REQ_ACCOUNTNAME
- [x] PACKET.CZ.JOIN_COUPLE
- [x] PACKET.CZ.REQ_JOIN_COUPLE
- [x] PACKET.CZ.DORIDORI
- [x] PACKET.CZ.MAKE_GROUP2
- [x] PACKET.CZ.CHOPOKGI
- [x] PACKET.CZ.JOIN_BABY
- [x] PACKET.CZ.REQ_JOIN_BABY
- [x] PACKET.CA.LOGIN3
- [x] PACKET.CH.DELETE_CHAR2
- [x] PACKET.CZ.REQ_ITEMREPAIR
- [x] PACKET.CA.CONNECT_INFO_CHANGED
- [x] PACKET.CZ.ADD_FRIENDS
- [x] PACKET.CZ.DELETE_FRIENDS
- [x] PACKET.CA.EXE_HASHCHECK
- [x] PACKET.CZ.ACK_REQ_ADD_FRIENDS
- [x] PACKET.CH.EXE_HASHCHECK
- [x] PACKET.CZ.EXE_HASHCHECK
- [x] PACKET.CZ.REQ_PVPPOINT
- [x] PACKET.CZ.REQ_GIVE_MANNER_BYNAME
- [x] PACKET.CZ.REQ_STATUS_GM
- [x] PACKET.CZ.BLACKSMITH_RANK
- [x] PACKET.CZ.ALCHEMIST_RANK
- [x] PACKET.CZ.LESSEFFECT
- [x] PACKET.CZ.REQ_WEAPONREFINE
- [x] PACKET.CZ.TAEKWON_RANK
- [x] PACKET.CZ.ACK_GAME_GUARD
- [x] PACKET.CZ.COMMAND_MER
- [x] PACKET.CZ.RENAME_MER
- [x] PACKET.CZ.REQUEST_MOVENPC
- [x] PACKET.CZ.REQUEST_ACTNPC
- [x] PACKET.CZ.REQUEST_MOVETOOWNER
- [x] PACKET.CZ.RANKING_PK
- [x] PACKET.CZ.ACK_STORE_PASSWORD
- [x] PACKET.CZ.MAIL_GET_LIST
- [x] PACKET.CZ.MAIL_OPEN
- [x] PACKET.CZ.MAIL_DELETE
- [x] PACKET.CZ.MAIL_GET_ITEM
- [x] PACKET.CZ.MAIL_RESET_ITEM
- [x] PACKET.CZ.MAIL_ADD_ITEM
- [x] PACKET.CZ.MAIL_SEND
- [x] PACKET.CZ.AUCTION_CREATE
- [x] PACKET.CZ.AUCTION_ADD_ITEM
- [x] PACKET.CZ.AUCTION_ADD
- [x] PACKET.CZ.AUCTION_ADD_CANCEL
- [x] PACKET.CZ.AUCTION_BUY
- [x] PACKET.CZ.AUCTION_ITEM_SEARCH
- [x] PACKET.CZ.AGREE_STARPLACE
- [x] PACKET.CA.REQ_GAME_GUARD_CHECK
- [x] PACKET.CZ.REQ_MAKINGITEM
- [x] PACKET.CZ.AUCTION_REQ_MY_INFO
- [x] PACKET.CZ.AUCTION_REQ_MY_SELL_STOP
- [x] PACKET.CA.ACK_LOGIN_OLDEKEY
- [x] PACKET.CA.ACK_LOGIN_NEWEKEY
- [x] PACKET.CA.ACK_LOGIN_CARDPASS
- [x] PACKET.CA.ACK_LOGIN_ACCOUNT_INFO
- [x] PACKET.CZ.REQ_MAIL_RETURN
- [x] PACKET.CH.ENTER2
- [x] PACKET.CA.LOGIN_PCBANG
- [x] PACKET.CZ.HUNTINGLIST
- [x] PACKET.CA.LOGIN4
- [x] PACKET.CA.CLIENT_TYPE
- [x] PACKET.CZ.GANGSI_RANK
- [x] PACKET.CZ.DEATH_QUESTION
- [x] PACKET.CZ.PC_BUY_CASH_POINT_ITEM
- [x] PACKET.CH.SELECT_CHAR_GOINGTOBEUSED
- [x] PACKET.CH.REQ_IS_VALID_CHARNAME
- [x] PACKET.CH.REQ_CHANGE_CHARNAME
- [x] PACKET.CZ.STANDING_RESURRECTION
- [x] PACKET.CZ.MER_COMMAND
- [x] PACKET.CZ.KSY_EVENT
- [x] PACKET.CZ.ACK_CASH_PASSWORD
- [x] PACKET.CA.LOGIN_HAN
- [x] PACKET.CZ.ACTIVE_QUEST
- [x] PACKET.CZ.SHORTCUT_KEY_CHANGE
- [x] PACKET.CZ.SRPACKETR2_START
- [x] PACKET.CZ.PARTY_JOIN_REQ
- [x] PACKET.CZ.PARTY_JOIN_REQ_ACK
- [x] PACKET.CZ.PARTY_CONFIG
- [x] PACKET.CZ.MEMORIALDUNGEON_COMMAND
- [x] PACKET.CZ.EQUIPWIN_MICROSCOPE
- [x] PACKET.CZ.CONFIG
- [x] PACKET.CZ.BATTLEFIELD_CHAT
- [x] PACKET.CZ.BOT_CHECK
- [x] PACKET.CZ.PROGRESS
- [x] PACKET.CZ.OPEN_SIMPLE_CASHSHOP_ITEMLIST
- [x] PACKET.CZ.CLOSE_WINDOW
- [x] PACKET.CZ.REQUEST_MOVE2
- [x] PACKET.CZ.ENTER2
- [x] PACKET.CZ.REQUEST_ACT2
- [x] PACKET.CZ.USE_SKILL2
- [x] PACKET.CZ.USE_ITEM2
- [x] PACKET.CZ.SKILL_SELECT_RESPONSE
- [x] PACKET.CZ.SIMPLE_BUY_CASH_POINT_ITEM
- [x] PACKET.CZ.BLOCKING_PLAY_CANCEL
- [x] PACKET.CZ.CLIENT_VERSION
- [x] PACKET.CZ.CLOSE_SIMPLECASH_SHOP
- [x] PACKET.CZ.ES_GET_LIST
- [x] PACKET.CZ.ES_CHOOSE
- [x] PACKET.CZ.ES_CANCEL
- [x] PACKET.CZ.GROUPINFO_CHANGE_V2
- [x] PACKET.CZ.CHANGE_GROUP_MASTER
- [x] PACKET.CZ.SEEK_PARTY
- [x] PACKET.CZ.SEEK_PARTY_MEMBER
- [x] PACKET.CZ.ITEMLISTWIN_RES
- [x] PACKET.CH.ENTER_CHECKBOT
- [x] PACKET.CH.CHECKBOT
- [x] PACKET.CZ.BATTLE_FIELD_LIST
- [x] PACKET.CZ.JOIN_BATTLE_FIELD
- [x] PACKET.CZ.CANCEL_BATTLE_FIELD
- [x] PACKET.CZ.REQ_BATTLE_STATE_MONITOR
- [x] PACKET.CZ.GM_FULLSTRIP
- [x] PACKET.CZ.PC_PURCHASE_ITEMLIST_FROMMC2
- [x] PACKET.CZ.PARTY_BOOKING_REQ_REGISTER
- [x] PACKET.CZ.PARTY_BOOKING_REQ_SEARCH
- [x] PACKET.CZ.PARTY_BOOKING_REQ_DELETE
- [x] PACKET.CZ.PARTY_BOOKING_REQ_UPDATE
- [x] PACKET.CZ.SIMPLE_CASH_BTNSHOW
- [x] PACKET.CZ.REQ_OPEN_BUYING_STORE
- [x] PACKET.CZ.REQ_CLOSE_BUYING_STORE
- [x] PACKET.CZ.REQ_CLICK_TO_BUYING_STORE
- [x] PACKET.CZ.REQ_TRADE_BUYING_STORE
- [x] PACKET.CA.OTP_AUTH_REQ
- [x] PACKET.CA.SSO_LOGIN_REQa
- [x] PACKET.CA.SSO_LOGIN_REQ
- [x] PACKET.CH.DELETE_CHAR3_RESERVED
- [x] PACKET.CH.DELETE_CHAR3
- [x] PACKET.CH.DELETE_CHAR3_CANCEL
- [x] PACKET.CZ.SEARCH_STORE_INFO
- [x] PACKET.CZ.SEARCH_STORE_INFO_NEXT_PAGE
- [x] PACKET.CZ.CLOSE_SEARCH_STORE_INFO
- [x] PACKET.CZ.SSILIST_ITEM_CLICK
- [x] PACKET.CH.SELECT_ACCESSIBLE_MAPNAME
- [x] PACKET.CZ.REMOVE_AID_SSO
- [x] PACKET.CH.MAKE_CHAR2