Ejemplo n.º 1
0
 internal void CreatePlayerObject(bool isClient)
 {
     try {
         // at enter world
         DebugLogger.Logger.Log("I have a feeling... that this is whats causing it to not work.");
         BinWriter w = new BinWriter();
         w.Write((byte)1);
         w.Write((uint)0);
         if (isClient == false)
         {
             w.Write((byte)2);
             Console.WriteLine("DEBUG: 2");
         }
         else
         {
             w.Write((byte)3);
             Console.WriteLine("DEBUG: 3");
         }
         m_player.AddCreateObject(w, true, true);
         BinWriter pkg = new BinWriter();
         pkg.Write((int)w.BaseStream.Length);
         pkg.Write(ZLib.Compress(w.GetBuffer(), 0, (int)w.BaseStream.Length));
         Send(SMSG.COMPRESSED_UPDATE_OBJECT, pkg);
         m_player.updateTime();
     } catch (Exception exp) {
         DebugLogger.Logger.Log("", exp);
     }
 }
Ejemplo n.º 2
0
        internal void CreatePlayerObject()
        {
            try {
                // at enter world
                BinWriter w = new BinWriter();
                w.Write(0);
                w.Write((byte)0);                 //A9 Fix by Phaze
                w.Set(0, m_player.Inventory.AddCreateInventory(w, true) + 1);
                m_player.AddCreateObject(w, true, true);
                BinWriter pkg = new BinWriter();
                pkg.Write((int)w.BaseStream.Length);

                pkg.Write(ZLib.Compress(w.GetBuffer(), 0, (int)w.BaseStream.Length));
                Send(SMSG.COMPRESSED_UPDATE_OBJECT, pkg);

                m_player.updateTime();
            } catch (Exception exp) {
                DebugLogger.Log("", exp);
            }
        }