PDA

View Full Version : The Serpent's Spine live release info.



CeleSEQ
09-19-2006, 03:41 PM
Post your findings here. We'll almost certainly need new opcodes, and quite possibly some struct work.

showeq42
09-19-2006, 06:05 PM
Opcodes didnt change, though there is an important new one.
I have seq working 100%, here's my spawnstruct. note the equipment struct was changed, this will need a change in spawn.cpp too (I changed equipment[i] to equipment[i].equip in 2 places)


/*
** Generic Spawn Struct
** Length: 900 Octets
** Used in:
** dbSpawnStruct
** spawnShroudOther
** spawnShroudSelf
*/

struct spawnStruct
{
/*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*/ struct
{
uint32_t equip0;
uint32_t equip1;
uint32_t equip;
} equipment[9];
/*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
signed padding0302:19; // ***Placeholder
/*0306*/ uint8_t unknown0306[2];
/*0308*/ uint8_t gender; // Gender (0=male, 1=female)
/*0309*/ uint8_t unknown0309[138];
/*0447*/ uint8_t gm; // 0=no, 1=gm
/*0448*/ uint8_t unknown0448[11];
/*0459*/ union
{
struct
{
/*0459*/ Color_Struct color_helmet; // Color of helmet item
/*0463*/ Color_Struct color_chest; // Color of chest item
/*0467*/ Color_Struct color_arms; // Color of arms item
/*0471*/ Color_Struct color_bracers; // Color of bracers item
/*0475*/ Color_Struct color_hands; // Color of hands item
/*0479*/ Color_Struct color_legs; // Color of legs item
/*0483*/ Color_Struct color_feet; // Color of feet item
/*0487*/ Color_Struct color_primary; // Color of primary item
/*0491*/ Color_Struct color_secondary; // Color of secondary item
} equipment_colors;
/*0459*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
};
/*0495*/ uint8_t unknown0495[200];
/*0695*/ char name[64]; // Player's Name
/*0759*/ uint8_t level; // Spawn Level
/*0760*/ uint8_t unknown0760;
/*0761*/ uint32_t petOwnerId; // If this is a pet, the spawn id of owner
/*0765*/ uint8_t NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse
/*0766*/ uint8_t unknown0766[9];
/*0775*/ uint32_t spawnId; // Spawn Id
/*0779*/ uint8_t unknown0779[40];
/*0819*/ uint8_t bodytype; // Bodytype
/*0820*/ uint8_t unknown0820[11];
/*0831*/ uint8_t light; // Spawn's lightsource
/*0832*/ uint8_t unknown0832[36];
/*0868*/ char suffix[32]; // Player's suffix (of Veeshan, etc.)
/*0900*/

};

showeq42
09-19-2006, 07:11 PM
OP_MobUpdate is being used again, it's 1399

There is a new opcode for npc movement, 5f33
It's variable length and is packed together tightly

x,y,z,h are always sent
others are only sent when non-zero:
p=pitch
v=velocity
dh,dx,dy,dz
first 16 bits are the spawn id, next 6 tell which of the 6 optional fields are being sent, then y,x,z,h, then any optional fields

this is what i have in my zoneopcodes.xml

<opcode id="5f33" name="OP_NpcMoveUpdate" updated="08/13/06">
<comment>Position updates</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>

interface.cpp

m_packet->connect2("OP_NpcMoveUpdate", SP_Zone, DIR_Server,
"uint8_t", SZC_None,
m_spawnShell, SLOT(npcMoveUpdate(const uint8_t*, size_t, uint8_t)));


maybe there is a more elegant way of doing this but this works
spawnshell.cpp:

void SpawnShell::npcMoveUpdate(const uint8_t* data, size_t len, uint8_t dir)
{
uint16_t id;
int16_t x, y, z, h, p=0, v=0, dh=0, dx=0, dy=0, dz=0;
uint8_t c[11];
size_t i;

if ((len < 13) || (len > 21)) {
printf("Error: Length %d\n", len);
return;
}

// if zoning, then don't do anything
if (m_zoneMgr->isZoning())
return;

id = (data[0] << 8) + data[1];

y = (data[4] >> 2) + (data[3] << 6) + ((data[2] & 1) << 14);
x = (data[7] >> 7) + (data[6] << 1) + ((data[5] & 63) << 9);
z = (data[9] >> 4) + (data[8] << 4) + ((data[7] & 7) << 12);
if (data[2] & 2) y = -y;
if (data[5] & 64) x = -x;
if (data[7] & 8) z = -z;

h = (data[11] >> 5) + (data[10] << 3);
if (data[9] & 1) h = -h;

for (i=11; i<len-1; i++)
c[i-9] = (data[i] << 3) + (data[i+1] >> 5);
c[i-9] = (data[i] << 3);

if (data[2] & 0x04) {
for (i=0; i<len-12; i++)
c[i] = (c[i+1] << 4) + (c[i+2] >> 4);
c[i] = c[i+1] << 4;
p = ((c[0] & 7) << 8) + c[1];
if (c[0] & 8) p = -p;
}
if (data[2] & 0x08) {
for (i=0; i<len-12; i++)
c[i] = (c[i+1] << 2) + (c[i+2] >> 6);
c[i] = c[i+1] << 2;
dh = ((c[0] & 1) << 8) + c[1];
if (c[0] & 2) dh = -dh;
}
if (data[2] & 0x10) {
for (i=0; i<len-12; i++)
c[i] = (c[i+1] << 2) + (c[i+2] >> 6);
c[i] = c[i+1] << 2;
v = ((c[0] & 1) << 8) + c[1];
if (c[0] & 2) v = -v;
}
if (data[2] & 0x20) {
for (i=0; i<len-12; i++)
c[i] = (c[i+1] << 5) + (c[i+2] >> 3);
c[i] = c[i+1] << 5;
dy = ((c[0] & 15) << 8) + c[1];
if (c[0] & 16) dy = -dy;
}
if (data[2] & 0x40) {
for (i=0; i<len-12; i++)
c[i] = (c[i+1] << 5) + (c[i+2] >> 3);
c[i] = c[i+1] << 5;
dx = ((c[0] & 15) << 8) + c[1];
if (c[0] & 16) dx = -dx;
}
if (data[2] & 0x80) {
for (i=0; i<len-12; i++)
c[i] = (c[i+1] << 5) + (c[i+2] >> 3);
c[i] = c[i+1] << 5;
dz = ((c[0] & 15) << 8) + c[1];
if (c[0] & 16) dz = -dz;
}

dy >>= 2;
dx >>= 2;
updateSpawn(id, x, y, z, dx, dy, 0, 0, 0, 0);

}

showeq42
09-19-2006, 07:47 PM
The rest of my everquest.h changes
I've hacked the file up a bit so a diff wasn't going to work well, so i'm posting the whole structs.


#define MAX_AA 359
#define MAX_BANDOLIERS 20
#define MAX_DISCIPLINES 100

/*
** Player Position Update
** Length: 26 Octets
** OpCode: PlayerPosCode
*/
struct playerSpawnPosStruct
{
/*0000*/ uint16_t spawnId; // spawn id of the thing moving
/*0002*/ signed padding1:12; // ***Placeholder
signed deltaZ:13; // change in z
signed padding2:7; // ***Placeholder
/*0006*/ signed y:19; // y coord
signed padding3:13; // ***Placeholder
/*0010*/ signed z:19; // z coord
signed animation:10; // animation
signed padding4:3; // ***Placeholder
/*0014*/ signed deltaHeading:10;// change in heading
signed deltaY:13; // change in y
signed padding5:9; // ***Placeholder
/*0018*/ signed x:19; // x coord
unsigned heading:12; // heading
signed padding6:1; // ***Placeholder
/*0022*/ signed deltaX:13; // change in x
signed padding7:19; // ***Placeholder
/*0026*/
};



/*
** Buffs
** Length: 32 Octets
** Used in:
** charProfileStruct(2d20)
*/
struct spellBuff
{
/*0000*/ uint8_t unknown0000; //
/*0001*/ int8_t level; // Level of person who cast buff
/*0002*/ uint8_t unknown0002; //
/*0003*/ uint8_t unknown0003; //
/*0004*/ int32_t spellid; // Spell
/*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*/ uint8_t unknown0020[12];
/*0032*/
};


/*
** New Zone Code
** Length: 836 Octets
** OpCode: NewZoneCode
*/
struct newZoneStruct
{
/*0000*/ char name[64]; // Character name
/*0064*/ char shortName[32]; // Zone Short Name (maybe longer?)
/*0096*/ char unknown0096[96];
/*0192*/ char longName[278]; // Zone Long Name
/*0470*/ uint8_t ztype; // Zone type
/*0471*/ uint8_t fog_red[4]; // Zone fog (red)
/*0475*/ uint8_t fog_green[4]; // Zone fog (green)
/*0479*/ uint8_t fog_blue[4]; // Zone fog (blue)
/*0483*/ uint8_t unknown0483[87]; // *** Placeholder
/*0570*/ uint8_t sky; // Zone sky
/*0571*/ uint8_t unknown0571[13]; // *** Placeholder
/*0584*/ float zone_exp_multiplier; // Experience Multiplier
/*0588*/ float safe_y; // Zone Safe Y
/*0592*/ float safe_x; // Zone Safe X
/*0596*/ float safe_z; // Zone Safe Z
/*0600*/ float unknown0600; // *** Placeholder
/*0604*/ float underworld; // Underworld
/*0608*/ float minclip; // Minimum view distance
/*0612*/ float maxclip; // Maximum view distance
/*0616*/ uint8_t unknown0616[172]; // *** Placeholder
/*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[36]; // *** Placeholder (06/13/2006)
/*0836*/
};


/*
** Drop Item On Ground
** Length: 104 Octets
** OpCode: MakeDropCode
*/
struct makeDropStruct
{
/*0000*/ uint32_t prevObject; // Previous object in the linked list
/*0004*/ uint32_t nextObject; // Next object in the linked list
/*0008*/ uint32_t unknown0008; // ***Placeholder
/*0012*/ uint32_t dropId; // DropID
/*0016*/ uint16_t zoneId; // ZoneID
/*0018*/ uint16_t zoneInstance; // Zone instance id
/*0020*/ uint8_t unknown0020[8]; // ***Placeholder
/*0028*/ uint8_t unknown0028[12]; // ***Placeholder
/*0040*/ float heading; // Heading
/*0044*/ float z; // Z Position
/*0048*/ float x; // X Position
/*0052*/ float y; // Y Position
/*0056*/ char idFile[16]; // ACTOR ID
/*0072*/ uint32_t unknown0072[5]; // ***Placeholder
/*0092*/ uint32_t dropType; // drop type
/*0096*/ uint32_t unknown0096; // ***Placeholder
/*0100*/ uint32_t userSpawnID; // spawn id of the person using
/*0104*/
};

struct spawnIllusionStruct
{
/*0000*/ uint32_t spawnId; // Spawn id of the target
/*0004*/ char name[64]; // Name of the target
/*0068*/ uint32_t race; // New race
/*0072*/ uint8_t gender; // New gender (0=male, 1=female)
/*0073*/ uint8_t texture; // ???
/*0074*/ uint8_t helm; // ???
/*0075*/ uint8_t unknown0077; // ***Placeholder
/*0076*/ uint32_t face; // New face
/*0080*/ uint8_t unknown0080[176]; // ***Placeholder
/*0256*/
};


/*
** Consider Struct
** Length: 20 Octets
** OpCode: considerCode
*/
struct considerStruct
{
/*0000*/ uint32_t playerid; // PlayerID
/*0004*/ uint32_t targetid; // TargetID
/*0008*/ int32_t faction; // Faction
/*0012*/ int32_t level; // Level
/*0016*/ int32_t unknown0016; // unknown
/*0020*/
};


struct action2Struct
{
/*0000*/ uint16_t target; // Target ID
/*0002*/ uint16_t source; // Source ID
/*0004*/ uint8_t type; // Bash, kick, cast, etc.
/*0005*/ int16_t spell; // SpellID
/*0007*/ int32_t damage;
/*0011*/ uint8_t unknown0011[13]; // ***Placeholder
/*0024*/
};

struct SpawnUpdateStruct
{
/*0000*/ uint16_t spawnId; // Id of spawn to update
/*0002*/ uint16_t subcommand; // some sort of subcommand type
/*0004*/ int16_t arg1; // first option
/*0006*/ int16_t arg2; // second option
/*0008*/ uint8_t arg3; // third option?
/*0009*/ uint8_t unknown0009[10];
/*0019*/
};

struct playerProfileStruct
{
/*00004*/ uint32_t gender; // Player Gender - 0 Male, 1 Female
/*00008*/ uint32_t race; // Player race
/*00012*/ uint32_t class_; // Player class
/*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: 21328 Octets
** OpCode: CharProfileCode
*/
struct charProfileStruct
{
/*00000*/ uint32_t checksum; //
/*00004*/ playerProfileStruct profile; // Profile
/*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*/
};

showeq42
09-19-2006, 07:57 PM
this line needs to change in interface.cpp (70 to 75)
m_levelSpinBox = new QSpinBox(1, 75, 1, this, "m_levelSpinBox");


change to player.cpp to support level 75 and some con changes

*** /showeq-5.5.0.0/src/player.cpp
--- player.cpp
***************
*** 1072,1085 ****
int greenRange = 0;
int cyanRange = 0;

! if (level() < 8)
! { // 1 - 7
greenRange = -4;
cyanRange = -8;
}
else if (level() < 13)
! { // 8 - 12
! greenRange = -5;
cyanRange = -4;
}
else if (level() < 23)
--- 1072,1085 ----
int greenRange = 0;
int cyanRange = 0;

! if (level() < 9)
! { // 1 - 8
greenRange = -4;
cyanRange = -8;
}
else if (level() < 13)
! { // 9 - 12
! greenRange = -6;
cyanRange = -4;
}
else if (level() < 23)
***************
*** 1137,1146 ****
greenRange = -20;
cyanRange = -15;
}
! else if (level() < 71)
{ //57 - 70
! greenRange = -21;
! cyanRange = -16;
}

uint8_t spawnLevel = 1;
--- 1137,1146 ----
greenRange = -20;
cyanRange = -15;
}
! else if (level() < 76)
{ //57 - 70
! greenRange = -16;
! cyanRange = -6;
}

uint8_t spawnLevel = 1;

lomandar
09-20-2006, 12:38 AM
Thank you for the detailed information showeq42.

After much banging of my head attempting to impliment these changes myself, I've come to the conclusion...I'm incompitent.

Any way you'd be willing to email the changed files or otherwise host them please?

ododecat at gmail dot com

Thank you in advance either way. :)

Buundi
09-20-2006, 02:30 AM
I am having compile problems as well, I am fixing them as they come up but still.

Things like this in the everquest.h file:
/*07736*/ uint32_t aa_spent; // Number of spent AA points
/*07736*/ uint32_t aa_spent; // Number of spent AA points

And Spawnshell.cpp reporting maxHp, curHp missing from considerStruct after replacing
struct considerStruct in everquest.h

So looks like there are a couple little things wrong with the above code unless I am screwing something up as well.

Which is entirely possible at almost 4am :P

showeq42
09-20-2006, 03:07 AM
Things like this in the everquest.h file:
/*07736*/ uint32_t aa_spent; // Number of spent AA points
/*07736*/ uint32_t aa_spent; // Number of spent AA points

And Spawnshell.cpp reporting maxHp, curHp missing from considerStruct after replacing
struct considerStruct in everquest.h copy/paste error on everquest.h, i put in that line twice, i edited and fixed that.

I commented out this section in spawnshell.cpp, since that data doesn't seem to be sent anymore on a con


/* 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;
}
*/


also changed this, it doesnt look like animation is being used now.


spawn->setAnimation(animation);
+
+ spawn->setDeltas(xVel, yVel, zVel);
+ spawn->setHeading(heading, deltaHeading);
+ /*
if ((animation != 0) && (animation != 66))
{
spawn->setDeltas(xVel, yVel, zVel);
spawn->setHeading(heading, deltaHeading);
}
else
{
spawn->setDeltas(0, 0, 0);
spawn->setHeading(heading, 0);
}
+ */

// Distance

showeq42
09-20-2006, 03:46 AM
Some more things i commented out. I think these are the last of my changes for tss...


*** /showeq-5.5.0.0/src/spawn.cpp
--- spawn.cpp
***************
*** 425,431 ****
setAnimation(s->animation);

// only non corpses and things with animation != 66 move
! if (!isCorpse() && (s->animation != 66))
{
setDeltas(s->deltaX >> 2, s->deltaY >> 2, s->deltaZ >> 2);
setHeading(s->heading, s->deltaHeading);
--- 425,431 ----
setAnimation(s->animation);

// only non corpses and things with animation != 66 move
! if (!isCorpse()) /*&& (s->animation != 66))*/
{
setDeltas(s->deltaX >> 2, s->deltaY >> 2, s->deltaZ >> 2);
setHeading(s->heading, s->deltaHeading);


*** /showeq-5.5.0.0/src/messageshell.cpp
--- messageshell.cpp
***************
*** 865,875 ****
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) + ")!";
--- 980,990 ----
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) + ")!";

*** /showeq-5.5.0.0/src/spawnshell.h
--- spawnshell.h
***************
*** 106,111 ****
--- 106,112 ----
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,

purple
09-20-2006, 04:14 AM
If you don't know how to take this work and fold it in, you're better off just waiting for a release. I spent all last night downloading patch stuff so assuming this stuff is good (from reading diffs, it looks more than reasonable) that shouldn't be far off.

Thanks for posting all the code, showeq42. I appreciate it.

showeq42
09-20-2006, 06:12 AM
I made a diff, tested it, it compiles and runs.

Buundi
09-20-2006, 10:05 AM
diff file works like a champ, thanks showeq42! :)

tanner
09-20-2006, 11:02 AM
Format: 1.7
Date: Wed, 20 Sep 2006 11:24:57 -0500
Source: showeq
Binary: showeq-dev showeq showeq-doc
Architecture: source i386 all
Version: 5.5.0.0~UNOfficial1-2
Distribution: unstable
Urgency: low
Maintainer: Robert J. Tanner <[email protected]>
Changed-By: Robert J. Tanner <[email protected]>
Description:
showeq - realtime packet analyzer for Everquest
showeq-dev - development tools for ShowEQ
showeq-doc - documentation for showeq
Changes:
showeq (5.5.0.0~UNOfficial1-2) unstable; urgency=low
.
* UNOfficial Patch for TSS http://www.showeq.net/forums/showthread.php?t=5695
Files:
fe05c19c910de08eb7d8c02aced2b230 789 x11 optional
+showeq_5.5.0.0~UNOfficial1-2.dsc
9de927c2d4d43e8d4a89ebf7b3e33712 1324234 x11 optional
+showeq_5.5.0.0~UNOfficial1-2.tar.gz
c63e294624dc7c4b0eddfddd3df7ed76 11158284 doc optional
+showeq-doc_5.5.0.0~UNOfficial1-2_all.deb
328a22935fb3f3ad857ea6e629980421 4454044 x11 optional
+showeq_5.5.0.0~UNOfficial1-2_i386.deb
d5de617011d95c72ecb9a9c8fb444b42 86240 x11 optional
+showeq-dev_5.5.0.0~UNOfficial1-2_i386.deb

Noobian
09-20-2006, 04:44 PM
I'm so totally illeterate in Linux that it hurts. I'm looking on the internet for how to apply a diff file. I'm finding some stuff but I'm unsure of myself. Would one of you be kind enough to post some instructions on how to apply the diff file mentioned above?

Thanks a million;

Noobian

Hendrix_Morton
09-20-2006, 04:58 PM
Tried applying this patch to the 5.5.0.0 tar extract and get this:



[root@db1 src]# pwd
/showeq/showeq-5.5.0.0/src
[root@db1 src]# patch -p1 < diff
missing header for context diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|*** /showeq/showeq-5.5.0.0/src/interface.cpp
|--- interface.cpp
--------------------------
File to patch:



Any thoughts? This is on FC4

ManOnTheMoon
09-20-2006, 05:58 PM
Put file up one dir and run from there.

Err 2 dir's

Chains20
09-20-2006, 06:10 PM
The FAQ says to do an update,
# cd showeq
# cvs -z3 update
Am I correct that there's a different update process using the sudo apt-get command?

BlueAdept
09-20-2006, 06:53 PM
I wanted to thank you for fixing SEQ so quickly. It is great to see SEQ working when EQ isnt.

I'm back btw. I decided to re-up for a month to see some of the new content.

Backspace
09-20-2006, 07:00 PM
By no means am I an expert, but here's what I did
1. Downloaded and unziped the diff file into my seq folder.
2. #patch -p1 < diff
3. Then every time is asked for file to patch, manually entered the full path and file name
(see above post)
4. Then ran the normal compile routine: ./configure, make, make install
5. Launched showeq and all works good.

I'm sure there's a faster way to apply the diff file, but that's how I did it and it worked.

Hope this helps...

uRit1u2CBBA=
09-20-2006, 07:54 PM
Chains20 - that FAQ is old. Getting files from the cvs is no longer the recommended method of getting updates.

This isn't an official release yet anyway, so wouldn't be in cvs. Just someone's patch that was submitted and will likely be used plus additional changes in the next official release.

Backspace - that's about what I did, except I didn't re-run configure.

dogmeat
09-20-2006, 09:49 PM
everything works fine for me except i don't get highlighted /con's when in map window with "hilight on consider" checked, and the heading vector line for me never gets updated, so as i rotate it says i'm still pointed in the same direction. i manually updated to showeq42's code before the diff, so may have made a mistake. does the diff have this behavior?

thanks

uRit1u2CBBA=
09-20-2006, 11:46 PM
I used the diff, and the compass seems to work just fine. The only thing that I'm trying to figure out is how to get Yellows to 3 levels above you instead of 2. That part of the code didn't jump out at me like I expected it to. If I get around to it, I'll try to play with Gray-con coding as well if purple doesn't beat me to it, but that's not as important to me.

cydex01
09-21-2006, 10:44 AM
Belongs in help forum, sorry.

KaL
09-21-2006, 11:56 PM
Works great for me. Thanks guys!

uRit1u2CBBA=
09-22-2006, 07:31 AM
Someone (sorry, forgot your name before deleting it, or I would give you credit) PMed me this diff to change the yellow cons to 3 levels. I've not yet tested it yet. I'll do that tonight, but thought I'd post this now so others can look at it:



--- showeq-5.5.0.0/src/player.cpp 2006-09-20 18:31:24.000000000 +0200
+++ ./player.cpp 2006-09-22 13:55:35.000000000 +0200
@@ -1181,7 +1181,11 @@
m_conTable[spawnLevel++] = QColor(m_conColorBases[tYellowSpawn].red(),
m_conColorBases[tYellowSpawn].green() - 30,
m_conColorBases[tYellowSpawn].blue()); // yellow con
+ m_conTable[spawnLevel++] = QColor(m_conColorBases[tYellowSpawn].red(),
+ m_conColorBases[tYellowSpawn].green() - 60,
+ m_conColorBases[tYellowSpawn].blue()); // yellow con

+
uint8_t redBase = m_conColorBases[tRedSpawn].red();
uint8_t redScale = 255 - redBase;
for (; spawnLevel < maxSpawnLevel; spawnLevel++)
@@ -1190,7 +1194,7 @@
m_conTable[spawnLevel] = m_conColorBases[tRedSpawn];
else
{
- scale = redScale/(spawnLevel - level() - 2);
+ scale = redScale/(spawnLevel - level() - 3);
m_conTable[spawnLevel] = QColor((redBase + scale),
m_conColorBases[tRedSpawn].green(),
m_conColorBases[tRedSpawn].blue());

uRit1u2CBBA=
09-24-2006, 11:54 AM
Here's a diff that I made to update some of the "weapons". (i.e. the U2xxxx codes you see on ground spawns, some of the wepons held by players and NPC, and some new models for tradeskill containers.)

There is no functional changes to this, this just changes some of the U2 codes to more meaningful names. There's a few in Cresent Reach that I've been unable to determine due to a locked door in my way, if I find out what they are, I'll generate a new diff.

purple
09-24-2006, 11:58 AM
Thanks, uRit.

purple
09-26-2006, 01:18 PM
Does anyone have any details about the lower con colors? Seq already does scaling of the con colors, so the new dark blue doesn't seem worth dealing with. But the whole green/gray thing I'd like to get in.

Are there full ranges now for a gray cutoff, then a band of green, band of light blue, band of blue, band of dark blue, even, 3 levels of yellow, then red now? How big are the bands for green/light blue/blue/dark blue?

OgerSEQ
09-26-2006, 01:21 PM
I don't know about the levels but it goes gray, green, light blue, blue, white, yellow, red. There are only 2 blue colors. Yellow is 3 levels now instead of 2, that's all I can confirm.

purple
09-26-2006, 01:40 PM
Ah, so they failed in inventing a dark blue and that's where gray came in? I guess that makes sense.

uRit1u2CBBA=
09-26-2006, 02:47 PM
I've been playing a low level and keeping on eye on things for that.

seems that the old Green levels are now the old Gray levels - so you can almost mimic the old code for that.

what's now greens didn't start showing up until I was L9, and I think L4's were gray, L5's were green, and L6's were navy. (no light blues yet).

And yes, there are still 2 shades of blue, "I call them lt blue and navy", that used to be the entire range of the old "navy" cons.

Before TSS, there were "navy" that gave OK XP, and "navy" that gave better XP .. the OK is now the lt blue and the better is still navy. Then what was green is now lt blue, and what was green is gray.

The gray came in to match what EQ2 (and apparently , other MMOs) do.

CeleSEQ
09-27-2006, 01:16 AM
I've also built an unofficial release to tide people over til a full build is ready.

You can get your Fedora Core 3, Fedora Core 4, and RHEL4 RPMs, as well as a source RPM at

http://fedora.showeq.org

Enjoy,
~CeleSeq

PS. I was lazy, so this only includes showeq42's patch, not the weapons patch or the con level patch that uRit posted.

purple
09-27-2006, 07:09 AM
So there is a new cut off.

Old green = new gray
Old light blue = new green
Old blue = new light blue/new blue
Even = same
Old yellow (2 level) = new yellow (3 level)
Above that is red.

Seq right now gradients the spawn colors anyways, so I feel ok ignoring the light blue/new blue, though I may adjust the gradient. I'll swap green to gray and light blue to green I guess and then bump yellow up (which is what uRit's posted patch above does correctly).

If people see problems with the cons, please report them

showeq42
09-27-2006, 07:15 PM
These are the correct cons (pre tss)

old green is now gray
old cyan is now green
old blues > 5 levels below you are now cyan


if (level() < 9)
{ // 1 - 8
greenRange = -4;
cyanRange = -8;
}
else if (level() < 13)
{ // 9 - 12
greenRange = -6;
cyanRange = -4;
}
else if (level() < 17)
{ // 13 - 16
greenRange = -7;
cyanRange = -5;
}
else if (level() < 21)
{ // 17 - 20
greenRange = -8;
cyanRange = -6;
}
else if (level() < 25)
{ // 21 - 24
greenRange = -9;
cyanRange = -7;
}
else if (level() < 29)
{ // 25 - 28
greenRange = -10;
cyanRange = -8;
}
else if (level() < 33)
{ // 29 - 32
greenRange = -11;
cyanRange = -9;
}
else if (level() < 37)
{ // 33 - 36
greenRange = -13;
cyanRange = -10;
}
else if (level() < 41)
{ // 37 - 40
greenRange = -14;
cyanRange = -11;
}
else if (level() < 45)
{ // 41 - 44
greenRange = -16;
cyanRange = -12;
}
else if (level() < 49)
{ // 45 - 48
greenRange = -17;
cyanRange = -13;
}
else if (level() < 53)
{ // 49 - 52
greenRange = -18;
cyanRange = -14;
}
else if (level() < 57)
{ // 53 - 56
greenRange = -20;
cyanRange = -15;
}
else
{ // 57+
greenRange = -21;
cyanRange = -16;
}

showeq42
09-28-2006, 02:24 AM
I added support for the new con colors.
Gray sucks, and it's already used for unknown spawns, so I set the default color for it to the old green (0,95,0) and the new green (old light blue) to light green (0,255,0).
I improved the gradient for red (it now goes from light red to dark from level+4 to level+10) and removed the other gradients since we have multiple levels of green/gray and blue already.

Attached is my diff against 5.5.0.0, it includes my player.cpp and interface.cpp changes in my previous diff

purple
09-28-2006, 07:06 AM
Thanks for the diff, showeq42. It is much appreciated. For future reference, unified diffs are much easier to read!

LordCrush
09-28-2006, 03:54 PM
I wanted to thank you for fixing SEQ so quickly. It is great to see SEQ working when EQ isnt.

I'm back btw. I decided to re-up for a month to see some of the new content.

Ups you did it ;)

i am thinking about coming back, but i have too much work at the moment ... perhaps its good so ;)

/wave Blue Adept

-- Cheers

uRit1u2CBBA=
09-28-2006, 05:21 PM
Small error with the colors from the new diff.

They have "lvl - 5" is lt blue.

At L75, L70s in-game are still navy, so the formula should be "lvl - 6".

purple
09-28-2006, 06:24 PM
uRit can you be more exact? I don't know what navy means. Do you mean that at level 75, a level 70 mob is light blue? Or that they are dark blue?

showeq42
09-28-2006, 06:31 PM
The code is correct, less than level -5 is lt blue


for (; spawnLevel < level() - 5; spawnLevel++)
{ // light blue cons here

uRit1u2CBBA=
09-28-2006, 08:35 PM
The code is correct, less than level -5 is lt blue


for (; spawnLevel < level() - 5; spawnLevel++)
{ // light blue cons here

That sounds like it should be right, but L70s in seq are still showing light blue for some reason.

showeq42
09-28-2006, 09:51 PM
70's are showing up dark blue in seq for me at 75...

uRit1u2CBBA=
09-29-2006, 09:30 AM
ahh - nm.

I was trying to manually apply the diff since I already did some of the changes from your first one.

I didn't see that you changed the <= to a < in that line.

Things are good. Thanks again :)

ksmith
09-29-2006, 10:01 AM
maybe there is a more elegant way of doing this but this works
spawnshell.cpp:

void SpawnShell::npcMoveUpdate(const uint8_t* data, size_t len, uint8_t dir)
<snipped: enough bit-shifting and 1-2 letter variables to make a nun curse>

For anyone who went cross-eyed looking at that npcMoveUpdate code for unraveling the bitstream, the following is essentially what the client does when receiving OP_NpcMoveUpdate:


void OP_NpcMoveUpdate(BitStream data) {
MovementDelta moveinfo;

moveinfo.spawnID = data:ReadUInt(0x10);
moveinfo.flags = data:ReadUInt(0x06);
moveinfo.y = data:ReadInt(0x13);
moveinfo.x = data:ReadInt(0x13);
moveinfo.z = data:ReadInt(0x13);
moveinfo.h = data:ReadInt(0x0c); // heading

if (flags & 0x01) moveinfo.vp = data:ReadInt(0x0c); // pitch
if (flags & 0x02) moveinfo.fh = data:ReadInt(0x0a); // heading
if (flags & 0x04) moveinfo.v = data:ReadInt(0x0a); // velocity
if (flags & 0x08) moveinfo.vy = data:ReadInt(0x0d); // dy
if (flags & 0x10) moveinfo.vx = data:ReadInt(0x0d); // dx
if (flags & 0x20) moveinfo.vz = data:ReadInt(0x0d); // dz

UpdateNpcMovement(moveinfo);
}