~ubuntu-branches/ubuntu/saucy/manaplus/saucy-proposed

« back to all changes in this revision

Viewing changes to src/net/tmwa/charserverhandler.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi, Andrei Karas, Patrick Matthäi
  • Date: 2013-06-10 10:53:26 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130610105326-c3xqk5ebcgy3jxmb
Tags: 1.3.6.9-1
[ Andrei Karas ]
* Add new files to copyright file.

[ Patrick Matthäi ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
 
160
160
    msg.readInt16();                          // speed
161
161
    tempPlayer->setSubtype(msg.readInt16());  // class (used for race)
162
 
    const int hairStyle = msg.readInt16();
 
162
    const int hairStyle = msg.readInt8();
 
163
    msg.readInt8();  // free
163
164
    const uint16_t weapon = msg.readInt16();   // unused on server. need use?
164
165
    tempPlayer->setSprite(SPRITE_WEAPON, weapon, "", 1, true);
165
166
 
172
173
    const int hat = msg.readInt16();  // head option top
173
174
    const int topClothes = msg.readInt16();
174
175
 
175
 
    int hairColor = msg.readInt16();
 
176
    int hairColor = msg.readInt8();
176
177
    if (hairColor > 255)
177
178
        hairColor = 255;
 
179
    msg.readInt8();  // free
178
180
    tempPlayer->setSprite(SPRITE_HAIR, hairStyle * -1,
179
181
        ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
180
182
    tempPlayer->setHairColor(static_cast<unsigned char>(hairColor));
253
255
        outMsg.writeInt8(static_cast<unsigned char>(stats[i]));
254
256
 
255
257
    outMsg.writeInt8(static_cast<unsigned char>(slot));
256
 
    outMsg.writeInt16(static_cast<int16_t>(hairColor));
257
 
    outMsg.writeInt16(static_cast<int16_t>(hairstyle));
 
258
    outMsg.writeInt8(static_cast<int8_t>(hairColor));
 
259
    outMsg.writeInt8(0);  // unused
 
260
    outMsg.writeInt8(static_cast<int8_t>(hairstyle));
 
261
    outMsg.writeInt8(0);  // unused
258
262
    if (serverVersion >= 2)
259
263
        outMsg.writeInt8(race);
260
264
}