Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var packets = {
- // Unused in SkyFire, intended for auth verification.
- CMSG_AUTH_SESSION: {
- digest: 7+4+1+8+4+1+1+2, seed: u32, digest2: 4+6,
- build: u16, digest3: 1+1+4+2,
- addonTable: array(u32, u8), account: cString
- },
- CMSG_CHAR_ENUM: {},
- CMSG_PLAYER_LOGIN: GUID,
- CMSG_MESSAGECHAT_SAY: {lang: u32, msg: cString},
- CMSG_MESSAGECHAT_WHISPER: {lang: u32, message: cString, name: cString},
- CMSG_GOSSIP_HELLO: {guid: GUID},
- CMSG_QUESTGIVER_HELLO: {guid: GUID},
- CMSG_QUESTGIVER_ACCEPT_QUEST: {guid: GUID, quest: u32, unk: u32},
- CMSG_QUESTGIVER_QUERY_QUEST: {guid: GUID, quest: u32, unk: u8},
- CMSG_QUESTGIVER_CHOOSE_REWARD: {guid: GUID, quest: u32, reward: u32},
- CMSG_QUESTGIVER_REQUEST_REWARD: {guid: GUID, quest: u32},
- CMSG_QUESTGIVER_CANCEL: {},
- CMSG_QUESTGIVER_COMPLETE_QUEST: {guid: GUID, quest: u32, unk: u8},
- CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY: {},
- CMSG_QUEST_QUERY: u32,
- CMSG_QUEST_COMFIRM_ACCEPT: {quest: u32},
- CMSG_START_QUEST: {unk: u32, quest: u32},
- MSG_LIST_STABLED_PETS: {guid: GUID, $num: u8, unk: u8, pets: array('$num', {
- slot: u8, number: u32, entry: u32,
- level: u16, name: cString, stable: u8
- })},
- // Unused in SkyFire, intended for auth verification.
- SMSG_AUTH_CHALLENGE: {seed1: 16, unk: u8, seed: u8, seed2: 16},
- SMSG_AUTH_RESPONSE: {
- code: u8,
- billingTimeRemaining: u32, billingPlanFlags: u8, billingTimeRested: u32,
- clientExpansion: u8, serverExpansion: u8
- },
- SMSG_CHAR_ENUM: array(u8, {
- guid: GUID,
- name: cString,
- race: u8, class: u8, gender: u8,
- skin: u8, face: u8, hairStyle: u8, hairColor: u8, facialHair: u8,
- level: u8,
- zone: u32, map: u32,
- x: float, y: float, z: float,
- guild: GUID,
- flags: u32,
- customize: u32,
- firstLogin: u8,
- petDisplayID: u32, petLevel: u32, petFamily: u32,
- equipment: array(19, filter({displayInfoID: u32, inventoryType: u8, enchant: u32}, function(x) {
- return x.displayInfoID ? x : null;
- })),
- //HACK Not filled in SkyFire.
- $bags: array(4, {displayInfoID: u32, inventoryType: u8, enchant: u32})
- }),
- SMSG_INITIALIZE_FACTIONS: array(u32, filter({flags: u8, standing: u32}, function(x) {
- return x.flags ? x : null;
- })),
- SMSG_ACTION_BUTTONS: {type: u8,
- butons: eq('type', 2, null, array(wow.MAX_ACTION_BUTTONS, filter(u32, function(x) {
- return x || null;
- })))
- },
- SMSG_EQUIPMENT_SET_LIST: array(u32, {
- guid: packGUID, idx: u32, name: cString, iconName: cString,
- slots: array(19, packGUID)
- }),
- SMSG_INIT_WORLD_STATES: {map: u32, zone: u32, area: u32, fields: array(filter(u16, function(x) {
- // HACK SkyFire sends num=8 for 5 fields.
- return Math.min(x, Math.floor((this._stream._buffer.length-this._stream._pos)/8));
- }), [u32, u32])},
- SMSG_UPDATE_WORLD_STATE: [u32, u32],
- SMSG_LEARNED_DANCE_MOVES: u64,
- SMSG_PLAY_SOUND: u32,
- SMSG_EMOTE: {anim: u32, guid: GUID},
- SMSG_WEATHER: {state: u32, grade: float, unk: u8},
- SMSG_MOTD: /*lines*/array(u32, cString),
- SMSG_GOSSIP_MESSAGE: {
- guid: GUID, menuID: u32, titleTextID: u32,
- menus: array(u32, {id: u32, icon: u8, isCoded: bool, boxMoney: u32, message: cString, boxMessage: cString}),
- quests: array(u32, {id: u32, icon: u32, level: i32, flags: u32, unk: u8, title: cString})
- },
- SMSG_GOSSIP_COMPLETE: {},
- SMSG_QUESTGIVER_QUEST_DETAILS: {
- guid: GUID, unk1: u64, id: u32,
- title: cString, details: cString, objectives: cString,
- targetText: cString, targetName: cString, unk2: u16, targetDisplayID: u32,
- unk3: u32, autoFinish: bool, flags: u32, suggestedPlayers: u32,
- unk4: u8, questStartType: u8, requiredSpell: u32,
- rewardChoicesCount: u32, rewardChoices: array(wow.QUEST_REWARD_CHOICES_COUNT, {itemID: u32, count: u32, displayID: u32}),
- rewardsCount: u32, rewards: array(wow.QUEST_REWARDS_COUNT, {itemID: u32, count: u32, displayID: u32}),
- rewardMoney: u32, xp: u32, charTitleID: u32, unk5: [u32, u32],
- bonusTalents: u32, unk6: [u32, u32],
- reputations: array(wow.QUEST_REPUTATIONS_COUNT, {faction: u32, valueID: i32, value: i32}),
- rewardSpellCast: i32, unk7: u32,
- currencies: array(wow.QUEST_CURRENCY_COUNT, {id: u32, count: u32}),
- unk8: [u32, u32],
- emotes: array(u32, {emote: u32, delay: u32})
- },
- SMSG_QUESTGIVER_OFFER_REWARD: {
- guid: GUID, id: u32,
- title: cString, offerReward: cString,
- questGiverTextWindow: cString, questGiverName: cString,
- questCompleteTextWindow: cString, questCompleteName: cString,
- questGiverPortrait: u32, questTurnInPortrait: u32,
- autoFinish: bool, flags: u32, suggestedPlayers: u32,
- emotes: array(u32, {delay: u32, emote: u32}),
- rewardChoicesCount: u32, rewardChoices: array(wow.QUEST_REWARD_CHOICES_COUNT, {itemID: u32, count: u32, displayID: u32}),
- rewardsCount: u32, rewards: array(wow.QUEST_REWARDS_COUNT, {itemID: u32, count: u32, displayID: u32}),
- rewardMoney: u32, xp: u32, charTitleID: u32, unk1: [u32, u32],
- bonusTalents: u32, unk2: [u32, u32],
- reputations: array(wow.QUEST_REPUTATIONS_COUNT, {faction: u32, valueID: i32, value: i32}),
- rewardSpellCast: i32, unk3: u32,
- currencies: array(wow.QUEST_CURRENCY_COUNT, {id: u32, count: u32}),
- unk4: [u32, u32]
- },
- SMSG_QUESTGIVER_STATUS: {guid: GUID, status: u32},
- SMSG_QUESTGIVER_STATUS_MULTIPLE: array(u32, {guid: GUID, status: u32}),
- SMSG_TALENTS_INFO: {
- pet: bool,
- unspent: u32,
- talents: eq('pet', true, array(u8, {id: u32, rank: u8})),
- $numSpecs: eq('pet', false, u8),
- active: eq('pet', false, u8),
- specs: eq('pet', false, array('$numSpecs', {
- tree: u32,
- talents: array(u8, {id: u32, rank: u8}),
- glyphs: array(u8, u16)
- }))
- },
- SMSG_POWER_UPDATE: {guid: packGUID, powers: array(u32, {power: u8, val: u32})},
- SMSG_AURA_UPDATE: {target: packGUID,
- slot: u8, id: u32,
- $: eq('id', 0, null, join({
- flags: u8, level: u8, stack: u8,
- //NOTE this looks rather anti-logical, maybe SkyFire is wrong.
- caster: flag(wow.auraFlag.CASTER, null, packGUID),
- maxDuration: flag(wow.auraFlag.DURATION, u32),
- duration: flag(wow.auraFlag.DURATION, u32),
- effectAmounts: flag(wow.auraFlag.ANY_EFFECT_AMOUNT_SENT, _(function(update) {
- var amounts = [];
- for(var i = 0; i < wow.MAX_SPELL_EFFECTS; i++)
- if(update.flags & (i << i))
- amounts[i] = this.read(u32);
- return amounts;
- }))
- }))
- },
- SMSG_THREAT_UPDATE: {guid: packGUID, threats: array(u32, {guid: packGUID, threat: filter(u32, function(x) {return x/100;}, function(x) {return Math.floor(x*100);})})},
- SMSG_HIGHEST_THREAT_UPDATE: {guid: packGUID, target: packGUID, threats: array(u32, {guid: packGUID, threat: u32})},
- SMSG_AI_REACTION: {guid: GUID, type: u32},
- SMSG_ATTACKSTART: {guid: GUID, victim: GUID},
- SMSG_SPELL_START: {
- source: packGUID, caster: packGUID, castCount: u8,
- id: u32, flags: u32, timer: i32,
- power: flag(wow.castFlag.POWER_LEFT_SELF, u32),
- runes: flag(wow.castFlag.RUNE_LIST, {
- before: u8, after: u8,
- cooldowns: array(wow.MAX_RUNES, filter(u8, function(x) {return x/255;}, function(x) {return Math.floor(x*255);}))
- }),
- unk_23: flag(wow.castFlag.UNKNOWN_23, [u32, u32])
- },
- SMSG_DESTROY_OBJECT: {guid: GUID, animated: bool}
- };
Add Comment
Please, Sign In to add comment