From: Hendrik B. <nh...@us...> - 2010-07-31 19:39:20
|
Update of /cvsroot/arianne/stendhal_website/scripts/pharauroa/common/net In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv27518/scripts/pharauroa/common/net Modified Files: message-factory.php Log Message: registered new messages Index: message-factory.php =================================================================== RCS file: /cvsroot/arianne/stendhal_website/scripts/pharauroa/common/net/message-factory.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** message-factory.php 29 Jul 2010 18:37:06 -0000 1.4 --- message-factory.php 31 Jul 2010 19:39:12 -0000 1.5 *************** *** 14,21 **** $data = socket_read($this->sock, $size); ! // TODO: make sure that $data contains the complete message $deserializer = new PharauroaDeserializer($data); $type = ord($data[1]); ! if ($type == PharauroaMessageType::S2C_CREATEACCOUNT_ACK) { $message = new PharauroaMessageS2CCreateAccountACK(); } else if ($type == PharauroaMessageType::S2C_CREATEACCOUNT_NACK) { --- 14,24 ---- $data = socket_read($this->sock, $size); ! // TODO: make sure that $data contains the complete message by calling it in a loop ! $deserializer = new PharauroaDeserializer($data); $type = ord($data[1]); ! if ($type == PharauroaMessageType::S2C_CONNECT_NACK) { ! $message = new PharauroaMessageS2ConnectNACK(); ! } else if ($type == PharauroaMessageType::S2C_CREATEACCOUNT_ACK) { $message = new PharauroaMessageS2CCreateAccountACK(); } else if ($type == PharauroaMessageType::S2C_CREATEACCOUNT_NACK) { *************** *** 25,28 **** --- 28,33 ---- } else if ($type == PharauroaMessageType::S2C_CREATECHARACTER_NACK) { $message = new PharauroaMessageS2CCreateCharacterNACK(); + } else if ($type == PharauroaMessageType::S2C_INVALID_MESSAGE) { + $message = new PharauroaMessageS2CInvalidMessage(); } else { // TODO |