void sendPost(Character c, MessageIn msg)
{
// send message to account server with id of sending player,
// the id of receiving player, the letter receiver and contents, and attachments
Logger.Write(LogLevel.Debug, "Sending GCMSG_STORE_POST.");
MessageOut outmsg=new MessageOut(Protocol.GCMSG_STORE_POST);
outmsg.writeInt32(c.getDatabaseID());
outmsg.writeString(msg.readString()); // name of receiver
outmsg.writeString(msg.readString()); // content of letter
while(msg.getUnreadLength()>0) // attachments
{
// write the item id and amount for each attachment
outmsg.writeInt32(msg.readInt16());
outmsg.writeInt32(msg.readInt16());
}
send(outmsg);
}