Update of /cvsroot/seq/showeq/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28119/src Modified Files: everquest.h interface.cpp mapicon.cpp messageshell.cpp netstream.cpp netstream.h player.cpp player.h races.h spawn.cpp spawn.h spawnlistcommon.cpp spawnshell.cpp spawnshell.h staticspells.h typenames.h weapons29.h weapons2a.h weapons2b.h zones.h Log Message: Updated for Serpents Spine: - New Movement Packet opcode + handler - Regenerated staticspells.h - Updated zones.h, typenames.h, races.h - Fixed structs/added padding - Added some new weapon names - Support for up to level 75 - New con tables - New con color for gray (looks poor - too much like a spawn point) Index: player.h =================================================================== RCS file: /cvsroot/seq/showeq/src/player.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- player.h 27 Feb 2006 23:16:47 -0000 1.24 +++ player.h 30 Sep 2006 21:18:25 -0000 1.25 @@ -25,14 +25,15 @@ enum ColorLevel { - tGreenSpawn = 0, - tCyanSpawn = 1, - tBlueSpawn = 2, - tEvenSpawn = 3, - tYellowSpawn = 4, - tRedSpawn = 5, - tUnknownSpawn = 6, - tMaxColorLevels = 7 + tGraySpawn = 0, + tGreenSpawn = 1, + tCyanSpawn = 2, + tBlueSpawn = 3, + tEvenSpawn = 4, + tYellowSpawn = 5, + tRedSpawn = 6, + tUnknownSpawn = 7, + tMaxColorLevels = 8 }; //---------------------------------------------------------------------- Index: messageshell.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/messageshell.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- messageshell.cpp 27 Feb 2006 23:16:47 -0000 1.6 +++ messageshell.cpp 30 Sep 2006 21:18:25 -0000 1.7 @@ -865,12 +865,6 @@ if (!deity.isEmpty()) msg += QString(" [") + deity + "]"; - if (con->maxHp || con->curHp) - { - lvl.sprintf(" (%i/%i HP)", con->curHp, con->maxHp); - msg += lvl; - } - msg += QString(" is: ") + print_faction(con->faction) + " (" + QString::number(con->faction) + ")!"; Index: staticspells.h =================================================================== RCS file: /cvsroot/seq/showeq/src/staticspells.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- staticspells.h 27 Feb 2006 23:16:47 -0000 1.4 +++ staticspells.h 30 Sep 2006 21:18:26 -0000 1.5 @@ -1518,7 +1518,7 @@ /* 0x05e2 - 1506 */ { "Scouring Wind" }, /* 0x05e3 - 1507 */ { "Blessing of the Theurgist" }, /* 0x05e4 - 1508 */ { "Asystole" }, -/* 0x05e5 - 1509 */ { "Leach" }, +/* 0x05e5 - 1509 */ { "Leech" }, /* 0x05e6 - 1510 */ { "Shadow Compact" }, /* 0x05e7 - 1511 */ { "Scent of Dusk" }, /* 0x05e8 - 1512 */ { "Scent of Shadow" }, @@ -1732,7 +1732,7 @@ /* 0x06b8 - 1720 */ { "Eye of Tallon" }, /* 0x06b9 - 1721 */ { "Unswerving Hammer of Faith" }, [...3143 lines suppressed...] +/* 0x2d79 - 11641 */ { "Gathering of Spirits" }, +/* 0x2d7a - 11642 */ { "Ancestral Favor" }, +/* 0x2d7b - 11643 */ { "Ancestral Favor" }, +/* 0x2d7c - 11644 */ { "Ancestral Favor" }, +/* 0x2d7d - 11645 */ { "Vengeance of Vergalid" }, +/* 0x2d7e - 11646 */ { "Oblivion" }, +/* 0x2d7f - 11647 */ { "Oblivion Blast" }, +/* 0x2d80 - 11648 */ { "Guardian Blade" }, +/* 0x2d81 - 11649 */ { "Frozen Tears" }, +/* 0x2d82 - 11650 */ { "Razor Strike" }, +/* 0x2d83 - 11651 */ { "Mark of Valdeholm" }, +/* 0x2d84 - 11652 */ { "Mark of Frostcrypt" }, +/* 0x2d85 - 11653 */ { "Mark of Vergalid" }, // -// Max SpellId: 0x2342 = 9026 -// Number of Spells: 8506 -// Empty Entries: 520 +// Max SpellId: 0x2d86 = 11654 +// Number of Spells: 10925 +// Empty Entries: 729 Index: netstream.h =================================================================== RCS file: /cvsroot/seq/showeq/src/netstream.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- netstream.h 13 Sep 2005 15:23:12 -0000 1.2 +++ netstream.h 30 Sep 2006 21:18:25 -0000 1.3 @@ -40,6 +40,31 @@ const uint8_t* m_pos; }; +/** + * A network stream that manages data by the bit. This is useful for + * unpacking non-byte-aligned data. + */ +class BitStream +{ +public: + BitStream(const uint8_t* data, size_t length); + ~BitStream(); + + const uint8_t* data() { return m_data; } + size_t length() { return m_totalBits >> 3; } + void reset(); + bool end() { return (m_currentBit >= m_totalBits); } + + bool readBit(); + uint32_t readUInt(size_t bitCount); + int32_t readInt(size_t bitCount); + +protected: + const uint8_t* m_data; + size_t m_totalBits; + size_t m_currentBit; +}; + #endif // _NETSTREAM_H_ Index: weapons2a.h =================================================================== RCS file: /cvsroot/seq/showeq/src/weapons2a.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- weapons2a.h 13 Sep 2005 15:23:14 -0000 1.2 +++ weapons2a.h 30 Sep 2006 21:18:26 -0000 1.3 @@ -61,7 +61,7 @@ "Forge", // 0x34 "BrewBarrel", // 0x35 NULL, // 0x36 - NULL, // 0x37 + "BlueBottle", // 0x37 NULL, // 0x38 NULL, // 0x39 NULL, // 0x3a @@ -117,9 +117,9 @@ NULL, // 0x6c NULL, // 0x6d NULL, // 0x6e - NULL, // 0x6f - NULL, // 0x70 - NULL, // 0x71 + "Forge", // 0x6f + "Forge", // 0x70 + "Oven", // 0x71 NULL, // 0x72 NULL, // 0x73 NULL, // 0x74 @@ -172,8 +172,8 @@ NULL, // 0xa3 NULL, // 0xa4 NULL, // 0xa5 - NULL, // 0xa6 - NULL, // 0xa7 + "Sabre", // 0xa6 + "Sabre", // 0xa7 NULL, // 0xa8 NULL, // 0xa9 NULL, // 0xaa Index: player.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/player.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- player.cpp 16 Jun 2006 13:36:35 -0000 1.51 +++ player.cpp 30 Sep 2006 21:18:25 -0000 1.52 @@ -30,6 +30,7 @@ static const char* conColorBasePrefNames[] = { + "GrayBase", "GreenBase", "CyanBase", "BlueBase", @@ -74,6 +75,10 @@ // set the name to the default name Spawn::setName(m_defaultName); + m_conColorBases[tGraySpawn] = + pSEQPrefs->getPrefColor(conColorBasePrefNames[tGraySpawn], + "Player", + QColor(140, 140, 140)); m_conColorBases[tGreenSpawn] = pSEQPrefs->getPrefColor(conColorBasePrefNames[tGreenSpawn], "Player", @@ -1048,150 +1053,132 @@ void Player::fillConTable() { -// keep around for historical giggles -// -// to make changes here, simply alter greenRange and cyanRange -// -// Levels Green Cyan Red -// 1-7 -4 n/a +3 -// 8-? -5 -4 +3 -// 11-? -6 -5 +3 -// 13-22 -7 -5 +3 -// 23-24 -10? -7? +3 -// 25-34 -13 -10 +3 -// 35-40 -14? -10? +3 -// 41-42 -15? -11? +3 -// 43-44 -16? -12? +3 -// 45-48 -17? -13? +3 -// 49-51 -18 -14? +3 -// 52-54 -19? -15? +3 -// 55-57 -20? -16? +3 -// 58-60 -21 -16 +3 -// 61 -13 -17 +3 - + int grayRange = 0; int greenRange = 0; - int cyanRange = 0; - if (level() < 8) - { // 1 - 7 - greenRange = -4; - cyanRange = -8; + if (level() < 9) + { // 1 - 8 + grayRange = -4; + greenRange = -8; } else if (level() < 13) - { // 8 - 12 + { // 9 - 12 + grayRange = -6; + greenRange = -4; + } + else if (level() < 17) + { // 13-16 + grayRange = -7; greenRange = -5; - cyanRange = -4; } - else if (level() < 23) - { // - greenRange = -8; - cyanRange = -6; + else if (level() < 21) + { // 17-20 + grayRange = -8; + greenRange = -6; } - else if (level() < 27) - { // - greenRange = -10; - cyanRange = -8; + else if (level() < 25) + { // 21-24 + grayRange = -9; + greenRange = -7; } else if (level() < 29) - { // - greenRange = -11; - cyanRange = -8; + { // 25-28 + grayRange = -10; + greenRange = -8; } - else if (level() < 34) - { // - greenRange = -12; - cyanRange = -9; + else if (level() < 33) + { // 29-32 + grayRange = -11; + greenRange = -9; } else if (level() < 37) - { // - greenRange = -13; - cyanRange = -10; + { // 33-36 + grayRange = -13; + greenRange = -10; } else if (level() < 41) { // 37 - 40 - greenRange = -14; - cyanRange = -11; + grayRange = -14; + greenRange = -11; } else if (level() < 45) { // 41 - 44 - greenRange = -16; - cyanRange = -12; + grayRange = -16; + greenRange = -12; } else if (level() < 49) { // 45 - 48 - greenRange = -17; - cyanRange = -13; + grayRange = -17; + greenRange = -13; } else if (level() < 53) { // 49 - 52 - greenRange = -18; - cyanRange = -14; - } - else if (level() < 55) - { // 52 - 54 - greenRange = -19; - cyanRange = -15; + grayRange = -18; + greenRange = -14; } else if (level() < 57) - { // 55 - 56 - greenRange = -20; - cyanRange = -15; + { // 53 - 56 + grayRange = -20; + greenRange = -15; } - else if (level() < 71) - { //57 - 70 - greenRange = -21; - cyanRange = -16; + else + { // 57+ + grayRange = -21; + greenRange = -16; } uint8_t spawnLevel = 1; uint8_t scale; - uint8_t greenBase = m_conColorBases[tGreenSpawn].green(); - uint8_t greenScale = 255 - greenBase; - for (; spawnLevel <= (greenRange + level()); spawnLevel++) - { // this loop handles all GREEN cons - if (spawnLevel <= (greenRange + level() - 5)) - m_conTable[spawnLevel] = m_conColorBases[tGreenSpawn]; - else - { - scale = greenScale/(greenRange + level() - spawnLevel + 1); - m_conTable[spawnLevel] = QColor(m_conColorBases[tGreenSpawn].red(), - (greenBase + scale), - m_conColorBases[tGreenSpawn].blue()); - } + // Gray spawns. No gradient. + for (; spawnLevel <= grayRange + level(); spawnLevel++) + { + m_conTable[spawnLevel] = m_conColorBases[tGraySpawn]; } - for (; spawnLevel <= cyanRange + level(); spawnLevel++) - { // light blue cons, no need to gradient a small range + // Green spawns. No gradient since green is small. + for (; spawnLevel <= greenRange + level(); spawnLevel++) + { + m_conTable[spawnLevel] = m_conColorBases[tGreenSpawn]; + } + + // Light blue spawns. Again, no gradient. Light blue is + // blue, but under 5 levels below, so for levels where there is + // no light blue, this is negative. + for (; spawnLevel < level() - 5; spawnLevel++) + { m_conTable[spawnLevel] = m_conColorBases[tCyanSpawn]; } - uint8_t blueBase = m_conColorBases[tBlueSpawn].blue(); - uint8_t blueScale = 255 - blueBase; + // Blue spawns. Just 5 levels in here. So again, no gradient. for (; spawnLevel < level(); spawnLevel++) - { // blue cons here - scale = blueScale/(level() - spawnLevel); - m_conTable[spawnLevel] = QColor(m_conColorBases[tBlueSpawn].red(), - m_conColorBases[tBlueSpawn].green(), - (blueBase + scale)); + { + m_conTable[spawnLevel] = m_conColorBases[tBlueSpawn]; } - m_conTable[spawnLevel++] = m_conColorBases[tEvenSpawn]; // even con - m_conTable[spawnLevel++] = m_conColorBases[tYellowSpawn]; // yellow con - m_conTable[spawnLevel++] = QColor(m_conColorBases[tYellowSpawn].red(), - m_conColorBases[tYellowSpawn].green() - 30, - m_conColorBases[tYellowSpawn].blue()); // yellow con + // Even is our level, natch. + m_conTable[spawnLevel++] = m_conColorBases[tEvenSpawn]; + + // 3 levels of yellow. + for (; spawnLevel < level() + 4; spawnLevel++) + { + m_conTable[spawnLevel++] = m_conColorBases[tYellowSpawn]; + } + // Finally, red spawns. Gradient this. uint8_t redBase = m_conColorBases[tRedSpawn].red(); uint8_t redScale = 255 - redBase; + for (; spawnLevel < maxSpawnLevel; spawnLevel++) - { // red cons - if (spawnLevel > level() + 13) + { + if (spawnLevel > level() + 9) + { m_conTable[spawnLevel] = m_conColorBases[tRedSpawn]; + } else { - scale = redScale/(spawnLevel - level() - 2); - m_conTable[spawnLevel] = QColor((redBase + scale), + scale = redScale*(spawnLevel - level() - 4) / 6; + m_conTable[spawnLevel] = QColor((255 - scale), m_conColorBases[tRedSpawn].green(), m_conColorBases[tRedSpawn].blue()); } Index: spawn.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/spawn.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- spawn.cpp 13 Sep 2005 15:23:13 -0000 1.33 +++ spawn.cpp 30 Sep 2006 21:18:25 -0000 1.34 @@ -43,6 +43,8 @@ const int animationCoefficientFixPt = fixPtToFixed<int, float>(animationCoefficient, qFormat); +const EquipStruct SlotEmpty = { 0, 0, 0 }; + //---------------------------------------------------------------------- // Handy utility functions // static @@ -263,7 +265,7 @@ setTypeflag(0); setGM(0); for (int i = 0; i < tNumWearSlots; i++) - setEquipment(i, 0); + setEquipment(i, SlotEmpty); // just clear the considred flag since data would be outdated setConsidered(false); @@ -313,7 +315,7 @@ setGuildID(0xffff); setGuildTag(NULL); for (int i = 0; i < tNumWearSlots; i++) - setEquipment(i, 0); + setEquipment(i, SlotEmpty); setTypeflag(0); setGM(0); setConsidered(false); @@ -367,7 +369,7 @@ setLevel(s.level()); for (int i = 0; i <= tLastCoreWearSlot; i++) setEquipment(i, s.equipment(i)); - setEquipment(tUnknown1, 0); + setEquipment(tUnknown1, SlotEmpty); setTypeflag(s.typeflag()); setGM(s.gm()); setNPC(s.NPC()); @@ -411,7 +413,7 @@ setLevel(s->level); for (int i = 0; i <= tLastCoreWearSlot; i++) setEquipment(i, s->equipment[i]); - setEquipment(tUnknown1, 0); + setEquipment(tUnknown1, SlotEmpty); setTypeflag(s->bodytype); setGM(s->gm); @@ -424,8 +426,8 @@ setAnimation(s->animation); - // only non corpses and things with animation != 66 move - if (!isCorpse() && (s->animation != 66)) + // only non corpses move + if (!isCorpse()) { setDeltas(s->deltaX >> 2, s->deltaY >> 2, s->deltaZ >> 2); setHeading(s->heading, s->deltaHeading); @@ -498,7 +500,7 @@ // only change unknown equipment for (i = 0; i <= tLastCoreWearSlot; i++) - if (equipment(i) == 0) + if (equipment(i).itemId == SlotEmpty.itemId) setEquipment(i, s->equipment[i]); // only change unknown or no light @@ -605,11 +607,11 @@ QString Spawn::equipmentStr(uint8_t wearingSlot) const { if (wearingSlot <= tLastMaterial) - return print_material(equipment(wearingSlot)); + return print_material(equipment(wearingSlot).itemId); else if (wearingSlot <= tLastWeapon) - return print_item(equipment(wearingSlot)); + return print_item(equipment(wearingSlot).itemId); else if (wearingSlot < tNumWearSlots) - return print_material(equipment(wearingSlot)); + return print_material(equipment(wearingSlot).itemId); else return ""; } @@ -824,22 +826,22 @@ // Worn stuff for (i = tFirstMaterial; i <= tLastMaterial ; i++) - if (equipment(i)) - temp += QString(locs[i]) + ":" + print_material(equipment(i)) + " "; + if (equipment(i).itemId != SlotEmpty.itemId) + temp += QString(locs[i]) + ":" + print_material(equipment(i).itemId) + " "; // Worn weapons for (i = tFirstWeapon; i <= tLastWeapon; i++) - if (equipment(i)) - temp += QString(locs[i]) + ":" + + print_item(equipment(i)) + " "; + if (equipment(i).itemId != SlotEmpty.itemId) + temp += QString(locs[i]) + ":" + + print_item(equipment(i).itemId) + " "; // Worn stuff -- Current best quess is that this may be material? i = tUnknown1; - if (equipment(i)) - temp += QString(locs[i]) + ":" + print_material(equipment(i)) + " "; + if (equipment(i).itemId != SlotEmpty.itemId) + temp += QString(locs[i]) + ":" + print_material(equipment(i).itemId) + " "; #if 1 // print also as slot U1 (Unknown1) until we're positive - if (equipment(i)) - temp += QString("U1:U") + QString::number(equipment(i), 16) + " "; + if (equipment(i).itemId != SlotEmpty.itemId) + temp += QString("U1:U") + QString::number(equipment(i).itemId, 16) + " "; #endif return temp; Index: races.h =================================================================== RCS file: /cvsroot/seq/showeq/src/races.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- races.h 27 Feb 2006 23:16:47 -0000 1.16 +++ races.h 30 Sep 2006 21:18:25 -0000 1.17 @@ -526,4 +526,34 @@ "Nightmare/Unicorn", // 517 "Horse", // 518 "Nightmare/Unicorn", // 519 + "Bixie", // 520 + "Centaur", // 521 + "Drakkin", // 522 + "Giant", // 523 + "Gnoll", // 524 + "Griffin", // 525 + "Giant Shade", // 526 + "Harpy", // 527 + "Mammoth", // 528 + "Satyr", // 529 + "Dragon", // 530 + "Dragon", // 531 + "Dyn'Leth", // 532 + "Boat", // 533 + "Weapon Rack", // 534 + "Armor Rack", // 535 + "Honey Pot", // 536 + "Jum Jum Bucket", // 537 + "Plant", // 538 + "Plant", // 539 + "Plant", // 540 + "Toolbox", // 541 + "Wine Cask", // 542 + "Stone Jug", // 543 + "Elven Boat", // 544 + "Gnomish Boat", // 545 + "Undead Boat", // 546 + "Goo", // 547 + "Goo", // 548 + "Goo", // 549 #endif Index: spawn.h =================================================================== RCS file: /cvsroot/seq/showeq/src/spawn.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- spawn.h 13 Sep 2005 15:23:13 -0000 1.20 +++ spawn.h 30 Sep 2006 21:18:25 -0000 1.21 @@ -233,7 +233,7 @@ int16_t deityTeam() const { return m_deityTeam; } int16_t raceTeam() const { return m_raceTeam; } bool considered() const { return m_considered; } - uint16_t equipment(uint8_t wearingSlot) const + EquipStruct equipment(uint8_t wearingSlot) const { return m_equipment[wearingSlot]; } QString equipmentStr(uint8_t wearingSlot) const; uint8_t typeflag() const { return m_typeflag; } @@ -317,8 +317,8 @@ void setGuildID(uint16_t GuildID) { m_guildID = GuildID; } void setGuildTag(QString GuildTag) { m_guildTag = GuildTag; } void setLevel(uint8_t level) { m_level = level; } - void setEquipment(uint8_t wearSlot, uint16_t itemID) - { if (wearSlot < tNumWearSlots) { m_equipment[wearSlot] = itemID; } } + void setEquipment(uint8_t wearSlot, EquipStruct item) + { if (wearSlot < tNumWearSlots) { m_equipment[wearSlot] = item; } } void setNPC(uint8_t NPC) { m_NPC = NPC; } void setTypeflag(uint8_t typeflag) { m_typeflag = typeflag; } void setGM(uint8_t gm) { m_gm = gm; } @@ -353,7 +353,7 @@ uint16_t m_guildID; uint16_t m_deity; int16_t m_deityTeam; - uint16_t m_equipment[tNumWearSlots]; + EquipStruct m_equipment[tNumWearSlots]; uint16_t m_race; int16_t m_raceTeam; uint8_t m_level; Index: weapons29.h =================================================================== RCS file: /cvsroot/seq/showeq/src/weapons29.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- weapons29.h 28 Oct 2005 06:25:46 -0000 1.3 +++ weapons29.h 30 Sep 2006 21:18:26 -0000 1.4 @@ -155,8 +155,8 @@ NULL, // 0x92 NULL, // 0x93 NULL, // 0x94 - NULL, // 0x95 - NULL, // 0x96 + "Book", // 0x95 + "Book", // 0x96 NULL, // 0x97 NULL, // 0x98 NULL, // 0x99 Index: mapicon.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/mapicon.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mapicon.cpp 17 Sep 2005 01:47:55 -0000 1.3 +++ mapicon.cpp 30 Sep 2006 21:18:25 -0000 1.4 @@ -701,7 +701,7 @@ true, false, false, true); m_mapIcons[tIconTypeSpawnPoint] .setImage(QBrush(SolidPattern), QPen(darkGray, 1, SolidLine, cap, join), - tIconStylePlus, tIconSizeSmall, + tIconStylePlus, tIconSizeRegular, true, true, false, false); m_mapIcons[tIconTypeSpawnPointSelected] .setHighlight(QBrush(NoBrush), QPen(blue, 1, SolidLine, cap, join), @@ -1273,6 +1273,7 @@ return Qt::magenta; case 66: case 67: + case 100: return Qt::darkMagenta; default: break; Index: typenames.h =================================================================== RCS file: /cvsroot/seq/showeq/src/typenames.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- typenames.h 13 Sep 2005 15:23:14 -0000 1.5 +++ typenames.h 30 Sep 2006 21:18:26 -0000 1.6 @@ -75,5 +75,37 @@ "Timer", // 66 "EventTrigger", // 67 NULL, // 68 + NULL, // 69 + NULL, // 70 + NULL, // 71 + NULL, // 72 + NULL, // 73 + NULL, // 74 + NULL, // 75 + NULL, // 76 + NULL, // 77 + NULL, // 78 + NULL, // 79 + NULL, // 80 + NULL, // 81 + NULL, // 82 + NULL, // 83 + NULL, // 84 + NULL, // 85 + NULL, // 86 + NULL, // 87 + NULL, // 88 + NULL, // 89 + NULL, // 90 + NULL, // 91 + NULL, // 92 + NULL, // 93 + NULL, // 94 + NULL, // 95 + NULL, // 96 + NULL, // 97 + NULL, // 968 + NULL, // 99 + "None", // 100 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ Index: weapons2b.h =================================================================== RCS file: /cvsroot/seq/showeq/src/weapons2b.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- weapons2b.h 13 Sep 2005 15:23:14 -0000 1.2 +++ weapons2b.h 30 Sep 2006 21:18:26 -0000 1.3 @@ -54,15 +54,15 @@ NULL, // 0x2d NULL, // 0x2e NULL, // 0x2f - NULL, // 0x30 + "Plant", // 0x30 NULL, // 0x31 - NULL, // 0x32 - NULL, // 0x33 - NULL, // 0x34 + "Bone", // 0x32 + "Books", // 0x33 + "Leaf", // 0x34 NULL, // 0x35 NULL, // 0x36 NULL, // 0x37 - NULL, // 0x38 + "Rock", // 0x38 NULL, // 0x39 NULL, // 0x3a NULL, // 0x3b @@ -71,7 +71,7 @@ NULL, // 0x3e NULL, // 0x3f NULL, // 0x40 - NULL, // 0x41 + "Books", // 0x41 NULL, // 0x42 NULL, // 0x43 NULL, // 0x44 Index: spawnshell.h =================================================================== RCS file: /cvsroot/seq/showeq/src/spawnshell.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- spawnshell.h 10 Dec 2005 23:27:15 -0000 1.23 +++ spawnshell.h 30 Sep 2006 21:18:25 -0000 1.24 @@ -106,6 +106,7 @@ void newSpawn(const uint8_t* spawn); void newSpawn(const spawnStruct& s); void playerUpdate(const uint8_t*pupdate, size_t, uint8_t); + void npcMoveUpdate(const uint8_t*npcupdate, size_t, uint8_t); void updateSpawn(uint16_t id, int16_t x, int16_t y, int16_t z, int16_t xVel, int16_t yVel, int16_t zVel, Index: netstream.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/netstream.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- netstream.cpp 13 Sep 2005 15:23:12 -0000 1.2 +++ netstream.cpp 30 Sep 2006 21:18:25 -0000 1.3 @@ -157,5 +157,98 @@ return QString(); } +BitStream::BitStream(const uint8_t* data, size_t length) + : m_data(data) +{ + // Length in bits. + m_totalBits = length * 8; + + reset(); +} + +BitStream::~BitStream() +{ +} + +void BitStream::reset() +{ + m_currentBit = 0; +} + +uint32_t BitStream::readUInt(size_t bitCount) +{ + // Make sure we have the bits first. + if (m_currentBit + bitCount > m_totalBits) + { + return 0; + } + + const uint8_t* currentByte = m_data + (m_currentBit >> 3); + uint32_t out = 0; + + // Partial bytes in the lead and end. Full bytes in the middle. + size_t leadPartialBitCount = 8 - (m_currentBit % 8); + size_t middleByteCount; + size_t tailPartialBitCount; + + if (leadPartialBitCount == 8) + { + // Lead partial is a byte. So just put it in the middle. + leadPartialBitCount = 0; + } + + if (leadPartialBitCount > bitCount) + { + // All the bits we need are in the lead partial. Note that when + // the lead partial is byte aligned, this won't process it. Instead + // it will be handled by the tailPartialBitCount. + out = *currentByte & ((1 << leadPartialBitCount) - 1); + m_currentBit += bitCount; + return out >> (leadPartialBitCount - bitCount); + } + else + { + // Spanning multiple bytes. leadPartialBitCount is correct. + // Calculate middle and tail. + middleByteCount = (bitCount - leadPartialBitCount) / 8; + tailPartialBitCount = + bitCount - (leadPartialBitCount + middleByteCount*8); + } + + if (leadPartialBitCount > 0) + { + // Pull in partial from the lead byte + out |= *currentByte & ((1 << leadPartialBitCount) - 1); + currentByte++; + } + + // Middle + for (size_t i=0; i<middleByteCount; i++) + { + out = (out << 8) | *currentByte; + currentByte++; + } + + // And the end. + if (tailPartialBitCount > 0) + { + out = (out << tailPartialBitCount) | + (*currentByte >> (8 - tailPartialBitCount)); + } + + // Update the current bit + m_currentBit += bitCount; + + return out; +} + +int32_t BitStream::readInt(size_t bitCount) +{ + // Sign + uint32_t sign = readUInt(1); + uint32_t retval = readUInt(bitCount - 1); + + return retval * (sign ? -1 : 1); +} Index: spawnlistcommon.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/spawnlistcommon.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- spawnlistcommon.cpp 13 Sep 2005 15:23:13 -0000 1.7 +++ spawnlistcommon.cpp 30 Sep 2006 21:18:25 -0000 1.8 @@ -387,6 +387,7 @@ return; case 66: case 67: + case 100: m_textColor = Qt::darkMagenta; return; } Index: interface.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/interface.cpp,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- interface.cpp 2 Mar 2006 01:03:14 -0000 1.75 +++ interface.cpp 30 Sep 2006 21:18:24 -0000 1.76 @@ -1004,9 +1004,11 @@ // Con Color base menu QPopupMenu* conColorBaseMenu = new QPopupMenu; + x = conColorBaseMenu->insertItem("Gray Spawn Base..."); + conColorBaseMenu->setItemParameter(x, tGraySpawn); x = conColorBaseMenu->insertItem("Green Spawn Base..."); conColorBaseMenu->setItemParameter(x, tGreenSpawn); - x = conColorBaseMenu->insertItem("Cyan Spawn Base..."); + x = conColorBaseMenu->insertItem("Light Blue Spawn Base..."); conColorBaseMenu->setItemParameter(x, tCyanSpawn); x = conColorBaseMenu->insertItem("Blue Spawn Base..."); conColorBaseMenu->setItemParameter(x, tBlueSpawn); @@ -1120,7 +1122,7 @@ // Character -> Level m_charLevelMenu = new QPopupMenu; m_charMenu->insertItem("Choose &Level", m_charLevelMenu); - m_levelSpinBox = new QSpinBox(1, 70, 1, this, "m_levelSpinBox"); + m_levelSpinBox = new QSpinBox(1, 75, 1, this, "m_levelSpinBox"); m_charLevelMenu->insertItem( m_levelSpinBox ); m_levelSpinBox->setWrapping( true ); m_levelSpinBox->setButtonSymbols(QSpinBox::PlusMinus); @@ -2021,6 +2023,9 @@ m_packet->connect2("OP_Consider", SP_Zone, DIR_Server|DIR_Client, "considerStruct", SZC_Match, m_spawnShell, SLOT(consMessage(const uint8_t*, size_t, uint8_t))); + m_packet->connect2("OP_NpcMoveUpdate", SP_Zone, DIR_Server, + "uint8_t", SZC_None, + m_spawnShell, SLOT(npcMoveUpdate(const uint8_t*, size_t, uint8_t))); m_packet->connect2("OP_ClientUpdate", SP_Zone, DIR_Server, "playerSpawnPosStruct", SZC_Match, m_spawnShell, SLOT(playerUpdate(const uint8_t*, size_t, uint8_t))); Index: spawnshell.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/spawnshell.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- spawnshell.cpp 16 Jun 2006 13:36:35 -0000 1.47 +++ spawnshell.cpp 30 Sep 2006 21:18:25 -0000 1.48 @@ -22,6 +22,7 @@ #include "guild.h" #include "packetcommon.h" #include "diagnosticmessages.h" +#include "netstream.h" #include <qfile.h> #include <qdatastream.h> @@ -642,6 +643,113 @@ } } +void SpawnShell::npcMoveUpdate(const uint8_t* data, size_t len, uint8_t dir) +{ +/* + * Wire format: + * 2 bytes - spawnId + * 6 bit - fieldSpecifier bitmask + * 19 bit - y + * 19 bit - x + * 19 bit - z + * 12 bit - heading + * [Variable fields] + * + * Depending on bits set in fields: + * 1 = 12 bit pitch + * 2 = 10 bit delta heading + * 4 = 10 bit velocity + * 8 = 13 bit delta y + * 16= 13 bit delta x + * 32 = 13 bit delta z + * + * Fields are in that order. For example, if the fieldSpecifier is + * 1, then there is just 12 bits of pitch. If the fieldSpecifier is + * 7, then there will be 10 bits of delta heading, 10 bits of animation, + * and 13 bits of delta y. Other non-specified values are 0. + * + * Oh and the byte order needs to be converted too. How nice. + */ +#define MASK_PITCH 0x01 +#define MASK_DELTA_HEADING 0x02 +#define MASK_ANIMATION 0x04 +#define MASK_DELTA_Y 0x08 +#define MASK_DELTA_X 0x10 +#define MASK_DELTA_Z 0x20 + + // Variable length movement packet. Sanity check. + if ((len < 13) || (len > 21)) + { + // Ignore it. + seqWarn("Ignoring invalid length %d for movement packet", len); + return; + } + + // if zoning, then don't do anything + if (m_zoneMgr->isZoning()) + { + return; + } + + // Pull data from the header. + BitStream stream(data, len); + + // spawnId. + uint16_t spawnId = stream.readUInt(16); + + // 6 bit field specifier. + uint8_t fieldSpecifier = stream.readUInt(6); + + // 19 bit coords. 12 bit heading. All signed. + int16_t y = stream.readInt(19) >> 3; + int16_t x = stream.readInt(19) >> 3; + int16_t z = stream.readInt(19) >> 3; + int16_t heading = stream.readInt(12); + + // Variable fields are 0 unless specified. + int16_t deltaX = 0; + int16_t deltaY = 0; + int16_t deltaZ = 0; + int8_t deltaHeading = 0; + int16_t velocity = 0; + int16_t pitch = 0; + + if (fieldSpecifier & MASK_PITCH) + { + // Pull off pitch. Seq doesn't pay attention to this. + pitch = stream.readInt(12); + } + if (fieldSpecifier & MASK_DELTA_HEADING) + { + // Pull off deltaHeading. It is 10 bits in length. Signed. + deltaHeading = stream.readInt(10) >> 2; + } + if (fieldSpecifier & MASK_ANIMATION) + { + // Pull off velocity. It is 10 bits in length. + velocity = stream.readInt(10) >> 2; + } + if (fieldSpecifier & MASK_DELTA_Y) + { + // Pull off deltaY. It is 13 bits in length. Signed. + deltaY = stream.readInt(13) >> 2; + } + if (fieldSpecifier & MASK_DELTA_X) + { + // Pull off deltaX. It is 13 bits in length. Signed, + deltaX = stream.readInt(13) >> 2; + } + if (fieldSpecifier & MASK_DELTA_Z) + { + // Pull off deltaZ. It is 13 bits in length. Signed. + deltaZ = stream.readInt(13) >> 2; + } + + // And send the update. + updateSpawn(spawnId, x, y, z, + deltaX, deltaY, deltaZ, heading, deltaHeading, velocity); +} + void SpawnShell::updateSpawn(uint16_t id, int16_t x, int16_t y, int16_t z, int16_t xVel, int16_t yVel, int16_t zVel, @@ -662,16 +770,9 @@ showeq_params->walkpathrecord, showeq_params->walkpathlength); spawn->setAnimation(animation); - if ((animation != 0) && (animation != 66)) - { - spawn->setDeltas(xVel, yVel, zVel); - spawn->setHeading(heading, deltaHeading); - } - else - { - spawn->setDeltas(0, 0, 0); - spawn->setHeading(heading, 0); - } + + spawn->setDeltas(xVel, yVel, zVel); + spawn->setHeading(heading, deltaHeading); // Distance if (!showeq_params->fast_machine) @@ -962,39 +1063,6 @@ // yes Spawn* spawn = (Spawn*)item; - int changed = tSpawnChangedNone; - - /* maxhp and curhp are available when considering players, */ - /* but not when considering mobs. */ - if (con->maxHp || con->curHp) - { - if (spawn->NPC() == SPAWN_NPC_UNKNOWN) - { - spawn->setNPC(SPAWN_PLAYER); // player - changed |= tSpawnChangedNPC; - } - spawn->setMaxHP(con->maxHp); - spawn->setHP(con->curHp); - changed |= tSpawnChangedHP; - } - else if (item->NPC() == SPAWN_NPC_UNKNOWN) - { - spawn->setNPC(SPAWN_NPC); - changed |= tSpawnChangedNPC; - } - - // note the updates if any - if (changed != tSpawnChangedNone) - { - if (updateFilterFlags(item)) - changed |= tSpawnChangedFilter; - if (updateRuntimeFilterFlags(item)) - changed |= tSpawnChangedRuntimeFilter; - - item->updateLastChanged(); - emit changeItem(item, changed); - } - // note that this spawn has been considered spawn->setConsidered(true); Index: zones.h =================================================================== RCS file: /cvsroot/seq/showeq/src/zones.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- zones.h 27 Feb 2006 23:16:48 -0000 1.11 +++ zones.h 30 Sep 2006 21:18:26 -0000 1.12 @@ -401,20 +401,20 @@ { "freeporthall", "Hall of Truth"}, // 391 { "northro", "North Ro"}, // 392 { "southro", "South Ro"}, // 393 -{ NULL, NULL }, // 394 -{ NULL, NULL }, // 395 -{ NULL, NULL }, // 396 -{ NULL, NULL }, // 397 -{ NULL, NULL }, // 398 -{ NULL, NULL }, // 399 -{ NULL, NULL }, // 400 -{ NULL, NULL }, // 401 -{ NULL, NULL }, // 402 -{ NULL, NULL }, // 403 -{ NULL, NULL }, // 404 -{ NULL, NULL }, // 405 -{ NULL, NULL }, // 406 -{ NULL, NULL }, // 407 +{ "crescent", "Crescent Reach" }, // 394 +{ "moors", "Blightfire Moors" }, // 395 +{ "stonehive", "Stone Hive" }, // 396 +{ "mesa", "Koru`kar Mesa" }, // 397 +{ "roost", "Blackfeather Roost" }, // 398 +{ "steppes", "The Steppes" }, // 399 +{ "icefall", "Icefall Glacier" }, // 400 +{ "valdeholm", "Valdeholm" }, // 401 +{ "frostcrypt", "Frostcrypt, Throne of the Shade King" }, // 402 +{ "sunderock", "Sunderock Springs" }, // 403 +{ "vergalid", "Vergalid Mines" }, // 404 +{ "direwind", "Direwind Cliffs" }, // 405 +{ "ashengate", "Ashengate, Reliquary of the Scale" }, // 406 +{ "highpasshold", "Highpass Hold" }, // 407 { NULL, NULL }, // 408 { NULL, NULL }, // 409 { NULL, NULL }, // 410 Index: everquest.h =================================================================== RCS file: /cvsroot/seq/showeq/src/everquest.h,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- everquest.h 18 Jun 2006 00:54:08 -0000 1.93 +++ everquest.h 30 Sep 2006 21:18:24 -0000 1.94 @@ -108,11 +108,11 @@ #define MAX_GROUP_MEMBERS 6 #define MAX_BUFFS 25 #define MAX_GUILDS 1500 -#define MAX_AA 239 -#define MAX_BANDOLIERS 4 +#define MAX_AA 359 +#define MAX_BANDOLIERS 20 #define MAX_POTIONS_IN_BELT 4 #define MAX_TRIBUTES 5 -#define MAX_DISCIPLINES 50 +#define MAX_DISCIPLINES 100 //Item Flags #define ITEM_NORMAL 0x0000 @@ -425,7 +425,7 @@ /* ** Buffs -** Length: 20 Octets +** Length: 32 Octets ** Used in: ** charProfileStruct(2d20) */ @@ -439,7 +439,8 @@ /*0008*/ int32_t duration; // Time remaining in ticks /*0012*/ int32_t effect; // holds the dmg absorb amount on runes /*0016*/ uint32_t playerId; // Global id of caster (for wear off) -/*0020*/ +/*0020*/ uint8_t unknown0020[12]; +/*0032*/ }; @@ -506,6 +507,18 @@ }; /* + * Visible equiptment. + * Size: 12 Octets + */ +struct EquipStruct +{ +/*00*/ uint32_t equip0; +/*04*/ uint32_t equip1; +/*08*/ uint32_t itemId; +/*12*/ +}; + +/* ** Type: Zone Change Request (before hand) ** Length: 88 Octets ** OpCode: ZoneChangeCode @@ -552,7 +565,7 @@ /* ** New Zone Code -** Length: 820 Octets +** Length: 836 Octets ** OpCode: NewZoneCode */ struct newZoneStruct @@ -580,8 +593,8 @@ /*0788*/ uint8_t unknown0788[4]; // *** Placeholder (06/29/2005) /*0792*/ uint8_t unknown0792[4]; // *** Placeholder (09/13/2005) /*0796*/ uint8_t unknown0796[4]; // *** Placeholder (02/21/2006) -/*0800*/ uint8_t unknown0800[20]; // *** Placeholder (06/13/2006) -}; /*0800*/ +/*0800*/ uint8_t unknown0800[36]; // *** Placeholder (06/13/2006) +}; /*0836*/ /** @@ -596,155 +609,154 @@ /*00004*/ uint32_t gender; // Player Gender - 0 Male, 1 Female /*00008*/ uint32_t race; // Player race /*00012*/ uint32_t class_; // Player class -/*00016*/ uint32_t unknown00016; // ***Placeholder -/*00020*/ uint8_t level; // Level of player -/*00021*/ uint8_t level1; // Level of player (again?) -/*00022*/ uint8_t unknown00022[2]; // ***Placeholder -/*00024*/ BindStruct binds[5]; // Bind points (primary is first) -/*00124*/ uint32_t deity; // deity -/*00128*/ uint32_t intoxication; // Alcohol level (in ticks till sober?) -/*00132*/ uint32_t spellSlotRefresh[MAX_SPELL_SLOTS]; // Refresh time (millis) -/*00168*/ uint8_t unknown0166[4]; -/*00172*/ uint8_t haircolor; // Player hair color -/*00173*/ uint8_t beardcolor; // Player beard color -/*00174*/ uint8_t eyecolor1; // Player left eye color -/*00175*/ uint8_t eyecolor2; // Player right eye color -/*00176*/ uint8_t hairstyle; // Player hair style -/*00177*/ uint8_t beard; // Player beard type -/*00178*/ uint8_t unknown00178[10]; -/*00188*/ uint32_t item_material[9]; // Item texture/material of worn items -/*00224*/ uint8_t unknown00224[48]; -/*00272*/ Color_Struct item_tint[9]; // RR GG BB 00 -/*00308*/ AA_Array aa_array[MAX_AA]; // AAs -/*02220*/ uint8_t unknown02220[4]; -/*02224*/ uint32_t points; // Unspent Practice points -/*02228*/ uint32_t MANA; // Current MANA -/*02232*/ uint32_t curHp; // Current HP without +HP equipment -/*02236*/ uint32_t STR; // Strength -/*02240*/ uint32_t STA; // Stamina -/*02244*/ uint32_t CHA; // Charisma -/*02248*/ uint32_t DEX; // Dexterity -/*02252*/ uint32_t INT; // Intelligence -/*02256*/ uint32_t AGI; // Agility -/*02260*/ uint32_t WIS; // Wisdom -/*02264*/ uint8_t face; // Player face -/*02265*/ uint8_t unknown02264[47]; -/*02312*/ int32_t sSpellBook[400]; // List of the Spells in spellbook -/*03912*/ uint8_t unknown4184[448]; // all 0xff after last spell -/*04360*/ int32_t sMemSpells[MAX_SPELL_SLOTS]; // List of spells memorized -/*04396*/ uint8_t unknown04396[32]; -/*04428*/ uint32_t platinum; // Platinum Pieces on player -/*04432*/ uint32_t gold; // Gold Pieces on player -/*04436*/ uint32_t silver; // Silver Pieces on player -/*04440*/ uint32_t copper; // Copper Pieces on player -/*04444*/ uint32_t platinum_cursor; // Platinum Pieces on cursor -/*04448*/ uint32_t gold_cursor; // Gold Pieces on cursor -/*04452*/ uint32_t silver_cursor; // Silver Pieces on cursor -/*04456*/ uint32_t copper_cursor; // Copper Pieces on cursor -/*04460*/ uint32_t skills[MAX_KNOWN_SKILLS]; // List of skills -/*04760*/ uint8_t unknown04760[236]; -/*04996*/ uint32_t toxicity; // Potion Toxicity (15=too toxic, each potion adds 3) -/*05000*/ uint32_t thirst; // Drink (ticks till next drink) -/*05004*/ uint32_t hunger; // Food (ticks till next eat) -/*05008*/ spellBuff buffs[MAX_BUFFS]; // Buffs currently on the player -/*05508*/ uint32_t disciplines[MAX_DISCIPLINES]; // Known disciplines -/*05708*/ uint8_t unknown05008[360]; -/*06068*/ uint32_t recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use) -/*06148*/ uint32_t endurance; // Current endurance -/*06152*/ uint32_t aa_spent; // Number of spent AA points -/*06156*/ uint32_t aa_unspent; // Unspent AA points -/*06160*/ uint8_t unknown06160[4]; -/*06164*/ BandolierStruct bandoliers[MAX_BANDOLIERS]; // bandolier contents -/*07444*/ uint8_t unknown07444[5120]; -/*12564*/ InlineItem potionBelt[MAX_POTIONS_IN_BELT]; // potion belt -/*12852*/ uint8_t unknown12852[88]; +/*00016*/ uint8_t unknown00016[40]; // ***Placeholder +/*00056*/ uint8_t level; // Level of player +/*00057*/ uint8_t level1; // Level of player (again?) +/*00058*/ uint8_t unknown00058[2]; // ***Placeholder +/*00060*/ BindStruct binds[5]; // Bind points (primary is first) +/*00160*/ uint32_t deity; // deity +/*00164*/ uint32_t intoxication; // Alcohol level (in ticks till sober?) +/*00168*/ uint32_t spellSlotRefresh[MAX_SPELL_SLOTS]; // Refresh time (millis) +/*00204*/ uint8_t unknown0204[4]; +/*00208*/ uint8_t haircolor; // Player hair color +/*00209*/ uint8_t beardcolor; // Player beard color +/*00210*/ uint8_t eyecolor1; // Player left eye color +/*00211*/ uint8_t eyecolor2; // Player right eye color +/*00212*/ uint8_t hairstyle; // Player hair style +/*00213*/ uint8_t beard; // Player beard type +/*00214*/ uint8_t unknown00214[10]; +/*00224*/ uint32_t item_material[9]; // Item texture/material of worn items +/*00260*/ uint8_t unknown00260[224]; +/*00484*/ Color_Struct item_tint[9]; // RR GG BB 00 +/*00520*/ AA_Array aa_array[MAX_AA]; // AAs +/*03392*/ uint8_t unknown03392[16]; +/*03408*/ uint32_t points; // Unspent Practice points +/*03412*/ uint32_t MANA; // Current MANA +/*03416*/ uint32_t curHp; // Current HP without +HP equipment +/*03420*/ uint32_t STR; // Strength +/*03424*/ uint32_t STA; // Stamina +/*03428*/ uint32_t CHA; // Charisma +/*03432*/ uint32_t DEX; // Dexterity +/*03436*/ uint32_t INT; // Intelligence +/*03440*/ uint32_t AGI; // Agility +/*03444*/ uint32_t WIS; // Wisdom +/*03448*/ uint8_t face; // Player face +/*03449*/ uint8_t unknown03449[147]; +/*03596*/ int32_t sSpellBook[400]; // List of the Spells in spellbook +/*05196*/ uint8_t unknown5196[448]; // all 0xff after last spell +/*05644*/ int32_t sMemSpells[MAX_SPELL_SLOTS]; // List of spells memorized +/*05680*/ uint8_t unknown05680[32]; +/*05712*/ uint32_t platinum; // Platinum Pieces on player +/*05716*/ uint32_t gold; // Gold Pieces on player +/*05720*/ uint32_t silver; // Silver Pieces on player +/*05724*/ uint32_t copper; // Copper Pieces on player +/*05728*/ uint32_t platinum_cursor; // Platinum Pieces on cursor +/*05732*/ uint32_t gold_cursor; // Gold Pieces on cursor +/*05736*/ uint32_t silver_cursor; // Silver Pieces on cursor +/*05740*/ uint32_t copper_cursor; // Copper Pieces on cursor +/*05744*/ uint32_t skills[MAX_KNOWN_SKILLS]; // List of skills +/*06044*/ uint8_t unknown06044[236]; +/*06280*/ uint32_t toxicity; // Potion Toxicity (15=too toxic, each potion adds 3) +/*06284*/ uint32_t thirst; // Drink (ticks till next drink) +/*06288*/ uint32_t hunger; // Food (ticks till next eat) +/*06292*/ spellBuff buffs[MAX_BUFFS]; // Buffs currently on the player +/*07092*/ uint32_t disciplines[MAX_DISCIPLINES]; // Known disciplines +/*07492*/ uint8_t unknown07492[160]; +/*07652*/ uint32_t recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use) +/*07732*/ uint32_t endurance; // Current endurance +/*07736*/ uint32_t aa_spent; // Number of spent AA points +/*07740*/ uint32_t aa_unspent; // Unspent AA points +/*07744*/ uint8_t unknown07744[4]; +/*07748*/ BandolierStruct bandoliers[MAX_BANDOLIERS]; // bandolier contents +/*14148*/ InlineItem potionBelt[MAX_POTIONS_IN_BELT]; // potion belt +/*14436*/ uint8_t unknown14436[92]; +/*14528*/ }; /* ** Player Profile -** Length: 19600 Octets +** Length: 21328 Octets ** OpCode: CharProfileCode */ struct charProfileStruct { /*00000*/ uint32_t checksum; // /*00004*/ playerProfileStruct profile; // Profile -/*12940*/ char name[64]; // Name of player -/*13004*/ char lastName[32]; // Last name of player -/*13036*/ uint8_t unknown13036[8]; //***Placeholder (1/18/2006) -/*13044*/ int32_t guildID; // guildID -/*13048*/ uint32_t birthdayTime; // character birthday -/*13052*/ uint32_t lastSaveTime; // character last save time -/*13056*/ uint32_t timePlayedMin; // time character played -/*13060*/ uint8_t pvp; // 1=pvp, 0=not pvp -/*13061*/ uint8_t anon; // 2=roleplay, 1=anon, 0=not anon -/*13062*/ uint8_t gm; // 0=no, 1=yes (guessing!) -/*13063*/ int8_t guildstatus; // 0=member, 1=officer, 2=guildleader -/*13064*/ uint8_t unknown13064[12]; -/*13076*/ uint32_t exp; // Current Experience -/*13080*/ uint8_t unknown13080[12]; -/*13092*/ uint8_t languages[MAX_KNOWN_LANGS]; // List of languages -/*13117*/ uint8_t unknown13117[7]; // All 0x00 (language buffer?) -/*13128*/ float y; // Players y position -/*13124*/ float x; // Players x position -/*13132*/ float z; // Players z position -/*13136*/ float heading; // Players heading -/*13140*/ uint8_t unknown13140[4]; // ***Placeholder -/*13144*/ uint32_t platinum_bank; // Platinum Pieces in Bank -/*13148*/ uint32_t gold_bank; // Gold Pieces in Bank -/*13152*/ uint32_t silver_bank; // Silver Pieces in Bank -/*13156*/ uint32_t copper_bank; // Copper Pieces in Bank -/*13160*/ uint32_t platinum_shared; // Shared platinum pieces -/*13164*/ uint8_t unknown13164[84]; -/*13248*/ uint32_t expansions; // Bitmask for expansions -/*13252*/ uint8_t unknown13252[12]; -/*13264*/ uint32_t autosplit; // 0 = off, 1 = on -/*13268*/ uint8_t unknown13268[16]; -/*13284*/ uint16_t zoneId; // see zones.h -/*13286*/ uint16_t zoneInstance; // Instance id -/*13288*/ char groupMembers[MAX_GROUP_MEMBERS][64];// all the members in group, including self -/*13672*/ char groupLeader[64]; // Leader of the group ? -/*13736*/ uint8_t unknown13736[660]; -/*14396*/ uint32_t leadAAActive; // 0 = leader AA off, 1 = leader AA on -/*14400*/ uint8_t unknown14400[4]; -/*14404*/ uint32_t ldon_guk_points; // Earned GUK points -/*14408*/ uint32_t ldon_mir_points; // Earned MIR points -/*14412*/ uint32_t ldon_mmc_points; // Earned MMC points -/*14416*/ uint32_t ldon_ruj_points; // Earned RUJ points -/*14420*/ uint32_t ldon_tak_points; // Earned TAK points -/*14424*/ uint32_t ldon_avail_points; // Available LDON points -/*14428*/ uint8_t unknown14428[132]; -/*14560*/ uint32_t tributeTime; // Time remaining on tribute (millisecs) -/*14564*/ uint32_t careerTribute; // Total favor points for this char -/*14568*/ uint32_t unknown14568; // *** Placeholder -/*14572*/ uint32_t currentTribute; // Current tribute points -/*14576*/ uint32_t unknown14576; // *** Placeholder -/*14580*/ uint32_t tributeActive; // 0 = off, 1=on -/*14584*/ TributeStruct tributes[MAX_TRIBUTES]; // Current tribute loadout -/*14624*/ uint8_t unknown14624[8]; -/*14632*/ uint32_t expGroupLeadAA; // Current group lead exp points (format though??) -/*14636*/ uint32_t unknown14636; -/*14640*/ uint32_t expRaidLeadAA; // Current raid lead AA exp points (format though??) -/*14644*/ uint32_t groupLeadAAUnspent; // Unspent group lead AA points -/*14648*/ uint32_t raidLeadAAUnspent; // Unspent raid lead AA points -/*14652*/ uint32_t leadershipAAs[MAX_LEAD_AA]; // Leader AA ranks -/*14780*/ uint8_t unknown14780[128]; -/*14908*/ uint32_t airRemaining; // Air supply (seconds) -/*14912*/ uint8_t unknown14912[4608]; -/*19520*/ uint32_t expAA; // Exp earned in current AA point -/*19524*/ uint8_t unknown19524[40]; -/*19564*/ uint32_t currentRadCrystals; // Current count of radiant crystals -/*19568*/ uint32_t careerRadCrystals; // Total count of radiant crystals ever -/*19572*/ uint32_t currentEbonCrystals; // Current count of ebon crystals -/*19576*/ uint32_t careerEbonCrystals; // Total count of ebon crystals ever -/*19580*/ uint8_t groupAutoconsent; // 0=off, 1=on -/*19581*/ uint8_t raidAutoconsent; // 0=off, 1=on -/*19582*/ uint8_t guildAutoconsent; // 0=off, 1=on -/*19583*/ uint8_t unknown19583[5]; // ***Placeholder (6/29/2005) -/*19588*/ uint32_t showhelm; // 0=no, 1=yes -/*19592*/ uint8_t unknown19592[4]; // ***Placeholder (10/27/2005) -/*19596*/ uint32_t unknown19596; // *** Placeholder -/*19600*/ +/*14528*/ char name[64]; // Name of player +/*14592*/ char lastName[32]; // Last name of player +/*14624*/ uint8_t unknown14624[12]; //***Placeholder (1/18/2006) +/*14636*/ int32_t guildID; // guildID +/*14640*/ uint32_t birthdayTime; // character birthday +/*14644*/ uint32_t lastSaveTime; // character last save time +/*14648*/ uint32_t timePlayedMin; // time character played +/*14652*/ uint8_t pvp; // 1=pvp, 0=not pvp +/*14653*/ uint8_t anon; // 2=roleplay, 1=anon, 0=not anon +/*14654*/ uint8_t gm; // 0=no, 1=yes (guessing!) +/*14655*/ int8_t guildstatus; // 0=member, 1=officer, 2=guildleader +/*14656*/ uint8_t unknown14656[12]; +/*14668*/ uint32_t exp; // Current Experience +/*14672*/ uint8_t unknown14672[12]; +/*14684*/ uint8_t languages[MAX_KNOWN_LANGS]; // List of languages +/*14709*/ uint8_t unknown14709[7]; // All 0x00 (language buffer?) +/*14716*/ float y; // Players y position +/*14720*/ float x; // Players x position +/*14724*/ float z; // Players z position +/*14728*/ float heading; // Players heading +/*14732*/ uint8_t unknown14732[4]; // ***Placeholder +/*14736*/ uint32_t platinum_bank; // Platinum Pieces in Bank +/*14740*/ uint32_t gold_bank; // Gold Pieces in Bank +/*14744*/ uint32_t silver_bank; // Silver Pieces in Bank +/*14748*/ uint32_t copper_bank; // Copper Pieces in Bank +/*14752*/ uint32_t platinum_shared; // Shared platinum pieces +/*14756*/ uint8_t unknown14756[84]; +/*14840*/ uint32_t expansions; // Bitmask for expansions +/*14844*/ uint8_t unknown14844[12]; +/*14856*/ uint32_t autosplit; // 0 = off, 1 = on +/*14860*/ uint8_t unknown14860[16]; +/*14876*/ uint16_t zoneId; // see zones.h +/*14878*/ uint16_t zoneInstance; // Instance id +/*14880*/ char groupMembers[MAX_GROUP_MEMBERS][64];// all the members in group, including self +/*15264*/ char groupLeader[64]; // Leader of the group ? +/*15328*/ uint8_t unknown15328[660]; +/*15988*/ uint32_t leadAAActive; // 0 = leader AA off, 1 = leader AA on +/*15992*/ uint8_t unknown15992[136]; +/*16128*/ uint32_t ldon_guk_points; // Earned GUK points +/*16132*/ uint32_t ldon_mir_points; // Earned MIR points +/*16136*/ uint32_t ldon_mmc_points; // Earned MMC points +/*16140*/ uint32_t ldon_ruj_points; // Earned RUJ points +/*16144*/ uint32_t ldon_tak_points; // Earned TAK points +/*16148*/ uint32_t ldon_avail_points; // Available LDON points +/*16152*/ uint8_t unknown16152[136]; +/*16288*/ uint32_t tributeTime; // Time remaining on tribute (millisecs) +/*16292*/ uint32_t careerTribute; // Total favor points for this char +/*16296*/ uint32_t unknown16296; // *** Placeholder +/*16300*/ uint32_t currentTribute; // Current tribute points +/*16304*/ uint32_t unknown16304; // *** Placeholder +/*16308*/ uint32_t tributeActive; // 0 = off, 1=on +/*16312*/ TributeStruct tributes[MAX_TRIBUTES]; // Current tribute loadout +/*16352*/ uint8_t unknown16352[8]; +/*16360*/ uint32_t expGroupLeadAA; // Current group lead exp points (format though??) +/*16364*/ uint32_t unknown16364; +/*16368*/ uint32_t expRaidLeadAA; // Current raid lead AA exp points (format though??) +/*16372*/ uint32_t groupLeadAAUnspent; // Unspent group lead AA points +/*16376*/ uint32_t raidLeadAAUnspent; // Unspent raid lead AA points +/*16380*/ uint32_t leadershipAAs[MAX_LEAD_AA]; // Leader AA ranks +/*16508*/ uint8_t unknown16508[128]; +/*16636*/ uint32_t airRemaining; // Air supply (seconds) +/*16640*/ uint8_t unknown16640[4608]; +/*21248*/ uint32_t expAA; // Exp earned in current AA point +/*21252*/ uint8_t unknown21252[40]; +/*21292*/ uint32_t currentRadCrystals; // Current count of radiant crystals +/*21296*/ uint32_t careerRadCrystals; // Total count of radiant crystals ever +/*21300*/ uint32_t currentEbonCrystals; // Current count of ebon crystals +/*21304*/ uint32_t careerEbonCrystals; // Total count of ebon crystals ever +/*21308*/ uint8_t groupAutoconsent; // 0=off, 1=on +/*21309*/ uint8_t raidAutoconsent; // 0=off, 1=on +/*21310*/ uint8_t guildAutoconsent; // 0=off, 1=on +/*21311*/ uint8_t unknown21311[5]; // ***Placeholder (6/29/2005) +/*21316*/ uint32_t showhelm; // 0=no, 1=yes +/*21320*/ uint8_t unknown21320[8]; // ***Placeholder (10/27/2005) +/*21328*/ }; #if 0 @@ -920,119 +932,105 @@ /* ** Generic Spawn Struct -** Length: 773 Octets +** Length: 900 Octets ** Used in: -** spawnZoneStruct ** dbSpawnStruct ** petStruct -** newSpawnStruct +** spawnShroudOther +** spawnShroudSelf */ + struct spawnStruct { -/*0000*/ uint32_t petOwnerId; // If this is a pet, the spawn id of owner -/*0004*/ uint8_t unknown0004[8]; -/*0012*/ uint32_t spawnId; // Spawn Id -/*0016*/ uint8_t unknown0016[4]; -/*0020*/ union +/*0000*/ uint8_t unknown0000[4]; +/*0004*/ float size; // Model size +/*0008*/ uint8_t unknown0008[4]; +/*0012*/ char lastName[32]; // Player's Lastname +/*0044*/ uint32_t race; // Spawn race +/*0048*/ uint8_t unknown0048[7]; +/*0055*/ float runspeed; // Speed when running +/*0059*/ uint8_t unknown0059[9]; +/*0068*/ float walkspeed; // Speed when walking +/*0072*/ int16_t deity; // Player's Deity +/*0074*/ uint8_t unknown0074[2]; +/*0076*/ uint8_t curHp; // Current hp +/*0077*/ uint8_t unknown0077; +/*0078*/ int8_t aa_title; // 0=none, 1=general, 2=archtype, 3=class +/*0079*/ uint8_t unknown0079[26]; +/*0105*/ uint8_t class_; // Player's class +/*0106*/ uint8_t unknown0106[16]; +/*0122*/ char title[32]; // Title +/*0154*/ uint8_t unknown0154; +/*0155*/ union { - struct + struct { - /*0020*/ uint32_t equip_helmet; // Equipment: Helmet Visual - /*0024*/ uint32_t equip_chest; // Equipment: Chest Visual - /*0028*/ uint32_t equip_arms; // Equipment: Arms Visual - /*0032*/ uint32_t equip_bracers; // Equipment: Bracers Visual - /*0036*/ uint32_t equip_hands; // Equipment: Hands Visual - /*0040*/ uint32_t equip_legs; // Equipment: Legs Visual - /*0044*/ uint32_t equip_feet; // Equipment: Feet Visual - /*0048*/ uint32_t equip_primary; // Equipment: Primary Visual - /*0052*/ uint32_t equip_secondary; // Equipment: Secondary Visual + /*0155*/ EquipStruct equip_helmet; // Equiptment: Helmet visual + /*0167*/ EquipStruct equip_chest; // Equiptment: Chest visual + /*0179*/ EquipStruct equip_arms; // Equiptment: Arms visual + /*0191*/ EquipStruct equip_bracers; // Equiptment: Wrist visual + /*0203*/ EquipStruct equip_hands; // Equiptment: Hands visual + /*0215*/ EquipStruct equip_legs; // Equiptment: Legs visual + /*0227*/ EquipStruct equip_feet; // Equiptment: Boots visual + /*0239*/ EquipStruct equip_primary; // Equiptment: Main visual + /*0251*/ EquipStruct equip_secondary; // Equiptment: Off visual } equip; - /*0020*/ uint32_t equipment[9]; // Array elements correspond to struct equipment above + /*0155*/ EquipStruct equipment[9]; }; -union -{ -/*0056*/ int8_t equip_chest2; // Second place in packet for chest texture (usually 0xFF in live packets) - // Not sure why there are 2 of them, but it effects chest texture! -/*0056*/ int8_t mount_color; // drogmor: 0=white, 1=black, 2=green, 3=red - // horse: 0=brown, 1=white, 2=black, 3=tan -}; -/*0057*/ uint8_t eyecolor1; // Player's left eye color -/*0058*/ char name[64]; // Player's Name -/*0122*/ uint8_t unknown0122; -/*0123*/ int16_t deity; // Player's Deity -/*0125*/ uint8_t unknown0125[7]; -/*0132*/ uint8_t level; // Spawn Level -/*0133*/ uint8_t set_to_0xFF[8]; // ***Placeholder (all ff) -/*0141*/ uint32_t guildID; // Current guild -/*0145*/ uint8_t unknown0145; -/*0146*/ char lastName[32]; // Player's Lastname -/*0178*/ uint8_t NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse,a -/*0179*/ uint8_t unknown0179; -/*0180*/ union +/*0263*/ uint8_t unknown0263[14]; +/*0277*/ uint32_t guildID; // Current guild +/*0281*/ uint8_t unknown0281[5]; +/*0286*/ signed y:19; // y coord + signed deltaZ:13; // change in z +/*0290*/ signed z:19; // z coord + signed animation:10; // animation + signed padding0290:3; // ***Placeholder +/*0294*/ signed deltaHeading:10;// change in heading + signed deltaY:13; // change in y + signed padding0294:9; // ***Placeholder +/*0298*/ signed x:19; // x coord + signed padding0298:1; // ***Placeholder + unsigned heading:12; // heading +/*0302*/ signed deltaX:13; // change in x + ... [truncated message content] |