|
From: Chad M. <cmm...@us...> - 2005-05-10 16:20:50
|
Update of /cvsroot/seq/showeq/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18622/src Modified Files: Tag: pre_5_0_beta player.h skilllist.cpp Log Message: Changed player's skills array to be uint32_t instead of uint8_t. Removed the special 254/255 values from the skill list so skills with those values actually show up properly in the list. Index: player.h =================================================================== RCS file: /cvsroot/seq/showeq/src/player.h,v retrieving revision 1.21.6.3 retrieving revision 1.21.6.4 diff -u -d -r1.21.6.3 -r1.21.6.4 --- player.h 7 Nov 2004 23:10:25 -0000 1.21.6.3 +++ player.h 10 May 2005 16:20:38 -0000 1.21.6.4 @@ -100,7 +100,7 @@ int16_t headingDegrees() const { return m_headingDegrees; } bool validPos() const { return m_validPos; } - uint8_t getSkill(uint8_t skillId) { return m_playerSkills[skillId]; } + uint32_t getSkill(uint8_t skillId) { return m_playerSkills[skillId]; } uint8_t getLanguage(uint8_t langId) { return m_playerLanguages[langId]; } int getPlusHP() { return m_plusHP; } @@ -210,7 +210,7 @@ uint16_t m_defaultDeity; uint8_t m_defaultClass; uint8_t m_defaultLevel; - uint8_t m_playerSkills[MAX_KNOWN_SKILLS]; + uint32_t m_playerSkills[MAX_KNOWN_SKILLS]; uint8_t m_playerLanguages[MAX_KNOWN_LANGS]; uint16_t m_plusMana; Index: skilllist.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/skilllist.cpp,v retrieving revision 1.6.16.2 retrieving revision 1.6.16.3 diff -u -d -r1.6.16.2 -r1.6.16.3 --- skilllist.cpp 7 Nov 2004 23:10:25 -0000 1.6.16.2 +++ skilllist.cpp 10 May 2005 16:20:39 -0000 1.6.16.3 @@ -74,7 +74,13 @@ return; } - /* Check if this is a valid skill */ + // Purple: Skills are uint32_now, but these special values don't seem to have + // been moved up to the top bits. Somehow, the client still knows + // the difference between a skill you don't get get and a skill that + // you do get and can train and should be shown in the list. For us, + // for now all skills show up and are skill 0 whether you can learn + // them or now. +#if 0 if (value == 255) return; @@ -85,6 +91,10 @@ str = " NA"; else str.sprintf ("%3d", value); +#endif + QString str; + + str.sprintf("%3d", value); /* If the skill is not added yet, look up the correct skill namd and add it * to the list |